From 2b79106551c3a1a715caa774e0f15194c58540db Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Sun, 8 Sep 2019 06:32:47 +0000 Subject: [PATCH 1/5] Add example for cloud-node-manager --- .../out-of-tree/cloud-controller-manager.yaml | 52 +++++++++++-------- examples/out-of-tree/cloud-node-manager.yaml | 45 ++++++++++++++++ examples/out-of-tree/kube-apiserver.yaml | 32 +++++++++++- .../out-of-tree/kube-controller-manager.yaml | 7 +++ examples/out-of-tree/kube-scheduler.yaml | 7 +++ 5 files changed, 120 insertions(+), 23 deletions(-) create mode 100644 examples/out-of-tree/cloud-node-manager.yaml diff --git a/examples/out-of-tree/cloud-controller-manager.yaml b/examples/out-of-tree/cloud-controller-manager.yaml index 05e1fad67f..cecf71e9c2 100644 --- a/examples/out-of-tree/cloud-controller-manager.yaml +++ b/examples/out-of-tree/cloud-controller-manager.yaml @@ -13,29 +13,37 @@ spec: image: k8s.gcr.io/hyperkube-amd64:v1.16.0-beta.1 imagePullPolicy: IfNotPresent command: ["cloud-controller-manager"] - args: - - "--allocate-node-cidrs=true" - - "--cloud-config=/etc/kubernetes/azure.json" - - "--cloud-provider=azure" - - "--cluster-cidr=10.244.0.0/16" - - "--cluster-name=k8s" - - "--configure-cloud-routes=true" # "false" for Azure CNI and "true" for other network plugins - - "--kubeconfig=/var/lib/kubelet/kubeconfig" - - "--leader-elect=true" - - "--route-reconciliation-period=10s" - - "--v=2" - - "--port=10267" + args: + - "--allocate-node-cidrs=true" + - "--cloud-config=/etc/kubernetes/azure.json" + - "--cloud-provider=azure" + - "--cluster-cidr=10.244.0.0/16" + - "--cluster-name=k8s" + - "--controllers=-cloud-node" # disable cloud-node controller + - "--configure-cloud-routes=true" # "false" for Azure CNI and "true" for other network plugins + - "--kubeconfig=/var/lib/kubelet/kubeconfig" + - "--leader-elect=true" + - "--route-reconciliation-period=10s" + - "--v=2" + - "--port=10267" + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 4 + memory: 2Gi volumeMounts: - - name: etc-kubernetes - mountPath: /etc/kubernetes - - name: etc-ssl - mountPath: /etc/ssl - readOnly: true - - name: var-lib-kubelet - mountPath: /var/lib/kubelet - - name: msi - mountPath: /var/lib/waagent/ManagedIdentity-Settings - readOnly: true + - name: etc-kubernetes + mountPath: /etc/kubernetes + - name: etc-ssl + mountPath: /etc/ssl + readOnly: true + - name: var-lib-kubelet + mountPath: /var/lib/kubelet + - name: msi + mountPath: /var/lib/waagent/ManagedIdentity-Settings + readOnly: true volumes: - name: etc-kubernetes hostPath: diff --git a/examples/out-of-tree/cloud-node-manager.yaml b/examples/out-of-tree/cloud-node-manager.yaml new file mode 100644 index 0000000000..eae224a33b --- /dev/null +++ b/examples/out-of-tree/cloud-node-manager.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: cloud-node-manager + namespace: kube-system + labels: + component: cloud-node-manager + kubernetes.io/cluster-service: "true" + addonmanager.kubernetes.io/mode: Reconcile +spec: + selector: + matchLabels: + k8s-app: cloud-node-manager + template: + metadata: + labels: + k8s-app: cloud-node-manager + spec: + priorityClassName: system-node-critical + hostNetwork: true # required to fetch correct hostname + nodeSelector: + beta.kubernetes.io/os: linux + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - key: node-role.kubernetes.io/master + operator: Equal + value: "true" + effect: NoSchedule + - operator: "Exists" + effect: NoExecute + - operator: "Exists" + effect: NoSchedule + containers: + - name: cloud-node-manager + image: + imagePullPolicy: IfNotPresent + commands: ["cloud-node-manager"] + resources: + requests: + cpu: 50m + memory: 50Mi + limits: + cpu: 2000m + memory: 512Mi \ No newline at end of file diff --git a/examples/out-of-tree/kube-apiserver.yaml b/examples/out-of-tree/kube-apiserver.yaml index b9f3d7b102..9222cbac16 100644 --- a/examples/out-of-tree/kube-apiserver.yaml +++ b/examples/out-of-tree/kube-apiserver.yaml @@ -27,9 +27,39 @@ spec: - "--client-ca-file=/etc/kubernetes/certs/ca.crt" - "--cloud-config=/etc/kubernetes/azure.json" - "--cloud-provider=azure" - - "--enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,ValidatingAdmissionWebhook,ResourceQuota,ExtendedResourceToleration,PodSecurityPolicy", "--enable-bootstrap-token-auth=true", "--etcd-cafile=/etc/kubernetes/certs/ca.crt", "--etcd-certfile=/etc/kubernetes/certs/etcdclient.crt", "--etcd-keyfile=/etc/kubernetes/certs/etcdclient.key", "--etcd-servers=https://127.0.0.1:2379", "--insecure-port=8080", "--kubelet-client-certificate=/etc/kubernetes/certs/client.crt", "--kubelet-client-key=/etc/kubernetes/certs/client.key", "--profiling=false", "--proxy-client-cert-file=/etc/kubernetes/certs/proxy.crt", "--proxy-client-key-file=/etc/kubernetes/certs/proxy.key", "--requestheader-allowed-names=", "--requestheader-client-ca-file=/etc/kubernetes/certs/proxy-ca.crt", "--requestheader-extra-headers-prefix=X-Remote-Extra-", "--requestheader-group-headers=X-Remote-Group", "--requestheader-username-headers=X-Remote-User", "--secure-port=443", "--service-account-key-file=/etc/kubernetes/certs/apiserver.key", "--service-account-lookup=true", "--service-cluster-ip-range=10.0.0.0/16", "--storage-backend=etcd3", "--tls-cert-file=/etc/kubernetes/certs/apiserver.crt", "--tls-cipher-suites=TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + - "--enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,ValidatingAdmissionWebhook,ResourceQuota,ExtendedResourceToleration,PodSecurityPolicy" + - "--enable-bootstrap-token-auth=true" + - "--etcd-cafile=/etc/kubernetes/certs/ca.crt" + - "--etcd-certfile=/etc/kubernetes/certs/etcdclient.crt" + - "--etcd-keyfile=/etc/kubernetes/certs/etcdclient.key" + - "--etcd-servers=https://127.0.0.1:2379" + - "--insecure-port=8080" + - "--kubelet-client-certificate=/etc/kubernetes/certs/client.crt" + - "--kubelet-client-key=/etc/kubernetes/certs/client.key" + - "--profiling=false" + - "--proxy-client-cert-file=/etc/kubernetes/certs/proxy.crt" + - "--proxy-client-key-file=/etc/kubernetes/certs/proxy.key" + - "--requestheader-allowed-names=" + - "--requestheader-client-ca-file=/etc/kubernetes/certs/proxy-ca.crt" + - "--requestheader-extra-headers-prefix=X-Remote-Extra-" + - "--requestheader-group-headers=X-Remote-Group" + - "--requestheader-username-headers=X-Remote-User" + - "--secure-port=443" + - "--service-account-key-file=/etc/kubernetes/certs/apiserver.key" + - "--service-account-lookup=true" + - "--service-cluster-ip-range=10.0.0.0/16" + - "--storage-backend=etcd3" + - "--tls-cert-file=/etc/kubernetes/certs/apiserver.crt" + - "--tls-cipher-suites=TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - "--tls-private-key-file=/etc/kubernetes/certs/apiserver.key" - "--v=3" + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 8 + memory: 4Gi volumeMounts: - name: etc-kubernetes mountPath: /etc/kubernetes diff --git a/examples/out-of-tree/kube-controller-manager.yaml b/examples/out-of-tree/kube-controller-manager.yaml index 9409ffdc7d..607d52ce39 100644 --- a/examples/out-of-tree/kube-controller-manager.yaml +++ b/examples/out-of-tree/kube-controller-manager.yaml @@ -32,6 +32,13 @@ spec: - "--terminated-pod-gc-threshold=5000" - "--use-service-account-credentials=true" - "--v=2" + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 4 + memory: 2Gi volumeMounts: - name: etc-kubernetes mountPath: /etc/kubernetes diff --git a/examples/out-of-tree/kube-scheduler.yaml b/examples/out-of-tree/kube-scheduler.yaml index 2555982ac3..c0d45a1b85 100644 --- a/examples/out-of-tree/kube-scheduler.yaml +++ b/examples/out-of-tree/kube-scheduler.yaml @@ -19,6 +19,13 @@ spec: mountPath: /etc/kubernetes - name: var-lib-kube-scheduler mountPath: /var/lib/kube-scheduler + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 4 + memory: 2Gi volumes: - name: etc-kubernetes hostPath: From fefef8bc47aaf199a4ec549f36ee38a84154b680 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Sun, 8 Sep 2019 06:33:15 +0000 Subject: [PATCH 2/5] Add cloud-node-manager which reconciles node's addresses --- Dockerfile.node | 22 + Makefile | 23 +- cmd/cloud-controller-manager/BUILD.bazel | 3 +- .../app/controllermanager.go | 7 +- .../controller-manager.go | 3 +- cmd/cloud-node-manager/BUILD.bazel | 20 + cmd/cloud-node-manager/app/BUILD.bazel | 26 ++ cmd/cloud-node-manager/app/config/BUILD.bazel | 18 + cmd/cloud-node-manager/app/config/config.go | 72 ++++ cmd/cloud-node-manager/app/nodemanager.go | 154 +++++++ .../app/options/BUILD.bazel | 25 ++ cmd/cloud-node-manager/app/options/options.go | 203 +++++++++ cmd/cloud-node-manager/node-manager.go | 45 ++ .../out-of-tree/cloud-controller-manager.yaml | 2 +- examples/out-of-tree/cloud-node-manager.yaml | 43 +- pkg/node/BUILD.bazel | 14 + pkg/node/node.go | 79 ++++ pkg/nodemanager/BUILD.bazel | 27 ++ pkg/nodemanager/nodemanager.go | 389 ++++++++++++++++++ pkg/version/verflag/verflag.go | 4 +- 20 files changed, 1157 insertions(+), 22 deletions(-) create mode 100644 Dockerfile.node create mode 100644 cmd/cloud-node-manager/BUILD.bazel create mode 100644 cmd/cloud-node-manager/app/BUILD.bazel create mode 100644 cmd/cloud-node-manager/app/config/BUILD.bazel create mode 100644 cmd/cloud-node-manager/app/config/config.go create mode 100644 cmd/cloud-node-manager/app/nodemanager.go create mode 100644 cmd/cloud-node-manager/app/options/BUILD.bazel create mode 100644 cmd/cloud-node-manager/app/options/options.go create mode 100644 cmd/cloud-node-manager/node-manager.go create mode 100644 pkg/node/BUILD.bazel create mode 100644 pkg/node/node.go create mode 100644 pkg/nodemanager/BUILD.bazel create mode 100644 pkg/nodemanager/nodemanager.go diff --git a/Dockerfile.node b/Dockerfile.node new file mode 100644 index 0000000000..7ff8d96d7c --- /dev/null +++ b/Dockerfile.node @@ -0,0 +1,22 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM golang:1.12.9-stretch AS build +WORKDIR /go/src/k8s.io/cloud-provider-azure +COPY . . +RUN make + +FROM buildpack-deps:stretch-curl +COPY --from=build /go/src/k8s.io/cloud-provider-azure/bin/azure-cloud-node-manager /usr/local/bin +RUN ln -s /usr/local/bin/azure-cloud-node-manager /usr/local/bin/cloud-node-manager diff --git a/Makefile b/Makefile index a9dc35ffbc..54a3b72763 100644 --- a/Makefile +++ b/Makefile @@ -37,22 +37,23 @@ CCM_E2E_ARGS ?= -ginkgo.skip=\\[Serial\\]\\[Slow\\] #The test args for Kubernetes e2e tests TEST_E2E_ARGS ?= '--ginkgo.focus=Port\sforwarding' -IMAGE_NAME=azure-cloud-controller-manager IMAGE_TAG ?= $(shell git rev-parse --short=7 HEAD) +# cloud controller manager image +IMAGE_NAME=azure-cloud-controller-manager IMAGE=$(IMAGE_REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) - -TEST_IMAGE_NAME=azure-cloud-controller-manager-test -TEST_IMAGE=$(TEST_IMAGE_NAME):$(IMAGE_TAG) - -WORKSPACE ?= $(shell pwd) -ARTIFACTS ?= $(WORKSPACE)/_artifactsx +# cloud node manager image +NODE_MANAGER_IMAGE_NAME=azure-cloud-node-manager +NODE_MANAGER_IMAGE=$(IMAGE_REGISTRY)/$(NODE_MANAGER_IMAGE_NAME):$(IMAGE_TAG) # Bazel variables BAZEL_VERSION := $(shell command -v bazel 2> /dev/null) BAZEL_ARGS ?= .PHONY: all -all: $(BIN_DIR)/azure-cloud-controller-manager +all: $(BIN_DIR)/azure-cloud-controller-manager $(BIN_DIR)/azure-cloud-node-manager + +$(BIN_DIR)/azure-cloud-node-manager: $(PKG_CONFIG) $(wildcard cmd/cloud-node-manager/*) $(wildcard cmd/cloud-node-manager/**/*) $(wildcard pkg/**/*) + go build -o $@ $(PKG_CONFIG_CONTENT) ./cmd/cloud-node-manager $(BIN_DIR)/azure-cloud-controller-manager: $(PKG_CONFIG) $(wildcard cmd/cloud-controller-manager/*) $(wildcard cmd/cloud-controller-manager/**/*) $(wildcard pkg/**/*) go build -o $@ $(PKG_CONFIG_CONTENT) ./cmd/cloud-controller-manager @@ -60,10 +61,12 @@ $(BIN_DIR)/azure-cloud-controller-manager: $(PKG_CONFIG) $(wildcard cmd/cloud-co .PHONY: image image: docker build -t $(IMAGE) . + docker build -t $(NODE_MANAGER_IMAGE) -f Dockerfile.node . .PHONY: push push: docker push $(IMAGE) + docker push $(NODE_MANAGER_IMAGE) hyperkube: ifneq ($(K8S_BRANCH), ) @@ -101,7 +104,7 @@ test-boilerplate: hack/verify-boilerplate.sh .PHONY: test-bazel -test-boilerplate: +test-bazel: hack/verify-bazel.sh .PHONY: update-prepare @@ -114,7 +117,7 @@ update: hack/update-dependencies.sh .PHONY: update-bazel -update: +update-bazel: hack/update-bazel.sh .PHONY: test-update diff --git a/cmd/cloud-controller-manager/BUILD.bazel b/cmd/cloud-controller-manager/BUILD.bazel index f8d399c113..fa5e841bbf 100644 --- a/cmd/cloud-controller-manager/BUILD.bazel +++ b/cmd/cloud-controller-manager/BUILD.bazel @@ -7,9 +7,8 @@ go_library( visibility = ["//visibility:private"], deps = [ "//cmd/cloud-controller-manager/app:go_default_library", - "//pkg/version/prometheus:go_default_library", "//vendor/k8s.io/component-base/logs:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo:go_default_library", + "//vendor/k8s.io/component-base/metrics/prometheus/clientgo:go_default_library", "//vendor/k8s.io/legacy-cloud-providers/azure:go_default_library", ], ) diff --git a/cmd/cloud-controller-manager/app/controllermanager.go b/cmd/cloud-controller-manager/app/controllermanager.go index c152319a34..5a203696df 100644 --- a/cmd/cloud-controller-manager/app/controllermanager.go +++ b/cmd/cloud-controller-manager/app/controllermanager.go @@ -63,10 +63,9 @@ func NewCloudControllerManagerCommand() *cobra.Command { cmd := &cobra.Command{ Use: "cloud-controller-manager", - Long: `The Cloud controller manager is a daemon that embeds -the cloud specific control loops shipped with Kubernetes.`, + Long: `The Cloud controller manager is a daemon that embeds the cloud specific control loops shipped with Kubernetes.`, Run: func(cmd *cobra.Command, args []string) { - verflag.PrintAndExitIfRequested() + verflag.PrintAndExitIfRequested("Cloud Provider Azure") utilflag.PrintFlags(cmd.Flags()) c, err := s.Config(KnownControllers(), ControllersDisabledByDefault.List()) @@ -140,7 +139,7 @@ func Run(c *cloudcontrollerconfig.CompletedConfig, stopCh <-chan struct{}) error } // Setup any healthz checks we will want to use. - var checks []healthz.HealthzChecker + var checks []healthz.HealthChecker var electionChecker *leaderelection.HealthzAdaptor if c.ComponentConfig.Generic.LeaderElection.LeaderElect { electionChecker = leaderelection.NewLeaderHealthzAdaptor(time.Second * 20) diff --git a/cmd/cloud-controller-manager/controller-manager.go b/cmd/cloud-controller-manager/controller-manager.go index c94748481b..7770e719ee 100644 --- a/cmd/cloud-controller-manager/controller-manager.go +++ b/cmd/cloud-controller-manager/controller-manager.go @@ -27,8 +27,7 @@ import ( "k8s.io/cloud-provider-azure/cmd/cloud-controller-manager/app" "k8s.io/component-base/logs" - _ "k8s.io/cloud-provider-azure/pkg/version/prometheus" // for version metric registration - _ "k8s.io/kubernetes/pkg/util/prometheusclientgo" // load all the prometheus client-go plugins + _ "k8s.io/component-base/metrics/prometheus/clientgo" // load all the prometheus client-go plugins _ "k8s.io/legacy-cloud-providers/azure" ) diff --git a/cmd/cloud-node-manager/BUILD.bazel b/cmd/cloud-node-manager/BUILD.bazel new file mode 100644 index 0000000000..0befa3cefc --- /dev/null +++ b/cmd/cloud-node-manager/BUILD.bazel @@ -0,0 +1,20 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["node-manager.go"], + importpath = "k8s.io/cloud-provider-azure/cmd/cloud-node-manager", + visibility = ["//visibility:private"], + deps = [ + "//cmd/cloud-node-manager/app:go_default_library", + "//vendor/k8s.io/component-base/logs:go_default_library", + "//vendor/k8s.io/component-base/metrics/prometheus/clientgo:go_default_library", + "//vendor/k8s.io/legacy-cloud-providers/azure:go_default_library", + ], +) + +go_binary( + name = "cloud-node-manager", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/cmd/cloud-node-manager/app/BUILD.bazel b/cmd/cloud-node-manager/app/BUILD.bazel new file mode 100644 index 0000000000..7a1005b29b --- /dev/null +++ b/cmd/cloud-node-manager/app/BUILD.bazel @@ -0,0 +1,26 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["nodemanager.go"], + importpath = "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app", + visibility = ["//visibility:public"], + deps = [ + "//cmd/cloud-node-manager/app/config:go_default_library", + "//cmd/cloud-node-manager/app/options:go_default_library", + "//pkg/node:go_default_library", + "//pkg/nodemanager:go_default_library", + "//pkg/version:go_default_library", + "//pkg/version/verflag:go_default_library", + "//vendor/github.com/spf13/cobra:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/term:go_default_library", + "//vendor/k8s.io/component-base/cli/flag:go_default_library", + "//vendor/k8s.io/component-base/cli/globalflag:go_default_library", + "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/kubernetes/cmd/controller-manager/app:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/util/flag:go_default_library", + ], +) diff --git a/cmd/cloud-node-manager/app/config/BUILD.bazel b/cmd/cloud-node-manager/app/config/BUILD.bazel new file mode 100644 index 0000000000..8bcbe9c3d9 --- /dev/null +++ b/cmd/cloud-node-manager/app/config/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["config.go"], + importpath = "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app/config", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server:go_default_library", + "//vendor/k8s.io/client-go/informers:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/component-base/config:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", + ], +) diff --git a/cmd/cloud-node-manager/app/config/config.go b/cmd/cloud-node-manager/app/config/config.go new file mode 100644 index 0000000000..4a9c71d75a --- /dev/null +++ b/cmd/cloud-node-manager/app/config/config.go @@ -0,0 +1,72 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package app + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiserver "k8s.io/apiserver/pkg/server" + "k8s.io/client-go/informers" + clientset "k8s.io/client-go/kubernetes" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/record" + componentbaseconfig "k8s.io/component-base/config" + "k8s.io/kubernetes/pkg/controller" +) + +// Config is the main context object for the cloud node manager. +type Config struct { + // the node name + NodeName string + + // NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status + NodeStatusUpdateFrequency metav1.Duration + + SecureServing *apiserver.SecureServingInfo + // LoopbackClientConfig is a config for a privileged loopback connection + LoopbackClientConfig *restclient.Config + + // TODO: remove deprecated insecure serving + InsecureServing *apiserver.DeprecatedInsecureServingInfo + Authentication apiserver.AuthenticationInfo + Authorization apiserver.AuthorizationInfo + + // the general kube client + Client *clientset.Clientset + + // the rest config for the master + Kubeconfig *restclient.Config + + // the event sink + EventRecorder record.EventRecorder + + // ClientBuilder will provide a client for this controller to use + ClientBuilder controller.ControllerClientBuilder + + // VersionedClient will provide a client for informers + VersionedClient clientset.Interface + + // SharedInformers gives access to informers for the controller. + SharedInformers informers.SharedInformerFactory + + // minResyncPeriod is the resync period in reflectors; will be random between + // minResyncPeriod and 2*minResyncPeriod. + MinResyncPeriod metav1.Duration + + // ClientConnection specifies the kubeconfig file and client connection + // settings for the proxy server to use when communicating with the apiserver. + ClientConnection componentbaseconfig.ClientConnectionConfiguration +} diff --git a/cmd/cloud-node-manager/app/nodemanager.go b/cmd/cloud-node-manager/app/nodemanager.go new file mode 100644 index 0000000000..02f4e2553e --- /dev/null +++ b/cmd/cloud-node-manager/app/nodemanager.go @@ -0,0 +1,154 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package app + +import ( + "context" + "fmt" + "os" + "time" + + "github.com/spf13/cobra" + + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/server/healthz" + "k8s.io/apiserver/pkg/util/term" + cloudnodeconfig "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app/config" + "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app/options" + nodeprovider "k8s.io/cloud-provider-azure/pkg/node" + "k8s.io/cloud-provider-azure/pkg/nodemanager" + "k8s.io/cloud-provider-azure/pkg/version" + "k8s.io/cloud-provider-azure/pkg/version/verflag" + cliflag "k8s.io/component-base/cli/flag" + "k8s.io/component-base/cli/globalflag" + "k8s.io/klog" + genericcontrollermanager "k8s.io/kubernetes/cmd/controller-manager/app" + utilflag "k8s.io/kubernetes/pkg/util/flag" +) + +// NewCloudNodeManagerCommand creates a *cobra.Command object with default parameters +func NewCloudNodeManagerCommand() *cobra.Command { + s, err := options.NewCloudNodeManagerOptions() + if err != nil { + klog.Fatalf("unable to initialize command options: %v", err) + } + + cmd := &cobra.Command{ + Use: "cloud-node-manager", + Long: `The Cloud node manager is a daemon that reconciles node information for its running node.`, + Run: func(cmd *cobra.Command, args []string) { + verflag.PrintAndExitIfRequested("Cloud Node Manager") + utilflag.PrintFlags(cmd.Flags()) + + c, err := s.Config() + if err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } + + if err := Run(c, wait.NeverStop); err != nil { + fmt.Fprintf(os.Stderr, "%v\n", err) + os.Exit(1) + } + + }, + } + + fs := cmd.Flags() + namedFlagSets := s.Flags() + verflag.AddFlags(namedFlagSets.FlagSet("global")) + globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name()) + for _, f := range namedFlagSets.FlagSets { + fs.AddFlagSet(f) + } + usageFmt := "Usage:\n %s\n" + cols, _, _ := term.TerminalSize(cmd.OutOrStdout()) + cmd.SetUsageFunc(func(cmd *cobra.Command) error { + fmt.Fprintf(cmd.OutOrStderr(), usageFmt, cmd.UseLine()) + cliflag.PrintSections(cmd.OutOrStderr(), namedFlagSets, cols) + return nil + }) + cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { + fmt.Fprintf(cmd.OutOrStdout(), "%s\n\n"+usageFmt, cmd.Long, cmd.UseLine()) + cliflag.PrintSections(cmd.OutOrStdout(), namedFlagSets, cols) + }) + + return cmd +} + +// Run runs the ExternalCMServer. This should never exit. +func Run(c *cloudnodeconfig.Config, stopCh <-chan struct{}) error { + // To help debugging, immediately log version + klog.Infof("Version: %+v", version.Get()) + + // Start the controller manager HTTP server + var checks []healthz.HealthChecker + if c.SecureServing != nil { + unsecuredMux := genericcontrollermanager.NewBaseHandler(nil, checks...) + handler := genericcontrollermanager.BuildHandlerChain(unsecuredMux, &c.Authorization, &c.Authentication) + // TODO: handle stoppedCh returned by c.SecureServing.Serve + if _, err := c.SecureServing.Serve(handler, 0, stopCh); err != nil { + return err + } + } + if c.InsecureServing != nil { + unsecuredMux := genericcontrollermanager.NewBaseHandler(nil, checks...) + insecureSuperuserAuthn := server.AuthenticationInfo{Authenticator: &server.InsecureSuperuser{}} + handler := genericcontrollermanager.BuildHandlerChain(unsecuredMux, nil, &insecureSuperuserAuthn) + if err := c.InsecureServing.Serve(handler, 0, stopCh); err != nil { + return err + } + } + + run := func(ctx context.Context) { + if err := startControllers(c, ctx.Done()); err != nil { + klog.Fatalf("error running controllers: %v", err) + } + } + + run(context.TODO()) + panic("unreachable") +} + +// startControllers starts the cloud specific controller loops. +func startControllers(c *cloudnodeconfig.Config, stopCh <-chan struct{}) error { + klog.V(1).Infof("Starting cloud-node-manager...") + + // Start the CloudNodeController + nodeController := nodemanager.NewCloudNodeController( + c.NodeName, + c.SharedInformers.Core().V1().Nodes(), + // cloud node controller uses existing cluster role from node-controller + c.ClientBuilder.ClientOrDie("node-controller"), + nodeprovider.NewIMDSNodeProvider(), + c.NodeStatusUpdateFrequency.Duration) + + go nodeController.Run(stopCh) + + klog.Infof("Started cloud-node-manager") + + // If apiserver is not running we should wait for some time and fail only then. This is particularly + // important when we start node manager before apiserver starts. + if err := genericcontrollermanager.WaitForAPIServer(c.VersionedClient, 10*time.Second); err != nil { + klog.Fatalf("Failed to wait for apiserver being healthy: %v", err) + } + + c.SharedInformers.Start(stopCh) + + select {} +} diff --git a/cmd/cloud-node-manager/app/options/BUILD.bazel b/cmd/cloud-node-manager/app/options/BUILD.bazel new file mode 100644 index 0000000000..6adabbe25d --- /dev/null +++ b/cmd/cloud-node-manager/app/options/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["options.go"], + importpath = "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app/options", + visibility = ["//visibility:public"], + deps = [ + "//cmd/cloud-node-manager/app/config:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/options:go_default_library", + "//vendor/k8s.io/client-go/informers:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/component-base/cli/flag:go_default_library", + "//vendor/k8s.io/component-base/config:go_default_library", + "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/api/legacyscheme:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", + ], +) diff --git a/cmd/cloud-node-manager/app/options/options.go b/cmd/cloud-node-manager/app/options/options.go new file mode 100644 index 0000000000..b6e35f659a --- /dev/null +++ b/cmd/cloud-node-manager/app/options/options.go @@ -0,0 +1,203 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "fmt" + "math/rand" + "net" + "os" + "strings" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiserveroptions "k8s.io/apiserver/pkg/server/options" + "k8s.io/client-go/informers" + clientset "k8s.io/client-go/kubernetes" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/tools/record" + cloudnodeconfig "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app/config" + cliflag "k8s.io/component-base/cli/flag" + componentbaseconfig "k8s.io/component-base/config" + "k8s.io/klog" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/controller" +) + +const ( + // cloudNodeManagerUserAgent is the userAgent name when starting cloud-node managers. + cloudNodeManagerUserAgent = "cloud-node-manager" + // defaultCloudNodeManagerPort is the default cloud-node manager port. + defaultCloudNodeManagerPort = 0 + // defaultInsecureCloudNodeManagerBindAddress is the default cloud-node manager address. + defaultInsecureCloudNodeManagerBindAddress = "127.0.0.1" + // CloudControllerManagerPort is the default port for the cloud controller manager server. + // This value may be overridden by a flag at startup. + CloudControllerManagerPort = 10263 + // defaultNodeStatusUpdateFrequencyInMinute is the default frequency at which the manager updates nodes' status. + defaultNodeStatusUpdateFrequencyInMinute = 5 +) + +// CloudNodeManagerOptions is the main context object for the controller manager. +type CloudNodeManagerOptions struct { + Master string + Kubeconfig string + NodeName string + + SecureServing *apiserveroptions.SecureServingOptionsWithLoopback + InsecureServing *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback + Authentication *apiserveroptions.DelegatingAuthenticationOptions + Authorization *apiserveroptions.DelegatingAuthorizationOptions + + // NodeStatusUpdateFrequency is the frequency at which the manager updates nodes' status + NodeStatusUpdateFrequency metav1.Duration + // minResyncPeriod is the resync period in reflectors; will be random between + // minResyncPeriod and 2*minResyncPeriod. + MinResyncPeriod metav1.Duration + // ClientConnection specifies the kubeconfig file and client connection + // settings for the proxy server to use when communicating with the apiserver. + ClientConnection componentbaseconfig.ClientConnectionConfiguration +} + +// NewCloudNodeManagerOptions creates a new CloudNodeManagerOptions with a default config. +func NewCloudNodeManagerOptions() (*CloudNodeManagerOptions, error) { + hostname, err := os.Hostname() + if err != nil { + return nil, err + } + + s := CloudNodeManagerOptions{ + NodeName: strings.ToLower(hostname), + SecureServing: apiserveroptions.NewSecureServingOptions().WithLoopback(), + InsecureServing: (&apiserveroptions.DeprecatedInsecureServingOptions{ + BindAddress: net.ParseIP(defaultInsecureCloudNodeManagerBindAddress), + BindPort: defaultCloudNodeManagerPort, + BindNetwork: "tcp", + }).WithLoopback(), + Authentication: apiserveroptions.NewDelegatingAuthenticationOptions(), + Authorization: apiserveroptions.NewDelegatingAuthorizationOptions(), + NodeStatusUpdateFrequency: metav1.Duration{ + Duration: defaultNodeStatusUpdateFrequencyInMinute * time.Minute, + }, + } + + s.Authentication.RemoteKubeConfigFileOptional = true + s.Authorization.RemoteKubeConfigFileOptional = true + s.Authorization.AlwaysAllowPaths = []string{"/healthz"} + + // Set the PairName but leave certificate directory blank to generate in-memory by default + s.SecureServing.ServerCert.CertDirectory = "" + s.SecureServing.ServerCert.PairName = "cloud-node-manager" + s.SecureServing.BindPort = defaultCloudNodeManagerPort + return &s, nil +} + +// Flags returns flags for a specific APIServer by section name +func (o *CloudNodeManagerOptions) Flags() cliflag.NamedFlagSets { + fss := cliflag.NamedFlagSets{} + o.SecureServing.AddFlags(fss.FlagSet("secure serving")) + o.InsecureServing.AddUnqualifiedFlags(fss.FlagSet("insecure serving")) + o.Authentication.AddFlags(fss.FlagSet("authentication")) + o.Authorization.AddFlags(fss.FlagSet("authorization")) + + fs := fss.FlagSet("misc") + fs.StringVar(&o.Master, "master", o.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig).") + fs.StringVar(&o.Kubeconfig, "kubeconfig", o.Kubeconfig, "Path to kubeconfig file with authorization and master location information.") + fs.DurationVar(&o.NodeStatusUpdateFrequency.Duration, "node-status-update-frequency", o.NodeStatusUpdateFrequency.Duration, "Specifies how often the controller updates nodes' status.") + fs.DurationVar(&o.MinResyncPeriod.Duration, "min-resync-period", o.MinResyncPeriod.Duration, "The resync period in reflectors will be random between MinResyncPeriod and 2*MinResyncPeriod.") + fs.StringVar(&o.ClientConnection.ContentType, "kube-api-content-type", o.ClientConnection.ContentType, "Content type of requests sent to apiserver.") + fs.Float32Var(&o.ClientConnection.QPS, "kube-api-qps", 20, "QPS to use while talking with kubernetes apiserver.") + fs.Int32Var(&o.ClientConnection.Burst, "kube-api-burst", 30, "Burst to use while talking with kubernetes apiserver.") + return fss +} + +// ApplyTo fills up cloud controller manager config with options. +func (o *CloudNodeManagerOptions) ApplyTo(c *cloudnodeconfig.Config, userAgent string) error { + var err error + if err = o.InsecureServing.ApplyTo(&c.InsecureServing, &c.LoopbackClientConfig); err != nil { + return err + } + if err = o.SecureServing.ApplyTo(&c.SecureServing, &c.LoopbackClientConfig); err != nil { + return err + } + if o.SecureServing.BindPort != 0 || o.SecureServing.Listener != nil { + if err = o.Authentication.ApplyTo(&c.Authentication, c.SecureServing, nil); err != nil { + return err + } + if err = o.Authorization.ApplyTo(&c.Authorization); err != nil { + return err + } + } + + c.Kubeconfig, err = clientcmd.BuildConfigFromFlags(o.Master, o.Kubeconfig) + if err != nil { + return err + } + c.Kubeconfig.DisableCompression = true + c.Kubeconfig.ContentConfig.ContentType = o.ClientConnection.ContentType + c.Kubeconfig.QPS = o.ClientConnection.QPS + c.Kubeconfig.Burst = int(o.ClientConnection.Burst) + + c.Client, err = clientset.NewForConfig(restclient.AddUserAgent(c.Kubeconfig, userAgent)) + if err != nil { + return err + } + + c.EventRecorder = createRecorder(c.Client, userAgent) + c.ClientBuilder = controller.SimpleControllerClientBuilder{ + ClientConfig: c.Kubeconfig, + } + c.VersionedClient = c.ClientBuilder.ClientOrDie("shared-informers") + // TODO(feiskyer): filter watch by node name whenever it's supported. + c.SharedInformers = informers.NewSharedInformerFactory(c.VersionedClient, resyncPeriod(c)()) + c.NodeStatusUpdateFrequency = o.NodeStatusUpdateFrequency + c.NodeName = o.NodeName + return nil +} + +// resyncPeriod computes the time interval a shared informer waits before resyncing with the api server +func resyncPeriod(c *cloudnodeconfig.Config) func() time.Duration { + return func() time.Duration { + factor := rand.Float64() + 1 + return time.Duration(float64(c.MinResyncPeriod.Nanoseconds()) * factor) + } +} + +// Config return a cloud controller manager config objective +func (o *CloudNodeManagerOptions) Config() (*cloudnodeconfig.Config, error) { + if err := o.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil { + return nil, fmt.Errorf("error creating self-signed certificates: %v", err) + } + + c := &cloudnodeconfig.Config{} + if err := o.ApplyTo(c, cloudNodeManagerUserAgent); err != nil { + return nil, err + } + + return c, nil +} + +func createRecorder(kubeClient clientset.Interface, userAgent string) record.EventRecorder { + eventBroadcaster := record.NewBroadcaster() + eventBroadcaster.StartLogging(klog.Infof) + eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) + // TODO: remove dependence on the legacyscheme + return eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: userAgent}) +} diff --git a/cmd/cloud-node-manager/node-manager.go b/cmd/cloud-node-manager/node-manager.go new file mode 100644 index 0000000000..20f0e28000 --- /dev/null +++ b/cmd/cloud-node-manager/node-manager.go @@ -0,0 +1,45 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// The external node manager is responsible for running node reconciler loops that +// are cloud provider dependent. It uses the API to listen to new events on resources. + +package main + +import ( + "math/rand" + "os" + "time" + + "k8s.io/cloud-provider-azure/cmd/cloud-node-manager/app" + "k8s.io/component-base/logs" + + _ "k8s.io/component-base/metrics/prometheus/clientgo" // load all the prometheus client-go plugins + _ "k8s.io/legacy-cloud-providers/azure" +) + +func main() { + rand.Seed(time.Now().UnixNano()) + + command := app.NewCloudNodeManagerCommand() + + logs.InitLogs() + defer logs.FlushLogs() + + if err := command.Execute(); err != nil { + os.Exit(1) + } +} diff --git a/examples/out-of-tree/cloud-controller-manager.yaml b/examples/out-of-tree/cloud-controller-manager.yaml index cecf71e9c2..9b03ee4630 100644 --- a/examples/out-of-tree/cloud-controller-manager.yaml +++ b/examples/out-of-tree/cloud-controller-manager.yaml @@ -19,7 +19,7 @@ spec: - "--cloud-provider=azure" - "--cluster-cidr=10.244.0.0/16" - "--cluster-name=k8s" - - "--controllers=-cloud-node" # disable cloud-node controller + - "--controllers=*,-cloud-node" # disable cloud-node controller - "--configure-cloud-routes=true" # "false" for Azure CNI and "true" for other network plugins - "--kubeconfig=/var/lib/kubelet/kubeconfig" - "--leader-elect=true" diff --git a/examples/out-of-tree/cloud-node-manager.yaml b/examples/out-of-tree/cloud-node-manager.yaml index eae224a33b..bd7396150a 100644 --- a/examples/out-of-tree/cloud-node-manager.yaml +++ b/examples/out-of-tree/cloud-node-manager.yaml @@ -1,3 +1,43 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + k8s-app: cloud-node-manager + kubernetes.io/cluster-service: "true" + addonmanager.kubernetes.io/mode: Reconcile + name: cloud-node-manager + namespace: kube-system +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: cloud-node-manager + labels: + k8s-app: cloud-node-manager + kubernetes.io/cluster-service: "true" + addonmanager.kubernetes.io/mode: Reconcile +rules: +- apiGroups: [""] + resources: ["nodes"] + verbs: ["watch","list","get","update"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cloud-node-manager + labels: + k8s-app: cloud-node-manager + kubernetes.io/cluster-service: "true" + addonmanager.kubernetes.io/mode: Reconcile +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cloud-node-manager +subjects: +- kind: ServiceAccount + name: cloud-node-manager + namespace: kube-system +--- apiVersion: apps/v1 kind: DaemonSet metadata: @@ -17,6 +57,7 @@ spec: k8s-app: cloud-node-manager spec: priorityClassName: system-node-critical + serviceAccountName: cloud-node-manager hostNetwork: true # required to fetch correct hostname nodeSelector: beta.kubernetes.io/os: linux @@ -35,7 +76,7 @@ spec: - name: cloud-node-manager image: imagePullPolicy: IfNotPresent - commands: ["cloud-node-manager"] + command: ["cloud-node-manager"] resources: requests: cpu: 50m diff --git a/pkg/node/BUILD.bazel b/pkg/node/BUILD.bazel new file mode 100644 index 0000000000..d703e6475e --- /dev/null +++ b/pkg/node/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["node.go"], + importpath = "k8s.io/cloud-provider-azure/pkg/node", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/cloud-provider:go_default_library", + "//vendor/k8s.io/legacy-cloud-providers/azure:go_default_library", + ], +) diff --git a/pkg/node/node.go b/pkg/node/node.go new file mode 100644 index 0000000000..fbfb0786f7 --- /dev/null +++ b/pkg/node/node.go @@ -0,0 +1,79 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package node + +import ( + "bytes" + "context" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + cloudprovider "k8s.io/cloud-provider" + azureprovider "k8s.io/legacy-cloud-providers/azure" + "k8s.io/klog" +) + +// IMDSNodeProvider implements nodemanager.NodeProvider. +type IMDSNodeProvider struct { + azure *azureprovider.Cloud +} + +// NewIMDSNodeProvider creates a new IMDSNodeProvider. +func NewIMDSNodeProvider() *IMDSNodeProvider { + az, err := azureprovider.NewCloud(bytes.NewBuffer([]byte(`{ + "useInstanceMetadata": true, + "vmType": "vmss" + }`))) + if err != nil { + klog.Fatalf("Failed to initilize Azure cloud provider: %v", err) + } + + return &IMDSNodeProvider{ + azure: az.(*azureprovider.Cloud), + } +} + +// NodeAddresses returns the addresses of the specified instance. +func (np *IMDSNodeProvider) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error) { + return np.azure.NodeAddresses(ctx, name) +} + +// InstanceID returns the cloud provider ID of the specified instance. +// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) +func (np *IMDSNodeProvider) InstanceID(ctx context.Context, name types.NodeName) (string, error) { + instanceID, err := np.azure.InstanceID(ctx, name) + if err != nil { + return "", err + } + + return np.azure.ProviderName() + "://" + instanceID, nil +} + +// InstanceType returns the type of the specified instance. +// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) +// (Implementer Note): This is used by kubelet. Kubelet will label the node. Real log from kubelet: +// Adding node label from cloud provider: beta.kubernetes.io/instance-type=[value] +func (np *IMDSNodeProvider) InstanceType(ctx context.Context, name types.NodeName) (string, error) { + return np.azure.InstanceType(ctx, name) +} + +// GetZone returns the Zone containing the current failure zone and locality region that the program is running in +// In most cases, this method is called from the kubelet querying a local metadata service to acquire its zone. +// If the node is not running with availability zones, then it will fall back to fault domain. +func (np *IMDSNodeProvider) GetZone(ctx context.Context) (cloudprovider.Zone, error) { + return np.azure.GetZone(ctx) +} diff --git a/pkg/nodemanager/BUILD.bazel b/pkg/nodemanager/BUILD.bazel new file mode 100644 index 0000000000..09be172278 --- /dev/null +++ b/pkg/nodemanager/BUILD.bazel @@ -0,0 +1,27 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["nodemanager.go"], + importpath = "k8s.io/cloud-provider-azure/pkg/nodemanager", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/tools/record:go_default_library", + "//vendor/k8s.io/client-go/util/retry:go_default_library", + "//vendor/k8s.io/cloud-provider:go_default_library", + "//vendor/k8s.io/klog:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/kubelet/apis:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/scheduler/api:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/util/node:go_default_library", + ], +) diff --git a/pkg/nodemanager/nodemanager.go b/pkg/nodemanager/nodemanager.go new file mode 100644 index 0000000000..4e345a12cb --- /dev/null +++ b/pkg/nodemanager/nodemanager.go @@ -0,0 +1,389 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package nodemanager + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + coreinformers "k8s.io/client-go/informers/core/v1" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/kubernetes/scheme" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/record" + clientretry "k8s.io/client-go/util/retry" + cloudprovider "k8s.io/cloud-provider" + "k8s.io/klog" + kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis" + schedulerapi "k8s.io/kubernetes/pkg/scheduler/api" + nodeutil "k8s.io/kubernetes/pkg/util/node" +) + +// UpdateNodeSpecBackoff defines the backoff for node spec updates. +var UpdateNodeSpecBackoff = wait.Backoff{ + Steps: 20, + Duration: 50 * time.Millisecond, + Jitter: 1.0, +} + +// NodeProvider defines the interfaces for node provider. +type NodeProvider interface { + // NodeAddresses returns the addresses of the specified instance. + NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error) + // InstanceID returns the cloud provider ID of the specified instance. + InstanceID(ctx context.Context, name types.NodeName) (string, error) + // InstanceType returns the type of the specified instance. + InstanceType(ctx context.Context, name types.NodeName) (string, error) + // GetZone returns the Zone containing the current failure zone and locality region that the program is running in + GetZone(ctx context.Context) (cloudprovider.Zone, error) +} + +// CloudNodeController reconciles node information. +type CloudNodeController struct { + nodeName string + nodeProvider NodeProvider + nodeInformer coreinformers.NodeInformer + kubeClient clientset.Interface + recorder record.EventRecorder + + nodeStatusUpdateFrequency time.Duration +} + +// NewCloudNodeController creates a CloudNodeController object +func NewCloudNodeController( + nodeName string, + nodeInformer coreinformers.NodeInformer, + kubeClient clientset.Interface, + nodeProvider NodeProvider, + nodeStatusUpdateFrequency time.Duration) *CloudNodeController { + + eventBroadcaster := record.NewBroadcaster() + recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloud-node-controller"}) + eventBroadcaster.StartLogging(klog.Infof) + if kubeClient != nil { + klog.V(0).Infof("Sending events to api server.") + eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) + } else { + klog.V(0).Infof("No api server defined - no events will be sent to API server.") + } + + cnc := &CloudNodeController{ + nodeName: nodeName, + nodeInformer: nodeInformer, + kubeClient: kubeClient, + recorder: recorder, + nodeProvider: nodeProvider, + nodeStatusUpdateFrequency: nodeStatusUpdateFrequency, + } + + // Use shared informer to listen to add/update of nodes. Note that any nodes + // that exist before node controller starts will show up in the update method + cnc.nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: cnc.AddCloudNode, + UpdateFunc: cnc.UpdateCloudNode, + }) + + return cnc +} + +// Run controller updates newly registered nodes with information +// from the cloud provider. This call is blocking so should be called +// via a goroutine +func (cnc *CloudNodeController) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + // The following loops run communicate with the APIServer with a worst case complexity + // of O(num_nodes) per cycle. These functions are justified here because these events fire + // very infrequently. DO NOT MODIFY this to perform frequent operations. + + // Start a loop to periodically update the node addresses obtained from the cloud + wait.Until(cnc.UpdateNodeStatus, cnc.nodeStatusUpdateFrequency, stopCh) +} + +// UpdateNodeStatus updates the node status, such as node addresses +func (cnc *CloudNodeController) UpdateNodeStatus() { + nodes, err := cnc.kubeClient.CoreV1().Nodes().List(metav1.ListOptions{ResourceVersion: "0"}) + if err != nil { + klog.Errorf("Error monitoring node status: %v", err) + return + } + + for i := range nodes.Items { + cnc.updateNodeAddress(&nodes.Items[i]) + } +} + +// UpdateNodeAddress updates the nodeAddress of a single node +func (cnc *CloudNodeController) updateNodeAddress(node *v1.Node) { + // Do not process nodes that are still tainted + cloudTaint := getCloudTaint(node.Spec.Taints) + if cloudTaint != nil { + klog.V(5).Infof("This node %s is still tainted. Will not process.", node.Name) + return + } + + // TODO(feiskyer): Node that isn't present according to the cloud provider shouldn't have its address updated + nodeAddresses, err := cnc.nodeProvider.NodeAddresses(context.TODO(), types.NodeName(node.Name)) + if err != nil { + klog.Errorf("%v", err) + return + } + + if len(nodeAddresses) == 0 { + klog.V(5).Infof("Skipping node address update for node %q since cloud provider did not return any", node.Name) + return + } + + // Check if a hostname address exists in the cloud provided addresses + hostnameExists := false + for i := range nodeAddresses { + if nodeAddresses[i].Type == v1.NodeHostName { + hostnameExists = true + } + } + // If hostname was not present in cloud provided addresses, use the hostname + // from the existing node (populated by kubelet) + if !hostnameExists { + for _, addr := range node.Status.Addresses { + if addr.Type == v1.NodeHostName { + nodeAddresses = append(nodeAddresses, addr) + } + } + } + // If nodeIP was suggested by user, ensure that + // it can be found in the cloud as well (consistent with the behaviour in kubelet) + if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok { + if nodeIP == nil { + klog.Errorf("Specified Node IP not found in cloudprovider") + return + } + } + if !nodeAddressesChangeDetected(node.Status.Addresses, nodeAddresses) { + return + } + newNode := node.DeepCopy() + newNode.Status.Addresses = nodeAddresses + _, _, err = nodeutil.PatchNodeStatus(cnc.kubeClient.CoreV1(), types.NodeName(node.Name), node, newNode) + if err != nil { + klog.Errorf("Error patching node with cloud ip addresses = [%v]", err) + } +} + +// UpdateCloudNode handles node update event. +func (cnc *CloudNodeController) UpdateCloudNode(_, newObj interface{}) { + node, ok := newObj.(*v1.Node) + if !ok { + utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", newObj)) + return + } + + // Skip other nodes other than cnc.nodeName. + if !strings.EqualFold(cnc.nodeName, node.Name) { + return + } + + cloudTaint := getCloudTaint(node.Spec.Taints) + if cloudTaint == nil { + // The node has already been initialized so nothing to do. + return + } + + cnc.initializeNode(node) +} + +// AddCloudNode handles initializing new nodes registered with the cloud taint. +func (cnc *CloudNodeController) AddCloudNode(obj interface{}) { + node := obj.(*v1.Node) + + // Skip other nodes other than cnc.nodeName. + if !strings.EqualFold(cnc.nodeName, node.Name) { + return + } + + cloudTaint := getCloudTaint(node.Spec.Taints) + if cloudTaint == nil { + klog.V(2).Infof("This node %s is registered without the cloud taint. Will not process.", node.Name) + return + } + + cnc.initializeNode(node) +} + +// This processes nodes that were added into the cluster, and cloud initialize them if appropriate +func (cnc *CloudNodeController) initializeNode(node *v1.Node) { + err := clientretry.RetryOnConflict(UpdateNodeSpecBackoff, func() error { + curNode, err := cnc.kubeClient.CoreV1().Nodes().Get(node.Name, metav1.GetOptions{}) + if err != nil { + return err + } + + cloudTaint := getCloudTaint(curNode.Spec.Taints) + if cloudTaint == nil { + // Node object received from event had the cloud taint but was outdated, + // the node has actually already been initialized. + return nil + } + + if curNode.Spec.ProviderID == "" { + providerID, err := cnc.nodeProvider.InstanceID(context.TODO(), types.NodeName(curNode.Name)) + if err == nil { + curNode.Spec.ProviderID = providerID + } else { + // we should attempt to set providerID on curNode, but + // we can continue if we fail since we will attempt to set + // node addresses given the node name in getNodeAddressesByProviderIDOrName + klog.Errorf("failed to set node provider id: %v", err) + } + } + + nodeAddresses, err := cnc.nodeProvider.NodeAddresses(context.TODO(), types.NodeName(curNode.Name)) + if err != nil { + return err + } + + // If user provided an IP address, ensure that IP address is found + // in the cloud provider before removing the taint on the node + if nodeIP, ok := ensureNodeProvidedIPExists(curNode, nodeAddresses); ok { + if nodeIP == nil { + return errors.New("failed to find kubelet node IP from cloud provider") + } + } + + if instanceType, err := cnc.nodeProvider.InstanceType(context.TODO(), types.NodeName(node.Name)); err != nil { + return err + } else if instanceType != "" { + klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceType, instanceType) + curNode.ObjectMeta.Labels[v1.LabelInstanceType] = instanceType + } + + // Set zones for the node. + zone, err := cnc.nodeProvider.GetZone(context.TODO()) + if err != nil { + return fmt.Errorf("failed to get zone from cloud provider: %v", err) + } + if zone.FailureDomain != "" { + klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneFailureDomain, zone.FailureDomain) + curNode.ObjectMeta.Labels[v1.LabelZoneFailureDomain] = zone.FailureDomain + } + if zone.Region != "" { + klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneRegion, zone.Region) + curNode.ObjectMeta.Labels[v1.LabelZoneRegion] = zone.Region + } + + curNode.Spec.Taints = excludeCloudTaint(curNode.Spec.Taints) + + _, err = cnc.kubeClient.CoreV1().Nodes().Update(curNode) + if err != nil { + return err + } + // After adding, call UpdateNodeAddress to set the CloudProvider provided IPAddresses + // So that users do not see any significant delay in IP addresses being filled into the node + cnc.updateNodeAddress(curNode) + + klog.Infof("Successfully initialized node %s with cloud provider", node.Name) + return nil + }) + if err != nil { + utilruntime.HandleError(err) + return + } +} + +func getCloudTaint(taints []v1.Taint) *v1.Taint { + for _, taint := range taints { + if taint.Key == schedulerapi.TaintExternalCloudProvider { + return &taint + } + } + return nil +} + +func excludeCloudTaint(taints []v1.Taint) []v1.Taint { + newTaints := []v1.Taint{} + for _, taint := range taints { + if taint.Key == schedulerapi.TaintExternalCloudProvider { + continue + } + newTaints = append(newTaints, taint) + } + return newTaints +} + +// ensureNodeExistsByProviderID checks if the instance exists by the provider id, +// If provider id in spec is empty it calls instanceId with node name to get provider id +func ensureNodeExistsByProviderID(instances cloudprovider.Instances, node *v1.Node) (bool, error) { + providerID := node.Spec.ProviderID + if providerID == "" { + var err error + providerID, err = instances.InstanceID(context.TODO(), types.NodeName(node.Name)) + if err != nil { + if err == cloudprovider.InstanceNotFound { + return false, nil + } + return false, err + } + + if providerID == "" { + klog.Warningf("Cannot find valid providerID for node name %q, assuming non existence", node.Name) + return false, nil + } + } + + return instances.InstanceExistsByProviderID(context.TODO(), providerID) +} + +func nodeAddressesChangeDetected(addressSet1, addressSet2 []v1.NodeAddress) bool { + if len(addressSet1) != len(addressSet2) { + return true + } + addressMap1 := map[v1.NodeAddressType]string{} + + for i := range addressSet1 { + addressMap1[addressSet1[i].Type] = addressSet1[i].Address + } + + for _, v := range addressSet2 { + if addressMap1[v.Type] != v.Address { + return true + } + } + return false +} + +func ensureNodeProvidedIPExists(node *v1.Node, nodeAddresses []v1.NodeAddress) (*v1.NodeAddress, bool) { + var nodeIP *v1.NodeAddress + nodeIPExists := false + if providedIP, ok := node.ObjectMeta.Annotations[kubeletapis.AnnotationProvidedIPAddr]; ok { + nodeIPExists = true + for i := range nodeAddresses { + if nodeAddresses[i].Address == providedIP { + nodeIP = &nodeAddresses[i] + break + } + } + } + return nodeIP, nodeIPExists +} diff --git a/pkg/version/verflag/verflag.go b/pkg/version/verflag/verflag.go index 8ebf3e4222..1b98b8ba3f 100644 --- a/pkg/version/verflag/verflag.go +++ b/pkg/version/verflag/verflag.go @@ -99,12 +99,12 @@ func AddFlags(fs *flag.FlagSet) { // PrintAndExitIfRequested will check if the -version flag was passed // and, if so, print the version and exit. -func PrintAndExitIfRequested() { +func PrintAndExitIfRequested(component string) { if *versionFlag == VersionRaw { fmt.Printf("%#v\n", version.Get()) os.Exit(0) } else if *versionFlag == VersionTrue { - fmt.Printf("Cloud Provider Azure %s\n", version.Get()) + fmt.Printf("%s %s\n", component, version.Get()) os.Exit(0) } } From 2bac70b182ee2468ed54f38106c4d4bf3f99bebb Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Mon, 9 Sep 2019 02:46:48 +0000 Subject: [PATCH 3/5] Update Kubernetes vendor to v1.16.0 beta version --- go.mod | 57 +- go.sum | 78 +- hack/update-dependencies.sh | 2 + pkg/node/BUILD.bazel | 1 + .../2019-03-01/compute/galleryapplications.go | 401 - .../compute/galleryapplicationversions.go | 428 - .../compute/BUILD.bazel | 6 +- .../compute/availabilitysets.go | 0 .../compute/client.go | 0 .../compute/containerservices.go | 0 .../compute/dedicatedhostgroups.go | 0 .../compute/dedicatedhosts.go | 0 .../compute/disks.go | 0 .../compute/galleries.go | 10 +- .../compute/galleryimages.go | 8 +- .../compute/galleryimageversions.go | 16 +- .../compute/images.go | 0 .../compute/loganalytics.go | 0 .../compute/models.go | 746 +- .../compute/operations.go | 0 .../compute/proximityplacementgroups.go | 0 .../compute/resourceskus.go | 0 .../compute/snapshots.go | 0 .../compute/usage.go | 0 .../compute/version.go | 2 +- .../compute/virtualmachineextensionimages.go | 0 .../compute/virtualmachineextensions.go | 0 .../compute/virtualmachineimages.go | 0 .../compute/virtualmachineruncommands.go | 0 .../compute/virtualmachines.go | 0 .../virtualmachinescalesetextensions.go | 0 .../virtualmachinescalesetrollingupgrades.go | 0 .../compute/virtualmachinescalesets.go | 0 .../compute/virtualmachinescalesetvms.go | 0 .../compute/virtualmachinesizes.go | 0 .../network/BUILD.bazel | 19 +- .../network/applicationgateways.go | 335 +- .../network/applicationsecuritygroups.go | 90 +- .../network/availabledelegations.go | 2 +- .../network/availableendpointservices.go | 2 +- .../network/availableprivateendpointtypes.go | 271 + .../availableresourcegroupdelegations.go | 2 +- .../network/azurefirewallfqdntags.go | 2 +- .../network/azurefirewalls.go | 91 +- .../mgmt/2019-06-01/network/bastionhosts.go | 498 + .../network/bgpservicecommunities.go | 2 +- .../network/client.go | 4 +- .../network/connectionmonitors.go | 14 +- .../2019-06-01/network/ddoscustompolicies.go | 355 + .../network/ddosprotectionplans.go | 90 +- .../network/defaultsecurityrules.go | 4 +- .../expressroutecircuitauthorizations.go | 9 +- .../network/expressroutecircuitconnections.go | 124 +- .../network/expressroutecircuitpeerings.go | 9 +- .../network/expressroutecircuits.go | 22 +- .../network/expressrouteconnections.go | 8 +- .../expressroutecrossconnectionpeerings.go | 8 +- .../network/expressroutecrossconnections.go | 18 +- .../network/expressroutegateways.go | 10 +- .../network/expressroutelinks.go | 4 +- .../network/expressrouteports.go | 16 +- .../network/expressrouteportslocations.go | 4 +- .../network/expressrouteserviceproviders.go | 2 +- .../network/hubvirtualnetworkconnections.go | 4 +- .../network/inboundnatrules.go | 9 +- .../network/interfaceipconfigurations.go | 6 +- .../network/interfaceloadbalancers.go | 2 +- .../network/interfacesgroup.go | 16 +- .../network/interfacetapconfigurations.go | 10 +- .../loadbalancerbackendaddresspools.go | 4 +- .../loadbalancerfrontendipconfigurations.go | 4 +- .../network/loadbalancerloadbalancingrules.go | 4 +- .../network/loadbalancernetworkinterfaces.go | 2 +- .../network/loadbalanceroutboundrules.go | 4 +- .../network/loadbalancerprobes.go | 4 +- .../network/loadbalancers.go | 12 +- .../network/localnetworkgateways.go | 10 +- .../network/models.go | 19460 ++++++++++------ .../mgmt/2019-06-01/network/natgateways.go | 581 + .../network/operations.go | 2 +- .../network/p2svpngateways.go | 92 +- .../network/p2svpnserverconfigurations.go | 8 +- .../network/packetcaptures.go | 12 +- .../peerexpressroutecircuitconnections.go | 241 + .../network/privateendpoints.go} | 198 +- .../2019-06-01/network/privatelinkservices.go | 1050 + .../network/profiles.go | 14 +- .../network/publicipaddresses.go | 12 +- .../network/publicipprefixes.go | 14 +- .../network/resourcenavigationlinks.go | 120 + .../network/routefilterrules.go | 10 +- .../network/routefilters.go | 12 +- .../network/routes.go | 8 +- .../network/routetables.go | 12 +- .../network/securitygroups.go | 12 +- .../network/securityrules.go | 8 +- .../network/serviceassociationlinks.go | 120 + .../network/serviceendpointpolicies.go | 12 +- .../serviceendpointpolicydefinitions.go | 8 +- .../mgmt/2019-06-01/network/servicetags.go | 116 + .../network/subnets.go | 90 +- .../network/usages.go | 2 +- .../network/version.go | 2 +- .../network/virtualhubs.go | 12 +- .../virtualnetworkgatewayconnections.go | 16 +- .../network/virtualnetworkgateways.go | 116 +- .../network/virtualnetworkpeerings.go | 8 +- .../network/virtualnetworks.go | 18 +- .../network/virtualnetworktaps.go | 12 +- .../network/virtualwans.go | 12 +- .../network/vpnconnections.go | 8 +- .../network/vpngateways.go | 89 +- .../2019-06-01/network/vpnlinkconnections.go | 158 + .../network/vpnsitelinkconnections.go | 122 + .../mgmt/2019-06-01/network/vpnsitelinks.go | 235 + .../network/vpnsites.go | 12 +- .../network/vpnsitesconfiguration.go | 9 +- .../network/watchers.go | 44 +- .../network/webapplicationfirewallpolicies.go | 517 + .../storage/BUILD.bazel | 5 +- .../storage/accounts.go | 115 +- .../storage/blobcontainers.go | 92 +- .../storage/blobservices.go | 4 +- .../storage/client.go | 2 +- .../storage/managementpolicies.go | 31 +- .../storage/models.go | 421 +- .../storage/operations.go | 2 +- .../storage/skus.go | 2 +- .../storage/usages.go | 2 +- .../storage/version.go | 2 +- vendor/github.com/blang/semver/BUILD.bazel | 15 + vendor/github.com/blang/semver/LICENSE | 22 + vendor/github.com/blang/semver/json.go | 23 + vendor/github.com/blang/semver/range.go | 416 + vendor/github.com/blang/semver/semver.go | 418 + vendor/github.com/blang/semver/sort.go | 28 + vendor/github.com/blang/semver/sql.go | 30 + .../go-grpc-prometheus/BUILD.bazel | 4 + .../go-grpc-prometheus/client.go | 79 +- .../go-grpc-prometheus/client_metrics.go | 170 + .../go-grpc-prometheus/client_reporter.go | 91 +- .../go-grpc-prometheus/metric_options.go | 41 + .../go-grpc-prometheus/server.go | 84 +- .../go-grpc-prometheus/server_metrics.go | 185 + .../go-grpc-prometheus/server_reporter.go | 137 +- .../grpc-ecosystem/go-grpc-prometheus/util.go | 23 + .../prometheus/promhttp/BUILD.bazel | 22 + .../prometheus/promhttp/delegator.go | 198 + .../prometheus/promhttp/delegator_1_8.go | 181 + .../prometheus/promhttp/delegator_pre_1_8.go | 44 + .../client_golang/prometheus/promhttp/http.go | 310 + .../prometheus/promhttp/instrument_client.go | 97 + .../promhttp/instrument_client_1_8.go | 144 + .../prometheus/promhttp/instrument_server.go | 447 + .../admissionregistration/v1/generated.proto | 8 +- .../api/admissionregistration/v1/types.go | 8 +- .../v1/types_swagger_doc_generated.go | 8 +- .../v1beta1/generated.proto | 10 +- .../admissionregistration/v1beta1/types.go | 10 +- .../v1beta1/types_swagger_doc_generated.go | 12 +- vendor/k8s.io/api/apps/v1/generated.proto | 20 +- vendor/k8s.io/api/apps/v1/types.go | 24 +- .../apps/v1/types_swagger_doc_generated.go | 20 +- .../k8s.io/api/apps/v1beta1/generated.proto | 10 +- vendor/k8s.io/api/apps/v1beta1/types.go | 14 +- .../v1beta1/types_swagger_doc_generated.go | 10 +- vendor/k8s.io/api/apps/v1beta2/types.go | 4 +- .../k8s.io/api/autoscaling/v1/generated.proto | 12 +- vendor/k8s.io/api/autoscaling/v1/types.go | 12 +- .../v1/types_swagger_doc_generated.go | 12 +- .../api/autoscaling/v2beta1/generated.proto | 6 +- .../k8s.io/api/autoscaling/v2beta1/types.go | 6 +- .../v2beta1/types_swagger_doc_generated.go | 6 +- .../api/autoscaling/v2beta2/generated.proto | 6 +- .../k8s.io/api/autoscaling/v2beta2/types.go | 6 +- .../v2beta2/types_swagger_doc_generated.go | 6 +- vendor/k8s.io/api/batch/v1/generated.proto | 8 +- vendor/k8s.io/api/batch/v1/types.go | 8 +- .../batch/v1/types_swagger_doc_generated.go | 8 +- .../k8s.io/api/batch/v1beta1/generated.proto | 16 +- vendor/k8s.io/api/batch/v1beta1/types.go | 16 +- .../v1beta1/types_swagger_doc_generated.go | 16 +- .../k8s.io/api/batch/v2alpha1/generated.proto | 16 +- vendor/k8s.io/api/batch/v2alpha1/types.go | 16 +- .../v2alpha1/types_swagger_doc_generated.go | 16 +- .../api/coordination/v1/generated.proto | 6 +- vendor/k8s.io/api/coordination/v1/types.go | 6 +- .../v1/types_swagger_doc_generated.go | 6 +- .../api/coordination/v1beta1/generated.proto | 6 +- .../k8s.io/api/coordination/v1beta1/types.go | 6 +- .../v1beta1/types_swagger_doc_generated.go | 6 +- vendor/k8s.io/api/core/v1/generated.pb.go | 2885 ++- vendor/k8s.io/api/core/v1/generated.proto | 216 +- vendor/k8s.io/api/core/v1/types.go | 230 +- .../core/v1/types_swagger_doc_generated.go | 146 +- .../k8s.io/api/core/v1/well_known_labels.go | 6 + .../api/core/v1/zz_generated.deepcopy.go | 46 +- .../k8s.io/api/discovery/v1alpha1/BUILD.bazel | 25 + vendor/k8s.io/api/discovery/v1alpha1/doc.go | 22 + .../api/discovery/v1alpha1/generated.pb.go | 1689 ++ .../api/discovery/v1alpha1/generated.proto | 148 + .../k8s.io/api/discovery/v1alpha1/register.go | 56 + vendor/k8s.io/api/discovery/v1alpha1/types.go | 144 + .../v1alpha1/types_swagger_doc_generated.go | 85 + .../discovery/v1alpha1/well_known_labels.go | 22 + .../v1alpha1/zz_generated.deepcopy.go | 195 + .../k8s.io/api/events/v1beta1/generated.proto | 2 +- vendor/k8s.io/api/events/v1beta1/types.go | 6 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../api/extensions/v1beta1/generated.proto | 1 - vendor/k8s.io/api/extensions/v1beta1/types.go | 1 - .../v1beta1/types_swagger_doc_generated.go | 2 +- .../api/networking/v1beta1/generated.proto | 8 +- vendor/k8s.io/api/networking/v1beta1/types.go | 8 +- .../v1beta1/types_swagger_doc_generated.go | 8 +- .../k8s.io/api/node/v1alpha1/generated.proto | 6 +- vendor/k8s.io/api/node/v1alpha1/types.go | 6 +- .../v1alpha1/types_swagger_doc_generated.go | 6 +- .../k8s.io/api/node/v1beta1/generated.proto | 4 +- vendor/k8s.io/api/node/v1beta1/types.go | 4 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../k8s.io/api/policy/v1beta1/generated.proto | 4 +- vendor/k8s.io/api/policy/v1beta1/types.go | 4 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../k8s.io/api/scheduling/v1/generated.proto | 4 +- vendor/k8s.io/api/scheduling/v1/types.go | 4 +- .../v1/types_swagger_doc_generated.go | 4 +- .../api/scheduling/v1alpha1/generated.proto | 4 +- .../k8s.io/api/scheduling/v1alpha1/types.go | 4 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- vendor/k8s.io/api/storage/v1/generated.proto | 8 +- vendor/k8s.io/api/storage/v1/types.go | 8 +- .../storage/v1/types_swagger_doc_generated.go | 8 +- .../api/storage/v1alpha1/generated.proto | 4 +- vendor/k8s.io/api/storage/v1alpha1/types.go | 4 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../api/storage/v1beta1/generated.pb.go | 216 +- .../api/storage/v1beta1/generated.proto | 38 +- vendor/k8s.io/api/storage/v1beta1/types.go | 63 +- .../v1beta1/types_swagger_doc_generated.go | 21 +- .../storage/v1beta1/zz_generated.deepcopy.go | 5 + .../pkg/features/kube_features.go | 16 +- .../apimachinery/pkg/api/errors/errors.go | 6 +- .../pkg/api/resource/generated.proto | 2 +- .../apimachinery/pkg/api/resource/quantity.go | 20 +- .../pkg/api/validation/objectmeta.go | 2 + .../apimachinery/pkg/apis/meta/v1/BUILD.bazel | 1 - .../pkg/apis/meta/v1/fields_proto.go | 88 - .../pkg/apis/meta/v1/generated.pb.go | 956 +- .../pkg/apis/meta/v1/generated.proto | 62 +- .../apimachinery/pkg/apis/meta/v1/helpers.go | 8 +- .../apimachinery/pkg/apis/meta/v1/types.go | 55 +- .../meta/v1/types_swagger_doc_generated.go | 43 +- .../pkg/apis/meta/v1/unstructured/helpers.go | 6 + .../pkg/apis/meta/v1/validation/validation.go | 15 + .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 42 +- .../pkg/apis/meta/v1beta1/generated.proto | 2 +- .../pkg/apis/meta/v1beta1/types.go | 2 +- .../v1beta1/types_swagger_doc_generated.go | 2 +- .../k8s.io/apimachinery/pkg/runtime/types.go | 2 +- .../apimachinery/pkg/util/clock/clock.go | 39 +- .../k8s.io/apimachinery/pkg/util/net/http.go | 20 +- .../k8s.io/apimachinery/pkg/util/net/util.go | 17 + .../pkg/util/validation/field/errors.go | 13 + .../k8s.io/apimachinery/pkg/util/wait/wait.go | 46 +- .../apiserver/pkg/admission/attributes.go | 32 +- .../k8s.io/apiserver/pkg/admission/audit.go | 20 +- .../k8s.io/apiserver/pkg/admission/chain.go | 10 +- .../apiserver/pkg/admission/interfaces.go | 21 +- .../pkg/admission/metrics/BUILD.bazel | 3 +- .../pkg/admission/metrics/metrics.go | 95 +- .../plugin/namespace/lifecycle/admission.go | 5 +- .../pkg/admission/plugin/webhook/BUILD.bazel | 3 + .../pkg/admission/plugin/webhook/accessors.go | 164 +- .../plugin/webhook/generic/webhook.go | 5 +- .../plugin/webhook/mutating/BUILD.bazel | 2 +- .../plugin/webhook/mutating/dispatcher.go | 187 +- .../plugin/webhook/mutating/plugin.go | 5 +- .../plugin/webhook/namespace/matcher.go | 3 +- .../plugin/webhook/object/BUILD.bazel | 1 - .../plugin/webhook/object/matcher.go | 4 +- .../admission/plugin/webhook/util/BUILD.bazel | 13 - .../plugin/webhook/util/client_config.go | 58 - .../plugin/webhook/validating/BUILD.bazel | 1 - .../plugin/webhook/validating/dispatcher.go | 59 +- .../plugin/webhook/validating/plugin.go | 5 +- .../apiserver/pkg/admission/reinvocation.go | 12 +- vendor/k8s.io/apiserver/pkg/audit/BUILD.bazel | 3 +- vendor/k8s.io/apiserver/pkg/audit/metrics.go | 51 +- vendor/k8s.io/apiserver/pkg/audit/request.go | 10 - .../authentication/request/x509/BUILD.bazel | 3 +- .../pkg/authentication/request/x509/x509.go | 19 +- .../pkg/endpoints/filters/BUILD.bazel | 4 +- .../pkg/endpoints/filters/authentication.go | 45 +- .../pkg/endpoints/filters/cachecontrol.go | 33 + .../pkg/endpoints/handlers/create.go | 34 +- .../pkg/endpoints/handlers/delete.go | 7 +- .../handlers/fieldmanager/fieldmanager.go | 83 +- .../handlers/fieldmanager/internal/fields.go | 6 +- .../fieldmanager/internal/gvkparser.go | 4 +- .../fieldmanager/internal/managedfields.go | 66 +- .../fieldmanager/internal/typeconverter.go | 4 +- .../apiserver/pkg/endpoints/handlers/patch.go | 9 +- .../apiserver/pkg/endpoints/handlers/rest.go | 4 +- .../pkg/endpoints/handlers/update.go | 11 +- .../apiserver/pkg/endpoints/handlers/watch.go | 1 + .../pkg/endpoints/metrics/BUILD.bazel | 2 + .../pkg/endpoints/metrics/metrics.go | 159 +- .../apiserver/pkg/features/kube_features.go | 5 +- .../pkg/registry/generic/registry/dryrun.go | 2 +- .../pkg/registry/generic/registry/store.go | 8 +- .../apiserver/pkg/registry/rest/create.go | 16 +- .../apiserver/pkg/registry/rest/delete.go | 6 +- .../apiserver/pkg/registry/rest/rest.go | 8 +- .../apiserver/pkg/registry/rest/update.go | 6 +- .../k8s.io/apiserver/pkg/server/BUILD.bazel | 4 +- vendor/k8s.io/apiserver/pkg/server/config.go | 45 +- .../pkg/server/egressselector/BUILD.bazel | 7 +- .../{ => egressselector}/egress_selector.go | 13 +- .../apiserver/pkg/server/genericapiserver.go | 43 +- vendor/k8s.io/apiserver/pkg/server/healthz.go | 115 +- .../apiserver/pkg/server/healthz/healthz.go | 36 +- vendor/k8s.io/apiserver/pkg/server/hooks.go | 7 +- .../pkg/server/options/egress_selector.go | 2 +- .../server/options/encryptionconfig/config.go | 6 +- .../pkg/server/options/server_run_options.go | 14 +- .../apiserver/pkg/server/routes/BUILD.bazel | 2 +- .../apiserver/pkg/server/routes/metrics.go | 7 +- .../apiserver/pkg/server/secure_serving.go | 13 +- .../apiserver/pkg/storage/cacher/BUILD.bazel | 3 +- .../apiserver/pkg/storage/cacher/cacher.go | 26 +- .../pkg/storage/etcd3/metrics/BUILD.bazel | 5 +- .../pkg/storage/etcd3/metrics/metrics.go | 44 +- .../apiserver/pkg/storage/etcd3/store.go | 17 +- .../apiserver/pkg/storage/interfaces.go | 4 +- .../pkg/storage/storagebackend/BUILD.bazel | 1 + .../pkg/storage/storagebackend/config.go | 3 + .../storagebackend/factory/BUILD.bazel | 3 + .../storage/storagebackend/factory/etcd3.go | 45 +- .../apiserver/pkg/storage/value/BUILD.bazel | 2 + .../apiserver/pkg/storage/value/metrics.go | 130 +- .../pkg/storage/value/transformer.go | 17 +- .../pkg/util/webhook/authentication.go | 61 +- .../apiserver/pkg/util/webhook/client.go | 29 +- .../apiserver/pkg/util/webhook/error.go | 15 +- vendor/k8s.io/client-go/informers/BUILD.bazel | 2 + .../client-go/informers/discovery/BUILD.bazel | 13 + .../informers/discovery/interface.go | 46 + .../informers/discovery/v1alpha1/BUILD.bazel | 22 + .../discovery/v1alpha1/endpointslice.go | 89 + .../informers/discovery/v1alpha1/interface.go | 45 + vendor/k8s.io/client-go/informers/factory.go | 6 + vendor/k8s.io/client-go/informers/generic.go | 5 + .../k8s.io/client-go/kubernetes/BUILD.bazel | 1 + .../k8s.io/client-go/kubernetes/clientset.go | 14 + .../client-go/kubernetes/scheme/BUILD.bazel | 1 + .../client-go/kubernetes/scheme/register.go | 2 + .../typed/discovery/v1alpha1/BUILD.bazel | 22 + .../discovery/v1alpha1/discovery_client.go | 89 + .../typed/discovery/v1alpha1/doc.go | 20 + .../typed/discovery/v1alpha1/endpointslice.go | 174 + .../discovery/v1alpha1/generated_expansion.go | 21 + .../listers/discovery/v1alpha1/BUILD.bazel | 18 + .../discovery/v1alpha1/endpointslice.go | 94 + .../discovery/v1alpha1/expansion_generated.go | 27 + vendor/k8s.io/client-go/rest/config.go | 9 + vendor/k8s.io/client-go/rest/transport.go | 1 + .../client-go/rest/zz_generated.deepcopy.go | 5 + .../k8s.io/client-go/tools/cache/BUILD.bazel | 1 + .../client-go/tools/cache/controller.go | 2 + .../k8s.io/client-go/tools/cache/reflector.go | 14 +- .../client-go/tools/cache/shared_informer.go | 16 + .../client-go/tools/clientcmd/validation.go | 9 +- vendor/k8s.io/client-go/transport/cache.go | 3 + vendor/k8s.io/client-go/transport/config.go | 6 + .../client-go/transport/round_trippers.go | 40 +- .../client-go/transport/token_source.go | 9 + .../k8s.io/client-go/transport/transport.go | 20 +- .../k8s.io/component-base/metrics/BUILD.bazel | 30 + .../k8s.io/component-base/metrics/counter.go | 165 + vendor/k8s.io/component-base/metrics/gauge.go | 164 + .../component-base/metrics/histogram.go | 159 + .../metrics/legacyregistry/BUILD.bazel | 14 + .../metrics/legacyregistry/registry.go | 85 + .../k8s.io/component-base/metrics/metric.go | 206 + vendor/k8s.io/component-base/metrics/opts.go | 211 + .../metrics/processstarttime.go | 64 + .../metrics/prometheus/clientgo/BUILD.bazel | 14 + .../clientgo/leaderelection/BUILD.bazel | 14 + .../clientgo/leaderelection/metrics.go} | 24 +- .../metrics/prometheus/clientgo/metrics.go} | 11 +- .../metrics/prometheus/restclient/BUILD.bazel | 15 + .../metrics/prometheus/restclient/metrics.go} | 34 +- .../metrics/prometheus/workqueue/BUILD.bazel | 15 + .../metrics/prometheus/workqueue/metrics.go} | 146 +- .../k8s.io/component-base/metrics/registry.go | 161 + .../k8s.io/component-base/metrics/summary.go | 166 + .../k8s.io/component-base/metrics/version.go | 37 + .../component-base/metrics/version_parser.go | 48 + .../k8s.io/component-base/metrics/wrappers.go | 81 + .../k8s.io/component-base/version/BUILD.bazel | 13 + vendor/k8s.io/component-base/version/base.go | 63 + .../k8s.io/component-base/version/version.go | 42 + .../config/v1alpha1/types.go | 19 + .../config/v1alpha1/zz_generated.deepcopy.go | 17 + .../kube-openapi/pkg/builder/openapi.go | 9 +- .../k8s.io/kube-openapi/pkg/common/common.go | 18 + .../k8s.io/kube-openapi/pkg/schemaconv/smd.go | 70 +- .../cmd/controller-manager/app/BUILD.bazel | 2 +- .../cmd/controller-manager/app/serve.go | 7 +- .../kubernetes/pkg/apis/apps/register.go | 4 +- .../k8s.io/kubernetes/pkg/apis/apps/types.go | 29 +- .../kubernetes/pkg/apis/autoscaling/types.go | 12 +- .../k8s.io/kubernetes/pkg/apis/core/types.go | 97 +- .../kubernetes/pkg/apis/core/v1/BUILD.bazel | 3 + .../kubernetes/pkg/apis/core/v1/defaults.go | 43 +- .../apis/core/v1/zz_generated.conversion.go | 48 + .../pkg/apis/core/v1/zz_generated.defaults.go | 60 + .../pkg/apis/core/validation/validation.go | 44 +- .../pkg/apis/core/zz_generated.deepcopy.go | 46 +- .../kubernetes/pkg/apis/scheduling/types.go | 4 +- .../pkg/client/metrics/prometheus/BUILD.bazel | 13 - .../kubernetes/pkg/controller/BUILD.bazel | 1 - .../pkg/controller/apis/config/BUILD.bazel | 1 + .../pkg/controller/apis/config/types.go | 4 + .../apis/config/v1alpha1/BUILD.bazel | 1 + .../apis/config/v1alpha1/defaults.go | 3 + .../controller/apis/config/v1alpha1/doc.go | 1 + .../v1alpha1/zz_generated.conversion.go | 7 + .../apis/config/zz_generated.deepcopy.go | 1 + .../pkg/controller/controller_utils.go | 16 - .../endpointslice/config/BUILD.bazel | 13 + .../controller/endpointslice/config/doc.go | 19 + .../controller/endpointslice/config/types.go | 31 + .../endpointslice/config/v1alpha1/BUILD.bazel | 23 + .../config/v1alpha1/conversion.go | 40 + .../endpointslice/config/v1alpha1/defaults.go | 41 + .../endpointslice/config/v1alpha1/doc.go | 21 + .../endpointslice/config/v1alpha1/register.go | 34 + .../v1alpha1/zz_generated.conversion.go | 103 + .../config/v1alpha1/zz_generated.deepcopy.go | 21 + .../config/zz_generated.deepcopy.go | 37 + .../pkg/controller/nodeipam/config/types.go | 2 + .../v1alpha1/zz_generated.conversion.go | 2 + .../pkg/controller/route/BUILD.bazel | 1 - .../pkg/controller/route/route_controller.go | 3 +- .../pkg/controller/service/BUILD.bazel | 3 - .../controller/service/service_controller.go | 83 +- .../kubernetes/pkg/features/kube_features.go | 67 +- .../pkg/kubelet/types/pod_update.go | 8 +- .../kubernetes/pkg/kubelet/util/format/pod.go | 2 +- .../kubernetes/pkg/scheduler/api/types.go | 13 +- .../scheduler/api/zz_generated.deepcopy.go | 21 + .../kubernetes/pkg/serviceaccount/jwt.go | 148 +- .../kubernetes/pkg/util/metrics/BUILD.bazel | 3 +- .../kubernetes/pkg/util/metrics/util.go | 17 +- .../pkg/util/prometheusclientgo/BUILD.bazel | 14 - .../leaderelection/BUILD.bazel | 13 - .../kubernetes/pkg/util/slice/BUILD.bazel | 10 - .../k8s.io/kubernetes/pkg/util/slice/slice.go | 91 - .../pkg/util/workqueue/prometheus/BUILD.bazel | 13 - .../legacy-cloud-providers/azure/BUILD.bazel | 10 +- .../legacy-cloud-providers/azure/azure.go | 4 +- .../azure/azure_backoff.go | 50 +- .../azure/azure_blobDiskController.go | 4 +- .../azure/azure_cache.go | 2 + .../azure/azure_client.go | 38 +- .../azure/azure_config.go | 2 + .../azure/azure_controller_common.go | 41 +- .../azure/azure_controller_standard.go | 10 +- .../azure/azure_controller_vmss.go | 10 +- .../azure/azure_fakes.go | 8 +- .../azure/azure_file.go | 2 + .../azure/azure_instance_metadata.go | 10 +- .../azure/azure_instances.go | 13 +- .../azure/azure_loadbalancer.go | 46 +- .../azure/azure_managedDiskController.go | 6 +- .../azure/azure_metrics.go | 31 +- .../azure/azure_routes.go | 10 +- .../azure/azure_standard.go | 77 +- .../azure/azure_storage.go | 4 +- .../azure/azure_storageaccount.go | 4 +- .../azure/azure_vmsets.go | 6 +- .../azure/azure_vmss.go | 352 +- .../azure/azure_vmss_cache.go | 2 + .../azure/azure_wrap.go | 6 +- .../azure/azure_zones.go | 12 +- .../legacy-cloud-providers/azure/doc.go | 17 + 488 files changed, 32842 insertions(+), 13877 deletions(-) delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplications.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/BUILD.bazel (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/availabilitysets.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/client.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/containerservices.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/dedicatedhostgroups.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/dedicatedhosts.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/disks.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/galleries.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/galleryimages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/galleryimageversions.go (96%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/images.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/loganalytics.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/models.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/operations.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/proximityplacementgroups.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/resourceskus.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/snapshots.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/usage.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/version.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachineextensionimages.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachineextensions.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachineimages.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachineruncommands.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachines.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachinescalesetextensions.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachinescalesetrollingupgrades.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachinescalesets.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachinescalesetvms.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/{2019-03-01 => 2019-07-01}/compute/virtualmachinesizes.go (100%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/BUILD.bazel (84%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/applicationgateways.go (78%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/applicationsecuritygroups.go (84%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/availabledelegations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/availableendpointservices.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/availableresourcegroupdelegations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/azurefirewallfqdntags.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/azurefirewalls.go (84%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/bgpservicecommunities.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/client.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/connectionmonitors.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/ddosprotectionplans.go (85%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/defaultsecurityrules.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecircuitauthorizations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecircuitconnections.go (70%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecircuitpeerings.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecircuits.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressrouteconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecrossconnectionpeerings.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutecrossconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutegateways.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressroutelinks.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressrouteports.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressrouteportslocations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/expressrouteserviceproviders.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/hubvirtualnetworkconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/inboundnatrules.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/interfaceipconfigurations.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/interfaceloadbalancers.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/interfacesgroup.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/interfacetapconfigurations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancerbackendaddresspools.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancerfrontendipconfigurations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancerloadbalancingrules.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancernetworkinterfaces.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalanceroutboundrules.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancerprobes.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/loadbalancers.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/localnetworkgateways.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/models.go (83%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/p2svpngateways.go (88%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/p2svpnserverconfigurations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/packetcaptures.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01/network/interfaceendpoints.go => 2019-06-01/network/privateendpoints.go} (51%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/profiles.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/publicipaddresses.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/publicipprefixes.go (98%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/routefilterrules.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/routefilters.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/routes.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/routetables.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/securitygroups.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/securityrules.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/serviceendpointpolicies.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/serviceendpointpolicydefinitions.go (99%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/subnets.go (80%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/usages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/version.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualhubs.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualnetworkgatewayconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualnetworkgateways.go (94%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualnetworkpeerings.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualnetworks.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualnetworktaps.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/virtualwans.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/vpnconnections.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/vpngateways.go (87%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/vpnsites.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/vpnsitesconfiguration.go (92%) rename vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/{2018-08-01 => 2019-06-01}/network/watchers.go (98%) create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/BUILD.bazel (85%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/accounts.go (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/blobcontainers.go (95%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/blobservices.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/client.go (98%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/managementpolicies.go (91%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/models.go (87%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/operations.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/skus.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/usages.go (99%) rename vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/{2018-07-01 => 2019-04-01}/storage/version.go (94%) create mode 100644 vendor/github.com/blang/semver/BUILD.bazel create mode 100644 vendor/github.com/blang/semver/LICENSE create mode 100644 vendor/github.com/blang/semver/json.go create mode 100644 vendor/github.com/blang/semver/range.go create mode 100644 vendor/github.com/blang/semver/semver.go create mode 100644 vendor/github.com/blang/semver/sort.go create mode 100644 vendor/github.com/blang/semver/sql.go create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.go create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.go create mode 100644 vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/BUILD.bazel create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/doc.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/generated.proto create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/register.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/types.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/well_known_labels.go create mode 100644 vendor/k8s.io/api/discovery/v1alpha1/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fields_proto.go delete mode 100644 vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/BUILD.bazel delete mode 100644 vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/client_config.go create mode 100644 vendor/k8s.io/apiserver/pkg/endpoints/filters/cachecontrol.go rename vendor/k8s.io/apiserver/pkg/server/{ => egressselector}/egress_selector.go (91%) create mode 100644 vendor/k8s.io/client-go/informers/discovery/BUILD.bazel create mode 100644 vendor/k8s.io/client-go/informers/discovery/interface.go create mode 100644 vendor/k8s.io/client-go/informers/discovery/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go create mode 100644 vendor/k8s.io/client-go/informers/discovery/v1alpha1/interface.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/discovery_client.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/doc.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go create mode 100644 vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/generated_expansion.go create mode 100644 vendor/k8s.io/client-go/listers/discovery/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go create mode 100644 vendor/k8s.io/client-go/listers/discovery/v1alpha1/expansion_generated.go create mode 100644 vendor/k8s.io/component-base/metrics/BUILD.bazel create mode 100644 vendor/k8s.io/component-base/metrics/counter.go create mode 100644 vendor/k8s.io/component-base/metrics/gauge.go create mode 100644 vendor/k8s.io/component-base/metrics/histogram.go create mode 100644 vendor/k8s.io/component-base/metrics/legacyregistry/BUILD.bazel create mode 100644 vendor/k8s.io/component-base/metrics/legacyregistry/registry.go create mode 100644 vendor/k8s.io/component-base/metrics/metric.go create mode 100644 vendor/k8s.io/component-base/metrics/opts.go create mode 100644 vendor/k8s.io/component-base/metrics/processstarttime.go create mode 100644 vendor/k8s.io/component-base/metrics/prometheus/clientgo/BUILD.bazel create mode 100644 vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/BUILD.bazel rename vendor/k8s.io/{kubernetes/pkg/util/prometheusclientgo/leaderelection/adapter.go => component-base/metrics/prometheus/clientgo/leaderelection/metrics.go} (63%) rename vendor/k8s.io/{kubernetes/pkg/util/prometheusclientgo/adapters.go => component-base/metrics/prometheus/clientgo/metrics.go} (56%) create mode 100644 vendor/k8s.io/component-base/metrics/prometheus/restclient/BUILD.bazel rename vendor/k8s.io/{kubernetes/pkg/client/metrics/prometheus/prometheus.go => component-base/metrics/prometheus/restclient/metrics.go} (77%) create mode 100644 vendor/k8s.io/component-base/metrics/prometheus/workqueue/BUILD.bazel rename vendor/k8s.io/{kubernetes/pkg/util/workqueue/prometheus/prometheus.go => component-base/metrics/prometheus/workqueue/metrics.go} (51%) create mode 100644 vendor/k8s.io/component-base/metrics/registry.go create mode 100644 vendor/k8s.io/component-base/metrics/summary.go create mode 100644 vendor/k8s.io/component-base/metrics/version.go create mode 100644 vendor/k8s.io/component-base/metrics/version_parser.go create mode 100644 vendor/k8s.io/component-base/metrics/wrappers.go create mode 100644 vendor/k8s.io/component-base/version/BUILD.bazel create mode 100644 vendor/k8s.io/component-base/version/base.go create mode 100644 vendor/k8s.io/component-base/version/version.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/BUILD.bazel create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/BUILD.bazel create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/doc.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/types.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/BUILD.bazel create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/conversion.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/defaults.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/doc.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/register.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.conversion.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/zz_generated.deepcopy.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/BUILD.bazel delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/BUILD.bazel delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/slice/BUILD.bazel delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/slice/slice.go delete mode 100644 vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/BUILD.bazel create mode 100644 vendor/k8s.io/legacy-cloud-providers/azure/doc.go diff --git a/go.mod b/go.mod index 650cff7690..99f7b052b9 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/Azure/go-autorest/autorest v0.9.0 github.com/Azure/go-autorest/autorest/adal v0.5.0 github.com/Azure/go-autorest/autorest/to v0.2.0 + github.com/google/btree v0.0.0-00010101000000-000000000000 // indirect github.com/gotestyourself/gotestyourself v0.0.0-00010101000000-000000000000 // indirect github.com/inconshreveable/mousetrap v0.0.0-00010101000000-000000000000 // indirect github.com/natefinch/lumberjack v0.0.0-00010101000000-000000000000 // indirect @@ -14,7 +15,7 @@ require ( github.com/onsi/gomega v1.5.0 github.com/philhofer/fwd v0.0.0-00010101000000-000000000000 // indirect github.com/prometheus/client_golang v0.9.2 - github.com/spf13/cobra v0.0.4 + github.com/spf13/cobra v0.0.5 github.com/spf13/pflag v1.0.3 github.com/stretchr/testify v1.3.0 github.com/tinylib/msgp v0.0.0-00010101000000-000000000000 // indirect @@ -38,7 +39,6 @@ replace ( cloud.google.com/go => cloud.google.com/go v0.34.0 github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v32.5.0+incompatible github.com/Azure/go-ansiterm => github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 - github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.0.0+incompatible github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.9.0 github.com/Azure/go-autorest/autorest/adal => github.com/Azure/go-autorest/autorest/adal v0.5.0 github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.1.0 @@ -88,6 +88,7 @@ replace ( github.com/containerd/containerd => github.com/containerd/containerd v1.0.2 github.com/containerd/typeurl => github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20 github.com/containernetworking/cni => github.com/containernetworking/cni v0.6.0 + github.com/coredns/corefile-migration => github.com/coredns/corefile-migration v1.0.2 github.com/coreos/bbolt => github.com/coreos/bbolt v1.3.1-coreos.6 github.com/coreos/etcd => github.com/coreos/etcd v3.3.10+incompatible github.com/coreos/go-oidc => github.com/coreos/go-oidc v0.0.0-20180117170138-065b426bd416 @@ -164,8 +165,8 @@ replace ( github.com/gotestyourself/gotestyourself => github.com/gotestyourself/gotestyourself v2.2.0+incompatible github.com/gregjones/httpcache => github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7 github.com/grpc-ecosystem/go-grpc-middleware => github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79 - github.com/grpc-ecosystem/go-grpc-prometheus => github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611 - github.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.6.2 + github.com/grpc-ecosystem/go-grpc-prometheus => github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/grpc-ecosystem/grpc-gateway => github.com/grpc-ecosystem/grpc-gateway v1.3.0 github.com/hashicorp/go-syslog => github.com/hashicorp/go-syslog v1.0.0 github.com/hashicorp/golang-lru => github.com/hashicorp/golang-lru v0.5.0 github.com/hashicorp/hcl => github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1 @@ -329,34 +330,34 @@ replace ( gotest.tools => gotest.tools v2.2.0+incompatible gotest.tools/gotestsum => gotest.tools/gotestsum v0.3.5 honnef.co/go/tools => honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099 - k8s.io/api => k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190815230911-4e7fd98763aa - k8s.io/apiextensions-apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190815230911-4e7fd98763aa - k8s.io/apimachinery => k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190815230911-4e7fd98763aa - k8s.io/apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190815230911-4e7fd98763aa - k8s.io/cli-runtime => k8s.io/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20190815230911-4e7fd98763aa - k8s.io/client-go => k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190815230911-4e7fd98763aa - k8s.io/cloud-provider => k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190815230911-4e7fd98763aa - k8s.io/cluster-bootstrap => k8s.io/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20190815230911-4e7fd98763aa - k8s.io/code-generator => k8s.io/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20190815230911-4e7fd98763aa - k8s.io/component-base => k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190815230911-4e7fd98763aa - k8s.io/cri-api => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20190815230911-4e7fd98763aa - k8s.io/csi-translation-lib => k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20190815230911-4e7fd98763aa + k8s.io/api => k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/apiextensions-apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/apimachinery => k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/cli-runtime => k8s.io/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/client-go => k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/cloud-provider => k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/cluster-bootstrap => k8s.io/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/code-generator => k8s.io/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/component-base => k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/cri-api => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/csi-translation-lib => k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20190908184117-1cdd0848eee1 k8s.io/gengo => k8s.io/gengo v0.0.0-20190813173942-955ffa8fcfc9 k8s.io/heapster => k8s.io/heapster v1.2.0-beta.1 k8s.io/klog => k8s.io/klog v0.4.0 - k8s.io/kube-aggregator => k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kube-controller-manager => k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058 - k8s.io/kube-proxy => k8s.io/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kube-scheduler => k8s.io/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kubectl => k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kubelet => k8s.io/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20190815230911-4e7fd98763aa - k8s.io/kubernetes => k8s.io/kubernetes v0.0.0-20190815230911-4e7fd98763aa - k8s.io/legacy-cloud-providers => k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190815230911-4e7fd98763aa - k8s.io/metrics => k8s.io/kubernetes/staging/src/k8s.io/metrics v0.0.0-20190815230911-4e7fd98763aa - k8s.io/node-api => k8s.io/kubernetes/staging/src/k8s.io/node-api v0.0.0-20190815230911-4e7fd98763aa + k8s.io/kube-aggregator => k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kube-controller-manager => k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf + k8s.io/kube-proxy => k8s.io/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kube-scheduler => k8s.io/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kubectl => k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kubelet => k8s.io/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/kubernetes => k8s.io/kubernetes v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/legacy-cloud-providers => k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/metrics => k8s.io/kubernetes/staging/src/k8s.io/metrics v0.0.0-20190908184117-1cdd0848eee1 + k8s.io/node-api => k8s.io/kubernetes/staging/src/k8s.io/node-api v0.0.0-20190908184117-1cdd0848eee1 k8s.io/repo-infra => k8s.io/repo-infra v0.0.0-20190329054012-df02ded38f95 - k8s.io/sample-apiserver => k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20190815230911-4e7fd98763aa + k8s.io/sample-apiserver => k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20190908184117-1cdd0848eee1 k8s.io/utils => k8s.io/utils v0.0.0-20190801114015-581e00157fb1 modernc.org/cc => modernc.org/cc v1.0.0 modernc.org/golex => modernc.org/golex v1.0.0 diff --git a/go.sum b/go.sum index 2ec6272ee8..3e21e796c1 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,7 @@ github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5J github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= +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/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/caddyserver/caddy v1.0.1/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= @@ -66,6 +67,7 @@ github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containernetworking/cni v0.6.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= github.com/coreos/bbolt v1.3.1-coreos.6 h1:uTXKg9gY70s9jMAKdfljFQcuh4e/BXOM+V+d00KFj3A= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= @@ -169,10 +171,10 @@ github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79 h1:lR9ssWAqp9qL0bALxqEEkuudiP1eweOdv9jsRK3e7lE= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611 h1:f5vL2EW5pL274ztMNnizZAEa457nKyKPEaN/sm/kdBk= -github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.6.2 h1:8KyC64BiO8ndiGHY5DlFWWdangUPC9QHPakFRre/Ud0= -github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.3.0 h1:HJtP6RRwj2EpPCD/mhAWzSvLL/dFTdPm1UrWwanoFos= +github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -388,40 +390,40 @@ k8s.io/gengo v0.0.0-20190813173942-955ffa8fcfc9/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= k8s.io/klog v0.4.0 h1:lCJCxf/LIowc2IGS9TPjWDyXY4nOmdGdfcwwDQCOURQ= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058 h1:di3XCwddOR9cWBNpfgXaskhh6cgJuwcK54rvtwUaC10= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kubernetes v0.0.0-20190815230911-4e7fd98763aa h1:haLBop69DZvSy8w/7ZUXfp0uAb/yx8XbG4S7NsA/DUU= -k8s.io/kubernetes v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:4S6WbfkxPC31ymJEWhO+YuHPfVvcMaxl6xAcUIPGj7M= -k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190815230911-4e7fd98763aa h1:xxGZBTVy4r1oaBNoUYlnuRZglmRgGn0Q9NDgC0x1OD8= -k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:qaquZ/4GvNdPMfIXVIpTIqZkwbyHD+YxJzJM1Vp6IeQ= -k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190815230911-4e7fd98763aa h1:Xl3u8WGmI+7kdovGOmTAneDSdzBUN56twrXN4mrX4u4= -k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:hSTOgaWwsHuFzOgKZ69lHWjxrr/LU7ztilRyPsYadWg= -k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190815230911-4e7fd98763aa h1:L9VpsjKkMb2gU8BlMaN9aPNZ2htA1WkSFUb+SEbNws0= -k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:Eg434LgQobNUgiWKptWMcbkZjqZcYr8P1VkIyJE22vc= -k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190815230911-4e7fd98763aa h1:uigYU8yrb3sA0kxbPLUfWmiyjy0o7DBXbw2XuHp0Exo= -k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:1zN12jAelNZN6SJsdgZl/o0Rkqg3putvIWA7UvE/zM8= -k8s.io/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:sjbIZYpSOIyOgJXagdqERZ9nBTfkxaeNxFmXX6ov77A= -k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190815230911-4e7fd98763aa h1:ulmoaa2ZDT0eXKsa++JdPswhUzKMrlRocUVXFysPdIE= -k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:mlJLLdZ4cRgFw/bNcMf8Qg9RANqO+h5ej55cqa8zgbY= -k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190815230911-4e7fd98763aa h1:qS4DUNUNVfnhYrJHFM/EKR6XcdAWCC2UcMikYJKuEhE= -k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:0aiDL6B8yntSR7i9PSEtlhHh1BA3OMqJGHVCJbmBrXo= -k8s.io/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:2nFYLJ5y/5vM0yHXnnqbUe7r2CZTCWEnLLcve6aBlIM= -k8s.io/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:3l3VgCX4jcgQgXv+BtSZ+DuddXuYx3ZfXXYBZ5yqme0= -k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190815230911-4e7fd98763aa h1:/tr+y6rPt2K/hsh2+COksrOfoe4zgY7EwfoD4KmjUvM= -k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:Cuucgb8YYravHooJMZpGwegTZAI97WcnZth9F5+F/pQ= -k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:DgU25Lrzh5v80sEi4RBjT208ESGEvo1tyN+HamHAs6M= -k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:3C5o8jYp27UZhFcy+wt7NQJRhKgH8T1splDEtneCPKo= -k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:KiTbPWP+D2z9TRpps6DNNNKkqwb8EKnco+IsDrVkcNg= -k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190815230911-4e7fd98763aa h1:8o3CiT9SHc/IobLeae0XbgbEjLSm8NeYph7Blkk5aGA= -k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:ayft/7Lni/jrphEc1MUEdMhtB83puMfib4hdQeUpKGE= -k8s.io/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:rS4FauHIJSBSmUKHd0HUrXpnCp5YH6oecFl0GIimH48= -k8s.io/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:JcFgltQ/p4Djrl+djpfI8SuaGXvVeFg17sEPuTNpj0g= -k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:NpwWMefhbyGze3yt1K3NWsmQSIt6MdBD7TOg3Bd6XPY= -k8s.io/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:zp3BmiEAa1TXMaWqQCumsK+5WYn3SJsgi1y+w3x+A88= -k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190815230911-4e7fd98763aa h1:zNS7a43VLozouctiZritmaVdPCZdCdVCxGvEmf9gEUs= -k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:NgiD4D5Q7V6AXov5Cm7tHnHQuB6Tn1X2IfwUd70H/h4= -k8s.io/kubernetes/staging/src/k8s.io/metrics v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:W8rkRFlI5rxPiHWHR8p+fzDa9tONHBKso7QVyI9I8UI= -k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20190815230911-4e7fd98763aa/go.mod h1:HgHRP/hj4oj0e8fvHXmvoQbkH0EGfx4YIU1EoTe2lFw= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf h1:EYm5AW/UUDbnmnI+gK0TJDVK9qPLhM+sRHYanNKw0EQ= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kubernetes v0.0.0-20190908184117-1cdd0848eee1 h1:w/OjUmbLesELmeu8umQITJKWXBBzdwXqGm8/GcFjrHY= +k8s.io/kubernetes v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:nlP2zevWKRGKuaaVbKIwozU0Rjg9leVDXkL4YTtjmVs= +k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190908184117-1cdd0848eee1 h1:nf7ZINmxpLR8PzXY59ZTbXuOZ6IUuf0zgXKzvL4FVA8= +k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:cHpnPcbNeE90PrTRnTu13OM+FN+ROt82odVbEh++81o= +k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190908184117-1cdd0848eee1 h1:MaOiFlpDdPIHOAvaWtdWPb8qvFgcxMBatPKeq4+xvqI= +k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:f1tFT2pOqPzfckbG1GjHIzy3G+T2LW7rchcruNoLaiM= +k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190908184117-1cdd0848eee1 h1:h2QcuSCQizKf6cXCV+CCZsJF9gDdgEngnuF4Yo3G7LY= +k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:PNw+FbGH4/s3zK9V3rAeMiHTbQz2CU/yqAkfQ2UgLVs= +k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190908184117-1cdd0848eee1 h1:jbLbqMt8GteJHg7DFbA1RofcAhZ5aYdvwugfJ5hJe94= +k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:WmFoxjELD2xtWb77Yj9RPibT5ACkQYEW9lPQtNkGtbE= +k8s.io/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:nBogvbgjMgo7AeVA6CuqVO13LVIfmlQ11t6xzAJdBN8= +k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190908184117-1cdd0848eee1 h1:t/R8eaqXBBRoH3+i093LDIiPY+F1Ym8csxEgEU2j5Hw= +k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:GiGfbsjtP4tOW6zgpL8/vCUoyXAV5+9X2onLursPi08= +k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190908184117-1cdd0848eee1 h1:HlK2WKkRn2obNXYJki7EArGghcDMYUYnZbqTDigjWcI= +k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:77Vtl0d5SOrs6vqwqhZZQakDEovGSm2rRqtpTeteqcQ= +k8s.io/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:Gwev4EWWC1Yfr0gBTJR0n8FYLsIdRu4ARubU6hXRadU= +k8s.io/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:L8deZCu6NpzgKzY91TOGKJ1JtAoHd8WyJ/HdoxqZCGo= +k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190908184117-1cdd0848eee1 h1:Efx4CSq/jOaDiVAfud4R0jFsNbGemjK8bRPLl0+R3bY= +k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:spPP+vRNS8EsnNNIhFCZTTuRO3XhV1WoF18HJySoZn8= +k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:FuWtYjatYStosiEepg0w/7/QrG0T/HMh/FA5T/8AIP8= +k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:w51XnEBJkmGEjUGylUXL1TezQIc0JYndQCsVkQMHjKA= +k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:ttKFRQ6/4l0mjLwPJ/Ccn9k/vc/6y5dJ98r88NLLiGw= +k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190908184117-1cdd0848eee1 h1:TNJ+9jgPu4lf864pZujYF0d5MK8xCli3pFtHC3dxJ4U= +k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:Wm4X9LSXr3uszFEajh8M75iyxHdjOKSp0LCL4TIp7UQ= +k8s.io/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:8btekvQmHgyy4XTchusVAW/mQIPE+hVLn61sZ/epsAA= +k8s.io/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:sBq5nR6KVpfnkBsj4RjOQhw0j5yOtLHXIX2Dz5uZQmw= +k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:ellVfoCz8MlDjTnkqsTkU5svJOIjcK3XNx/onmixgDk= +k8s.io/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:4Sbo2Vn3tAIZpwx4YIp+SushTtzzzabVrg9Tq4rrImM= +k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190908184117-1cdd0848eee1 h1:wO0TsEQiTNZ8plJ+j7WXAKbo3csRBHckk+XLOzUPfO8= +k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:OpqDei2/Qdg+5YGQYPiEuQ4vlFoiAJy0Ysn8aLKP7Cs= +k8s.io/kubernetes/staging/src/k8s.io/metrics v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:vQHTmz0IaEb7/OXPSor1uga8Er0V+2M5aSdXG832NbU= +k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20190908184117-1cdd0848eee1/go.mod h1:E3i4wscD52Qj6PEcgUjvCd81Tl6Mghk1GHtEzoaaqwU= k8s.io/repo-infra v0.0.0-20190329054012-df02ded38f95/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= diff --git a/hack/update-dependencies.sh b/hack/update-dependencies.sh index 717f79fb87..da953cdf17 100755 --- a/hack/update-dependencies.sh +++ b/hack/update-dependencies.sh @@ -25,6 +25,7 @@ export GOFLAGS= cd "$(git rev-parse --show-toplevel)" trap 'echo "FAILED" >&2' ERR TMP_DIR="${TMP_DIR:-$(mktemp -d /tmp/update-vendor.XXXX)}" +SCRIPT_ROOT=$(dirname "${BASH_SOURCE}") prune-vendor() { find vendor -type f \ @@ -103,4 +104,5 @@ ensure_require_replace_directives_for_all_dependencies group_replace_directives go mod vendor prune-vendor +${SCRIPT_ROOT}/update-bazel.sh echo SUCCESS diff --git a/pkg/node/BUILD.bazel b/pkg/node/BUILD.bazel index d703e6475e..92f6f12b65 100644 --- a/pkg/node/BUILD.bazel +++ b/pkg/node/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/cloud-provider:go_default_library", + "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/legacy-cloud-providers/azure:go_default_library", ], ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplications.go deleted file mode 100644 index 58d54bd610..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplications.go +++ /dev/null @@ -1,401 +0,0 @@ -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. -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-03-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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// 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 -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go deleted file mode 100644 index 305216d25f..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryapplicationversions.go +++ /dev/null @@ -1,428 +0,0 @@ -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. -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-03-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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) - 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(string(expand)) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// 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-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/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) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) -} - -// 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 -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD.bazel b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/BUILD.bazel similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD.bazel rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/BUILD.bazel index 8b832c27e2..3615afa68e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/BUILD.bazel +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/BUILD.bazel @@ -10,8 +10,6 @@ go_library( "dedicatedhosts.go", "disks.go", "galleries.go", - "galleryapplications.go", - "galleryapplicationversions.go", "galleryimages.go", "galleryimageversions.go", "images.go", @@ -34,8 +32,8 @@ go_library( "virtualmachinescalesetvms.go", "virtualmachinesizes.go", ], - importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute", - importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute", + importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute", + importpath = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute", visibility = ["//visibility:public"], deps = [ "//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library", diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/availabilitysets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/availabilitysets.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/client.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/containerservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/containerservices.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/dedicatedhostgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhostgroups.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/dedicatedhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/dedicatedhosts.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/disks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/disks.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go index 0eac41be05..553defda18 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleries.go @@ -80,7 +80,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go index 1d22a9d30a..c4c78e5706 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimages.go @@ -96,7 +96,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -177,7 +177,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -261,7 +261,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -339,7 +339,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go index 0e2d583a44..658da5864e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/galleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/galleryimageversions.go @@ -64,11 +64,9 @@ 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.PublishingProfile", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.PublishingProfile.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.PublishingProfile.Source.ManagedImage", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.PublishingProfile.Source.ManagedImage.ID", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, + 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 { return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error()) @@ -99,7 +97,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -182,7 +180,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -269,7 +267,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +351,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" + const APIVersion = "2019-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/images.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/images.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/loganalytics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/loganalytics.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go index f231357f94..b56b2ae1e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" // AccessLevel enumerates the values for access level. type AccessLevel string @@ -605,29 +605,6 @@ 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 @@ -3707,688 +3684,36 @@ func (g *Gallery) UnmarshalJSON(body []byte) error { 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 -} - -// 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' - 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 -} - // 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 - READ-ONLY; 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 - 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 - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,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 - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,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. @@ -4665,16 +3990,18 @@ type GalleryImageProperties struct { 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 - The allowed values for OS State are 'Generalized'. Possible values include: 'Generalized', 'Specialized' + // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: '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"` + // 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"` } // GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -4979,19 +4306,15 @@ func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryIma // 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 - READ-ONLY - StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,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"` + 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 { - Source *GalleryArtifactSource `json:"source,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. @@ -5002,6 +4325,8 @@ type GalleryImageVersionPublishingProfile struct { 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"` + // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable. + TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"` } // GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -5056,11 +4381,11 @@ func (future *GalleryImageVersionsDeleteFuture) Result(client GalleryImageVersio return } -// GalleryImageVersionStorageProfile this is the storage profile of a gallery Image Version. +// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version. type GalleryImageVersionStorageProfile struct { - // OsDiskImage - READ-ONLY - OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` - // DataDiskImages - READ-ONLY; A list of data disk images. + Source *GalleryArtifactVersionSource `json:"source,omitempty"` + OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"` + // DataDiskImages - A list of data disk images. DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"` } @@ -5214,8 +4539,9 @@ func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryL type GalleryOSDiskImage struct { // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created. SizeInGB *int32 `json:"sizeInGB,omitempty"` - // HostCaching - READ-ONLY; The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite' - HostCaching HostCaching `json:"hostCaching,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. @@ -6048,12 +5374,6 @@ type MaintenanceRedeployStatus struct { 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' @@ -7933,14 +7253,6 @@ type UsageName struct { 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 { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/operations.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/proximityplacementgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/proximityplacementgroups.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/resourceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/resourceskus.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/snapshots.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/snapshots.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/usage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/usage.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/version.go index 184b918cc5..7ad07e0158 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-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-03-01" + return "Azure-SDK-For-Go/" + version.Number + " 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-03-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineextensionimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensionimages.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineextensions.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineimages.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachineruncommands.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachineruncommands.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachines.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachines.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetextensions.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetrollingupgrades.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetrollingupgrades.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesets.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinescalesetvms.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinescalesetvms.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute/virtualmachinesizes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/virtualmachinesizes.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/BUILD.bazel b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/BUILD.bazel similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/BUILD.bazel rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/BUILD.bazel index 655ff89075..ed44f9af39 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/BUILD.bazel +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/BUILD.bazel @@ -7,12 +7,15 @@ go_library( "applicationsecuritygroups.go", "availabledelegations.go", "availableendpointservices.go", + "availableprivateendpointtypes.go", "availableresourcegroupdelegations.go", "azurefirewallfqdntags.go", "azurefirewalls.go", + "bastionhosts.go", "bgpservicecommunities.go", "client.go", "connectionmonitors.go", + "ddoscustompolicies.go", "ddosprotectionplans.go", "defaultsecurityrules.go", "expressroutecircuitauthorizations.go", @@ -29,7 +32,6 @@ go_library( "expressrouteserviceproviders.go", "hubvirtualnetworkconnections.go", "inboundnatrules.go", - "interfaceendpoints.go", "interfaceipconfigurations.go", "interfaceloadbalancers.go", "interfacesgroup.go", @@ -43,21 +45,28 @@ go_library( "loadbalancers.go", "localnetworkgateways.go", "models.go", + "natgateways.go", "operations.go", "p2svpngateways.go", "p2svpnserverconfigurations.go", "packetcaptures.go", + "peerexpressroutecircuitconnections.go", + "privateendpoints.go", + "privatelinkservices.go", "profiles.go", "publicipaddresses.go", "publicipprefixes.go", + "resourcenavigationlinks.go", "routefilterrules.go", "routefilters.go", "routes.go", "routetables.go", "securitygroups.go", "securityrules.go", + "serviceassociationlinks.go", "serviceendpointpolicies.go", "serviceendpointpolicydefinitions.go", + "servicetags.go", "subnets.go", "usages.go", "version.go", @@ -70,12 +79,16 @@ go_library( "virtualwans.go", "vpnconnections.go", "vpngateways.go", + "vpnlinkconnections.go", + "vpnsitelinkconnections.go", + "vpnsitelinks.go", "vpnsites.go", "vpnsitesconfiguration.go", "watchers.go", + "webapplicationfirewallpolicies.go", ], - importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network", - importpath = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network", + importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network", + importpath = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network", visibility = ["//visibility:public"], deps = [ "//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library", diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go similarity index 78% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go index 9ab38fb4f8..b3c1d5aa88 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go @@ -80,7 +80,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -122,6 +122,91 @@ func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Respon return } +// BackendHealthOnDemand gets the backend health for given combination of backend pool and http setting of the +// specified application gateway in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationGatewayName - the name of the application gateway. +// probeRequest - request body for on-demand test probe operation. +// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health. +func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (result ApplicationGatewaysBackendHealthOnDemandFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealthOnDemand") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.BackendHealthOnDemandPreparer(ctx, resourceGroupName, applicationGatewayName, probeRequest, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure preparing request") + return + } + + result, err = client.BackendHealthOnDemandSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", result.Response(), "Failure sending request") + return + } + + return +} + +// BackendHealthOnDemandPreparer prepares the BackendHealthOnDemand request. +func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationGatewayName": autorest.Encode("path", applicationGatewayName), + "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(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand", pathParameters), + autorest.WithJSON(probeRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// BackendHealthOnDemandResponder handles the response to the BackendHealthOnDemand request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) BackendHealthOnDemandResponder(resp *http.Response) (result ApplicationGatewayBackendHealthOnDemand, 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 +} + // CreateOrUpdate creates or updates the specified application gateway. // Parameters: // resourceGroupName - the name of the resource group. @@ -154,13 +239,13 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil}, }}, {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil}, - {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 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: 2, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.InclusiveMinimum, Rule: 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}}}, }}, }}}}}); err != nil { return result, validation.NewError("network.ApplicationGatewaysClient", "CreateOrUpdate", err.Error()) @@ -189,7 +274,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -268,7 +353,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -350,7 +435,7 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -425,7 +510,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -501,7 +586,7 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -611,7 +696,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -681,6 +766,222 @@ func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (re return } +// ListAvailableRequestHeaders lists all available request headers. +func (client ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableRequestHeaders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableRequestHeadersPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableRequestHeadersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableRequestHeadersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableRequestHeaders", resp, "Failure responding to request") + } + + return +} + +// ListAvailableRequestHeadersPreparer prepares the ListAvailableRequestHeaders request. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableRequestHeadersSender sends the ListAvailableRequestHeaders request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAvailableRequestHeadersResponder handles the response to the ListAvailableRequestHeaders request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableRequestHeadersResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableResponseHeaders lists all available response headers. +func (client ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableResponseHeaders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableResponseHeadersPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableResponseHeadersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableResponseHeadersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableResponseHeaders", resp, "Failure responding to request") + } + + return +} + +// ListAvailableResponseHeadersPreparer prepares the ListAvailableResponseHeaders request. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableResponseHeadersSender sends the ListAvailableResponseHeaders request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAvailableResponseHeadersResponder handles the response to the ListAvailableResponseHeaders request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableResponseHeadersResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableServerVariables lists all available server variables. +func (client ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context) (result ListString, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableServerVariables") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListAvailableServerVariablesPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableServerVariablesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableServerVariablesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableServerVariables", resp, "Failure responding to request") + } + + return +} + +// ListAvailableServerVariablesPreparer prepares the ListAvailableServerVariables request. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAvailableServerVariablesSender sends the ListAvailableServerVariables request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAvailableServerVariablesResponder handles the response to the ListAvailableServerVariables request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableServerVariablesResponder(resp *http.Response) (result ListString, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListAvailableSslOptions lists available Ssl options for configuring Ssl policy. func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) { if tracing.IsEnabled() { @@ -720,7 +1021,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -793,7 +1094,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -902,7 +1203,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -973,7 +1274,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1049,7 +1350,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1126,7 +1427,7 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go index 4fae8ed845..41a47cf0f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go @@ -79,7 +79,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +317,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -496,3 +496,83 @@ func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Contex result.page, err = client.ListAll(ctx) return } + +// UpdateTags updates an application security group's tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// applicationSecurityGroupName - the name of the application security group. +// parameters - parameters supplied to update application security group tags. +func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (result ApplicationSecurityGroupsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) UpdateTagsResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + 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/network/mgmt/2018-08-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go index 8ab8fe4d77..747fd724a5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availabledelegations.go @@ -83,7 +83,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go index c8a6642f9e..79b645fbcb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableendpointservices.go @@ -83,7 +83,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..b7de98c4a6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableprivateendpointtypes.go @@ -0,0 +1,271 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// AvailablePrivateEndpointTypesClient is the network Client +type AvailablePrivateEndpointTypesClient struct { + BaseClient +} + +// NewAvailablePrivateEndpointTypesClient creates an instance of the AvailablePrivateEndpointTypesClient client. +func NewAvailablePrivateEndpointTypesClient(subscriptionID string) AvailablePrivateEndpointTypesClient { + return NewAvailablePrivateEndpointTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailablePrivateEndpointTypesClientWithBaseURI creates an instance of the AvailablePrivateEndpointTypesClient +// client. +func NewAvailablePrivateEndpointTypesClientWithBaseURI(baseURI string, subscriptionID string) AvailablePrivateEndpointTypesClient { + return AvailablePrivateEndpointTypesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. +// Parameters: +// location - the location of the domain name. +func (client AvailablePrivateEndpointTypesClient) List(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.List") + defer func() { + sc := -1 + if result.apetr.Response.Response != nil { + sc = result.apetr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.apetr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure sending request") + return + } + + result.apetr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailablePrivateEndpointTypesClient) 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-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes", 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 AvailablePrivateEndpointTypesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, 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 AvailablePrivateEndpointTypesClient) listNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { + req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailablePrivateEndpointTypesClient) ListComplete(ctx context.Context, location string) (result AvailablePrivateEndpointTypesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.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 +} + +// ListByResourceGroup returns all of the resource types that can be linked to a Private Endpoint in this subscription +// in this region. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.apetr.Response.Response != nil { + sc = result.apetr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, location, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.apetr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.apetr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/locations/{location}/availablePrivateEndpointTypes", 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 AvailablePrivateEndpointTypesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupResponder(resp *http.Response) (result AvailablePrivateEndpointTypesResult, 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 AvailablePrivateEndpointTypesClient) listByResourceGroupNextResults(ctx context.Context, lastResults AvailablePrivateEndpointTypesResult) (result AvailablePrivateEndpointTypesResult, err error) { + req, err := lastResults.availablePrivateEndpointTypesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailablePrivateEndpointTypesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AvailablePrivateEndpointTypesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesClient.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, location, resourceGroupName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go index 5f14e23f7d..32069f2daa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/availableresourcegroupdelegations.go @@ -87,7 +87,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go index c001765147..cf0d2a97df 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewallfqdntags.go @@ -80,7 +80,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go similarity index 84% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go index e045010aed..c85a97dd9a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go @@ -79,7 +79,7 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +317,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -496,3 +496,84 @@ func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result result.page, err = client.ListAll(ctx) return } + +// UpdateTags updates tags for an Azure Firewall resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// azureFirewallName - the name of the Azure Firewall. +// parameters - parameters supplied to the create or update Azure Firewall operation. +func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewall, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, azureFirewallName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", resp, "Failure responding to request") + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "azureFirewallName": autorest.Encode("path", azureFirewallName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = 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.Network/azureFirewalls/{azureFirewallName}", 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 AzureFirewallsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client AzureFirewallsClient) UpdateTagsResponder(resp *http.Response) (result AzureFirewall, 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/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 new file mode 100644 index 0000000000..c15c2e1a85 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go @@ -0,0 +1,498 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BastionHostsClient is the network Client +type BastionHostsClient struct { + BaseClient +} + +// NewBastionHostsClient creates an instance of the BastionHostsClient client. +func NewBastionHostsClient(subscriptionID string) BastionHostsClient { + return NewBastionHostsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBastionHostsClientWithBaseURI creates an instance of the BastionHostsClient client. +func NewBastionHostsClientWithBaseURI(baseURI string, subscriptionID string) BastionHostsClient { + return BastionHostsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// parameters - parameters supplied to the create or update Bastion Host operation. +func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (result BastionHostsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, bastionHostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", 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 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...) + 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 BastionHostsClient) CreateOrUpdateResponder(resp *http.Response) (result BastionHost, 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 specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHostsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, bastionHostName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "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.Network/bastionHosts/{bastionHostName}", 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 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...) + 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 BastionHostsClient) 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 specified Bastion Host. +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +func (client BastionHostsClient) Get(ctx context.Context, resourceGroupName string, bastionHostName string) (result BastionHost, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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, bastionHostName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, bastionHostName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "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.Network/bastionHosts/{bastionHostName}", 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 BastionHostsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) GetResponder(resp *http.Response) (result BastionHost, 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 Bastion Hosts in a subscription. +func (client BastionHostsClient) List(ctx context.Context) (result BastionHostListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.List") + defer func() { + sc := -1 + if result.bhlr.Response.Response != nil { + sc = result.bhlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.bhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure sending request") + return + } + + result.bhlr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "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}/providers/Microsoft.Network/bastionHosts", 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 BastionHostsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListResponder(resp *http.Response) (result BastionHostListResult, 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 BastionHostsClient) listNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { + req, err := lastResults.bastionHostListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BastionHostsClient) ListComplete(ctx context.Context) (result BastionHostListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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 Bastion Hosts in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client BastionHostsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result BastionHostListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.bhlr.Response.Response != nil { + sc = result.bhlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.bhlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.bhlr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client BastionHostsClient) 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-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.Network/bastionHosts", 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 BastionHostsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) ListByResourceGroupResponder(resp *http.Response) (result BastionHostListResult, 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 BastionHostsClient) listByResourceGroupNextResults(ctx context.Context, lastResults BastionHostListResult) (result BastionHostListResult, err error) { + req, err := lastResults.bastionHostListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result BastionHostListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.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/network/mgmt/2018-08-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go index 5f6f887ee4..5d93b851fd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bgpservicecommunities.go @@ -80,7 +80,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go index 75c294fd35..14cd48cfb9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/client.go @@ -98,7 +98,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "domainNameLabel": autorest.Encode("query", domainNameLabel), @@ -176,7 +176,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go index 39ae46c0bf..843e1f5594 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go @@ -92,7 +92,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +334,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -407,7 +407,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -486,7 +486,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -564,7 +564,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..f8d645460d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go @@ -0,0 +1,355 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// DdosCustomPoliciesClient is the network Client +type DdosCustomPoliciesClient struct { + BaseClient +} + +// NewDdosCustomPoliciesClient creates an instance of the DdosCustomPoliciesClient client. +func NewDdosCustomPoliciesClient(subscriptionID string) DdosCustomPoliciesClient { + return NewDdosCustomPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDdosCustomPoliciesClientWithBaseURI creates an instance of the DdosCustomPoliciesClient client. +func NewDdosCustomPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DdosCustomPoliciesClient { + return DdosCustomPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +// parameters - parameters supplied to the create or update operation. +func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (result DdosCustomPoliciesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + parameters.Etag = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, ddosCustomPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified DDoS custom policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +func (client DdosCustomPoliciesClient) Get(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (result DdosCustomPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, ddosCustomPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DdosCustomPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) GetResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateTags update a DDoS custom policy tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosCustomPolicyName - the name of the DDoS custom policy. +// parameters - parameters supplied to the update DDoS custom policy resource tags. +func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (result DdosCustomPoliciesUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosCustomPoliciesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosCustomPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosCustomPolicyName": autorest.Encode("path", ddosCustomPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ddosCustomPolicies/{ddosCustomPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client DdosCustomPoliciesClient) UpdateTagsResponder(resp *http.Response) (result DdosCustomPolicy, err error) { + err = autorest.Respond( + resp, + 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/network/mgmt/2018-08-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go index 88d1caf00e..efd5f7635c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go @@ -79,7 +79,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +317,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -499,3 +499,83 @@ func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context. result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } + +// UpdateTags update a DDoS protection plan tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// ddosProtectionPlanName - the name of the DDoS protection plan. +// parameters - parameters supplied to the update DDoS protection plan resource tags. +func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (result DdosProtectionPlansUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.UpdateTags") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ddosProtectionPlanName": autorest.Encode("path", ddosProtectionPlanName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ddosProtectionPlans/{ddosProtectionPlanName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client DdosProtectionPlansClient) UpdateTagsResponder(resp *http.Response) (result DdosProtectionPlan, err error) { + err = autorest.Respond( + resp, + 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/network/mgmt/2018-08-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go index ab8785f273..0c38bd8fd2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/defaultsecurityrules.go @@ -86,7 +86,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go index 449af06ab9..7211b209a4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go @@ -84,12 +84,13 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } authorizationParameters.Etag = nil + authorizationParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -166,7 +167,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +251,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +329,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go similarity index 70% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go index d63311e97d..a27357867a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go @@ -85,12 +85,13 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } expressRouteCircuitConnectionParameters.Etag = nil + expressRouteCircuitConnectionParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -169,7 +170,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -255,7 +256,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,3 +288,120 @@ func (client ExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Respo result.Response = autorest.Response{Response: resp} return } + +// List gets all global reach connections associated with a private peering in an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// peeringName - the name of the peering. +func (client ExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.ercclr.Response.Response != nil { + sc = result.ercclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.ercclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.ercclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result ExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 ExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitConnectionListResult) (result ExpressRouteCircuitConnectionListResult, err error) { + req, err := lastResults.expressRouteCircuitConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, circuitName, peeringName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go index 786ea36dcd..42e165667b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go @@ -93,12 +93,13 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } peeringParameters.Etag = nil + peeringParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -175,7 +176,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -259,7 +260,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +338,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go index eefc9981f3..b54c9b0ca3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go @@ -79,7 +79,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,7 +397,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -473,7 +473,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -583,7 +583,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -695,7 +695,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -777,7 +777,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -859,7 +859,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -937,7 +937,7 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go index da4fa8e36c..6e30029ed5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go @@ -90,7 +90,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -255,7 +255,7 @@ func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +332,7 @@ func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go index e94979fb42..c0b32ea762 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go @@ -96,7 +96,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,7 +178,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -262,7 +262,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -340,7 +340,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go index ad6e6f8af6..71bff3a151 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go @@ -80,7 +80,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -239,7 +239,7 @@ func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Contex // resourceGroupName - the name of the resource group. // crossConnectionName - the name of the ExpressRouteCrossConnection. // peeringName - the name of the peering. -// devicePath - the path of the device +// devicePath - the path of the device. func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable") @@ -352,7 +352,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,7 +434,7 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -547,7 +547,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -629,7 +629,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -707,7 +707,7 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go index af74a38ff8..77c3777c5c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go @@ -87,7 +87,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,7 +168,7 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroupPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,7 +397,7 @@ func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go index eb6df4e4a5..f295fafc24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutelinks.go @@ -86,7 +86,7 @@ func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go index 210cdd4554..1c5547cdee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go @@ -79,7 +79,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,7 +274,7 @@ func (client ExpressRoutePortsClient) GetResponder(resp *http.Response) (result return } -// List list all the ExpressRoutePort resources in the specified subscription +// List list all the ExpressRoutePort resources in the specified subscription. func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List") @@ -314,7 +314,7 @@ func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -497,7 +497,7 @@ func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Co return } -// UpdateTags update ExpressRoutePort tags +// UpdateTags update ExpressRoutePort tags. // Parameters: // resourceGroupName - the name of the resource group. // expressRoutePortName - the name of the ExpressRoutePort resource. @@ -536,7 +536,7 @@ func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go index b483106ceb..7e07586b4d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteportslocations.go @@ -83,7 +83,7 @@ func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go index 6d2e1b7b0a..e50a784300 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteserviceproviders.go @@ -81,7 +81,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go index d8da91d3e1..4535ac1ebd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/hubvirtualnetworkconnections.go @@ -87,7 +87,7 @@ func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Contex "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go index 6715198653..0f05a47e39 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go @@ -101,11 +101,12 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + inboundNatRuleParameters.Type = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -182,7 +183,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +268,7 @@ func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -348,7 +349,7 @@ func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go index 52b252caaf..5183273429 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceipconfigurations.go @@ -86,7 +86,7 @@ func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -119,7 +119,7 @@ func (client InterfaceIPConfigurationsClient) GetResponder(resp *http.Response) return } -// List get all ip configurations in a network interface +// List get all ip configurations in a network interface. // Parameters: // resourceGroupName - the name of the resource group. // networkInterfaceName - the name of the network interface. @@ -164,7 +164,7 @@ func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go index f2da3d1c88..75a6aa9e32 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfaceloadbalancers.go @@ -85,7 +85,7 @@ func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go index a45dc74bf6..be36ebebf8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go @@ -79,7 +79,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -570,7 +570,7 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -680,7 +680,7 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -788,7 +788,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1223,7 +1223,7 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go index ac142c968c..ca11aecf16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go @@ -117,7 +117,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -283,7 +283,7 @@ func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client InterfaceTapConfigurationsClient) GetResponder(resp *http.Response) return } -// List get all Tap configurations in a network interface +// List get all Tap configurations in a network interface. // Parameters: // resourceGroupName - the name of the resource group. // networkInterfaceName - the name of the network interface. @@ -361,7 +361,7 @@ func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go index e1052ba801..0f7c54d714 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerbackendaddresspools.go @@ -87,7 +87,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go index b31ef59974..eb2e34cf93 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerfrontendipconfigurations.go @@ -88,7 +88,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go index 0ce635eb2c..96d493f8ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerloadbalancingrules.go @@ -87,7 +87,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go index 386e2b9b1d..7b8a52bdbf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancernetworkinterfaces.go @@ -86,7 +86,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go index f5f964b2ea..550f2980c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalanceroutboundrules.go @@ -86,7 +86,7 @@ func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go index 542baea60f..4f872bde25 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancerprobes.go @@ -86,7 +86,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go index 5930a4c2e7..2897a04089 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go @@ -79,7 +79,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go index 0e3731921f..5a08cb4216 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go @@ -88,7 +88,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -261,7 +261,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,7 +452,7 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go similarity index 83% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go index 3e5fd091d6..3f4ca3c868 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/models.go @@ -29,7 +29,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" // Access enumerates the values for access. type Access string @@ -453,6 +453,23 @@ func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { return []AzureFirewallRCActionType{AzureFirewallRCActionTypeAllow, AzureFirewallRCActionTypeDeny} } +// AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. +type AzureFirewallThreatIntelMode string + +const ( + // AzureFirewallThreatIntelModeAlert ... + AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" + // AzureFirewallThreatIntelModeDeny ... + AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" + // AzureFirewallThreatIntelModeOff ... + AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" +) + +// PossibleAzureFirewallThreatIntelModeValues returns an array of possible values for the AzureFirewallThreatIntelMode const type. +func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode { + return []AzureFirewallThreatIntelMode{AzureFirewallThreatIntelModeAlert, AzureFirewallThreatIntelModeDeny, AzureFirewallThreatIntelModeOff} +} + // BgpPeerState enumerates the values for bgp peer state. type BgpPeerState string @@ -495,17 +512,17 @@ func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { type ConnectionMonitorSourceStatus string const ( - // Active ... - Active ConnectionMonitorSourceStatus = "Active" - // Inactive ... - Inactive ConnectionMonitorSourceStatus = "Inactive" - // Uknown ... - Uknown ConnectionMonitorSourceStatus = "Uknown" + // ConnectionMonitorSourceStatusActive ... + ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" + // ConnectionMonitorSourceStatusInactive ... + ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" + // ConnectionMonitorSourceStatusUnknown ... + ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" ) // PossibleConnectionMonitorSourceStatusValues returns an array of possible values for the ConnectionMonitorSourceStatus const type. func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStatus { - return []ConnectionMonitorSourceStatus{Active, Inactive, Uknown} + return []ConnectionMonitorSourceStatus{ConnectionMonitorSourceStatusActive, ConnectionMonitorSourceStatusInactive, ConnectionMonitorSourceStatusUnknown} } // ConnectionState enumerates the values for connection state. @@ -544,6 +561,58 @@ func PossibleConnectionStatusValues() []ConnectionStatus { return []ConnectionStatus{ConnectionStatusConnected, ConnectionStatusDegraded, ConnectionStatusDisconnected, ConnectionStatusUnknown} } +// DdosCustomPolicyProtocol enumerates the values for ddos custom policy protocol. +type DdosCustomPolicyProtocol string + +const ( + // DdosCustomPolicyProtocolSyn ... + DdosCustomPolicyProtocolSyn DdosCustomPolicyProtocol = "Syn" + // DdosCustomPolicyProtocolTCP ... + DdosCustomPolicyProtocolTCP DdosCustomPolicyProtocol = "Tcp" + // DdosCustomPolicyProtocolUDP ... + DdosCustomPolicyProtocolUDP DdosCustomPolicyProtocol = "Udp" +) + +// PossibleDdosCustomPolicyProtocolValues returns an array of possible values for the DdosCustomPolicyProtocol const type. +func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { + return []DdosCustomPolicyProtocol{DdosCustomPolicyProtocolSyn, DdosCustomPolicyProtocolTCP, DdosCustomPolicyProtocolUDP} +} + +// DdosCustomPolicyTriggerSensitivityOverride enumerates the values for ddos custom policy trigger sensitivity +// override. +type DdosCustomPolicyTriggerSensitivityOverride string + +const ( + // Default ... + Default DdosCustomPolicyTriggerSensitivityOverride = "Default" + // High ... + High DdosCustomPolicyTriggerSensitivityOverride = "High" + // Low ... + Low DdosCustomPolicyTriggerSensitivityOverride = "Low" + // Relaxed ... + Relaxed DdosCustomPolicyTriggerSensitivityOverride = "Relaxed" +) + +// PossibleDdosCustomPolicyTriggerSensitivityOverrideValues returns an array of possible values for the DdosCustomPolicyTriggerSensitivityOverride const type. +func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPolicyTriggerSensitivityOverride { + return []DdosCustomPolicyTriggerSensitivityOverride{Default, High, Low, Relaxed} +} + +// DdosSettingsProtectionCoverage enumerates the values for ddos settings protection coverage. +type DdosSettingsProtectionCoverage string + +const ( + // DdosSettingsProtectionCoverageBasic ... + DdosSettingsProtectionCoverageBasic DdosSettingsProtectionCoverage = "Basic" + // DdosSettingsProtectionCoverageStandard ... + DdosSettingsProtectionCoverageStandard DdosSettingsProtectionCoverage = "Standard" +) + +// PossibleDdosSettingsProtectionCoverageValues returns an array of possible values for the DdosSettingsProtectionCoverage const type. +func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCoverage { + return []DdosSettingsProtectionCoverage{DdosSettingsProtectionCoverageBasic, DdosSettingsProtectionCoverageStandard} +} + // DhGroup enumerates the values for dh group. type DhGroup string @@ -609,15 +678,15 @@ func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { type EffectiveRouteState string const ( - // EffectiveRouteStateActive ... - EffectiveRouteStateActive EffectiveRouteState = "Active" - // EffectiveRouteStateInvalid ... - EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" + // Active ... + Active EffectiveRouteState = "Active" + // Invalid ... + Invalid EffectiveRouteState = "Invalid" ) // PossibleEffectiveRouteStateValues returns an array of possible values for the EffectiveRouteState const type. func PossibleEffectiveRouteStateValues() []EffectiveRouteState { - return []EffectiveRouteState{EffectiveRouteStateActive, EffectiveRouteStateInvalid} + return []EffectiveRouteState{Active, Invalid} } // EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. @@ -710,6 +779,8 @@ type ExpressRouteCircuitSkuTier string const ( // ExpressRouteCircuitSkuTierBasic ... ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" + // ExpressRouteCircuitSkuTierLocal ... + ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" // ExpressRouteCircuitSkuTierPremium ... ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" // ExpressRouteCircuitSkuTierStandard ... @@ -718,7 +789,7 @@ const ( // PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type. func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier { - return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} + return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierLocal, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard} } // ExpressRouteLinkAdminState enumerates the values for express route link admin state. @@ -798,6 +869,19 @@ func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsula return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ} } +// FlowLogFormatType enumerates the values for flow log format type. +type FlowLogFormatType string + +const ( + // JSON ... + JSON FlowLogFormatType = "JSON" +) + +// PossibleFlowLogFormatTypeValues returns an array of possible values for the FlowLogFormatType const type. +func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { + return []FlowLogFormatType{JSON} +} + // HTTPMethod enumerates the values for http method. type HTTPMethod string @@ -1004,6 +1088,23 @@ func PossibleIssueTypeValues() []IssueType { return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} } +// LoadBalancerOutboundRuleProtocol enumerates the values for load balancer outbound rule protocol. +type LoadBalancerOutboundRuleProtocol string + +const ( + // LoadBalancerOutboundRuleProtocolAll ... + LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" + // LoadBalancerOutboundRuleProtocolTCP ... + LoadBalancerOutboundRuleProtocolTCP LoadBalancerOutboundRuleProtocol = "Tcp" + // LoadBalancerOutboundRuleProtocolUDP ... + LoadBalancerOutboundRuleProtocolUDP LoadBalancerOutboundRuleProtocol = "Udp" +) + +// PossibleLoadBalancerOutboundRuleProtocolValues returns an array of possible values for the LoadBalancerOutboundRuleProtocol const type. +func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRuleProtocol { + return []LoadBalancerOutboundRuleProtocol{LoadBalancerOutboundRuleProtocolAll, LoadBalancerOutboundRuleProtocolTCP, LoadBalancerOutboundRuleProtocolUDP} +} + // LoadBalancerSkuName enumerates the values for load balancer sku name. type LoadBalancerSkuName string @@ -1023,17 +1124,30 @@ func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { type LoadDistribution string const ( - // Default ... - Default LoadDistribution = "Default" - // SourceIP ... - SourceIP LoadDistribution = "SourceIP" - // SourceIPProtocol ... - SourceIPProtocol LoadDistribution = "SourceIPProtocol" + // LoadDistributionDefault ... + LoadDistributionDefault LoadDistribution = "Default" + // LoadDistributionSourceIP ... + LoadDistributionSourceIP LoadDistribution = "SourceIP" + // LoadDistributionSourceIPProtocol ... + LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" ) // PossibleLoadDistributionValues returns an array of possible values for the LoadDistribution const type. func PossibleLoadDistributionValues() []LoadDistribution { - return []LoadDistribution{Default, SourceIP, SourceIPProtocol} + return []LoadDistribution{LoadDistributionDefault, LoadDistributionSourceIP, LoadDistributionSourceIPProtocol} +} + +// NatGatewaySkuName enumerates the values for nat gateway sku name. +type NatGatewaySkuName string + +const ( + // Standard ... + Standard NatGatewaySkuName = "Standard" +) + +// PossibleNatGatewaySkuNameValues returns an array of possible values for the NatGatewaySkuName const type. +func PossibleNatGatewaySkuNameValues() []NatGatewaySkuName { + return []NatGatewaySkuName{Standard} } // NextHopType enumerates the values for next hop type. @@ -1251,23 +1365,6 @@ func PossibleProtocolValues() []Protocol { return []Protocol{ProtocolHTTP, ProtocolHTTPS, ProtocolIcmp, ProtocolTCP} } -// Protocol1 enumerates the values for protocol 1. -type Protocol1 string - -const ( - // Protocol1All ... - Protocol1All Protocol1 = "All" - // Protocol1TCP ... - Protocol1TCP Protocol1 = "Tcp" - // Protocol1UDP ... - Protocol1UDP Protocol1 = "Udp" -) - -// PossibleProtocol1Values returns an array of possible values for the Protocol1 const type. -func PossibleProtocol1Values() []Protocol1 { - return []Protocol1{Protocol1All, Protocol1TCP, Protocol1UDP} -} - // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string @@ -1306,13 +1403,32 @@ func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName { type PublicIPPrefixSkuName string const ( - // Standard ... - Standard PublicIPPrefixSkuName = "Standard" + // PublicIPPrefixSkuNameStandard ... + PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" ) // PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type. func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName { - return []PublicIPPrefixSkuName{Standard} + return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeNone ... + ResourceIdentityTypeNone ResourceIdentityType = "None" + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" + // ResourceIdentityTypeSystemAssignedUserAssigned ... + ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // ResourceIdentityTypeUserAssigned ... + ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned} } // RouteNextHopType enumerates the values for route next hop type. @@ -1372,6 +1488,10 @@ type SecurityRuleProtocol string const ( // SecurityRuleProtocolAsterisk ... SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" + // SecurityRuleProtocolEsp ... + SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" + // SecurityRuleProtocolIcmp ... + SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" // SecurityRuleProtocolTCP ... SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" // SecurityRuleProtocolUDP ... @@ -1380,7 +1500,7 @@ const ( // PossibleSecurityRuleProtocolValues returns an array of possible values for the SecurityRuleProtocol const type. func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { - return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} + return []SecurityRuleProtocol{SecurityRuleProtocolAsterisk, SecurityRuleProtocolEsp, SecurityRuleProtocolIcmp, SecurityRuleProtocolTCP, SecurityRuleProtocolUDP} } // ServiceProviderProvisioningState enumerates the values for service provider provisioning state. @@ -1711,6 +1831,173 @@ func PossibleVpnTypeValues() []VpnType { return []VpnType{PolicyBased, RouteBased} } +// WebApplicationFirewallAction enumerates the values for web application firewall action. +type WebApplicationFirewallAction string + +const ( + // WebApplicationFirewallActionAllow ... + WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" + // WebApplicationFirewallActionBlock ... + WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" + // WebApplicationFirewallActionLog ... + WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" +) + +// PossibleWebApplicationFirewallActionValues returns an array of possible values for the WebApplicationFirewallAction const type. +func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction { + return []WebApplicationFirewallAction{WebApplicationFirewallActionAllow, WebApplicationFirewallActionBlock, WebApplicationFirewallActionLog} +} + +// WebApplicationFirewallEnabledState enumerates the values for web application firewall enabled state. +type WebApplicationFirewallEnabledState string + +const ( + // WebApplicationFirewallEnabledStateDisabled ... + WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" + // WebApplicationFirewallEnabledStateEnabled ... + WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" +) + +// PossibleWebApplicationFirewallEnabledStateValues returns an array of possible values for the WebApplicationFirewallEnabledState const type. +func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewallEnabledState { + return []WebApplicationFirewallEnabledState{WebApplicationFirewallEnabledStateDisabled, WebApplicationFirewallEnabledStateEnabled} +} + +// WebApplicationFirewallMatchVariable enumerates the values for web application firewall match variable. +type WebApplicationFirewallMatchVariable string + +const ( + // PostArgs ... + PostArgs WebApplicationFirewallMatchVariable = "PostArgs" + // QueryString ... + QueryString WebApplicationFirewallMatchVariable = "QueryString" + // RemoteAddr ... + RemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" + // RequestBody ... + RequestBody WebApplicationFirewallMatchVariable = "RequestBody" + // RequestCookies ... + RequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" + // RequestHeaders ... + RequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" + // RequestMethod ... + RequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" + // RequestURI ... + RequestURI WebApplicationFirewallMatchVariable = "RequestUri" +) + +// PossibleWebApplicationFirewallMatchVariableValues returns an array of possible values for the WebApplicationFirewallMatchVariable const type. +func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewallMatchVariable { + return []WebApplicationFirewallMatchVariable{PostArgs, QueryString, RemoteAddr, RequestBody, RequestCookies, RequestHeaders, RequestMethod, RequestURI} +} + +// WebApplicationFirewallMode enumerates the values for web application firewall mode. +type WebApplicationFirewallMode string + +const ( + // WebApplicationFirewallModeDetection ... + WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" + // WebApplicationFirewallModePrevention ... + WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" +) + +// PossibleWebApplicationFirewallModeValues returns an array of possible values for the WebApplicationFirewallMode const type. +func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { + return []WebApplicationFirewallMode{WebApplicationFirewallModeDetection, WebApplicationFirewallModePrevention} +} + +// WebApplicationFirewallOperator enumerates the values for web application firewall operator. +type WebApplicationFirewallOperator string + +const ( + // WebApplicationFirewallOperatorBeginsWith ... + WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" + // WebApplicationFirewallOperatorContains ... + WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" + // WebApplicationFirewallOperatorEndsWith ... + WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" + // WebApplicationFirewallOperatorEqual ... + WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" + // WebApplicationFirewallOperatorGreaterThan ... + WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" + // WebApplicationFirewallOperatorGreaterThanOrEqual ... + WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" + // WebApplicationFirewallOperatorIPMatch ... + WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" + // WebApplicationFirewallOperatorLessThan ... + WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" + // WebApplicationFirewallOperatorLessThanOrEqual ... + WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" + // WebApplicationFirewallOperatorRegex ... + WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" +) + +// PossibleWebApplicationFirewallOperatorValues returns an array of possible values for the WebApplicationFirewallOperator const type. +func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOperator { + return []WebApplicationFirewallOperator{WebApplicationFirewallOperatorBeginsWith, WebApplicationFirewallOperatorContains, WebApplicationFirewallOperatorEndsWith, WebApplicationFirewallOperatorEqual, WebApplicationFirewallOperatorGreaterThan, WebApplicationFirewallOperatorGreaterThanOrEqual, WebApplicationFirewallOperatorIPMatch, WebApplicationFirewallOperatorLessThan, WebApplicationFirewallOperatorLessThanOrEqual, WebApplicationFirewallOperatorRegex} +} + +// WebApplicationFirewallPolicyResourceState enumerates the values for web application firewall policy resource +// state. +type WebApplicationFirewallPolicyResourceState string + +const ( + // WebApplicationFirewallPolicyResourceStateCreating ... + WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" + // WebApplicationFirewallPolicyResourceStateDeleting ... + WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" + // WebApplicationFirewallPolicyResourceStateDisabled ... + WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" + // WebApplicationFirewallPolicyResourceStateDisabling ... + WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" + // WebApplicationFirewallPolicyResourceStateEnabled ... + WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" + // WebApplicationFirewallPolicyResourceStateEnabling ... + WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" +) + +// PossibleWebApplicationFirewallPolicyResourceStateValues returns an array of possible values for the WebApplicationFirewallPolicyResourceState const type. +func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationFirewallPolicyResourceState { + return []WebApplicationFirewallPolicyResourceState{WebApplicationFirewallPolicyResourceStateCreating, WebApplicationFirewallPolicyResourceStateDeleting, WebApplicationFirewallPolicyResourceStateDisabled, WebApplicationFirewallPolicyResourceStateDisabling, WebApplicationFirewallPolicyResourceStateEnabled, WebApplicationFirewallPolicyResourceStateEnabling} +} + +// WebApplicationFirewallRuleType enumerates the values for web application firewall rule type. +type WebApplicationFirewallRuleType string + +const ( + // WebApplicationFirewallRuleTypeInvalid ... + WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" + // WebApplicationFirewallRuleTypeMatchRule ... + WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" +) + +// PossibleWebApplicationFirewallRuleTypeValues returns an array of possible values for the WebApplicationFirewallRuleType const type. +func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRuleType { + return []WebApplicationFirewallRuleType{WebApplicationFirewallRuleTypeInvalid, WebApplicationFirewallRuleTypeMatchRule} +} + +// WebApplicationFirewallTransform enumerates the values for web application firewall transform. +type WebApplicationFirewallTransform string + +const ( + // HTMLEntityDecode ... + HTMLEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" + // Lowercase ... + Lowercase WebApplicationFirewallTransform = "Lowercase" + // RemoveNulls ... + RemoveNulls WebApplicationFirewallTransform = "RemoveNulls" + // Trim ... + Trim WebApplicationFirewallTransform = "Trim" + // URLDecode ... + URLDecode WebApplicationFirewallTransform = "UrlDecode" + // URLEncode ... + URLEncode WebApplicationFirewallTransform = "UrlEncode" +) + +// PossibleWebApplicationFirewallTransformValues returns an array of possible values for the WebApplicationFirewallTransform const type. +func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTransform { + return []WebApplicationFirewallTransform{HTMLEntityDecode, Lowercase, RemoveNulls, Trim, URLDecode, URLEncode} +} + // AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the // virtual network. type AddressSpace struct { @@ -1718,14 +2005,17 @@ type AddressSpace struct { AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` } -// ApplicationGateway application gateway resource +// ApplicationGateway application gateway resource. type ApplicationGateway struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // ApplicationGatewayPropertiesFormat - Properties of the application gateway. *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // Zones - A list of availability zones denoting where the resource needs to come from. Zones *[]string `json:"zones,omitempty"` + // Identity - The identity of the application gateway, if configured. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -1750,6 +2040,9 @@ func (ag ApplicationGateway) MarshalJSON() ([]byte, error) { if ag.Zones != nil { objectMap["zones"] = ag.Zones } + if ag.Identity != nil { + objectMap["identity"] = ag.Identity + } if ag.ID != nil { objectMap["id"] = ag.ID } @@ -1798,6 +2091,15 @@ func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { } ag.Zones = &zones } + case "identity": + if v != nil { + var identity ManagedServiceIdentity + err = json.Unmarshal(*v, &identity) + if err != nil { + return err + } + ag.Identity = &identity + } case "id": if v != nil { var ID string @@ -1851,6 +2153,7 @@ func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error { // ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway. type ApplicationGatewayAuthenticationCertificate struct { + // ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate. *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the authentication certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -1954,14 +2257,17 @@ type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { // ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration. type ApplicationGatewayAutoscaleConfiguration struct { - // MinCapacity - Lower bound on number of Application Gateway instances + // MinCapacity - Lower bound on number of Application Gateway capacity. MinCapacity *int32 `json:"minCapacity,omitempty"` + // MaxCapacity - Upper bound on number of Application Gateway capacity. + MaxCapacity *int32 `json:"maxCapacity,omitempty"` } // ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service // call. type ApplicationGatewayAvailableSslOptions struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options. *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -2063,7 +2369,7 @@ func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) e } // ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of -// ApplicationGatewayAvailableSslOptions +// ApplicationGatewayAvailableSslOptions. type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { // PredefinedPolicies - List of available Ssl predefined policy. PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` @@ -2236,12 +2542,13 @@ type ApplicationGatewayAvailableWafRuleSetsResult struct { type ApplicationGatewayBackendAddress struct { // Fqdn - Fully qualified domain name (FQDN). Fqdn *string `json:"fqdn,omitempty"` - // IPAddress - IP address + // IPAddress - IP address. IPAddress *string `json:"ipAddress,omitempty"` } // ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway. type ApplicationGatewayBackendAddressPool struct { + // ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool. *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` // Name - Name of the backend address pool that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -2339,15 +2646,16 @@ func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) er type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { // BackendIPConfigurations - Collection of references to IPs defined in network interfaces. BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - // BackendAddresses - Backend addresses + // BackendAddresses - Backend addresses. BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` // ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources. +// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call. type ApplicationGatewayBackendHealth struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources. BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` } @@ -2359,6 +2667,15 @@ type ApplicationGatewayBackendHealthHTTPSettings struct { Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` } +// ApplicationGatewayBackendHealthOnDemand result of on demand test probe. +type ApplicationGatewayBackendHealthOnDemand struct { + autorest.Response `json:"-"` + // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. + BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` + // BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. + BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` +} + // ApplicationGatewayBackendHealthPool application gateway BackendHealth pool. type ApplicationGatewayBackendHealthPool struct { // BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource. @@ -2375,10 +2692,13 @@ type ApplicationGatewayBackendHealthServer struct { IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` // Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining' Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` + // HealthProbeLog - Health Probe Log. + HealthProbeLog *string `json:"healthProbeLog,omitempty"` } // ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway. type ApplicationGatewayBackendHTTPSettings struct { + // ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings. *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` // Name - Name of the backend http settings that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -2476,7 +2796,7 @@ func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) e type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { // Port - The destination port on the backend. Port *int32 `json:"port,omitempty"` - // Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS' + // Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled' CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` @@ -2531,7 +2851,7 @@ type ApplicationGatewayFirewallDisabledRuleGroup struct { } // ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF -// check +// check. type ApplicationGatewayFirewallExclusion struct { // MatchVariable - The variable to be excluded. MatchVariable *string `json:"matchVariable,omitempty"` @@ -2561,6 +2881,7 @@ type ApplicationGatewayFirewallRuleGroup struct { // ApplicationGatewayFirewallRuleSet a web application firewall rule set. type ApplicationGatewayFirewallRuleSet struct { + // ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set. *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -2675,6 +2996,7 @@ type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { // ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway. type ApplicationGatewayFrontendIPConfiguration struct { + // ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration. *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the frontend IP configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -2772,7 +3094,7 @@ func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byt type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { // PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration. PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic' + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` // Subnet - Reference of the subnet resource. Subnet *SubResource `json:"subnet,omitempty"` @@ -2784,8 +3106,9 @@ type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { // ApplicationGatewayFrontendPort frontend port of an application gateway. type ApplicationGatewayFrontendPort struct { + // ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port. *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - // Name - Name of the frontend port that is unique within an Application Gateway + // Name - Name of the frontend port that is unique within an Application Gateway. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -2878,14 +3201,23 @@ func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error { // ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway. type ApplicationGatewayFrontendPortPropertiesFormat struct { - // Port - Frontend port + // Port - Frontend port. Port *int32 `json:"port,omitempty"` // ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } +// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway. +type ApplicationGatewayHeaderConfiguration struct { + // HeaderName - Header name of the header configuration. + HeaderName *string `json:"headerName,omitempty"` + // HeaderValue - Header value of the header configuration. + HeaderValue *string `json:"headerValue,omitempty"` +} + // ApplicationGatewayHTTPListener http listener of an application gateway. type ApplicationGatewayHTTPListener struct { + // ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener. *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` // Name - Name of the HTTP listener that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -2984,7 +3316,7 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` // FrontendPort - Frontend port resource of an application gateway. FrontendPort *SubResource `json:"frontendPort,omitempty"` - // Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS' + // Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // HostName - Host name of HTTP listener. HostName *string `json:"hostName,omitempty"` @@ -3001,6 +3333,7 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { // ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 // private IP configuration is allowed. type ApplicationGatewayIPConfiguration struct { + // ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration. *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the IP configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3248,8 +3581,29 @@ func NewApplicationGatewayListResultPage(getNextPage func(context.Context, Appli return ApplicationGatewayListResultPage{fn: getNextPage} } +// ApplicationGatewayOnDemandProbe details of on demand test probe request. +type ApplicationGatewayOnDemandProbe struct { + // Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // Host - Host name to send the probe to. + Host *string `json:"host,omitempty"` + // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. + Path *string `json:"path,omitempty"` + // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + Timeout *int32 `json:"timeout,omitempty"` + // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. + PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` + // Match - Criterion for classifying a healthy probe response. + Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` + // BackendPoolName - Name of backend pool of application gateway to which probe request will be sent. + BackendPoolName *string `json:"backendPoolName,omitempty"` + // BackendHTTPSettingName - Name of backend http setting of application gateway to be used for test probe. + BackendHTTPSettingName *string `json:"backendHttpSettingName,omitempty"` +} + // ApplicationGatewayPathRule path rule of URL path map of an application gateway. type ApplicationGatewayPathRule struct { + // ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule. *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` // Name - Name of the path rule that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3352,12 +3706,15 @@ type ApplicationGatewayPathRulePropertiesFormat struct { BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` // RedirectConfiguration - Redirect configuration resource of URL path map path rule. RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + // RewriteRuleSet - Rewrite rule set resource of URL path map path rule. + RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` // ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } // ApplicationGatewayProbe probe of the application gateway. type ApplicationGatewayProbe struct { + // ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe. *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` // Name - Name of the probe that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3450,7 +3807,7 @@ func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error { return nil } -// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match +// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match. type ApplicationGatewayProbeHealthResponseMatch struct { // Body - Body that must be contained in the health response. Default value is empty. Body *string `json:"body,omitempty"` @@ -3460,15 +3817,15 @@ type ApplicationGatewayProbeHealthResponseMatch struct { // ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. type ApplicationGatewayProbePropertiesFormat struct { - // Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS' + // Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // Host - Host name to send the probe to. Host *string `json:"host,omitempty"` - // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://: + // Path - Relative path of probe. Valid path starts from '/'. Probe is sent to ://:. Path *string `json:"path,omitempty"` // Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds. Interval *int32 `json:"interval,omitempty"` - // Timeout - the probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + // Timeout - The probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period. Acceptable values are from 1 second to 86400 seconds. Timeout *int32 `json:"timeout,omitempty"` // UnhealthyThreshold - The probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second to 20. UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` @@ -3480,6 +3837,8 @@ type ApplicationGatewayProbePropertiesFormat struct { Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` // ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` + // Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only. + Port *int32 `json:"port,omitempty"` } // ApplicationGatewayPropertiesFormat properties of the application gateway. @@ -3490,34 +3849,38 @@ type ApplicationGatewayPropertiesFormat struct { SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` // OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping' OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - // GatewayIPConfigurations - Subnets of application the gateway resource. + // GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - // AuthenticationCertificates - Authentication certificates of the application gateway resource. + // AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - // TrustedRootCertificates - Trusted Root certificates of the application gateway resource. + // TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - // SslCertificates - SSL certificates of the application gateway resource. + // SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. + // FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - // FrontendPorts - Frontend ports of the application gateway resource. + // FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` // Probes - Probes of the application gateway resource. Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - // BackendAddressPools - Backend address pool of the application gateway resource. + // BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. + // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - // HTTPListeners - Http listeners of the application gateway resource. + // HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - // URLPathMaps - URL path map of the application gateway resource. + // URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` // RequestRoutingRules - Request routing rules of the application gateway resource. RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - // RedirectConfigurations - Redirect configurations of the application gateway resource. + // RewriteRuleSets - Rewrite rules for the application gateway resource. + RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` + // RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` // WebApplicationFirewallConfiguration - Web application firewall configuration. WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` + // FirewallPolicy - Reference of the FirewallPolicy resource. + FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` // EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource. EnableHTTP2 *bool `json:"enableHttp2,omitempty"` // EnableFips - Whether FIPS is enabled on the application gateway resource. @@ -3534,6 +3897,7 @@ type ApplicationGatewayPropertiesFormat struct { // ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway. type ApplicationGatewayRedirectConfiguration struct { + // ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration. *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the redirect configuration that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3629,7 +3993,7 @@ func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) // ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the // application gateway. type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - // RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary' + // RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary' RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` // TargetListener - Reference to a listener to redirect the request to. TargetListener *SubResource `json:"targetListener,omitempty"` @@ -3649,6 +4013,7 @@ type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { // ApplicationGatewayRequestRoutingRule request routing rule of an application gateway. type ApplicationGatewayRequestRoutingRule struct { + // ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule. *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` // Name - Name of the request routing rule that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3754,12 +4119,133 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { HTTPListener *SubResource `json:"httpListener,omitempty"` // URLPathMap - URL path map resource of the application gateway. URLPathMap *SubResource `json:"urlPathMap,omitempty"` + // RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway. + RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` // RedirectConfiguration - Redirect configuration resource of the application gateway. RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` // ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } +// ApplicationGatewayRewriteRule rewrite rule of an application gateway. +type ApplicationGatewayRewriteRule struct { + // Name - Name of the rewrite rule that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet. + RuleSequence *int32 `json:"ruleSequence,omitempty"` + // Conditions - Conditions based on which the action set execution will be evaluated. + Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` + // ActionSet - Set of actions to be done as part of the rewrite Rule. + ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` +} + +// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleActionSet struct { + // RequestHeaderConfigurations - Request Header Actions in the Action Set. + RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` + // ResponseHeaderConfigurations - Response Header Actions in the Action Set. + ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` +} + +// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway. +type ApplicationGatewayRewriteRuleCondition struct { + // Variable - The condition parameter of the RewriteRuleCondition. + Variable *string `json:"variable,omitempty"` + // Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition. + Pattern *string `json:"pattern,omitempty"` + // IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison. + IgnoreCase *bool `json:"ignoreCase,omitempty"` + // Negate - Setting this value as truth will force to check the negation of the condition given by the user. + Negate *bool `json:"negate,omitempty"` +} + +// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway. +type ApplicationGatewayRewriteRuleSet struct { + // ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set. + *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the rewrite rule set that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet. +func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil { + objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat + } + if agrrs.Name != nil { + objectMap["name"] = agrrs.Name + } + if agrrs.ID != nil { + objectMap["id"] = agrrs.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct. +func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat) + if err != nil { + return err + } + agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agrrs.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agrrs.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agrrs.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application +// gateway. +type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { + // RewriteRules - Rewrite rules in the rewrite rule set. + RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + // ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ApplicationGatewaysBackendHealthFuture struct { @@ -3789,6 +4275,35 @@ func (future *ApplicationGatewaysBackendHealthFuture) Result(client ApplicationG return } +// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ApplicationGatewaysBackendHealthOnDemandFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationGatewaysBackendHealthOnDemandFuture) Result(client ApplicationGatewaysClient) (agbhod ApplicationGatewayBackendHealthOnDemand, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthOnDemandFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if agbhod.Response.Response, err = future.GetResult(sender); err == nil && agbhod.Response.Response.StatusCode != http.StatusNoContent { + agbhod, err = client.BackendHealthOnDemandResponder(agbhod.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthOnDemandFuture", "Result", agbhod.Response.Response, "Failure responding to request") + } + } + return +} + // ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ApplicationGatewaysCreateOrUpdateFuture struct { @@ -3841,7 +4356,7 @@ func (future *ApplicationGatewaysDeleteFuture) Result(client ApplicationGateways return } -// ApplicationGatewaySku SKU of an application gateway +// ApplicationGatewaySku SKU of an application gateway. type ApplicationGatewaySku struct { // Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2' Name ApplicationGatewaySkuName `json:"name,omitempty"` @@ -3853,6 +4368,7 @@ type ApplicationGatewaySku struct { // ApplicationGatewaySslCertificate SSL certificates of an application gateway. type ApplicationGatewaySslCertificate struct { + // ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate. *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the SSL certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -3954,6 +4470,8 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { Password *string `json:"password,omitempty"` // PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request. PublicCertData *string `json:"publicCertData,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` // ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -3972,11 +4490,12 @@ type ApplicationGatewaySslPolicy struct { MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` } -// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy +// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy. type ApplicationGatewaySslPredefinedPolicy struct { autorest.Response `json:"-"` // Name - Name of the Ssl predefined policy. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + // ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy. *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -4040,7 +4559,7 @@ func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) e } // ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of -// ApplicationGatewaySslPredefinedPolicy +// ApplicationGatewaySslPredefinedPolicy. type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { // CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway. CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` @@ -4125,6 +4644,7 @@ func (future *ApplicationGatewaysUpdateTagsFuture) Result(client ApplicationGate // ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway. type ApplicationGatewayTrustedRootCertificate struct { + // ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate. *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` // Name - Name of the trusted root certificate that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -4222,8 +4742,8 @@ func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { // Data - Certificate public data. Data *string `json:"data,omitempty"` - // KeyvaultSecretID - KeyVault Secret Id for certificate. - KeyvaultSecretID *string `json:"keyvaultSecretId,omitempty"` + // KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. + KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"` // ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -4231,6 +4751,7 @@ type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { // ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for // PathBasedRouting. type ApplicationGatewayURLPathMap struct { + // ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map. *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` // Name - Name of the URL path map that is unique within an Application Gateway. Name *string `json:"name,omitempty"` @@ -4329,6 +4850,8 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` // DefaultBackendHTTPSettings - Default backend http settings resource of URL path map. DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` + // DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map. + DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` // PathRules - Path rule of URL path map resource. @@ -4684,6 +5207,35 @@ func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSe return } +// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ApplicationSecurityGroupsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ApplicationSecurityGroupsUpdateTagsFuture) Result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent { + asg, err = client.UpdateTagsResponder(asg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request") + } + } + return +} + // AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations // that belongs to an ExpressRouteCircuit. type AuthorizationListResult struct { @@ -4832,38 +5384,192 @@ func NewAuthorizationListResultPage(getNextPage func(context.Context, Authorizat return AuthorizationListResultPage{fn: getNextPage} } -// AuthorizationPropertiesFormat ... +// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization. type AuthorizationPropertiesFormat struct { // AuthorizationKey - The authorization key. AuthorizationKey *string `json:"authorizationKey,omitempty"` - // AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse' + // AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse' AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// Availability availability of the metric. -type Availability struct { - // TimeGrain - The time grain of the availability. - TimeGrain *string `json:"timeGrain,omitempty"` - // Retention - The retention of the availability. - Retention *string `json:"retention,omitempty"` - // BlobDuration - Duration of the availability blob. - BlobDuration *string `json:"blobDuration,omitempty"` +// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService. +type AutoApprovedPrivateLinkService struct { + // PrivateLinkService - The id of the private link service resource. + PrivateLinkService *string `json:"privateLinkService,omitempty"` } -// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a -// subnet. -type AvailableDelegation struct { - // Name - The name of the AvailableDelegation resource. - Name *string `json:"name,omitempty"` - // ID - A unique identifier of the AvailableDelegation resource. +// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a +// private end point with auto approved. +type AutoApprovedPrivateLinkServicesResult struct { + autorest.Response `json:"-"` + // Value - An array of auto approved private link service. + Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of +// AutoApprovedPrivateLinkService values. +type AutoApprovedPrivateLinkServicesResultIterator struct { + i int + page AutoApprovedPrivateLinkServicesResultPage +} + +// 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 *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.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 *AutoApprovedPrivateLinkServicesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AutoApprovedPrivateLinkServicesResultIterator) 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 AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult { + 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 AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService { + if !iter.page.NotDone() { + return AutoApprovedPrivateLinkService{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type. +func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator { + return AutoApprovedPrivateLinkServicesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool { + return aaplsr.Value == nil || len(*aaplsr.Value) == 0 +} + +// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) { + if aaplsr.NextLink == nil || len(to.String(aaplsr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(aaplsr.NextLink))) +} + +// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values. +type AutoApprovedPrivateLinkServicesResultPage struct { + fn func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error) + aaplsr AutoApprovedPrivateLinkServicesResult +} + +// 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 *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.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.aaplsr) + if err != nil { + return err + } + page.aaplsr = 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 *AutoApprovedPrivateLinkServicesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool { + return !page.aaplsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult { + return page.aaplsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService { + if page.aaplsr.IsEmpty() { + return nil + } + return *page.aaplsr.Value +} + +// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type. +func NewAutoApprovedPrivateLinkServicesResultPage(getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage { + return AutoApprovedPrivateLinkServicesResultPage{fn: getNextPage} +} + +// Availability availability of the metric. +type Availability struct { + // TimeGrain - The time grain of the availability. + TimeGrain *string `json:"timeGrain,omitempty"` + // Retention - The retention of the availability. + Retention *string `json:"retention,omitempty"` + // BlobDuration - Duration of the availability blob. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a +// subnet. +type AvailableDelegation struct { + // Name - The name of the AvailableDelegation resource. + Name *string `json:"name,omitempty"` + // ID - A unique identifier of the AvailableDelegation resource. ID *string `json:"id,omitempty"` // Type - Resource type. Type *string `json:"type,omitempty"` - // ServiceName - The name of the service and resource + // ServiceName - The name of the service and resource. ServiceName *string `json:"serviceName,omitempty"` - // Actions - Describes the actions permitted to the service upon delegation + // Actions - Describes the actions permitted to the service upon delegation. Actions *[]string `json:"actions,omitempty"` } @@ -5013,6 +5719,165 @@ func NewAvailableDelegationsResultPage(getNextPage func(context.Context, Availab return AvailableDelegationsResultPage{fn: getNextPage} } +// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType. +type AvailablePrivateEndpointType struct { + // Name - The name of the service and resource. + Name *string `json:"name,omitempty"` + // ID - A unique identifier of the AvailablePrivateEndpoint Type resource. + ID *string `json:"id,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` + // ResourceName - The name of the service and resource. + ResourceName *string `json:"resourceName,omitempty"` +} + +// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types. +type AvailablePrivateEndpointTypesResult struct { + autorest.Response `json:"-"` + // Value - An array of available privateEndpoint type. + Value *[]AvailablePrivateEndpointType `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of +// AvailablePrivateEndpointType values. +type AvailablePrivateEndpointTypesResultIterator struct { + i int + page AvailablePrivateEndpointTypesResultPage +} + +// 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 *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.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 *AvailablePrivateEndpointTypesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter AvailablePrivateEndpointTypesResultIterator) 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 AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult { + 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 AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType { + if !iter.page.NotDone() { + return AvailablePrivateEndpointType{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type. +func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator { + return AvailablePrivateEndpointTypesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool { + return apetr.Value == nil || len(*apetr.Value) == 0 +} + +// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) { + if apetr.NextLink == nil || len(to.String(apetr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(apetr.NextLink))) +} + +// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values. +type AvailablePrivateEndpointTypesResultPage struct { + fn func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error) + apetr AvailablePrivateEndpointTypesResult +} + +// 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 *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.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.apetr) + if err != nil { + return err + } + page.apetr = 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 *AvailablePrivateEndpointTypesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool { + return !page.apetr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult { + return page.apetr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType { + if page.apetr.IsEmpty() { + return nil + } + return *page.apetr.Value +} + +// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type. +func NewAvailablePrivateEndpointTypesResultPage(getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage { + return AvailablePrivateEndpointTypesResultPage{fn: getNextPage} +} + // AvailableProvidersList list of available countries with details. type AvailableProvidersList struct { autorest.Response `json:"-"` @@ -5068,15 +5933,19 @@ type AvailableProvidersListState struct { // asynchronous operation failed, the response body includes the HTTP status code for the failed request // and error information regarding the failure. type AzureAsyncOperationResult struct { - // Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' + // Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed' Status OperationStatus `json:"status,omitempty"` - Error *Error `json:"error,omitempty"` + // Error - Details of the error occurred during specified asynchronous operation. + Error *Error `json:"error,omitempty"` } -// AzureFirewall azure Firewall resource +// AzureFirewall azure Firewall resource. type AzureFirewall struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // AzureFirewallPropertiesFormat - Properties of the azure firewall. *AzureFirewallPropertiesFormat `json:"properties,omitempty"` + // Zones - A list of availability zones denoting where the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. @@ -5097,6 +5966,9 @@ func (af AzureFirewall) MarshalJSON() ([]byte, error) { if af.AzureFirewallPropertiesFormat != nil { objectMap["properties"] = af.AzureFirewallPropertiesFormat } + if af.Zones != nil { + objectMap["zones"] = af.Zones + } if af.ID != nil { objectMap["id"] = af.ID } @@ -5127,6 +5999,15 @@ func (af *AzureFirewall) UnmarshalJSON(body []byte) error { } af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + af.Zones = &zones + } case "etag": if v != nil { var etag string @@ -5203,8 +6084,9 @@ type AzureFirewallApplicationRule struct { FqdnTags *[]string `json:"fqdnTags,omitempty"` } -// AzureFirewallApplicationRuleCollection application rule collection resource +// AzureFirewallApplicationRuleCollection application rule collection resource. type AzureFirewallApplicationRuleCollection struct { + // AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection. *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -5284,7 +6166,7 @@ func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { // Priority - Priority of the application rule collection resource. Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a rule collection + // Action - The action type of a rule collection. Action *AzureFirewallRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a application rule collection. Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` @@ -5300,8 +6182,9 @@ type AzureFirewallApplicationRuleProtocol struct { Port *int32 `json:"port,omitempty"` } -// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource +// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource. type AzureFirewallFqdnTag struct { + // AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag. *AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -5560,7 +6443,7 @@ func NewAzureFirewallFqdnTagListResultPage(getNextPage func(context.Context, Azu return AzureFirewallFqdnTagListResultPage{fn: getNextPage} } -// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties +// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties. type AzureFirewallFqdnTagPropertiesFormat struct { // ProvisioningState - READ-ONLY; The provisioning state of the resource. ProvisioningState *string `json:"provisioningState,omitempty"` @@ -5570,6 +6453,7 @@ type AzureFirewallFqdnTagPropertiesFormat struct { // AzureFirewallIPConfiguration IP configuration of an Azure Firewall. type AzureFirewallIPConfiguration struct { + // AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration. *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -5647,7 +6531,7 @@ func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error { // AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall. type AzureFirewallIPConfigurationPropertiesFormat struct { - // PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. + // PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes. PrivateIPAddress *string `json:"privateIPAddress,omitempty"` // Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'. Subnet *SubResource `json:"subnet,omitempty"` @@ -5817,7 +6701,7 @@ type AzureFirewallNatRule struct { Description *string `json:"description,omitempty"` // SourceAddresses - List of source IP addresses for this rule. SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - // DestinationAddresses - List of destination IP addresses for this rule. + // DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags. DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` // DestinationPorts - List of destination ports. DestinationPorts *[]string `json:"destinationPorts,omitempty"` @@ -5829,8 +6713,9 @@ type AzureFirewallNatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` } -// AzureFirewallNatRuleCollection NAT rule collection resource +// AzureFirewallNatRuleCollection NAT rule collection resource. type AzureFirewallNatRuleCollection struct { + // AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection. *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -5910,7 +6795,7 @@ func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error { type AzureFirewallNatRuleCollectionProperties struct { // Priority - Priority of the NAT rule collection resource. Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a NAT rule collection + // Action - The action type of a NAT rule collection. Action *AzureFirewallNatRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a NAT rule collection. Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` @@ -5934,8 +6819,9 @@ type AzureFirewallNetworkRule struct { DestinationPorts *[]string `json:"destinationPorts,omitempty"` } -// AzureFirewallNetworkRuleCollection network rule collection resource +// AzureFirewallNetworkRuleCollection network rule collection resource. type AzureFirewallNetworkRuleCollection struct { + // AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection. *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -6015,7 +6901,7 @@ func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) erro type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { // Priority - Priority of the network rule collection resource. Priority *int32 `json:"priority,omitempty"` - // Action - The action type of a rule collection + // Action - The action type of a rule collection. Action *AzureFirewallRCAction `json:"action,omitempty"` // Rules - Collection of rules used by a network rule collection. Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` @@ -6035,6 +6921,8 @@ type AzureFirewallPropertiesFormat struct { IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff' + ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` } // AzureFirewallRCAction properties of the AzureFirewallRCAction. @@ -6099,7 +6987,8 @@ func (future *AzureFirewallsDeleteFuture) Result(client AzureFirewallsClient) (a type AzureReachabilityReport struct { autorest.Response `json:"-"` // AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City. - AggregationLevel *string `json:"aggregationLevel,omitempty"` + AggregationLevel *string `json:"aggregationLevel,omitempty"` + // ProviderLocation - Parameters that define a geographic location. ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` // ReachabilityReport - List of Azure reachability report items. ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` @@ -6135,6 +7024,7 @@ type AzureReachabilityReportLocation struct { // AzureReachabilityReportParameters geographic and time constraints for Azure reachability report. type AzureReachabilityReportParameters struct { + // ProviderLocation - Parameters that define a geographic location. ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` // Providers - List of Internet service providers. Providers *[]string `json:"providers,omitempty"` @@ -6151,10 +7041,12 @@ type BackendAddressPool struct { autorest.Response `json:"-"` // BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool. *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + // Name - Gets name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } @@ -6213,6 +7105,15 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { } bap.Etag = &etag } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bap.Type = &typeVar + } case "id": if v != nil { var ID string @@ -6236,56 +7137,19 @@ type BackendAddressPoolPropertiesFormat struct { LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` // OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool. OutboundRule *SubResource `json:"outboundRule,omitempty"` + // OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool. + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` // ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// BGPCommunity contains bgp community information offered in Service Community resources. -type BGPCommunity struct { - // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` - // CommunityName - The name of the bgp community. e.g. Skype. - CommunityName *string `json:"communityName,omitempty"` - // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - CommunityValue *string `json:"communityValue,omitempty"` - // CommunityPrefixes - The prefixes that the bgp community contains. - CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` - // IsAuthorizedToUse - Customer is authorized to use bgp community or not. - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - // ServiceGroup - The service group of the bgp community contains. - ServiceGroup *string `json:"serviceGroup,omitempty"` -} - -// BgpPeerStatus BGP peer status details -type BgpPeerStatus struct { - // LocalAddress - READ-ONLY; The virtual network gateway's local address - LocalAddress *string `json:"localAddress,omitempty"` - // Neighbor - READ-ONLY; The remote BGP peer - Neighbor *string `json:"neighbor,omitempty"` - // Asn - READ-ONLY; The autonomous system number of the remote BGP peer - Asn *int32 `json:"asn,omitempty"` - // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' - State BgpPeerState `json:"state,omitempty"` - // ConnectedDuration - READ-ONLY; For how long the peering has been up - ConnectedDuration *string `json:"connectedDuration,omitempty"` - // RoutesReceived - READ-ONLY; The number of routes learned from this peer - RoutesReceived *int64 `json:"routesReceived,omitempty"` - // MessagesSent - READ-ONLY; The number of BGP messages sent - MessagesSent *int64 `json:"messagesSent,omitempty"` - // MessagesReceived - READ-ONLY; The number of BGP messages received - MessagesReceived *int64 `json:"messagesReceived,omitempty"` -} - -// BgpPeerStatusListResult response for list BGP peer status API service call -type BgpPeerStatusListResult struct { +// BastionHost bastion Host resource. +type BastionHost struct { autorest.Response `json:"-"` - // Value - List of BGP peers - Value *[]BgpPeerStatus `json:"value,omitempty"` -} - -// BgpServiceCommunity service Community Properties. -type BgpServiceCommunity struct { - *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` + // BastionHostPropertiesFormat - Represents the bastion host resource. + *BastionHostPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -6298,26 +7162,26 @@ type BgpServiceCommunity struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for BgpServiceCommunity. -func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for BastionHost. +func (bh BastionHost) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if bsc.BgpServiceCommunityPropertiesFormat != nil { - objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat + if bh.BastionHostPropertiesFormat != nil { + objectMap["properties"] = bh.BastionHostPropertiesFormat } - if bsc.ID != nil { - objectMap["id"] = bsc.ID + if bh.ID != nil { + objectMap["id"] = bh.ID } - if bsc.Location != nil { - objectMap["location"] = bsc.Location + if bh.Location != nil { + objectMap["location"] = bh.Location } - if bsc.Tags != nil { - objectMap["tags"] = bsc.Tags + if bh.Tags != nil { + objectMap["tags"] = bh.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. -func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for BastionHost struct. +func (bh *BastionHost) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -6327,12 +7191,21 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat - err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) + var bastionHostPropertiesFormat BastionHostPropertiesFormat + err = json.Unmarshal(*v, &bastionHostPropertiesFormat) if err != nil { return err } - bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat + bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bh.Etag = &etag } case "id": if v != nil { @@ -6341,7 +7214,7 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.ID = &ID + bh.ID = &ID } case "name": if v != nil { @@ -6350,7 +7223,7 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.Name = &name + bh.Name = &name } case "type": if v != nil { @@ -6359,7 +7232,7 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.Type = &typeVar + bh.Type = &typeVar } case "location": if v != nil { @@ -6368,7 +7241,7 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.Location = &location + bh.Location = &location } case "tags": if v != nil { @@ -6377,7 +7250,7 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { if err != nil { return err } - bsc.Tags = tags + bh.Tags = tags } } } @@ -6385,27 +7258,127 @@ func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { return nil } -// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. -type BgpServiceCommunityListResult struct { +// BastionHostIPConfiguration IP configuration of an Bastion Host. +type BastionHostIPConfiguration struct { + // BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource. + *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Ip configuration type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for BastionHostIPConfiguration. +func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if bhic.BastionHostIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat + } + if bhic.Name != nil { + objectMap["name"] = bhic.Name + } + if bhic.ID != nil { + objectMap["id"] = bhic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct. +func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error { + 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 bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat) + if err != nil { + return err + } + bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bhic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bhic.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bhic.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bhic.ID = &ID + } + } + } + + return nil +} + +// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host. +type BastionHostIPConfigurationPropertiesFormat struct { + // Subnet - Reference of the subnet resource. + Subnet *SubResource `json:"subnet,omitempty"` + // PublicIPAddress - Reference of the PublicIP resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` +} + +// BastionHostListResult response for ListBastionHosts API service call. +type BastionHostListResult struct { autorest.Response `json:"-"` - // Value - A list of service community resources. - Value *[]BgpServiceCommunity `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - List of Bastion Hosts in a resource group. + Value *[]BastionHost `json:"value,omitempty"` + // NextLink - URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity -// values. -type BgpServiceCommunityListResultIterator struct { +// BastionHostListResultIterator provides access to a complete listing of BastionHost values. +type BastionHostListResultIterator struct { i int - page BgpServiceCommunityListResultPage + page BastionHostListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -6430,62 +7403,62 @@ func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.C // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *BgpServiceCommunityListResultIterator) Next() error { +func (iter *BastionHostListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter BgpServiceCommunityListResultIterator) NotDone() bool { +func (iter BastionHostListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { +func (iter BastionHostListResultIterator) Response() BastionHostListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { +func (iter BastionHostListResultIterator) Value() BastionHost { if !iter.page.NotDone() { - return BgpServiceCommunity{} + return BastionHost{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the BgpServiceCommunityListResultIterator type. -func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator { - return BgpServiceCommunityListResultIterator{page: page} +// Creates a new instance of the BastionHostListResultIterator type. +func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator { + return BastionHostListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { - return bsclr.Value == nil || len(*bsclr.Value) == 0 +func (bhlr BastionHostListResult) IsEmpty() bool { + return bhlr.Value == nil || len(*bhlr.Value) == 0 } -// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. +// bastionHostListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) { - if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { +func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) { + if bhlr.NextLink == nil || len(to.String(bhlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(bsclr.NextLink))) + autorest.WithBaseURL(to.String(bhlr.NextLink))) } -// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. -type BgpServiceCommunityListResultPage struct { - fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) - bsclr BgpServiceCommunityListResult +// BastionHostListResultPage contains a page of BastionHost values. +type BastionHostListResultPage struct { + fn func(context.Context, BastionHostListResult) (BastionHostListResult, error) + bhlr BastionHostListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -6494,239 +7467,185 @@ func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.bsclr) + next, err := page.fn(ctx, page.bhlr) if err != nil { return err } - page.bsclr = next + page.bhlr = 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 *BgpServiceCommunityListResultPage) Next() error { +func (page *BastionHostListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page BgpServiceCommunityListResultPage) NotDone() bool { - return !page.bsclr.IsEmpty() +func (page BastionHostListResultPage) NotDone() bool { + return !page.bhlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { - return page.bsclr +func (page BastionHostListResultPage) Response() BastionHostListResult { + return page.bhlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { - if page.bsclr.IsEmpty() { +func (page BastionHostListResultPage) Values() []BastionHost { + if page.bhlr.IsEmpty() { return nil } - return *page.bsclr.Value + return *page.bhlr.Value } -// Creates a new instance of the BgpServiceCommunityListResultPage type. -func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { - return BgpServiceCommunityListResultPage{fn: getNextPage} +// Creates a new instance of the BastionHostListResultPage type. +func NewBastionHostListResultPage(getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage { + return BastionHostListResultPage{fn: getNextPage} } -// BgpServiceCommunityPropertiesFormat properties of Service Community. -type BgpServiceCommunityPropertiesFormat struct { - // ServiceName - The name of the bgp community. e.g. Skype. - ServiceName *string `json:"serviceName,omitempty"` - // BgpCommunities - Get a list of bgp communities. - BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` +// BastionHostPropertiesFormat properties of the Bastion Host. +type BastionHostPropertiesFormat struct { + // IPConfigurations - IP configuration of the Bastion Host resource. + IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` + // DNSName - FQDN for the endpoint on which bastion host is accessible. + DNSName *string `json:"dnsName,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// BgpSettings BGP settings details -type BgpSettings struct { - // Asn - The BGP speaker's ASN. - Asn *int64 `json:"asn,omitempty"` - // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - // PeerWeight - The weight added to routes learned from this BGP speaker. - PeerWeight *int32 `json:"peerWeight,omitempty"` +// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type BastionHostsCreateOrUpdateFuture struct { + azure.Future } -// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic. -type ConfigurationDiagnosticParameters struct { - // TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full' - VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"` - // Profiles - List of network configuration diagnostic profiles. - Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *BastionHostsCreateOrUpdateFuture) Result(client BastionHostsClient) (bh BastionHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.BastionHostsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { + bh, err = client.CreateOrUpdateResponder(bh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsCreateOrUpdateFuture", "Result", bh.Response.Response, "Failure responding to request") + } + } + return } -// ConfigurationDiagnosticProfile parameters to compare with network configuration. -type ConfigurationDiagnosticProfile struct { - // Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound' - Direction Direction `json:"direction,omitempty"` - // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP. - Protocol *string `json:"protocol,omitempty"` - // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. - Source *string `json:"source,omitempty"` - // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. - Destination *string `json:"destination,omitempty"` - // DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). - DestinationPort *string `json:"destinationPort,omitempty"` +// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BastionHostsDeleteFuture struct { + azure.Future } -// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource. -type ConfigurationDiagnosticResponse struct { - autorest.Response `json:"-"` - // Results - READ-ONLY; List of network configuration diagnostic results. - Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *BastionHostsDeleteFuture) Result(client BastionHostsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.BastionHostsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic -// query. -type ConfigurationDiagnosticResult struct { - Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"` - NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` -} - -// ConnectionMonitor parameters that define the operation to create a connection monitor. -type ConnectionMonitor struct { - // Location - Connection monitor location. - Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - *ConnectionMonitorParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ConnectionMonitor. -func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cm.Location != nil { - objectMap["location"] = cm.Location - } - if cm.Tags != nil { - objectMap["tags"] = cm.Tags - } - if cm.ConnectionMonitorParameters != nil { - objectMap["properties"] = cm.ConnectionMonitorParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. -func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - cm.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - cm.Tags = tags - } - case "properties": - if v != nil { - var connectionMonitorParameters ConnectionMonitorParameters - err = json.Unmarshal(*v, &connectionMonitorParameters) - if err != nil { - return err - } - cm.ConnectionMonitorParameters = &connectionMonitorParameters - } - } - } - - return nil -} - -// ConnectionMonitorDestination describes the destination of connection monitor. -type ConnectionMonitorDestination struct { - // ResourceID - The ID of the resource used as the destination by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Address - Address of the connection monitor destination (IP or domain name). - Address *string `json:"address,omitempty"` - // Port - The destination port used by connection monitor. - Port *int32 `json:"port,omitempty"` -} - -// ConnectionMonitorListResult list of connection monitors. -type ConnectionMonitorListResult struct { - autorest.Response `json:"-"` - // Value - Information about connection monitors. - Value *[]ConnectionMonitorResult `json:"value,omitempty"` +// BGPCommunity contains bgp community information offered in Service Community resources. +type BGPCommunity struct { + // ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global. + ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` + // CommunityName - The name of the bgp community. e.g. Skype. + CommunityName *string `json:"communityName,omitempty"` + // CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + CommunityValue *string `json:"communityValue,omitempty"` + // CommunityPrefixes - The prefixes that the bgp community contains. + CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` + // IsAuthorizedToUse - Customer is authorized to use bgp community or not. + IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` + // ServiceGroup - The service group of the bgp community contains. + ServiceGroup *string `json:"serviceGroup,omitempty"` } -// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. -type ConnectionMonitorParameters struct { - Source *ConnectionMonitorSource `json:"source,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` +// BgpPeerStatus BGP peer status details. +type BgpPeerStatus struct { + // LocalAddress - READ-ONLY; The virtual network gateway's local address. + LocalAddress *string `json:"localAddress,omitempty"` + // Neighbor - READ-ONLY; The remote BGP peer. + Neighbor *string `json:"neighbor,omitempty"` + // Asn - READ-ONLY; The autonomous system number of the remote BGP peer. + Asn *int32 `json:"asn,omitempty"` + // State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected' + State BgpPeerState `json:"state,omitempty"` + // ConnectedDuration - READ-ONLY; For how long the peering has been up. + ConnectedDuration *string `json:"connectedDuration,omitempty"` + // RoutesReceived - READ-ONLY; The number of routes learned from this peer. + RoutesReceived *int64 `json:"routesReceived,omitempty"` + // MessagesSent - READ-ONLY; The number of BGP messages sent. + MessagesSent *int64 `json:"messagesSent,omitempty"` + // MessagesReceived - READ-ONLY; The number of BGP messages received. + MessagesReceived *int64 `json:"messagesReceived,omitempty"` } -// ConnectionMonitorQueryResult list of connection states snapshots. -type ConnectionMonitorQueryResult struct { +// BgpPeerStatusListResult response for list BGP peer status API service call. +type BgpPeerStatusListResult struct { autorest.Response `json:"-"` - // SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive' - SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - // States - Information about connection states. - States *[]ConnectionStateSnapshot `json:"states,omitempty"` + // Value - List of BGP peers. + Value *[]BgpPeerStatus `json:"value,omitempty"` } -// ConnectionMonitorResult information about the connection monitor. -type ConnectionMonitorResult struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; Name of the connection monitor. +// BgpServiceCommunity service Community Properties. +type BgpServiceCommunity struct { + // BgpServiceCommunityPropertiesFormat - Properties of the BGP service community. + *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` - // ID - READ-ONLY; ID of the connection monitor. - ID *string `json:"id,omitempty"` - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Connection monitor type. + // Type - READ-ONLY; Resource type. Type *string `json:"type,omitempty"` - // Location - Connection monitor location. + // Location - Resource location. Location *string `json:"location,omitempty"` - // Tags - Connection monitor tags. - Tags map[string]*string `json:"tags"` - *ConnectionMonitorResultProperties `json:"properties,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ConnectionMonitorResult. -func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for BgpServiceCommunity. +func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if cmr.Etag != nil { - objectMap["etag"] = cmr.Etag + if bsc.BgpServiceCommunityPropertiesFormat != nil { + objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat } - if cmr.Location != nil { - objectMap["location"] = cmr.Location + if bsc.ID != nil { + objectMap["id"] = bsc.ID } - if cmr.Tags != nil { - objectMap["tags"] = cmr.Tags + if bsc.Location != nil { + objectMap["location"] = bsc.Location } - if cmr.ConnectionMonitorResultProperties != nil { - objectMap["properties"] = cmr.ConnectionMonitorResultProperties + if bsc.Tags != nil { + objectMap["tags"] = bsc.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. -func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct. +func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -6734,14 +7653,14 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "name": + case "properties": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat + err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat) if err != nil { return err } - cmr.Name = &name + bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat } case "id": if v != nil { @@ -6750,16 +7669,16 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - cmr.ID = &ID + bsc.ID = &ID } - case "etag": + case "name": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - cmr.Etag = &etag + bsc.Name = &name } case "type": if v != nil { @@ -6768,7 +7687,7 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - cmr.Type = &typeVar + bsc.Type = &typeVar } case "location": if v != nil { @@ -6777,7 +7696,7 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - cmr.Location = &location + bsc.Location = &location } case "tags": if v != nil { @@ -6786,16 +7705,7 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - cmr.Tags = tags - } - case "properties": - if v != nil { - var connectionMonitorResultProperties ConnectionMonitorResultProperties - err = json.Unmarshal(*v, &connectionMonitorResultProperties) - if err != nil { - return err - } - cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties + bsc.Tags = tags } } } @@ -6803,311 +7713,263 @@ func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { return nil } -// ConnectionMonitorResultProperties describes the properties of a connection monitor. -type ConnectionMonitorResultProperties struct { - // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // StartTime - The date and time when the connection monitor was started. - StartTime *date.Time `json:"startTime,omitempty"` - // MonitoringStatus - The monitoring status of the connection monitor. - MonitoringStatus *string `json:"monitoringStatus,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - // AutoStart - Determines if the connection monitor will start automatically once created. - AutoStart *bool `json:"autoStart,omitempty"` - // MonitoringIntervalInSeconds - Monitoring interval in seconds. - MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` +// BgpServiceCommunityListResult response for the ListServiceCommunity API service call. +type BgpServiceCommunityListResult struct { + autorest.Response `json:"-"` + // Value - A list of service community resources. + Value *[]BgpServiceCommunity `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConnectionMonitorsCreateOrUpdateFuture struct { - azure.Future +// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity +// values. +type BgpServiceCommunityListResultIterator struct { + i int + page BgpServiceCommunityListResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") - return +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { - cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") - } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - return + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ConnectionMonitorsDeleteFuture struct { - azure.Future +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *BgpServiceCommunityListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") - return +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BgpServiceCommunityListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity { + if !iter.page.NotDone() { + return BgpServiceCommunity{} } - ar.Response = future.Response() - return + return iter.page.Values()[iter.i] } -// ConnectionMonitorSource describes the source of connection monitor. -type ConnectionMonitorSource struct { - // ResourceID - The ID of the resource used as the source by connection monitor. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port used by connection monitor. - Port *int32 `json:"port,omitempty"` +// Creates a new instance of the BgpServiceCommunityListResultIterator type. +func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator { + return BgpServiceCommunityListResultIterator{page: page} } -// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsQueryFuture struct { - azure.Future +// IsEmpty returns true if the ListResult contains no values. +func (bsclr BgpServiceCommunityListResult) IsEmpty() bool { + return bsclr.Value == nil || len(*bsclr.Value) == 0 } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { - cmqr, err = client.QueryResponder(cmqr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") - } +// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) { + if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(bsclr.NextLink))) } -// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStartFuture struct { - azure.Future +// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values. +type BgpServiceCommunityListResultPage struct { + fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error) + bsclr BgpServiceCommunityListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") - return +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") - return + next, err := page.fn(ctx, page.bsclr) + if err != nil { + return err } - ar.Response = future.Response() - return + page.bsclr = next + return nil } -// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type ConnectionMonitorsStopFuture struct { - azure.Future +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *BgpServiceCommunityListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") - return - } - ar.Response = future.Response() - return +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BgpServiceCommunityListResultPage) NotDone() bool { + return !page.bsclr.IsEmpty() } -// ConnectionResetSharedKey the virtual network connection reset shared key -type ConnectionResetSharedKey struct { - autorest.Response `json:"-"` - // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. - KeyLength *int32 `json:"keyLength,omitempty"` +// Response returns the raw server response from the last page request. +func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult { + return page.bsclr } -// ConnectionSharedKey response for GetConnectionSharedKey API service call -type ConnectionSharedKey struct { - autorest.Response `json:"-"` - // Value - The virtual network connection shared key value. - Value *string `json:"value,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// Values returns the slice of values for the current page or nil if there are no values. +func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity { + if page.bsclr.IsEmpty() { + return nil + } + return *page.bsclr.Value } -// ConnectionStateSnapshot connection state snapshot. -type ConnectionStateSnapshot struct { - // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' - ConnectionState ConnectionState `json:"connectionState,omitempty"` - // StartTime - The start time of the connection snapshot. - StartTime *date.Time `json:"startTime,omitempty"` - // EndTime - The end time of the connection snapshot. - EndTime *date.Time `json:"endTime,omitempty"` - // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' - EvaluationState EvaluationState `json:"evaluationState,omitempty"` - // AvgLatencyInMs - Average latency in ms. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` - // MinLatencyInMs - Minimum latency in ms. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` - // MaxLatencyInMs - Maximum latency in ms. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` - // ProbesSent - The number of sent probes. - ProbesSent *int32 `json:"probesSent,omitempty"` - // ProbesFailed - The number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty"` - // Hops - READ-ONLY; List of hops between the source and the destination. - Hops *[]ConnectivityHop `json:"hops,omitempty"` +// Creates a new instance of the BgpServiceCommunityListResultPage type. +func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage { + return BgpServiceCommunityListResultPage{fn: getNextPage} } -// ConnectivityDestination parameters that define destination of connection. -type ConnectivityDestination struct { - // ResourceID - The ID of the resource to which a connection attempt will be made. - ResourceID *string `json:"resourceId,omitempty"` - // Address - The IP address or URI the resource to which a connection attempt will be made. - Address *string `json:"address,omitempty"` - // Port - Port on which check connectivity will be performed. - Port *int32 `json:"port,omitempty"` +// BgpServiceCommunityPropertiesFormat properties of Service Community. +type BgpServiceCommunityPropertiesFormat struct { + // ServiceName - The name of the bgp community. e.g. Skype. + ServiceName *string `json:"serviceName,omitempty"` + // BgpCommunities - Get a list of bgp communities. + BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` } -// ConnectivityHop information about a hop between the source and the destination. -type ConnectivityHop struct { - // Type - READ-ONLY; The type of the hop. - Type *string `json:"type,omitempty"` - // ID - READ-ONLY; The ID of the hop. - ID *string `json:"id,omitempty"` - // Address - READ-ONLY; The IP address of the hop. - Address *string `json:"address,omitempty"` - // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop. - ResourceID *string `json:"resourceId,omitempty"` - // NextHopIds - READ-ONLY; List of next hop identifiers. - NextHopIds *[]string `json:"nextHopIds,omitempty"` - // Issues - READ-ONLY; List of issues. - Issues *[]ConnectivityIssue `json:"issues,omitempty"` +// BgpSettings BGP settings details. +type BgpSettings struct { + // Asn - The BGP speaker's ASN. + Asn *int64 `json:"asn,omitempty"` + // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` + // PeerWeight - The weight added to routes learned from this BGP speaker. + PeerWeight *int32 `json:"peerWeight,omitempty"` } -// ConnectivityInformation information on the connectivity status. -type ConnectivityInformation struct { - autorest.Response `json:"-"` - // Hops - READ-ONLY; List of hops between the source and the destination. - Hops *[]ConnectivityHop `json:"hops,omitempty"` - // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' - ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` - // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds. - AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` - // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds. - MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` - // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds. - MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` - // ProbesSent - READ-ONLY; Total number of probes sent. - ProbesSent *int32 `json:"probesSent,omitempty"` - // ProbesFailed - READ-ONLY; Number of failed probes. - ProbesFailed *int32 `json:"probesFailed,omitempty"` +// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API +// service call. +type CheckPrivateLinkServiceVisibilityRequest struct { + // PrivateLinkServiceAlias - The alias of the private link service. + PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` } -// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. -type ConnectivityIssue struct { - // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' - Origin Origin `json:"origin,omitempty"` - // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' - Severity Severity `json:"severity,omitempty"` - // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' - Type IssueType `json:"type,omitempty"` - // Context - READ-ONLY; Provides additional context on the issue. - Context *[]map[string]*string `json:"context,omitempty"` +// CloudError an error response from the Batch service. +type CloudError struct { + // Error - Cloud error body. + Error *CloudErrorBody `json:"error,omitempty"` } -// ConnectivityParameters parameters that determine how the connectivity check will be performed. -type ConnectivityParameters struct { - Source *ConnectivitySource `json:"source,omitempty"` - Destination *ConnectivityDestination `json:"destination,omitempty"` - // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' - Protocol Protocol `json:"protocol,omitempty"` - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` +// CloudErrorBody an error response from the Batch service. +type CloudErrorBody struct { + // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + Code *string `json:"code,omitempty"` + // Message - A message describing the error, intended to be suitable for display in a user interface. + Message *string `json:"message,omitempty"` + // Target - The target of the particular error. For example, the name of the property in error. + Target *string `json:"target,omitempty"` + // Details - A list of additional details about the error. + Details *[]CloudErrorBody `json:"details,omitempty"` } -// ConnectivitySource parameters that define the source of the connection. -type ConnectivitySource struct { - // ResourceID - The ID of the resource from which a connectivity check will be initiated. - ResourceID *string `json:"resourceId,omitempty"` - // Port - The source port from which a connectivity check will be performed. - Port *int32 `json:"port,omitempty"` +// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic. +type ConfigurationDiagnosticParameters struct { + // TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full' + VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"` + // Profiles - List of network configuration diagnostic profiles. + Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"` } -// Container reference to container resource in remote resource provider. -type Container struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// ConfigurationDiagnosticProfile parameters to compare with network configuration. +type ConfigurationDiagnosticProfile struct { + // Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound' + Direction Direction `json:"direction,omitempty"` + // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP. + Protocol *string `json:"protocol,omitempty"` + // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + Source *string `json:"source,omitempty"` + // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + Destination *string `json:"destination,omitempty"` + // DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). + DestinationPort *string `json:"destinationPort,omitempty"` } -// ContainerNetworkInterface container network interface child resource. -type ContainerNetworkInterface struct { - // ContainerNetworkInterfacePropertiesFormat - Container network interface properties. - *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource. +type ConfigurationDiagnosticResponse struct { + autorest.Response `json:"-"` + // Results - READ-ONLY; List of network configuration diagnostic results. + Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"` } -// MarshalJSON is the custom marshaler for ContainerNetworkInterface. -func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) { +// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic +// query. +type ConfigurationDiagnosticResult struct { + // Profile - Network configuration diagnostic profile. + Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"` + // NetworkSecurityGroupResult - Network security group result. + NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` +} + +// ConnectionMonitor parameters that define the operation to create a connection monitor. +type ConnectionMonitor struct { + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + // ConnectionMonitorParameters - Properties of the connection monitor. + *ConnectionMonitorParameters `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionMonitor. +func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if cni.ContainerNetworkInterfacePropertiesFormat != nil { - objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat - } - if cni.Name != nil { - objectMap["name"] = cni.Name + if cm.Location != nil { + objectMap["location"] = cm.Location } - if cni.Etag != nil { - objectMap["etag"] = cni.Etag + if cm.Tags != nil { + objectMap["tags"] = cm.Tags } - if cni.ID != nil { - objectMap["id"] = cni.ID + if cm.ConnectionMonitorParameters != nil { + objectMap["properties"] = cm.ConnectionMonitorParameters } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct. -func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct. +func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -7115,50 +7977,32 @@ func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": - if v != nil { - var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat) - if err != nil { - return err - } - cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - cni.Name = &name - } - case "type": + case "location": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - cni.Type = &typeVar + cm.Location = &location } - case "etag": + case "tags": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - cni.Etag = &etag + cm.Tags = tags } - case "id": + case "properties": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var connectionMonitorParameters ConnectionMonitorParameters + err = json.Unmarshal(*v, &connectionMonitorParameters) if err != nil { return err } - cni.ID = &ID + cm.ConnectionMonitorParameters = &connectionMonitorParameters } } } @@ -7166,40 +8010,83 @@ func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error { return nil } -// ContainerNetworkInterfaceConfiguration container network interface configuration child resource. -type ContainerNetworkInterfaceConfiguration struct { - // ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. - *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. +// ConnectionMonitorDestination describes the destination of connection monitor. +type ConnectionMonitorDestination struct { + // ResourceID - The ID of the resource used as the destination by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Address - Address of the connection monitor destination (IP or domain name). + Address *string `json:"address,omitempty"` + // Port - The destination port used by connection monitor. + Port *int32 `json:"port,omitempty"` +} + +// ConnectionMonitorListResult list of connection monitors. +type ConnectionMonitorListResult struct { + autorest.Response `json:"-"` + // Value - Information about connection monitors. + Value *[]ConnectionMonitorResult `json:"value,omitempty"` +} + +// ConnectionMonitorParameters parameters that define the operation to create a connection monitor. +type ConnectionMonitorParameters struct { + // Source - Describes the source of connection monitor. + Source *ConnectionMonitorSource `json:"source,omitempty"` + // Destination - Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` +} + +// ConnectionMonitorQueryResult list of connection states snapshots. +type ConnectionMonitorQueryResult struct { + autorest.Response `json:"-"` + // SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive' + SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` + // States - Information about connection states. + States *[]ConnectionStateSnapshot `json:"states,omitempty"` +} + +// ConnectionMonitorResult information about the connection monitor. +type ConnectionMonitorResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Name of the connection monitor. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` + // ID - READ-ONLY; ID of the connection monitor. + ID *string `json:"id,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` + // Type - READ-ONLY; Connection monitor type. + Type *string `json:"type,omitempty"` + // Location - Connection monitor location. + Location *string `json:"location,omitempty"` + // Tags - Connection monitor tags. + Tags map[string]*string `json:"tags"` + // ConnectionMonitorResultProperties - Properties of the connection monitor result. + *ConnectionMonitorResultProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration. -func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ConnectionMonitorResult. +func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil { - objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat + if cmr.Etag != nil { + objectMap["etag"] = cmr.Etag } - if cnic.Name != nil { - objectMap["name"] = cnic.Name + if cmr.Location != nil { + objectMap["location"] = cmr.Location } - if cnic.Etag != nil { - objectMap["etag"] = cnic.Etag + if cmr.Tags != nil { + objectMap["tags"] = cmr.Tags } - if cnic.ID != nil { - objectMap["id"] = cnic.ID + if cmr.ConnectionMonitorResultProperties != nil { + objectMap["properties"] = cmr.ConnectionMonitorResultProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct. -func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct. +func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -7207,15 +8094,6 @@ func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) e } for k, v := range m { switch k { - case "properties": - if v != nil { - var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat) - if err != nil { - return err - } - cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat - } case "name": if v != nil { var name string @@ -7223,16 +8101,16 @@ func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) e if err != nil { return err } - cnic.Name = &name + cmr.Name = &name } - case "type": + case "id": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - cnic.Type = &typeVar + cmr.ID = &ID } case "etag": if v != nil { @@ -7241,105 +8119,43 @@ func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) e if err != nil { return err } - cnic.Etag = &etag + cmr.Etag = &etag } - case "id": + case "type": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - cnic.ID = &ID + cmr.Type = &typeVar } - } - } - - return nil -} - -// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration -// properties. -type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { - // IPConfigurations - A list of ip configurations of the container network interface configuration. - IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` - // ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration. - ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface. -type ContainerNetworkInterfaceIPConfiguration struct { - // ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. - *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` -} - -// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration. -func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat - } - if cniic.Name != nil { - objectMap["name"] = cniic.Name - } - if cniic.Etag != nil { - objectMap["etag"] = cniic.Etag - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct. -func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat) - if err != nil { - return err - } - cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat - } - case "name": + case "location": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - cniic.Name = &name + cmr.Location = &location } - case "type": + case "tags": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - cniic.Type = &typeVar + cmr.Tags = tags } - case "etag": + case "properties": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var connectionMonitorResultProperties ConnectionMonitorResultProperties + err = json.Unmarshal(*v, &connectionMonitorResultProperties) if err != nil { return err } - cniic.Etag = &etag + cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties } } } @@ -7347,377 +8163,316 @@ func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte return nil } -// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface -// IP configuration. -type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ContainerNetworkInterfacePropertiesFormat ... -type ContainerNetworkInterfacePropertiesFormat struct { - // ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created. - ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` - // Container - Reference to the container to which this container network interface is attached. - Container *Container `json:"container,omitempty"` - // IPConfigurations - Reference to the ip configuration on this container nic. - IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` +// ConnectionMonitorResultProperties describes the properties of a connection monitor. +type ConnectionMonitorResultProperties struct { + // ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // StartTime - The date and time when the connection monitor was started. + StartTime *date.Time `json:"startTime,omitempty"` + // MonitoringStatus - The monitoring status of the connection monitor. + MonitoringStatus *string `json:"monitoringStatus,omitempty"` + // Source - Describes the source of connection monitor. + Source *ConnectionMonitorSource `json:"source,omitempty"` + // Destination - Describes the destination of connection monitor. + Destination *ConnectionMonitorDestination `json:"destination,omitempty"` + // AutoStart - Determines if the connection monitor will start automatically once created. + AutoStart *bool `json:"autoStart,omitempty"` + // MonitoringIntervalInSeconds - Monitoring interval in seconds. + MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"` } -// DdosProtectionPlan a DDoS protection plan in a resource group. -type DdosProtectionPlan struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. - *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` +// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsCreateOrUpdateFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for DdosProtectionPlan. -func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if dpp.Location != nil { - objectMap["location"] = dpp.Location +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - if dpp.Tags != nil { - objectMap["tags"] = dpp.Tags + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture") + return } - if dpp.DdosProtectionPlanPropertiesFormat != nil { - objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent { + cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. -func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConnectionMonitorsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsDeleteFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - dpp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - dpp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - dpp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - dpp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - dpp.Tags = tags - } - case "properties": - if v != nil { - var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat - err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) - if err != nil { - return err - } - dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - dpp.Etag = &etag - } - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture") + return } + ar.Response = future.Response() + return +} - return nil +// ConnectionMonitorSource describes the source of connection monitor. +type ConnectionMonitorSource struct { + // ResourceID - The ID of the resource used as the source by connection monitor. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port used by connection monitor. + Port *int32 `json:"port,omitempty"` } -// DdosProtectionPlanListResult a list of DDoS protection plans. -type DdosProtectionPlanListResult struct { - autorest.Response `json:"-"` - // Value - A list of DDoS protection plans. - Value *[]DdosProtectionPlan `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. -type DdosProtectionPlanListResultIterator struct { - i int - page DdosProtectionPlanListResultPage +// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsQueryFuture struct { + azure.Future } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ConnectionMonitorsQueryFuture) Result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *DdosProtectionPlanListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter DdosProtectionPlanListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { - if !iter.page.NotDone() { - return DdosProtectionPlan{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the DdosProtectionPlanListResultIterator type. -func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator { - return DdosProtectionPlanListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { - return dpplr.Value == nil || len(*dpplr.Value) == 0 -} - -// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) { - if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(dpplr.NextLink))) -} - -// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. -type DdosProtectionPlanListResultPage struct { - fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) - dpplr DdosProtectionPlanListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure") + return } - next, err := page.fn(ctx, page.dpplr) - if err != nil { - return err + if !done { + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture") + return } - page.dpplr = 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 *DdosProtectionPlanListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page DdosProtectionPlanListResultPage) NotDone() bool { - return !page.dpplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { - return page.dpplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { - if page.dpplr.IsEmpty() { - return nil + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent { + cmqr, err = client.QueryResponder(cmqr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request") + } } - return *page.dpplr.Value -} - -// Creates a new instance of the DdosProtectionPlanListResultPage type. -func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { - return DdosProtectionPlanListResultPage{fn: getNextPage} -} - -// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. -type DdosProtectionPlanPropertiesFormat struct { - // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. - VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` + return } -// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansCreateOrUpdateFuture struct { +// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStartFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { +func (future *ConnectionMonitorsStartFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { - dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } -// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type DdosProtectionPlansDeleteFuture struct { +// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ConnectionMonitorsStopFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { +func (future *ConnectionMonitorsStopFuture) Result(client ConnectionMonitorsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture") return } ar.Response = future.Response() return } -// Delegation details the service to which the subnet is delegated. -type Delegation struct { - // ServiceDelegationPropertiesFormat - Properties of the subnet. - *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` +// ConnectionResetSharedKey the virtual network connection reset shared key. +type ConnectionResetSharedKey struct { + autorest.Response `json:"-"` + // KeyLength - The virtual network connection reset shared key length, should between 1 and 128. + KeyLength *int32 `json:"keyLength,omitempty"` +} + +// ConnectionSharedKey response for GetConnectionSharedKey API service call. +type ConnectionSharedKey struct { + autorest.Response `json:"-"` + // Value - The virtual network connection shared key value. + Value *string `json:"value,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for Delegation. -func (d Delegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if d.ServiceDelegationPropertiesFormat != nil { - objectMap["properties"] = d.ServiceDelegationPropertiesFormat - } - if d.Name != nil { - objectMap["name"] = d.Name - } - if d.Etag != nil { - objectMap["etag"] = d.Etag - } - if d.ID != nil { - objectMap["id"] = d.ID - } - return json.Marshal(objectMap) +// ConnectionStateSnapshot connection state snapshot. +type ConnectionStateSnapshot struct { + // ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown' + ConnectionState ConnectionState `json:"connectionState,omitempty"` + // StartTime - The start time of the connection snapshot. + StartTime *date.Time `json:"startTime,omitempty"` + // EndTime - The end time of the connection snapshot. + EndTime *date.Time `json:"endTime,omitempty"` + // EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed' + EvaluationState EvaluationState `json:"evaluationState,omitempty"` + // AvgLatencyInMs - Average latency in ms. + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - Minimum latency in ms. + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - Maximum latency in ms. + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - The number of sent probes. + ProbesSent *int32 `json:"probesSent,omitempty"` + // ProbesFailed - The number of failed probes. + ProbesFailed *int32 `json:"probesFailed,omitempty"` + // Hops - READ-ONLY; List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for Delegation struct. -func (d *Delegation) UnmarshalJSON(body []byte) error { +// ConnectivityDestination parameters that define destination of connection. +type ConnectivityDestination struct { + // ResourceID - The ID of the resource to which a connection attempt will be made. + ResourceID *string `json:"resourceId,omitempty"` + // Address - The IP address or URI the resource to which a connection attempt will be made. + Address *string `json:"address,omitempty"` + // Port - Port on which check connectivity will be performed. + Port *int32 `json:"port,omitempty"` +} + +// ConnectivityHop information about a hop between the source and the destination. +type ConnectivityHop struct { + // Type - READ-ONLY; The type of the hop. + Type *string `json:"type,omitempty"` + // ID - READ-ONLY; The ID of the hop. + ID *string `json:"id,omitempty"` + // Address - READ-ONLY; The IP address of the hop. + Address *string `json:"address,omitempty"` + // ResourceID - READ-ONLY; The ID of the resource corresponding to this hop. + ResourceID *string `json:"resourceId,omitempty"` + // NextHopIds - READ-ONLY; List of next hop identifiers. + NextHopIds *[]string `json:"nextHopIds,omitempty"` + // Issues - READ-ONLY; List of issues. + Issues *[]ConnectivityIssue `json:"issues,omitempty"` +} + +// ConnectivityInformation information on the connectivity status. +type ConnectivityInformation struct { + autorest.Response `json:"-"` + // Hops - READ-ONLY; List of hops between the source and the destination. + Hops *[]ConnectivityHop `json:"hops,omitempty"` + // ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded' + ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` + // AvgLatencyInMs - READ-ONLY; Average latency in milliseconds. + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + // MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds. + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + // MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds. + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + // ProbesSent - READ-ONLY; Total number of probes sent. + ProbesSent *int32 `json:"probesSent,omitempty"` + // ProbesFailed - READ-ONLY; Number of failed probes. + ProbesFailed *int32 `json:"probesFailed,omitempty"` +} + +// ConnectivityIssue information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + // Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound' + Origin Origin `json:"origin,omitempty"` + // Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning' + Severity Severity `json:"severity,omitempty"` + // Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform' + Type IssueType `json:"type,omitempty"` + // Context - READ-ONLY; Provides additional context on the issue. + Context *[]map[string]*string `json:"context,omitempty"` +} + +// ConnectivityParameters parameters that determine how the connectivity check will be performed. +type ConnectivityParameters struct { + // Source - Describes the source of the connection. + Source *ConnectivitySource `json:"source,omitempty"` + // Destination - Describes the destination of connection. + Destination *ConnectivityDestination `json:"destination,omitempty"` + // Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp' + Protocol Protocol `json:"protocol,omitempty"` + // ProtocolConfiguration - Configuration of the protocol. + ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` +} + +// ConnectivitySource parameters that define the source of the connection. +type ConnectivitySource struct { + // ResourceID - The ID of the resource from which a connectivity check will be initiated. + ResourceID *string `json:"resourceId,omitempty"` + // Port - The source port from which a connectivity check will be performed. + Port *int32 `json:"port,omitempty"` +} + +// Container reference to container resource in remote resource provider. +type Container struct { + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// ContainerNetworkInterface container network interface child resource. +type ContainerNetworkInterface struct { + // ContainerNetworkInterfacePropertiesFormat - Container network interface properties. + *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerNetworkInterface. +func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cni.ContainerNetworkInterfacePropertiesFormat != nil { + objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat + } + if cni.Name != nil { + objectMap["name"] = cni.Name + } + if cni.Etag != nil { + objectMap["etag"] = cni.Etag + } + if cni.ID != nil { + objectMap["id"] = cni.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct. +func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -7727,12 +8482,12 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat - err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat) + var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat) if err != nil { return err } - d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat + cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat } case "name": if v != nil { @@ -7741,7 +8496,16 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { if err != nil { return err } - d.Name = &name + cni.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cni.Type = &typeVar } case "etag": if v != nil { @@ -7750,7 +8514,7 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { if err != nil { return err } - d.Etag = &etag + cni.Etag = &etag } case "id": if v != nil { @@ -7759,7 +8523,7 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { if err != nil { return err } - d.ID = &ID + cni.ID = &ID } } } @@ -7767,349 +8531,293 @@ func (d *Delegation) UnmarshalJSON(body []byte) error { return nil } -// DeviceProperties list of properties of the device. -type DeviceProperties struct { - // DeviceVendor - Name of the device Vendor. - DeviceVendor *string `json:"deviceVendor,omitempty"` - // DeviceModel - Model of the device. - DeviceModel *string `json:"deviceModel,omitempty"` - // LinkSpeedInMbps - Link speed. - LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` -} - -// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual -// network. Standard DHCP option for a subnet overrides VNET DHCP options. -type DhcpOptions struct { - // DNSServers - The list of DNS servers IP addresses. - DNSServers *[]string `json:"dnsServers,omitempty"` -} - -// Dimension dimension of the metric. -type Dimension struct { - // Name - The name of the dimension. +// ContainerNetworkInterfaceConfiguration container network interface configuration child resource. +type ContainerNetworkInterfaceConfiguration struct { + // ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties. + *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // DisplayName - The display name of the dimension. - DisplayName *string `json:"displayName,omitempty"` - // InternalName - The internal name of the dimension. - InternalName *string `json:"internalName,omitempty"` -} - -// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. -type DNSNameAvailabilityResult struct { - autorest.Response `json:"-"` - // Available - Domain availability (True/False). - Available *bool `json:"available,omitempty"` -} - -// EffectiveNetworkSecurityGroup effective network security group. -type EffectiveNetworkSecurityGroup struct { - // NetworkSecurityGroup - The ID of network security group that is applied. - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - // Association - Associated resources. - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - // EffectiveSecurityRules - A collection of effective security rules. - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - // TagMap - Mapping of tags to list of IP Addresses included within the tag. - TagMap map[string][]string `json:"tagMap"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. -func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration. +func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ensg.NetworkSecurityGroup != nil { - objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup + if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil { + objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat } - if ensg.Association != nil { - objectMap["association"] = ensg.Association + if cnic.Name != nil { + objectMap["name"] = cnic.Name } - if ensg.EffectiveSecurityRules != nil { - objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules + if cnic.Etag != nil { + objectMap["etag"] = cnic.Etag } - if ensg.TagMap != nil { - objectMap["tagMap"] = ensg.TagMap + if cnic.ID != nil { + objectMap["id"] = cnic.ID } return json.Marshal(objectMap) } -// EffectiveNetworkSecurityGroupAssociation the effective network security group association. -type EffectiveNetworkSecurityGroupAssociation struct { - // Subnet - The ID of the subnet if assigned. - Subnet *SubResource `json:"subnet,omitempty"` - // NetworkInterface - The ID of the network interface if assigned. - NetworkInterface *SubResource `json:"networkInterface,omitempty"` -} - -// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service -// call. -type EffectiveNetworkSecurityGroupListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective network security groups. - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// EffectiveNetworkSecurityRule effective network security rules. -type EffectiveNetworkSecurityRule struct { - // Name - The name of the security rule specified by the user (if created by the user). - Name *string `json:"name,omitempty"` - // Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll' - Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - // SourcePortRange - The source port or range. - SourcePortRange *string `json:"sourcePortRange,omitempty"` - // DestinationPortRange - The destination port or range. - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*) - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*) - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // SourceAddressPrefix - The source address prefix. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - // DestinationAddressPrefix - The destination address prefix. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - // ExpandedSourceAddressPrefix - The expanded source address prefix. - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - // ExpandedDestinationAddressPrefix - Expanded destination address prefix. - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - // Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' - Access SecurityRuleAccess `json:"access,omitempty"` - // Priority - The priority of the rule. - Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' - Direction SecurityRuleDirection `json:"direction,omitempty"` -} - -// EffectiveRoute effective Route -type EffectiveRoute struct { - // Name - The name of the user defined route. This is optional. - Name *string `json:"name,omitempty"` - // Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' - Source EffectiveRouteSource `json:"source,omitempty"` - // State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid' - State EffectiveRouteState `json:"state,omitempty"` - // AddressPrefix - The address prefixes of the effective routes in CIDR notation. - AddressPrefix *[]string `json:"addressPrefix,omitempty"` - // NextHopIPAddress - The IP address of the next hop of the effective route. - NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' - NextHopType RouteNextHopType `json:"nextHopType,omitempty"` -} +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct. +func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat) + if err != nil { + return err + } + cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cnic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cnic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cnic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cnic.ID = &ID + } + } + } -// EffectiveRouteListResult response for list effective route API service call. -type EffectiveRouteListResult struct { - autorest.Response `json:"-"` - // Value - A list of effective routes. - Value *[]EffectiveRoute `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` + return nil } -// EndpointService identifies the service being brought into the virtual network. -type EndpointService struct { - // ID - A unique identifier of the service being referenced by the interface endpoint. - ID *string `json:"id,omitempty"` +// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration +// properties. +type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { + // IPConfigurations - A list of ip configurations of the container network interface configuration. + IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` + // ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration. + ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// EndpointServiceResult endpoint service. -type EndpointServiceResult struct { - // Name - READ-ONLY; Name of the endpoint service. +// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface. +type ContainerNetworkInterfaceIPConfiguration struct { + // ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration. + *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Type of the endpoint service. + // Type - READ-ONLY; Sub Resource type. Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. -type EndpointServicesListResult struct { - autorest.Response `json:"-"` - // Value - List of available endpoint services in a region. - Value *[]EndpointServiceResult `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult -// values. -type EndpointServicesListResultIterator struct { - i int - page EndpointServicesListResultPage + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration. +func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if cniic.Name != nil { + objectMap["name"] = cniic.Name } - err = iter.page.NextWithContext(ctx) + if cniic.Etag != nil { + objectMap["etag"] = cniic.Etag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct. +func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 + for k, v := range m { + switch k { + case "properties": + if v != nil { + var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat) + if err != nil { + return err + } + cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cniic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cniic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + cniic.Etag = &etag + } + } + } + return nil } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *EndpointServicesListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) +// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface +// IP configuration. +type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { + // ProvisioningState - READ-ONLY; The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter EndpointServicesListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// ContainerNetworkInterfacePropertiesFormat properties of container network interface. +type ContainerNetworkInterfacePropertiesFormat struct { + // ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created. + ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` + // Container - Reference to the container to which this container network interface is attached. + Container *Container `json:"container,omitempty"` + // IPConfigurations - Reference to the ip configuration on this container nic. + IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Response returns the raw server response from the last page request. -func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { - return iter.page.Response() +// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesCreateOrUpdateFuture struct { + azure.Future } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { - if !iter.page.NotDone() { - return EndpointServiceResult{} +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosCustomPoliciesCreateOrUpdateFuture) Result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - return iter.page.Values()[iter.i] + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { + dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request") + } + } + return } -// Creates a new instance of the EndpointServicesListResultIterator type. -func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator { - return EndpointServicesListResultIterator{page: page} +// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesDeleteFuture struct { + azure.Future } -// IsEmpty returns true if the ListResult contains no values. -func (eslr EndpointServicesListResult) IsEmpty() bool { - return eslr.Value == nil || len(*eslr.Value) == 0 +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosCustomPoliciesDeleteFuture) Result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return } -// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) { - if eslr.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))) -} - -// EndpointServicesListResultPage contains a page of EndpointServiceResult values. -type EndpointServicesListResultPage struct { - fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error) - eslr EndpointServicesListResult +// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosCustomPoliciesUpdateTagsFuture struct { + azure.Future } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.eslr) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosCustomPoliciesUpdateTagsFuture) Result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return } - 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 *EndpointServicesListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page EndpointServicesListResultPage) NotDone() bool { - return !page.eslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { - return page.eslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { - if page.eslr.IsEmpty() { - return nil + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture") + return } - return *page.eslr.Value -} - -// Creates a new instance of the EndpointServicesListResultPage type. -func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { - return EndpointServicesListResultPage{fn: getNextPage} -} - -// Error ... -type Error struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` - Details *[]ErrorDetails `json:"details,omitempty"` - InnerError *string `json:"innerError,omitempty"` -} - -// ErrorDetails ... -type ErrorDetails struct { - Code *string `json:"code,omitempty"` - Target *string `json:"target,omitempty"` - Message *string `json:"message,omitempty"` -} - -// ErrorResponse the error object. -type ErrorResponse struct { - Error *ErrorDetails `json:"error,omitempty"` -} - -// EvaluatedNetworkSecurityGroup results of network security group evaluation. -type EvaluatedNetworkSecurityGroup struct { - // NetworkSecurityGroupID - Network security group ID. - NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"` - // AppliedTo - Resource ID of nic or subnet to which network security group is applied. - AppliedTo *string `json:"appliedTo,omitempty"` - MatchedRule *MatchedRule `json:"matchedRule,omitempty"` - // RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results. - RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent { + dcp, err = client.UpdateTagsResponder(dcp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request") + } + } + return } -// ExpressRouteCircuit expressRouteCircuit resource -type ExpressRouteCircuit struct { +// DdosCustomPolicy a DDoS custom policy in a resource group. +type DdosCustomPolicy struct { autorest.Response `json:"-"` - // Sku - The SKU. - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + // DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy. + *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -8123,29 +8831,26 @@ type ExpressRouteCircuit struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRouteCircuit. -func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DdosCustomPolicy. +func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erc.Sku != nil { - objectMap["sku"] = erc.Sku - } - if erc.ExpressRouteCircuitPropertiesFormat != nil { - objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat + if dcp.DdosCustomPolicyPropertiesFormat != nil { + objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat } - if erc.ID != nil { - objectMap["id"] = erc.ID + if dcp.ID != nil { + objectMap["id"] = dcp.ID } - if erc.Location != nil { - objectMap["location"] = erc.Location + if dcp.Location != nil { + objectMap["location"] = dcp.Location } - if erc.Tags != nil { - objectMap["tags"] = erc.Tags + if dcp.Tags != nil { + objectMap["tags"] = dcp.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. -func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct. +func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -8153,23 +8858,14 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "sku": - if v != nil { - var sku ExpressRouteCircuitSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - erc.Sku = &sku - } case "properties": if v != nil { - var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) + var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat + err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat) if err != nil { return err } - erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat + dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat } case "etag": if v != nil { @@ -8178,7 +8874,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Etag = &etag + dcp.Etag = &etag } case "id": if v != nil { @@ -8187,7 +8883,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.ID = &ID + dcp.ID = &ID } case "name": if v != nil { @@ -8196,7 +8892,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Name = &name + dcp.Name = &name } case "type": if v != nil { @@ -8205,7 +8901,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Type = &typeVar + dcp.Type = &typeVar } case "location": if v != nil { @@ -8214,7 +8910,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Location = &location + dcp.Location = &location } case "tags": if v != nil { @@ -8223,7 +8919,7 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.Tags = tags + dcp.Tags = tags } } } @@ -8231,47 +8927,54 @@ func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitArpTable struct { - // Age - Entry age in minutes - Age *int32 `json:"age,omitempty"` - // Interface - Interface address - Interface *string `json:"interface,omitempty"` - // IPAddress - The IP address. - IPAddress *string `json:"ipAddress,omitempty"` - // MacAddress - The MAC address. - MacAddress *string `json:"macAddress,omitempty"` +// DdosCustomPolicyPropertiesFormat dDoS custom policy properties. +type DdosCustomPolicyPropertiesFormat struct { + // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only. + PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"` + // ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters. + ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"` } -// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. -type ExpressRouteCircuitAuthorization struct { - autorest.Response `json:"-"` - *AuthorizationPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. +// DdosProtectionPlan a DDoS protection plan in a resource group. +type DdosProtectionPlan struct { + autorest.Response `json:"-"` + // ID - READ-ONLY; Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan. + *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. -func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for DdosProtectionPlan. +func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erca.AuthorizationPropertiesFormat != nil { - objectMap["properties"] = erca.AuthorizationPropertiesFormat + if dpp.Location != nil { + objectMap["location"] = dpp.Location } - if erca.Name != nil { - objectMap["name"] = erca.Name + if dpp.Tags != nil { + objectMap["tags"] = dpp.Tags } - if erca.ID != nil { - objectMap["id"] = erca.ID + if dpp.DdosProtectionPlanPropertiesFormat != nil { + objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. -func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct. +func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -8279,14 +8982,14 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "properties": + case "id": if v != nil { - var authorizationPropertiesFormat AuthorizationPropertiesFormat - err = json.Unmarshal(*v, &authorizationPropertiesFormat) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat + dpp.ID = &ID } case "name": if v != nil { @@ -8295,25 +8998,52 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { if err != nil { return err } - erca.Name = &name + dpp.Name = &name } - case "etag": + case "type": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - erca.Etag = &etag + dpp.Type = &typeVar } - case "id": + case "location": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - erca.ID = &ID + dpp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + dpp.Tags = tags + } + case "properties": + if v != nil { + var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat + err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat) + if err != nil { + return err + } + dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + dpp.Etag = &etag } } } @@ -8321,226 +9051,26 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { - azure.Future +// DdosProtectionPlanListResult a list of DDoS protection plans. +type DdosProtectionPlanListResult struct { + autorest.Response `json:"-"` + // Value - A list of DDoS protection plans. + Value *[]DdosProtectionPlan `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { - erca, err = client.CreateOrUpdateResponder(erca.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCircuitAuthorizationsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering -// resource. -type ExpressRouteCircuitConnection struct { - autorest.Response `json:"-"` - *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. -func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { - objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat - } - if ercc.Name != nil { - objectMap["name"] = ercc.Name - } - if ercc.ID != nil { - objectMap["id"] = ercc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. -func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) - if err != nil { - return err - } - ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ercc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ercc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ercc.ID = &ID - } - } - } - - return nil -} - -// ExpressRouteCircuitConnectionPropertiesFormat ... -type ExpressRouteCircuitConnectionPropertiesFormat struct { - // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. - AddressPrefix *string `json:"addressPrefix,omitempty"` - // AuthorizationKey - The authorization key. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected' - CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - // ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitConnectionsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. -type ExpressRouteCircuitListResult struct { - autorest.Response `json:"-"` - // Value - A list of ExpressRouteCircuits in a resource group. - Value *[]ExpressRouteCircuit `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit -// values. -type ExpressRouteCircuitListResultIterator struct { +// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values. +type DdosProtectionPlanListResultIterator struct { i int - page ExpressRouteCircuitListResultPage + page DdosProtectionPlanListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -8565,62 +9095,62 @@ func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.C // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteCircuitListResultIterator) Next() error { +func (iter *DdosProtectionPlanListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { +func (iter DdosProtectionPlanListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { +func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { +func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan { if !iter.page.NotDone() { - return ExpressRouteCircuit{} + return DdosProtectionPlan{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRouteCircuitListResultIterator type. -func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { - return ExpressRouteCircuitListResultIterator{page: page} +// Creates a new instance of the DdosProtectionPlanListResultIterator type. +func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator { + return DdosProtectionPlanListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { - return erclr.Value == nil || len(*erclr.Value) == 0 +func (dpplr DdosProtectionPlanListResult) IsEmpty() bool { + return dpplr.Value == nil || len(*dpplr.Value) == 0 } -// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. +// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { - if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { +func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) { + if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(erclr.NextLink))) + autorest.WithBaseURL(to.String(dpplr.NextLink))) } -// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. -type ExpressRouteCircuitListResultPage struct { - fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) - erclr ExpressRouteCircuitListResult +// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values. +type DdosProtectionPlanListResultPage struct { + fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error) + dpplr DdosProtectionPlanListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -8629,73 +9159,175 @@ func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erclr) + next, err := page.fn(ctx, page.dpplr) if err != nil { return err } - page.erclr = next + page.dpplr = 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 *ExpressRouteCircuitListResultPage) Next() error { +func (page *DdosProtectionPlanListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitListResultPage) NotDone() bool { - return !page.erclr.IsEmpty() +func (page DdosProtectionPlanListResultPage) NotDone() bool { + return !page.dpplr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { - return page.erclr -} +func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult { + return page.dpplr +} // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { - if page.erclr.IsEmpty() { +func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan { + if page.dpplr.IsEmpty() { return nil } - return *page.erclr.Value + return *page.dpplr.Value } -// Creates a new instance of the ExpressRouteCircuitListResultPage type. -func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { - return ExpressRouteCircuitListResultPage{fn: getNextPage} +// Creates a new instance of the DdosProtectionPlanListResultPage type. +func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage { + return DdosProtectionPlanListResultPage{fn: getNextPage} } -// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. -type ExpressRouteCircuitPeering struct { - autorest.Response `json:"-"` - *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. +// DdosProtectionPlanPropertiesFormat dDoS protection plan properties. +type DdosProtectionPlanPropertiesFormat struct { + // ResourceGUID - READ-ONLY; The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only. + VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` +} + +// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { + dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request") + } + } + return +} + +// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosProtectionPlansDeleteFuture) Result(client DdosProtectionPlansClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DdosProtectionPlansUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *DdosProtectionPlansUpdateTagsFuture) Result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent { + dpp, err = client.UpdateTagsResponder(dpp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request") + } + } + return +} + +// DdosSettings contains the DDoS protection settings of the public IP. +type DdosSettings struct { + // DdosCustomPolicy - The DDoS custom policy associated with the public IP. + DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"` + // ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard' + ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"` +} + +// Delegation details the service to which the subnet is delegated. +type Delegation struct { + // ServiceDelegationPropertiesFormat - Properties of the subnet. + *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a subnet. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. -func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Delegation. +func (d Delegation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { - objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat + if d.ServiceDelegationPropertiesFormat != nil { + objectMap["properties"] = d.ServiceDelegationPropertiesFormat } - if ercp.Name != nil { - objectMap["name"] = ercp.Name + if d.Name != nil { + objectMap["name"] = d.Name } - if ercp.ID != nil { - objectMap["id"] = ercp.ID + if d.Etag != nil { + objectMap["etag"] = d.Etag + } + if d.ID != nil { + objectMap["id"] = d.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. -func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Delegation struct. +func (d *Delegation) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -8705,12 +9337,12 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat - err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) + var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat + err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat) if err != nil { return err } - ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat + d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat } case "name": if v != nil { @@ -8719,7 +9351,7 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercp.Name = &name + d.Name = &name } case "etag": if v != nil { @@ -8728,7 +9360,7 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercp.Etag = &etag + d.Etag = &etag } case "id": if v != nil { @@ -8737,7 +9369,7 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercp.ID = &ID + d.ID = &ID } } } @@ -8745,130 +9377,260 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCircuitPeeringConfig specifies the peering configuration. -type ExpressRouteCircuitPeeringConfig struct { - // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - // AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' - AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - // LegacyMode - The legacy mode of the peering. - LegacyMode *int32 `json:"legacyMode,omitempty"` - // CustomerASN - The CustomerASN of the peering. - CustomerASN *int32 `json:"customerASN,omitempty"` - // RoutingRegistryName - The RoutingRegistryName of the configuration. - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` +// DeviceProperties list of properties of the device. +type DeviceProperties struct { + // DeviceVendor - Name of the device Vendor. + DeviceVendor *string `json:"deviceVendor,omitempty"` + // DeviceModel - Model of the device. + DeviceModel *string `json:"deviceModel,omitempty"` + // LinkSpeedInMbps - Link speed. + LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` } -// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier. -type ExpressRouteCircuitPeeringID struct { - // ID - The ID of the ExpressRoute circuit peering. - ID *string `json:"id,omitempty"` +// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual +// network. Standard DHCP option for a subnet overrides VNET DHCP options. +type DhcpOptions struct { + // DNSServers - The list of DNS servers IP addresses. + DNSServers *[]string `json:"dnsServers,omitempty"` } -// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings -// that belong to an ExpressRouteCircuit. -type ExpressRouteCircuitPeeringListResult struct { +// Dimension dimension of the metric. +type Dimension struct { + // Name - The name of the dimension. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the dimension. + DisplayName *string `json:"displayName,omitempty"` + // InternalName - The internal name of the dimension. + InternalName *string `json:"internalName,omitempty"` +} + +// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call. +type DNSNameAvailabilityResult struct { autorest.Response `json:"-"` - // Value - The peerings in an express route circuit. - Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` + // Available - Domain availability (True/False). + Available *bool `json:"available,omitempty"` } -// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of -// ExpressRouteCircuitPeering values. -type ExpressRouteCircuitPeeringListResultIterator struct { - i int - page ExpressRouteCircuitPeeringListResultPage +// EffectiveNetworkSecurityGroup effective network security group. +type EffectiveNetworkSecurityGroup struct { + // NetworkSecurityGroup - The ID of network security group that is applied. + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + // Association - Associated resources. + Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` + // EffectiveSecurityRules - A collection of effective security rules. + EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` + // TagMap - Mapping of tags to list of IP Addresses included within the tag. + TagMap map[string][]string `json:"tagMap"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup. +func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ensg.NetworkSecurityGroup != nil { + objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if ensg.Association != nil { + objectMap["association"] = ensg.Association } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err + if ensg.EffectiveSecurityRules != nil { + objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) + if ensg.TagMap != nil { + objectMap["tagMap"] = ensg.TagMap + } + return json.Marshal(objectMap) } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// EffectiveNetworkSecurityGroupAssociation the effective network security group association. +type EffectiveNetworkSecurityGroupAssociation struct { + // Subnet - The ID of the subnet if assigned. + Subnet *SubResource `json:"subnet,omitempty"` + // NetworkInterface - The ID of the network interface if assigned. + NetworkInterface *SubResource `json:"networkInterface,omitempty"` +} + +// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service +// call. +type EffectiveNetworkSecurityGroupListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective network security groups. + Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// EffectiveNetworkSecurityRule effective network security rules. +type EffectiveNetworkSecurityRule struct { + // Name - The name of the security rule specified by the user (if created by the user). + Name *string `json:"name,omitempty"` + // Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll' + Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` + // SourcePortRange - The source port or range. + SourcePortRange *string `json:"sourcePortRange,omitempty"` + // DestinationPortRange - The destination port or range. + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + // SourcePortRanges - The source port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - The destination port ranges. Expected values include a single integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + // SourceAddressPrefix - The source address prefix. + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + // DestinationAddressPrefix - The destination address prefix. + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + // SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + // DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + // ExpandedSourceAddressPrefix - The expanded source address prefix. + ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` + // ExpandedDestinationAddressPrefix - Expanded destination address prefix. + ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` + // Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + Access SecurityRuleAccess `json:"access,omitempty"` + // Priority - The priority of the rule. + Priority *int32 `json:"priority,omitempty"` + // Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + Direction SecurityRuleDirection `json:"direction,omitempty"` +} + +// EffectiveRoute effective Route. +type EffectiveRoute struct { + // Name - The name of the user defined route. This is optional. + Name *string `json:"name,omitempty"` + // DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet. + DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` + // Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault' + Source EffectiveRouteSource `json:"source,omitempty"` + // State - The value of effective route. Possible values include: 'Active', 'Invalid' + State EffectiveRouteState `json:"state,omitempty"` + // AddressPrefix - The address prefixes of the effective routes in CIDR notation. + AddressPrefix *[]string `json:"addressPrefix,omitempty"` + // NextHopIPAddress - The IP address of the next hop of the effective route. + NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` + // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + NextHopType RouteNextHopType `json:"nextHopType,omitempty"` +} + +// EffectiveRouteListResult response for list effective route API service call. +type EffectiveRouteListResult struct { + autorest.Response `json:"-"` + // Value - A list of effective routes. + Value *[]EffectiveRoute `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// EndpointServiceResult endpoint service. +type EndpointServiceResult struct { + // Name - READ-ONLY; Name of the endpoint service. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the endpoint service. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// EndpointServicesListResult response for the ListAvailableEndpointServices API service call. +type EndpointServicesListResult struct { + autorest.Response `json:"-"` + // Value - List of available endpoint services in a region. + Value *[]EndpointServiceResult `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult +// values. +type EndpointServicesListResultIterator struct { + i int + page EndpointServicesListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EndpointServicesListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EndpointServicesListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { +func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { +func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult { if !iter.page.NotDone() { - return ExpressRouteCircuitPeering{} + return EndpointServiceResult{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. -func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { - return ExpressRouteCircuitPeeringListResultIterator{page: page} +// Creates a new instance of the EndpointServicesListResultIterator type. +func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator { + return EndpointServicesListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { - return ercplr.Value == nil || len(*ercplr.Value) == 0 +func (eslr EndpointServicesListResult) IsEmpty() bool { + return eslr.Value == nil || len(*eslr.Value) == 0 } -// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. +// endpointServicesListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { - if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { +func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(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(ercplr.NextLink))) + autorest.WithBaseURL(to.String(eslr.NextLink))) } -// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. -type ExpressRouteCircuitPeeringListResultPage struct { - fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) - ercplr ExpressRouteCircuitPeeringListResult +// EndpointServicesListResultPage contains a page of EndpointServiceResult values. +type EndpointServicesListResultPage struct { + fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error) + eslr EndpointServicesListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -8877,463 +9639,2871 @@ func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ercplr) + next, err := page.fn(ctx, page.eslr) if err != nil { return err } - page.ercplr = next + 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 *ExpressRouteCircuitPeeringListResultPage) Next() error { +func (page *EndpointServicesListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { - return !page.ercplr.IsEmpty() +func (page EndpointServicesListResultPage) NotDone() bool { + return !page.eslr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { - return page.ercplr +func (page EndpointServicesListResultPage) Response() EndpointServicesListResult { + return page.eslr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { - if page.ercplr.IsEmpty() { +func (page EndpointServicesListResultPage) Values() []EndpointServiceResult { + if page.eslr.IsEmpty() { return nil } - return *page.ercplr.Value + return *page.eslr.Value } -// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. -func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { - return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} +// Creates a new instance of the EndpointServicesListResultPage type. +func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage { + return EndpointServicesListResultPage{fn: getNextPage} } -// ExpressRouteCircuitPeeringPropertiesFormat ... -type ExpressRouteCircuitPeeringPropertiesFormat struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // Stats - Gets peering stats. - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *RouteFilter `json:"routeFilter,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - // ExpressRouteConnection - The ExpressRoute connection. - ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` - // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` +// Error common error representation. +type Error struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` + // Target - Error target. + Target *string `json:"target,omitempty"` + // Details - Error details. + Details *[]ErrorDetails `json:"details,omitempty"` + // InnerError - Inner error message. + InnerError *string `json:"innerError,omitempty"` } -// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { - azure.Future +// ErrorDetails common error details representation. +type ErrorDetails struct { + // Code - Error code. + Code *string `json:"code,omitempty"` + // Target - Error target. + Target *string `json:"target,omitempty"` + // Message - Error message. + Message *string `json:"message,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") - return - } +// ErrorResponse the error object. +type ErrorResponse struct { + // Error - The error details object. + Error *ErrorDetails `json:"error,omitempty"` +} + +// EvaluatedNetworkSecurityGroup results of network security group evaluation. +type EvaluatedNetworkSecurityGroup struct { + // NetworkSecurityGroupID - Network security group ID. + NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"` + // AppliedTo - Resource ID of nic or subnet to which network security group is applied. + AppliedTo *string `json:"appliedTo,omitempty"` + // MatchedRule - Matched network security rule. + MatchedRule *MatchedRule `json:"matchedRule,omitempty"` + // RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results. + RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` +} + +// ExpressRouteCircuit expressRouteCircuit resource. +type ExpressRouteCircuit struct { + autorest.Response `json:"-"` + // Sku - The SKU. + Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` + // ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit. + *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuit. +func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erc.Sku != nil { + objectMap["sku"] = erc.Sku + } + if erc.ExpressRouteCircuitPropertiesFormat != nil { + objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat + } + if erc.ID != nil { + objectMap["id"] = erc.ID + } + if erc.Location != nil { + objectMap["location"] = erc.Location + } + if erc.Tags != nil { + objectMap["tags"] = erc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct. +func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "sku": + if v != nil { + var sku ExpressRouteCircuitSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + erc.Sku = &sku + } + case "properties": + if v != nil { + var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat) + if err != nil { + return err + } + erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erc.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitArpTable struct { + // Age - Entry age in minutes. + Age *int32 `json:"age,omitempty"` + // Interface - Interface address. + Interface *string `json:"interface,omitempty"` + // IPAddress - The IP address. + IPAddress *string `json:"ipAddress,omitempty"` + // MacAddress - The MAC address. + MacAddress *string `json:"macAddress,omitempty"` +} + +// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource. +type ExpressRouteCircuitAuthorization struct { + autorest.Response `json:"-"` + // AuthorizationPropertiesFormat - Properties of the express route circuit authorization. + *AuthorizationPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization. +func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erca.AuthorizationPropertiesFormat != nil { + objectMap["properties"] = erca.AuthorizationPropertiesFormat + } + if erca.Name != nil { + objectMap["name"] = erca.Name + } + if erca.ID != nil { + objectMap["id"] = erca.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct. +func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var authorizationPropertiesFormat AuthorizationPropertiesFormat + err = json.Unmarshal(*v, &authorizationPropertiesFormat) + if err != nil { + return err + } + erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erca.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erca.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erca.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erca.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent { + erca, err = client.CreateOrUpdateResponder(erca.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitAuthorizationsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering +// resource. +type ExpressRouteCircuitConnection struct { + autorest.Response `json:"-"` + // ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. + *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection. +func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil { + objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat + } + if ercc.Name != nil { + objectMap["name"] = ercc.Name + } + if ercc.ID != nil { + objectMap["id"] = ercc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct. +func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat) + if err != nil { + return err + } + ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercc.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all +// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. +type ExpressRouteCircuitConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit. + Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of +// ExpressRouteCircuitConnection values. +type ExpressRouteCircuitConnectionListResultIterator struct { + i int + page ExpressRouteCircuitConnectionListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection { + if !iter.page.NotDone() { + return ExpressRouteCircuitConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type. +func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator { + return ExpressRouteCircuitConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool { + return ercclr.Value == nil || len(*ercclr.Value) == 0 +} + +// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercclr.NextLink))) +} + +// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values. +type ExpressRouteCircuitConnectionListResultPage struct { + fn func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error) + ercclr ExpressRouteCircuitConnectionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = 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 *ExpressRouteCircuitConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool { + return !page.ercclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult { + return page.ercclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection { + if page.ercclr.IsEmpty() { + return nil + } + return *page.ercclr.Value +} + +// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type. +func NewExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage { + return ExpressRouteCircuitConnectionListResultPage{fn: getNextPage} +} + +// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection. +type ExpressRouteCircuitConnectionPropertiesFormat struct { + // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection. + ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` + // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` + // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // AuthorizationKey - The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitConnectionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitConnectionsDeleteFuture) Result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call. +type ExpressRouteCircuitListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteCircuits in a resource group. + Value *[]ExpressRouteCircuit `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit +// values. +type ExpressRouteCircuitListResultIterator struct { + i int + page ExpressRouteCircuitListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit { + if !iter.page.NotDone() { + return ExpressRouteCircuit{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitListResultIterator type. +func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator { + return ExpressRouteCircuitListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erclr ExpressRouteCircuitListResult) IsEmpty() bool { + return erclr.Value == nil || len(*erclr.Value) == 0 +} + +// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) { + if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erclr.NextLink))) +} + +// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values. +type ExpressRouteCircuitListResultPage struct { + fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error) + erclr ExpressRouteCircuitListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.erclr) + if err != nil { + return err + } + page.erclr = 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 *ExpressRouteCircuitListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitListResultPage) NotDone() bool { + return !page.erclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult { + return page.erclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit { + if page.erclr.IsEmpty() { + return nil + } + return *page.erclr.Value +} + +// Creates a new instance of the ExpressRouteCircuitListResultPage type. +func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage { + return ExpressRouteCircuitListResultPage{fn: getNextPage} +} + +// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource. +type ExpressRouteCircuitPeering struct { + autorest.Response `json:"-"` + // ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. + *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering. +func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil { + objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat + } + if ercp.Name != nil { + objectMap["name"] = ercp.Name + } + if ercp.ID != nil { + objectMap["id"] = ercp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct. +func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat + err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat) + if err != nil { + return err + } + ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercp.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCircuitPeeringConfig specifies the peering configuration. +type ExpressRouteCircuitPeeringConfig struct { + // AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes. + AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` + // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering. + AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` + // AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded' + AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` + // LegacyMode - The legacy mode of the peering. + LegacyMode *int32 `json:"legacyMode,omitempty"` + // CustomerASN - The CustomerASN of the peering. + CustomerASN *int32 `json:"customerASN,omitempty"` + // RoutingRegistryName - The RoutingRegistryName of the configuration. + RoutingRegistryName *string `json:"routingRegistryName,omitempty"` +} + +// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier. +type ExpressRouteCircuitPeeringID struct { + // ID - The ID of the ExpressRoute circuit peering. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings +// that belong to an ExpressRouteCircuit. +type ExpressRouteCircuitPeeringListResult struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route circuit. + Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of +// ExpressRouteCircuitPeering values. +type ExpressRouteCircuitPeeringListResultIterator struct { + i int + page ExpressRouteCircuitPeeringListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering { + if !iter.page.NotDone() { + return ExpressRouteCircuitPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type. +func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator { + return ExpressRouteCircuitPeeringListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool { + return ercplr.Value == nil || len(*ercplr.Value) == 0 +} + +// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) { + if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercplr.NextLink))) +} + +// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values. +type ExpressRouteCircuitPeeringListResultPage struct { + fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error) + ercplr ExpressRouteCircuitPeeringListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercplr) + if err != nil { + return err + } + page.ercplr = 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 *ExpressRouteCircuitPeeringListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool { + return !page.ercplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult { + return page.ercplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering { + if page.ercplr.IsEmpty() { + return nil + } + return *page.ercplr.Value +} + +// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type. +func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage { + return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage} +} + +// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering. +type ExpressRouteCircuitPeeringPropertiesFormat struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // Stats - Gets peering stats. + Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - Gets whether the provider or the customer last modified the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // RouteFilter - The reference of the RouteFilter resource. + RouteFilter *SubResource `json:"routeFilter,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` + // ExpressRouteConnection - The ExpressRoute connection. + ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"` + // Connections - The list of circuit connections associated with Azure Private Peering for this circuit. + Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` + // PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit. + PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` +} + +// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { + ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitPeeringsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. +type ExpressRouteCircuitPropertiesFormat struct { + // AllowClassicOperations - Allow classic operations. + AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` + // CircuitProvisioningState - The CircuitProvisioningState state of the resource. + CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` + // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // Authorizations - The list of authorizations. + Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // ServiceKey - The ServiceKey. + ServiceKey *string `json:"serviceKey,omitempty"` + // ServiceProviderNotes - The ServiceProviderNotes. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ServiceProviderProperties - The ServiceProviderProperties. + ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` + // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. + ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` + // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. + BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` + // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + Stag *int32 `json:"stag,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // GlobalReachEnabled - Flag denoting Global reach status. + GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` +} + +// ExpressRouteCircuitReference reference to an express route circuit. +type ExpressRouteCircuitReference struct { + // ID - Corresponding Express Route Circuit Id. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTable struct { + // NetworkProperty - IP address of a network entity. + NetworkProperty *string `json:"network,omitempty"` + // NextHop - NextHop address. + NextHop *string `json:"nextHop,omitempty"` + // LocPrf - Local preference value as set with the set local-preference route-map configuration command. + LocPrf *string `json:"locPrf,omitempty"` + // Weight - Route Weight. + Weight *int32 `json:"weight,omitempty"` + // Path - Autonomous system paths to the destination network. + Path *string `json:"path,omitempty"` +} + +// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCircuitRoutesTableSummary struct { + // Neighbor - IP address of the neighbor. + Neighbor *string `json:"neighbor,omitempty"` + // V - BGP version number spoken to the neighbor. + V *int32 `json:"v,omitempty"` + // As - Autonomous system number. + As *int32 `json:"as,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StatePfxRcd *string `json:"statePfxRcd,omitempty"` +} + +// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsArpTableListResult struct { + autorest.Response `json:"-"` + // Value - Gets list of the ARP table. + Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an +// ExpressRouteCircuit. +type ExpressRouteCircuitServiceProviderProperties struct { + // ServiceProviderName - The serviceProviderName. + ServiceProviderName *string `json:"serviceProviderName,omitempty"` + // PeeringLocation - The peering location. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - The BandwidthInMbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` +} + +// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. +type ExpressRouteCircuitSku struct { + // Name - The name of the SKU. + Name *string `json:"name,omitempty"` + // Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal' + Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` + // Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData' + Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` +} + +// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListArpTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsListRoutesTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { + ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route +// Circuits API. +type ExpressRouteCircuitsRoutesTableListResult struct { + autorest.Response `json:"-"` + // Value - The list of routes table. + Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the +// Express Route Circuits API. +type ExpressRouteCircuitsRoutesTableSummaryListResult struct { + autorest.Response `json:"-"` + // Value - A list of the routes table. + Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCircuitStats contains stats associated with the peering. +type ExpressRouteCircuitStats struct { + autorest.Response `json:"-"` + // PrimarybytesIn - Gets BytesIn of the peering. + PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` + // PrimarybytesOut - Gets BytesOut of the peering. + PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` + // SecondarybytesIn - Gets BytesIn of the peering. + SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` + // SecondarybytesOut - Gets BytesOut of the peering. + SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` +} + +// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteCircuitsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.UpdateTagsResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteConnection expressRouteConnection resource. +type ExpressRouteConnection struct { + autorest.Response `json:"-"` + // ExpressRouteConnectionProperties - Properties of the express route connection. + *ExpressRouteConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource. + Name *string `json:"name,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteConnection. +func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erc.ExpressRouteConnectionProperties != nil { + objectMap["properties"] = erc.ExpressRouteConnectionProperties + } + if erc.Name != nil { + objectMap["name"] = erc.Name + } + if erc.ID != nil { + objectMap["id"] = erc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct. +func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteConnectionProperties ExpressRouteConnectionProperties + err = json.Unmarshal(*v, &expressRouteConnectionProperties) + if err != nil { + return err + } + erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erc.Name = &name + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erc.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteConnectionID the ID of the ExpressRouteConnection. +type ExpressRouteConnectionID struct { + // ID - READ-ONLY; The ID of the ExpressRouteConnection. + ID *string `json:"id,omitempty"` +} + +// ExpressRouteConnectionList expressRouteConnection list. +type ExpressRouteConnectionList struct { + autorest.Response `json:"-"` + // Value - The list of ExpressRoute connections. + Value *[]ExpressRouteConnection `json:"value,omitempty"` +} + +// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource. +type ExpressRouteConnectionProperties struct { + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ExpressRouteCircuitPeering - The ExpressRoute circuit peering. + ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` + // AuthorizationKey - Authorization key to establish the connection. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // RoutingWeight - The routing weight associated to the connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` +} + +// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ExpressRouteConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteConnectionsCreateOrUpdateFuture) Result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { + erc, err = client.CreateOrUpdateResponder(erc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteConnectionsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteConnectionsDeleteFuture) Result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCrossConnection expressRouteCrossConnection resource. +type ExpressRouteCrossConnection struct { + autorest.Response `json:"-"` + // ExpressRouteCrossConnectionProperties - Properties of the express route cross connection. + *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. +func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ercc.ExpressRouteCrossConnectionProperties != nil { + objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties + } + if ercc.ID != nil { + objectMap["id"] = ercc.ID + } + if ercc.Location != nil { + objectMap["location"] = ercc.Location + } + if ercc.Tags != nil { + objectMap["tags"] = ercc.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. +func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) + if err != nil { + return err + } + ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ercc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ercc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ercc.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ercc.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ercc.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ercc.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. +type ExpressRouteCrossConnectionListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRouteCrossConnection resources. + Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of +// ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultIterator struct { + i int + page ExpressRouteCrossConnectionListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { + if !iter.page.NotDone() { + return ExpressRouteCrossConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type. +func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator { + return ExpressRouteCrossConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { + return ercclr.Value == nil || len(*ercclr.Value) == 0 +} + +// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ercclr.NextLink))) +} + +// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. +type ExpressRouteCrossConnectionListResultPage struct { + fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) + ercclr ExpressRouteCrossConnectionListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ercclr) + if err != nil { + return err + } + page.ercclr = 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 *ExpressRouteCrossConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { + return !page.ercclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { + return page.ercclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { + if page.ercclr.IsEmpty() { + return nil + } + return *page.ercclr.Value +} + +// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type. +func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { + return ExpressRouteCrossConnectionListResultPage{fn: getNextPage} +} + +// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. +type ExpressRouteCrossConnectionPeering struct { + autorest.Response `json:"-"` + // ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering. + *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. +func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { + objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties + } + if erccp.Name != nil { + objectMap["name"] = erccp.Name + } + if erccp.ID != nil { + objectMap["id"] = erccp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. +func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties + err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) + if err != nil { + return err + } + erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erccp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erccp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erccp.ID = &ID + } + } + } + + return nil +} + +// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings +// that belong to an ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionPeeringList struct { + autorest.Response `json:"-"` + // Value - The peerings in an express route cross connection. + Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of +// ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListIterator struct { + i int + page ExpressRouteCrossConnectionPeeringListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { + if !iter.page.NotDone() { + return ExpressRouteCrossConnectionPeering{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type. +func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator { + return ExpressRouteCrossConnectionPeeringListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { + return erccpl.Value == nil || len(*erccpl.Value) == 0 +} + +// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) { + if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erccpl.NextLink))) +} + +// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. +type ExpressRouteCrossConnectionPeeringListPage struct { + fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) + erccpl ExpressRouteCrossConnectionPeeringList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.erccpl) + if err != nil { + return err + } + page.erccpl = 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 *ExpressRouteCrossConnectionPeeringListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { + return !page.erccpl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { + return page.erccpl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { + if page.erccpl.IsEmpty() { + return nil + } + return *page.erccpl.Value +} + +// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type. +func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { + return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage} +} + +// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering. +type ExpressRouteCrossConnectionPeeringProperties struct { + // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` + // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' + State ExpressRoutePeeringState `json:"state,omitempty"` + // AzureASN - READ-ONLY; The Azure ASN. + AzureASN *int32 `json:"azureASN,omitempty"` + // PeerASN - The peer ASN. + PeerASN *int64 `json:"peerASN,omitempty"` + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // PrimaryAzurePort - READ-ONLY; The primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - READ-ONLY; The secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // SharedKey - The shared key. + SharedKey *string `json:"sharedKey,omitempty"` + // VlanID - The VLAN ID. + VlanID *int32 `json:"vlanId,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // GatewayManagerEtag - The GatewayManager Etag. + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + // LastModifiedBy - Gets whether the provider or the customer last modified the peering. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // Ipv6PeeringConfig - The IPv6 peering configuration. + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` +} + +// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { + erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. +type ExpressRouteCrossConnectionProperties struct { + // PrimaryAzurePort - READ-ONLY; The name of the primary port. + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + // SecondaryAzurePort - READ-ONLY; The name of the secondary port. + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + // STag - READ-ONLY; The identifier of the circuit traffic. + STag *int32 `json:"sTag,omitempty"` + // PeeringLocation - The peering location of the ExpressRoute circuit. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInMbps - The circuit bandwidth In Mbps. + BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` + // ExpressRouteCircuit - The ExpressRouteCircuit. + ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` + // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` + // ServiceProviderNotes - Additional read only notes set by the connectivity provider. + ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` + // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Peerings - The list of peerings. + Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` +} + +// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. +type ExpressRouteCrossConnectionRoutesTableSummary struct { + // Neighbor - IP address of Neighbor router. + Neighbor *string `json:"neighbor,omitempty"` + // Asn - Autonomous system number. + Asn *int32 `json:"asn,omitempty"` + // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. + UpDown *string `json:"upDown,omitempty"` + // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. + StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` +} + +// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ExpressRouteCrossConnectionsListArpTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { + ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { + ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { + erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with +// the Express Route Cross Connections. +type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { + autorest.Response `json:"-"` + // Value - A list of the routes table. + Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. +type ExpressRouteCrossConnectionsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { + ercc, err = client.UpdateTagsResponder(ercc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteGateway expressRoute gateway resource. +type ExpressRouteGateway struct { + autorest.Response `json:"-"` + // ExpressRouteGatewayProperties - Properties of the express route gateway. + *ExpressRouteGatewayProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for ExpressRouteGateway. +func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erg.ExpressRouteGatewayProperties != nil { + objectMap["properties"] = erg.ExpressRouteGatewayProperties + } + if erg.ID != nil { + objectMap["id"] = erg.ID + } + if erg.Location != nil { + objectMap["location"] = erg.Location + } + if erg.Tags != nil { + objectMap["tags"] = erg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct. +func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteGatewayProperties ExpressRouteGatewayProperties + err = json.Unmarshal(*v, &expressRouteGatewayProperties) + if err != nil { + return err + } + erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erg.Tags = tags + } + } + } + + return nil +} + +// ExpressRouteGatewayList list of ExpressRoute gateways. +type ExpressRouteGatewayList struct { + autorest.Response `json:"-"` + // Value - List of ExpressRoute gateways. + Value *[]ExpressRouteGateway `json:"value,omitempty"` +} + +// ExpressRouteGatewayProperties expressRoute gateway resource properties. +type ExpressRouteGatewayProperties struct { + // AutoScaleConfiguration - Configuration for auto scaling. + AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` + // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. + ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. + VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` +} + +// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling. +type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { + // Bounds - Minimum and maximum number of scale units to deploy. + Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` +} + +// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to +// deploy. +type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { + // Min - Minimum number of scale units deployed for ExpressRoute gateway. + Min *int32 `json:"min,omitempty"` + // Max - Maximum number of scale units deployed for ExpressRoute gateway. + Max *int32 `json:"max,omitempty"` +} + +// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRouteGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRouteGatewaysCreateOrUpdateFuture) Result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture") + return + } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent { - ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response) + if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent { + erg, err = client.CreateOrUpdateResponder(erg.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request") } } return } -// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a +// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRouteCircuitPeeringsDeleteFuture struct { +type ExpressRouteGatewaysDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitPeeringsDeleteFuture) Result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) { +func (future *ExpressRouteGatewaysDeleteFuture) Result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture") return } ar.Response = future.Response() return } -// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit. -type ExpressRouteCircuitPropertiesFormat struct { - // AllowClassicOperations - Allow classic operations - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - // CircuitProvisioningState - The CircuitProvisioningState state of the resource. - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // Authorizations - The list of authorizations. - Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - // Peerings - The list of peerings. - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - // ServiceKey - The ServiceKey. - ServiceKey *string `json:"serviceKey,omitempty"` - // ServiceProviderNotes - The ServiceProviderNotes. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ServiceProviderProperties - The ServiceProviderProperties. - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource. - ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` - // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource. - BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` - // Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation. - Stag *int32 `json:"stag,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // AllowGlobalReach - Flag to enable Global Reach on the circuit. - AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"` -} - -// ExpressRouteCircuitReference ... -type ExpressRouteCircuitReference struct { - // ID - Corresponding Express Route Circuit Id. +// ExpressRouteLink expressRouteLink child resource definition. +type ExpressRouteLink struct { + autorest.Response `json:"-"` + // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties. + *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` + // Name - Name of child port resource that is unique among child port resources of the parent. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. ID *string `json:"id,omitempty"` } -// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit -type ExpressRouteCircuitRoutesTable struct { - // NetworkProperty - IP address of a network entity - NetworkProperty *string `json:"network,omitempty"` - // NextHop - NextHop address - NextHop *string `json:"nextHop,omitempty"` - // LocPrf - Local preference value as set with the set local-preference route-map configuration command - LocPrf *string `json:"locPrf,omitempty"` - // Weight - Route Weight. - Weight *int32 `json:"weight,omitempty"` - // Path - Autonomous system paths to the destination network. - Path *string `json:"path,omitempty"` +// MarshalJSON is the custom marshaler for ExpressRouteLink. +func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erl.ExpressRouteLinkPropertiesFormat != nil { + objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat + } + if erl.Name != nil { + objectMap["name"] = erl.Name + } + if erl.ID != nil { + objectMap["id"] = erl.ID + } + return json.Marshal(objectMap) } -// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCircuitRoutesTableSummary struct { - // Neighbor - IP address of the neighbor. - Neighbor *string `json:"neighbor,omitempty"` - // V - BGP version number spoken to the neighbor. - V *int32 `json:"v,omitempty"` - // As - Autonomous system number. - As *int32 `json:"as,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StatePfxRcd *string `json:"statePfxRcd,omitempty"` +// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct. +func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat + err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat) + if err != nil { + return err + } + erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erl.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erl.ID = &ID + } + } + } + + return nil } -// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsArpTableListResult struct { +// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call. +type ExpressRouteLinkListResult struct { autorest.Response `json:"-"` - // Value - Gets list of the ARP table. - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` + // Value - The list of ExpressRouteLink sub-resources. + Value *[]ExpressRouteLink `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsCreateOrUpdateFuture struct { - azure.Future +// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values. +type ExpressRouteLinkListResultIterator struct { + i int + page ExpressRouteLinkListResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.CreateOrUpdateResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") - } +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - return -} - -// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture") - return + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - ar.Response = future.Response() - return + iter.i = 0 + return nil } -// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an -// ExpressRouteCircuit. -type ExpressRouteCircuitServiceProviderProperties struct { - // ServiceProviderName - The serviceProviderName. - ServiceProviderName *string `json:"serviceProviderName,omitempty"` - // PeeringLocation - The peering location. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The BandwidthInMbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRouteLinkListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit. -type ExpressRouteCircuitSku struct { - // Name - The name of the SKU. - Name *string `json:"name,omitempty"` - // Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic' - Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"` - // Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData' - Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRouteLinkListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListArpTableFuture struct { - azure.Future +// Response returns the raw server response from the last page request. +func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult { + return iter.page.Response() } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListArpTableFuture) Result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") - } +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink { + if !iter.page.NotDone() { + return ExpressRouteLink{} } - return + return iter.page.Values()[iter.i] } -// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsListRoutesTableFuture struct { - azure.Future +// Creates a new instance of the ExpressRouteLinkListResultIterator type. +func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator { + return ExpressRouteLinkListResultIterator{page: page} } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } +// IsEmpty returns true if the ListResult contains no values. +func (erllr ExpressRouteLinkListResult) IsEmpty() bool { + return erllr.Value == nil || len(*erllr.Value) == 0 +} + +// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) { + if erllr.NextLink == nil || len(to.String(erllr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erllr.NextLink))) } -// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCircuitsListRoutesTableSummaryFuture struct { - azure.Future +// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values. +type ExpressRouteLinkListResultPage struct { + fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error) + erllr ExpressRouteLinkListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) Result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture") - return +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent { - ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request") - } + next, err := page.fn(ctx, page.erllr) + if err != nil { + return err } - return + page.erllr = next + return nil } -// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route -// Circuits API. -type ExpressRouteCircuitsRoutesTableListResult struct { - autorest.Response `json:"-"` - // Value - The list of routes table. - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteLinkListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the -// Express Route Circuits API. -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteLinkListResultPage) NotDone() bool { + return !page.erllr.IsEmpty() } -// ExpressRouteCircuitStats contains stats associated with the peering. -type ExpressRouteCircuitStats struct { - autorest.Response `json:"-"` - // PrimarybytesIn - Gets BytesIn of the peering. - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - // PrimarybytesOut - Gets BytesOut of the peering. - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - // SecondarybytesIn - Gets BytesIn of the peering. - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - // SecondarybytesOut - Gets BytesOut of the peering. - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` +// Response returns the raw server response from the last page request. +func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult { + return page.erllr } -// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteCircuitsUpdateTagsFuture struct { - azure.Future +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink { + if page.erllr.IsEmpty() { + return nil + } + return *page.erllr.Value } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCircuitsUpdateTagsFuture) Result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.UpdateTagsResponder(erc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request") - } - } - return +// Creates a new instance of the ExpressRouteLinkListResultPage type. +func NewExpressRouteLinkListResultPage(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { + return ExpressRouteLinkListResultPage{fn: getNextPage} +} + +// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources. +type ExpressRouteLinkPropertiesFormat struct { + // RouterName - READ-ONLY; Name of Azure router associated with physical port. + RouterName *string `json:"routerName,omitempty"` + // InterfaceName - READ-ONLY; Name of Azure router interface. + InterfaceName *string `json:"interfaceName,omitempty"` + // PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port. + PatchPanelID *string `json:"patchPanelId,omitempty"` + // RackID - READ-ONLY; Mapping of physical patch panel to rack. + RackID *string `json:"rackId,omitempty"` + // ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC' + ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` + // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled' + AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// ExpressRouteConnection expressRouteConnection resource. -type ExpressRouteConnection struct { - autorest.Response `json:"-"` - *ExpressRouteConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource. - Name *string `json:"name,omitempty"` +// ExpressRoutePort expressRoutePort resource definition. +type ExpressRoutePort struct { + autorest.Response `json:"-"` + // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties. + *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRouteConnection. -func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRoutePort. +func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erc.ExpressRouteConnectionProperties != nil { - objectMap["properties"] = erc.ExpressRouteConnectionProperties + if erp.ExpressRoutePortPropertiesFormat != nil { + objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat } - if erc.Name != nil { - objectMap["name"] = erc.Name + if erp.ID != nil { + objectMap["id"] = erp.ID } - if erc.ID != nil { - objectMap["id"] = erc.ID + if erp.Location != nil { + objectMap["location"] = erp.Location + } + if erp.Tags != nil { + objectMap["tags"] = erp.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct. -func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct. +func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9343,21 +12513,21 @@ func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRouteConnectionProperties ExpressRouteConnectionProperties - err = json.Unmarshal(*v, &expressRouteConnectionProperties) + var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat + err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat) if err != nil { return err } - erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties + erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat } - case "name": + case "etag": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - erc.Name = &name + erp.Etag = &etag } case "id": if v != nil { @@ -9366,7 +12536,43 @@ func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - erc.ID = &ID + erp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + erp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + erp.Tags = tags } } } @@ -9374,89 +12580,235 @@ func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteConnectionID the ID of the ExpressRouteConnection. -type ExpressRouteConnectionID struct { - // ID - READ-ONLY; The ID of the ExpressRouteConnection. - ID *string `json:"id,omitempty"` +// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. +type ExpressRoutePortListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRoutePort resources. + Value *[]ExpressRoutePort `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteConnectionList expressRouteConnection list -type ExpressRouteConnectionList struct { - autorest.Response `json:"-"` - // Value - The list of ExpressRoute connections - Value *[]ExpressRouteConnection `json:"value,omitempty"` +// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. +type ExpressRoutePortListResultIterator struct { + i int + page ExpressRoutePortListResultPage } -// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource. -type ExpressRouteConnectionProperties struct { - // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // ExpressRouteCircuitPeering - The ExpressRoute circuit peering. - ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"` - // AuthorizationKey - Authorization key to establish the connection. - AuthorizationKey *string `json:"authorizationKey,omitempty"` - // RoutingWeight - The routing weight associated to the connection. - RoutingWeight *int32 `json:"routingWeight,omitempty"` +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRoutePortListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRoutePortListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort { + if !iter.page.NotDone() { + return ExpressRoutePort{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRoutePortListResultIterator type. +func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator { + return ExpressRoutePortListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erplr ExpressRoutePortListResult) IsEmpty() bool { + return erplr.Value == nil || len(*erplr.Value) == 0 +} + +// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) { + if erplr.NextLink == nil || len(to.String(erplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erplr.NextLink))) +} + +// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values. +type ExpressRoutePortListResultPage struct { + fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error) + erplr ExpressRoutePortListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.erplr) + if err != nil { + return err + } + page.erplr = 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 *ExpressRoutePortListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRoutePortListResultPage) NotDone() bool { + return !page.erplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult { + return page.erplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort { + if page.erplr.IsEmpty() { + return nil + } + return *page.erplr.Value +} + +// Creates a new instance of the ExpressRoutePortListResultPage type. +func NewExpressRoutePortListResultPage(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { + return ExpressRoutePortListResultPage{fn: getNextPage} } -// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ExpressRouteConnectionsCreateOrUpdateFuture struct { +// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources. +type ExpressRoutePortPropertiesFormat struct { + // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically. + PeeringLocation *string `json:"peeringLocation,omitempty"` + // BandwidthInGbps - Bandwidth of procured ports in Gbps. + BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"` + // ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths. + ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` + // Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s). + Mtu *string `json:"mtu,omitempty"` + // Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ' + Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` + // EtherType - READ-ONLY; Ether type of the physical port. + EtherType *string `json:"etherType,omitempty"` + // AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. + AllocationDate *string `json:"allocationDate,omitempty"` + // Links - The set of physical links of the ExpressRoutePort resource. + Links *[]ExpressRouteLink `json:"links,omitempty"` + // Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. + Circuits *[]SubResource `json:"circuits,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ResourceGUID - The resource GUID property of the ExpressRoutePort resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` +} + +// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRoutePortsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteConnectionsCreateOrUpdateFuture) Result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) { +func (future *ExpressRoutePortsCreateOrUpdateFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent { - erc, err = client.CreateOrUpdateResponder(erc.Response.Response) + if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { + erp, err = client.CreateOrUpdateResponder(erp.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request") } } return } -// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteConnectionsDeleteFuture struct { +// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ExpressRoutePortsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRouteConnectionsDeleteFuture) Result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) { +func (future *ExpressRoutePortsDeleteFuture) Result(client ExpressRoutePortsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture") return } ar.Response = future.Response() return } -// ExpressRouteCrossConnection expressRouteCrossConnection resource -type ExpressRouteCrossConnection struct { - autorest.Response `json:"-"` - *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` +// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource. +type ExpressRoutePortsLocation struct { + autorest.Response `json:"-"` + // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties. + *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -9469,26 +12821,26 @@ type ExpressRouteCrossConnection struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection. -func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation. +func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ercc.ExpressRouteCrossConnectionProperties != nil { - objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties + if erpl.ExpressRoutePortsLocationPropertiesFormat != nil { + objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat } - if ercc.ID != nil { - objectMap["id"] = ercc.ID + if erpl.ID != nil { + objectMap["id"] = erpl.ID } - if ercc.Location != nil { - objectMap["location"] = ercc.Location + if erpl.Location != nil { + objectMap["location"] = erpl.Location } - if ercc.Tags != nil { - objectMap["tags"] = ercc.Tags + if erpl.Tags != nil { + objectMap["tags"] = erpl.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct. -func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct. +func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9498,21 +12850,12 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties) - if err != nil { - return err - } - ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat + err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat) if err != nil { return err } - ercc.Etag = &etag + erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat } case "id": if v != nil { @@ -9521,7 +12864,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.ID = &ID + erpl.ID = &ID } case "name": if v != nil { @@ -9530,7 +12873,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Name = &name + erpl.Name = &name } case "type": if v != nil { @@ -9539,7 +12882,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Type = &typeVar + erpl.Type = &typeVar } case "location": if v != nil { @@ -9548,7 +12891,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Location = &location + erpl.Location = &location } case "tags": if v != nil { @@ -9557,7 +12900,7 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { if err != nil { return err } - ercc.Tags = tags + erpl.Tags = tags } } } @@ -9565,27 +12908,35 @@ func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call. -type ExpressRouteCrossConnectionListResult struct { +// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths. +type ExpressRoutePortsLocationBandwidths struct { + // OfferName - READ-ONLY; Bandwidth descriptive name. + OfferName *string `json:"offerName,omitempty"` + // ValueInGbps - READ-ONLY; Bandwidth value in Gbps. + ValueInGbps *int32 `json:"valueInGbps,omitempty"` +} + +// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call. +type ExpressRoutePortsLocationListResult struct { autorest.Response `json:"-"` - // Value - A list of ExpressRouteCrossConnection resources. - Value *[]ExpressRouteCrossConnection `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - The list of all ExpressRoutePort peering locations. + Value *[]ExpressRoutePortsLocation `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of -// ExpressRouteCrossConnection values. -type ExpressRouteCrossConnectionListResultIterator struct { +// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of +// ExpressRoutePortsLocation values. +type ExpressRoutePortsLocationListResultIterator struct { i int - page ExpressRouteCrossConnectionListResultPage + page ExpressRoutePortsLocationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -9610,62 +12961,62 @@ func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx c // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error { +func (iter *ExpressRoutePortsLocationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool { +func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult { +func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection { +func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation { if !iter.page.NotDone() { - return ExpressRouteCrossConnection{} + return ExpressRoutePortsLocation{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type. -func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator { - return ExpressRouteCrossConnectionListResultIterator{page: page} +// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type. +func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator { + return ExpressRoutePortsLocationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool { - return ercclr.Value == nil || len(*ercclr.Value) == 0 +func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool { + return erpllr.Value == nil || len(*erpllr.Value) == 0 } -// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results. +// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { - if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 { +func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) { + if erpllr.NextLink == nil || len(to.String(erpllr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ercclr.NextLink))) + autorest.WithBaseURL(to.String(erpllr.NextLink))) } -// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values. -type ExpressRouteCrossConnectionListResultPage struct { - fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error) - ercclr ExpressRouteCrossConnectionListResult +// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values. +type ExpressRoutePortsLocationListResultPage struct { + fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error) + erpllr ExpressRoutePortsLocationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -9674,73 +13025,122 @@ func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ercclr) + next, err := page.fn(ctx, page.erpllr) if err != nil { return err } - page.ercclr = next + page.erpllr = 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 *ExpressRouteCrossConnectionListResultPage) Next() error { +func (page *ExpressRoutePortsLocationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool { - return !page.ercclr.IsEmpty() +func (page ExpressRoutePortsLocationListResultPage) NotDone() bool { + return !page.erpllr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult { - return page.ercclr +func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult { + return page.erpllr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection { - if page.ercclr.IsEmpty() { +func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation { + if page.erpllr.IsEmpty() { return nil } - return *page.ercclr.Value + return *page.erpllr.Value } -// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type. -func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage { - return ExpressRouteCrossConnectionListResultPage{fn: getNextPage} +// Creates a new instance of the ExpressRoutePortsLocationListResultPage type. +func NewExpressRoutePortsLocationListResultPage(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { + return ExpressRoutePortsLocationListResultPage{fn: getNextPage} } -// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource. -type ExpressRouteCrossConnectionPeering struct { - autorest.Response `json:"-"` - *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` +// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location +// resources. +type ExpressRoutePortsLocationPropertiesFormat struct { + // Address - READ-ONLY; Address of peering location. + Address *string `json:"address,omitempty"` + // Contact - READ-ONLY; Contact details of peering locations. + Contact *string `json:"contact,omitempty"` + // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths. + AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRoutePortsUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *ExpressRoutePortsUpdateTagsFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { + erp, err = client.UpdateTagsResponder(erp.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. +type ExpressRouteServiceProvider struct { + // ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider. + *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering. -func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. +func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erccp.ExpressRouteCrossConnectionPeeringProperties != nil { - objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties + if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { + objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat } - if erccp.Name != nil { - objectMap["name"] = erccp.Name + if ersp.ID != nil { + objectMap["id"] = ersp.ID } - if erccp.ID != nil { - objectMap["id"] = erccp.ID + if ersp.Location != nil { + objectMap["location"] = ersp.Location + } + if ersp.Tags != nil { + objectMap["tags"] = ersp.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct. -func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. +func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -9750,12 +13150,21 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro switch k { case "properties": if v != nil { - var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties - err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties) + var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat + err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) if err != nil { return err } - erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties + ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ersp.ID = &ID } case "name": if v != nil { @@ -9764,25 +13173,34 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro if err != nil { return err } - erccp.Name = &name + ersp.Name = &name } - case "etag": + case "type": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - erccp.Etag = &etag + ersp.Type = &typeVar } - case "id": + case "location": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - erccp.ID = &ID + ersp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ersp.Tags = tags } } } @@ -9790,28 +13208,36 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro return nil } -// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings -// that belong to an ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionPeeringList struct { +// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider +// resources. +type ExpressRouteServiceProviderBandwidthsOffered struct { + // OfferName - The OfferName. + OfferName *string `json:"offerName,omitempty"` + // ValueInMbps - The ValueInMbps. + ValueInMbps *int32 `json:"valueInMbps,omitempty"` +} + +// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. +type ExpressRouteServiceProviderListResult struct { autorest.Response `json:"-"` - // Value - The peerings in an express route cross connection. - Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - A list of ExpressRouteResourceProvider resources. + Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of -// ExpressRouteCrossConnectionPeering values. -type ExpressRouteCrossConnectionPeeringListIterator struct { +// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of +// ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultIterator struct { i int - page ExpressRouteCrossConnectionPeeringListPage + page ExpressRouteServiceProviderListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -9836,423 +13262,253 @@ func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error { +func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool { +func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList { +func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering { +func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { if !iter.page.NotDone() { - return ExpressRouteCrossConnectionPeering{} + return ExpressRouteServiceProvider{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type. -func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator { - return ExpressRouteCrossConnectionPeeringListIterator{page: page} +// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. +func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { + return ExpressRouteServiceProviderListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool { - return erccpl.Value == nil || len(*erccpl.Value) == 0 +func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { + return ersplr.Value == nil || len(*ersplr.Value) == 0 } -// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results. +// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) { - if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erccpl.NextLink))) -} - -// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values. -type ExpressRouteCrossConnectionPeeringListPage struct { - fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error) - erccpl ExpressRouteCrossConnectionPeeringList -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.erccpl) - if err != nil { - return err - } - page.erccpl = 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 *ExpressRouteCrossConnectionPeeringListPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool { - return !page.erccpl.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList { - return page.erccpl -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering { - if page.erccpl.IsEmpty() { - return nil - } - return *page.erccpl.Value -} - -// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type. -func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage { - return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage} -} - -// ExpressRouteCrossConnectionPeeringProperties ... -type ExpressRouteCrossConnectionPeeringProperties struct { - // PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' - PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"` - // State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled' - State ExpressRoutePeeringState `json:"state,omitempty"` - // AzureASN - READ-ONLY; The Azure ASN. - AzureASN *int32 `json:"azureASN,omitempty"` - // PeerASN - The peer ASN. - PeerASN *int64 `json:"peerASN,omitempty"` - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // PrimaryAzurePort - READ-ONLY; The primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - READ-ONLY; The secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // SharedKey - The shared key. - SharedKey *string `json:"sharedKey,omitempty"` - // VlanID - The VLAN ID. - VlanID *int32 `json:"vlanId,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // GatewayManagerEtag - The GatewayManager Etag. - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - // LastModifiedBy - Gets whether the provider or the customer last modified the peering. - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - // Ipv6PeeringConfig - The IPv6 peering configuration. - Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` -} - -// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent { - erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request") - } +func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { + if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ersplr.NextLink))) } -// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCrossConnectionPeeringsDeleteFuture struct { - azure.Future +// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. +type ExpressRouteServiceProviderListResultPage struct { + fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) + ersplr ExpressRouteServiceProviderListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) Result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure") - return +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture") - return + next, err := page.fn(ctx, page.ersplr) + if err != nil { + return err } - ar.Response = future.Response() - return + page.ersplr = next + return nil } -// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection. -type ExpressRouteCrossConnectionProperties struct { - // PrimaryAzurePort - READ-ONLY; The name of the primary port. - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - // SecondaryAzurePort - READ-ONLY; The name of the secondary port. - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - // STag - READ-ONLY; The identifier of the circuit traffic. - STag *int32 `json:"sTag,omitempty"` - // PeeringLocation - The peering location of the ExpressRoute circuit. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInMbps - The circuit bandwidth In Mbps. - BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` - // ExpressRouteCircuit - The ExpressRouteCircuit - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - // ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' - ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - // ServiceProviderNotes - Additional read only notes set by the connectivity provider. - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - // ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Peerings - The list of peerings. - Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRouteServiceProviderListResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit. -type ExpressRouteCrossConnectionRoutesTableSummary struct { - // Neighbor - IP address of Neighbor router - Neighbor *string `json:"neighbor,omitempty"` - // Asn - Autonomous system number. - Asn *int32 `json:"asn,omitempty"` - // UpDown - The length of time that the BGP session has been in the Established state, or the current status if not in the Established state. - UpDown *string `json:"upDown,omitempty"` - // StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group. - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { + return !page.ersplr.IsEmpty() } -// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct { - azure.Future +// Response returns the raw server response from the last page request. +func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { + return page.ersplr } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request") - } +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { + if page.ersplr.IsEmpty() { + return nil } - return -} - -// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type ExpressRouteCrossConnectionsListArpTableFuture struct { - azure.Future + return *page.ersplr.Value } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent { - ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request") - } - } - return +// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. +func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { + return ExpressRouteServiceProviderListResultPage{fn: getNextPage} } -// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableFuture struct { - azure.Future +// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. +type ExpressRouteServiceProviderPropertiesFormat struct { + // PeeringLocations - Get a list of peering locations. + PeeringLocations *[]string `json:"peeringLocations,omitempty"` + // BandwidthsOffered - Gets bandwidths offered. + BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` + // ProvisioningState - Gets the provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent { - ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request") - } - } - return +// FlowLogFormatParameters parameters that define the flow log format. +type FlowLogFormatParameters struct { + // Type - The file type of flow log. Possible values include: 'JSON' + Type FlowLogFormatType `json:"type,omitempty"` + // Version - The version (revision) of the flow log. + Version *int32 `json:"version,omitempty"` } -// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving -// the results of a long-running operation. -type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct { - azure.Future +// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . +type FlowLogInformation struct { + autorest.Response `json:"-"` + // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . + TargetResourceID *string `json:"targetResourceId,omitempty"` + // FlowLogProperties - Properties of the flow log. + *FlowLogProperties `json:"properties,omitempty"` + // FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. + FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure") - return +// MarshalJSON is the custom marshaler for FlowLogInformation. +func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fli.TargetResourceID != nil { + objectMap["targetResourceId"] = fli.TargetResourceID } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture") - return + if fli.FlowLogProperties != nil { + objectMap["properties"] = fli.FlowLogProperties } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent { - erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request") - } + if fli.FlowAnalyticsConfiguration != nil { + objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration } - return + return json.Marshal(objectMap) } -// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with -// the Express Route Cross Connections. -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - autorest.Response `json:"-"` - // Value - A list of the routes table. - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. +func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "targetResourceId": + if v != nil { + var targetResourceID string + err = json.Unmarshal(*v, &targetResourceID) + if err != nil { + return err + } + fli.TargetResourceID = &targetResourceID + } + case "properties": + if v != nil { + var flowLogProperties FlowLogProperties + err = json.Unmarshal(*v, &flowLogProperties) + if err != nil { + return err + } + fli.FlowLogProperties = &flowLogProperties + } + case "flowAnalyticsConfiguration": + if v != nil { + var flowAnalyticsConfiguration TrafficAnalyticsProperties + err = json.Unmarshal(*v, &flowAnalyticsConfiguration) + if err != nil { + return err + } + fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration + } + } + } + + return nil } -// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. -type ExpressRouteCrossConnectionsUpdateTagsFuture struct { - azure.Future +// FlowLogProperties parameters that define the configuration of flow log. +type FlowLogProperties struct { + // StorageID - ID of the storage account which is used to store the flow log. + StorageID *string `json:"storageId,omitempty"` + // Enabled - Flag to enable/disable flow logging. + Enabled *bool `json:"enabled,omitempty"` + // RetentionPolicy - Parameters that define the retention policy for flow log. + RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` + // Format - Parameters that define the flow log format. + Format *FlowLogFormatParameters `json:"format,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) Result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent { - ercc, err = client.UpdateTagsResponder(ercc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request") - } - } - return +// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics +// (optional) status. +type FlowLogStatusParameters struct { + // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. + TargetResourceID *string `json:"targetResourceId,omitempty"` } -// ExpressRouteGateway expressRoute gateway resource. -type ExpressRouteGateway struct { - autorest.Response `json:"-"` - *ExpressRouteGatewayProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. +// FrontendIPConfiguration frontend IP address of the load balancer. +type FrontendIPConfiguration struct { + autorest.Response `json:"-"` + // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. + *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. + Zones *[]string `json:"zones,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRouteGateway. -func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for FrontendIPConfiguration. +func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erg.ExpressRouteGatewayProperties != nil { - objectMap["properties"] = erg.ExpressRouteGatewayProperties + if fic.FrontendIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat } - if erg.ID != nil { - objectMap["id"] = erg.ID + if fic.Name != nil { + objectMap["name"] = fic.Name } - if erg.Location != nil { - objectMap["location"] = erg.Location + if fic.Etag != nil { + objectMap["etag"] = fic.Etag } - if erg.Tags != nil { - objectMap["tags"] = erg.Tags + if fic.Zones != nil { + objectMap["zones"] = fic.Zones + } + if fic.ID != nil { + objectMap["id"] = fic.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct. -func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. +func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -10262,39 +13518,30 @@ func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRouteGatewayProperties ExpressRouteGatewayProperties - err = json.Unmarshal(*v, &expressRouteGatewayProperties) - if err != nil { - return err - } - erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) if err != nil { return err } - erg.Etag = &etag + fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat } - case "id": + case "name": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - erg.ID = &ID + fic.Name = &name } - case "name": + case "etag": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - erg.Name = &name + fic.Etag = &etag } case "type": if v != nil { @@ -10303,25 +13550,25 @@ func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error { if err != nil { return err } - erg.Type = &typeVar + fic.Type = &typeVar } - case "location": + case "zones": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var zones []string + err = json.Unmarshal(*v, &zones) if err != nil { return err } - erg.Location = &location + fic.Zones = &zones } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - erg.Tags = tags + fic.ID = &ID } } } @@ -10329,122 +13576,113 @@ func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteGatewayList list of ExpressRoute gateways. -type ExpressRouteGatewayList struct { - autorest.Response `json:"-"` - // Value - List of ExpressRoute gateways. - Value *[]ExpressRouteGateway `json:"value,omitempty"` -} - -// ExpressRouteGatewayProperties expressRoute gateway resource properties. -type ExpressRouteGatewayProperties struct { - // AutoScaleConfiguration - Configuration for auto scaling. - AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. - ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed. - VirtualHub *VirtualHubID `json:"virtualHub,omitempty"` -} - -// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling. -type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { - // Bounds - Minimum and maximum number of scale units to deploy. - Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` -} - -// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to -// deploy. -type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { - // Min - Minimum number of scale units deployed for ExpressRoute gateway. - Min *int32 `json:"min,omitempty"` - // Max - Maximum number of scale units deployed for ExpressRoute gateway. - Max *int32 `json:"max,omitempty"` +// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. +type FrontendIPConfigurationPropertiesFormat struct { + // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP. + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` + // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP. + InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` + // OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP. + OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP. + LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - It represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the Public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // PublicIPPrefix - The reference of the Public IP Prefix resource. + PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteGatewaysCreateOrUpdateFuture struct { - azure.Future +// GatewayRoute gateway routing details. +type GatewayRoute struct { + // LocalAddress - READ-ONLY; The gateway's local address. + LocalAddress *string `json:"localAddress,omitempty"` + // NetworkProperty - READ-ONLY; The route's network prefix. + NetworkProperty *string `json:"network,omitempty"` + // NextHop - READ-ONLY; The route's next hop. + NextHop *string `json:"nextHop,omitempty"` + // SourcePeer - READ-ONLY; The peer this route was learned from. + SourcePeer *string `json:"sourcePeer,omitempty"` + // Origin - READ-ONLY; The source this route was learned from. + Origin *string `json:"origin,omitempty"` + // AsPath - READ-ONLY; The route's AS path sequence. + AsPath *string `json:"asPath,omitempty"` + // Weight - READ-ONLY; The route's weight. + Weight *int32 `json:"weight,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteGatewaysCreateOrUpdateFuture) Result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent { - erg, err = client.CreateOrUpdateResponder(erg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request") - } - } - return +// GatewayRouteListResult list of virtual network gateway routes. +type GatewayRouteListResult struct { + autorest.Response `json:"-"` + // Value - List of gateway routes. + Value *[]GatewayRoute `json:"value,omitempty"` } -// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRouteGatewaysDeleteFuture struct { - azure.Future +// GetVpnSitesConfigurationRequest list of Vpn-Sites. +type GetVpnSitesConfigurationRequest struct { + // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. + VpnSites *[]string `json:"vpnSites,omitempty"` + // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites. + OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRouteGatewaysDeleteFuture) Result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return +// HTTPConfiguration HTTP configuration of the connectivity check. +type HTTPConfiguration struct { + // Method - HTTP method. Possible values include: 'Get' + Method HTTPMethod `json:"method,omitempty"` + // Headers - List of HTTP headers. + Headers *[]HTTPHeader `json:"headers,omitempty"` + // ValidStatusCodes - Valid status codes. + ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` } -// ExpressRouteLink expressRouteLink child resource definition. -type ExpressRouteLink struct { +// HTTPHeader describes the HTTP header. +type HTTPHeader struct { + // Name - The name in HTTP header. + Name *string `json:"name,omitempty"` + // Value - The value in HTTP header. + Value *string `json:"value,omitempty"` +} + +// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource. +type HubVirtualNetworkConnection struct { autorest.Response `json:"-"` - // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties - *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` - // Name - Name of child port resource that is unique among child port resources of the parent. + // HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection. + *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for ExpressRouteLink. -func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection. +func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erl.ExpressRouteLinkPropertiesFormat != nil { - objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat + if hvnc.HubVirtualNetworkConnectionProperties != nil { + objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties } - if erl.Name != nil { - objectMap["name"] = erl.Name + if hvnc.Name != nil { + objectMap["name"] = hvnc.Name } - if erl.ID != nil { - objectMap["id"] = erl.ID + if hvnc.ID != nil { + objectMap["id"] = hvnc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct. -func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct. +func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -10454,12 +13692,12 @@ func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat - err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat) + var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties + err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties) if err != nil { return err } - erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat + hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties } case "name": if v != nil { @@ -10468,7 +13706,7 @@ func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { if err != nil { return err } - erl.Name = &name + hvnc.Name = &name } case "etag": if v != nil { @@ -10477,7 +13715,7 @@ func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { if err != nil { return err } - erl.Etag = &etag + hvnc.Etag = &etag } case "id": if v != nil { @@ -10486,7 +13724,7 @@ func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { if err != nil { return err } - erl.ID = &ID + hvnc.ID = &ID } } } @@ -10494,209 +13732,54 @@ func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error { return nil } -// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call. -type ExpressRouteLinkListResult struct { - autorest.Response `json:"-"` - // Value - The list of ExpressRouteLink sub-resources. - Value *[]ExpressRouteLink `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values. -type ExpressRouteLinkListResultIterator struct { - i int - page ExpressRouteLinkListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteLinkListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteLinkListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink { - if !iter.page.NotDone() { - return ExpressRouteLink{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ExpressRouteLinkListResultIterator type. -func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator { - return ExpressRouteLinkListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (erllr ExpressRouteLinkListResult) IsEmpty() bool { - return erllr.Value == nil || len(*erllr.Value) == 0 -} - -// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) { - if erllr.NextLink == nil || len(to.String(erllr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(erllr.NextLink))) -} - -// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values. -type ExpressRouteLinkListResultPage struct { - fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error) - erllr ExpressRouteLinkListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.erllr) - if err != nil { - return err - } - page.erllr = 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 *ExpressRouteLinkListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteLinkListResultPage) NotDone() bool { - return !page.erllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult { - return page.erllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink { - if page.erllr.IsEmpty() { - return nil - } - return *page.erllr.Value -} - -// Creates a new instance of the ExpressRouteLinkListResultPage type. -func NewExpressRouteLinkListResultPage(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage { - return ExpressRouteLinkListResultPage{fn: getNextPage} -} - -// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources. -type ExpressRouteLinkPropertiesFormat struct { - // RouterName - READ-ONLY; Name of Azure router associated with physical port. - RouterName *string `json:"routerName,omitempty"` - // InterfaceName - READ-ONLY; Name of Azure router interface. - InterfaceName *string `json:"interfaceName,omitempty"` - // PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port. - PatchPanelID *string `json:"patchPanelId,omitempty"` - // RackID - READ-ONLY; Mapping of physical patch panel to rack. - RackID *string `json:"rackId,omitempty"` - // ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC' - ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled' - AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection. +type HubVirtualNetworkConnectionProperties struct { + // RemoteVirtualNetwork - Reference to the remote virtual network. + RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` + // AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not. + AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` + // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways. + AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` + // EnableInternetSecurity - Enable internet security. + EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// ExpressRoutePort expressRoutePort resource definition. -type ExpressRoutePort struct { - autorest.Response `json:"-"` - // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties - *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. +// InboundNatPool inbound NAT pool of the load balancer. +type InboundNatPool struct { + // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. + *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRoutePort. -func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for InboundNatPool. +func (inp InboundNatPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erp.ExpressRoutePortPropertiesFormat != nil { - objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat + if inp.InboundNatPoolPropertiesFormat != nil { + objectMap["properties"] = inp.InboundNatPoolPropertiesFormat } - if erp.ID != nil { - objectMap["id"] = erp.ID + if inp.Name != nil { + objectMap["name"] = inp.Name } - if erp.Location != nil { - objectMap["location"] = erp.Location + if inp.Etag != nil { + objectMap["etag"] = inp.Etag } - if erp.Tags != nil { - objectMap["tags"] = erp.Tags + if inp.ID != nil { + objectMap["id"] = inp.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct. -func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. +func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -10706,12 +13789,21 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat - err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat) + var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat + err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) if err != nil { return err } - erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat + inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + inp.Name = &name } case "etag": if v != nil { @@ -10720,7 +13812,16 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { if err != nil { return err } - erp.Etag = &etag + inp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + inp.Type = &typeVar } case "id": if v != nil { @@ -10729,7 +13830,86 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { if err != nil { return err } - erp.ID = &ID + inp.ID = &ID + } + } + } + + return nil +} + +// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. +type InboundNatPoolPropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. + FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` + // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. + FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// InboundNatRule inbound NAT rule of the load balancer. +type InboundNatRule struct { + autorest.Response `json:"-"` + // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. + *InboundNatRulePropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatRule. +func (inr InboundNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if inr.InboundNatRulePropertiesFormat != nil { + objectMap["properties"] = inr.InboundNatRulePropertiesFormat + } + if inr.Name != nil { + objectMap["name"] = inr.Name + } + if inr.Etag != nil { + objectMap["etag"] = inr.Etag + } + if inr.ID != nil { + objectMap["id"] = inr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. +func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat + err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) + if err != nil { + return err + } + inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat } case "name": if v != nil { @@ -10738,34 +13918,34 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { if err != nil { return err } - erp.Name = &name + inr.Name = &name } - case "type": + case "etag": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - erp.Type = &typeVar + inr.Etag = &etag } - case "location": + case "type": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - erp.Location = &location + inr.Type = &typeVar } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - erp.Tags = tags + inr.ID = &ID } } } @@ -10773,26 +13953,26 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { return nil } -// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. -type ExpressRoutePortListResult struct { +// InboundNatRuleListResult response for ListInboundNatRule API service call. +type InboundNatRuleListResult struct { autorest.Response `json:"-"` - // Value - A list of ExpressRoutePort resources. - Value *[]ExpressRoutePort `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - A list of inbound nat rules in a load balancer. + Value *[]InboundNatRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. -type ExpressRoutePortListResultIterator struct { +// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. +type InboundNatRuleListResultIterator struct { i int - page ExpressRoutePortListResultPage + page InboundNatRuleListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -10817,62 +13997,62 @@ func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRoutePortListResultIterator) Next() error { +func (iter *InboundNatRuleListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRoutePortListResultIterator) NotDone() bool { +func (iter InboundNatRuleListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult { +func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort { +func (iter InboundNatRuleListResultIterator) Value() InboundNatRule { if !iter.page.NotDone() { - return ExpressRoutePort{} + return InboundNatRule{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRoutePortListResultIterator type. -func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator { - return ExpressRoutePortListResultIterator{page: page} +// Creates a new instance of the InboundNatRuleListResultIterator type. +func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator { + return InboundNatRuleListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (erplr ExpressRoutePortListResult) IsEmpty() bool { - return erplr.Value == nil || len(*erplr.Value) == 0 +func (inrlr InboundNatRuleListResult) IsEmpty() bool { + return inrlr.Value == nil || len(*inrlr.Value) == 0 } -// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results. +// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) { - if erplr.NextLink == nil || len(to.String(erplr.NextLink)) < 1 { +func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(erplr.NextLink))) + autorest.WithBaseURL(to.String(inrlr.NextLink))) } -// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values. -type ExpressRoutePortListResultPage struct { - fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error) - erplr ExpressRoutePortListResult +// InboundNatRuleListResultPage contains a page of InboundNatRule values. +type InboundNatRuleListResultPage struct { + fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error) + inrlr InboundNatRuleListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -10881,127 +14061,167 @@ func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erplr) + next, err := page.fn(ctx, page.inrlr) if err != nil { return err } - page.erplr = next + page.inrlr = 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 *ExpressRoutePortListResultPage) Next() error { +func (page *InboundNatRuleListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRoutePortListResultPage) NotDone() bool { - return !page.erplr.IsEmpty() +func (page InboundNatRuleListResultPage) NotDone() bool { + return !page.inrlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult { - return page.erplr +func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { + return page.inrlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort { - if page.erplr.IsEmpty() { +func (page InboundNatRuleListResultPage) Values() []InboundNatRule { + if page.inrlr.IsEmpty() { return nil } - return *page.erplr.Value + return *page.inrlr.Value } -// Creates a new instance of the ExpressRoutePortListResultPage type. -func NewExpressRoutePortListResultPage(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage { - return ExpressRoutePortListResultPage{fn: getNextPage} +// Creates a new instance of the InboundNatRuleListResultPage type. +func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { + return InboundNatRuleListResultPage{fn: getNextPage} } -// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources. -type ExpressRoutePortPropertiesFormat struct { - // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically. - PeeringLocation *string `json:"peeringLocation,omitempty"` - // BandwidthInGbps - Bandwidth of procured ports in Gbps - BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"` - // ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths. - ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` - // Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s) - Mtu *string `json:"mtu,omitempty"` - // Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ' - Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` - // EtherType - READ-ONLY; Ether type of the physical port. - EtherType *string `json:"etherType,omitempty"` - // AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization. - AllocationDate *string `json:"allocationDate,omitempty"` - // Links - The set of physical links of the ExpressRoutePort resource - Links *[]ExpressRouteLink `json:"links,omitempty"` - // Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource. - Circuits *[]SubResource `json:"circuits,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. +// InboundNatRulePropertiesFormat properties of the inbound NAT rule. +type InboundNatRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. + BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` + // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` - // ResourceGUID - The resource GUID property of the ExpressRoutePort resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` } -// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type ExpressRoutePortsCreateOrUpdateFuture struct { +type InboundNatRulesCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRoutePortsCreateOrUpdateFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { +func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { - erp, err = client.CreateOrUpdateResponder(erp.Response.Response) + if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { + inr, err = client.CreateOrUpdateResponder(inr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") } } return } -// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running // operation. -type ExpressRoutePortsDeleteFuture struct { +type InboundNatRulesDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ExpressRoutePortsDeleteFuture) Result(client ExpressRoutePortsClient) (ar autorest.Response, err error) { +func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") return } ar.Response = future.Response() return } -// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource. -type ExpressRoutePortsLocation struct { +// IntentPolicy network Intent Policy resource. +type IntentPolicy struct { + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for IntentPolicy. +func (IP IntentPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if IP.Etag != nil { + objectMap["etag"] = IP.Etag + } + if IP.ID != nil { + objectMap["id"] = IP.ID + } + if IP.Location != nil { + objectMap["location"] = IP.Location + } + if IP.Tags != nil { + objectMap["tags"] = IP.Tags + } + return json.Marshal(objectMap) +} + +// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. +type IntentPolicyConfiguration struct { + // NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription. + NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` + // SourceNetworkIntentPolicy - Source network intent policy. + SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` +} + +// Interface a network interface in a resource group. +type Interface struct { autorest.Response `json:"-"` - // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties - *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` + // InterfacePropertiesFormat - Properties of the network interface. + *InterfacePropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -11014,26 +14234,29 @@ type ExpressRoutePortsLocation struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation. -func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for Interface. +func (i Interface) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if erpl.ExpressRoutePortsLocationPropertiesFormat != nil { - objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat + if i.InterfacePropertiesFormat != nil { + objectMap["properties"] = i.InterfacePropertiesFormat } - if erpl.ID != nil { - objectMap["id"] = erpl.ID + if i.Etag != nil { + objectMap["etag"] = i.Etag } - if erpl.Location != nil { - objectMap["location"] = erpl.Location + if i.ID != nil { + objectMap["id"] = i.ID } - if erpl.Tags != nil { - objectMap["tags"] = erpl.Tags + 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 ExpressRoutePortsLocation struct. -func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for Interface struct. +func (i *Interface) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -11043,12 +14266,21 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat - err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat) + var interfacePropertiesFormat InterfacePropertiesFormat + err = json.Unmarshal(*v, &interfacePropertiesFormat) if err != nil { return err } - erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat + i.InterfacePropertiesFormat = &interfacePropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + i.Etag = &etag } case "id": if v != nil { @@ -11057,7 +14289,7 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { if err != nil { return err } - erpl.ID = &ID + i.ID = &ID } case "name": if v != nil { @@ -11066,7 +14298,7 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { if err != nil { return err } - erpl.Name = &name + i.Name = &name } case "type": if v != nil { @@ -11075,7 +14307,7 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { if err != nil { return err } - erpl.Type = &typeVar + i.Type = &typeVar } case "location": if v != nil { @@ -11084,7 +14316,7 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { if err != nil { return err } - erpl.Location = &location + i.Location = &location } case "tags": if v != nil { @@ -11093,7 +14325,7 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { if err != nil { return err } - erpl.Tags = tags + i.Tags = tags } } } @@ -11101,35 +14333,131 @@ func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error { return nil } -// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths. -type ExpressRoutePortsLocationBandwidths struct { - // OfferName - READ-ONLY; Bandwidth descriptive name - OfferName *string `json:"offerName,omitempty"` - // ValueInGbps - READ-ONLY; Bandwidth value in Gbps - ValueInGbps *int32 `json:"valueInGbps,omitempty"` +// InterfaceAssociation network interface and its custom security rules. +type InterfaceAssociation struct { + // ID - READ-ONLY; Network interface ID. + ID *string `json:"id,omitempty"` + // SecurityRules - Collection of custom security rules. + SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } -// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call. -type ExpressRoutePortsLocationListResult struct { +// InterfaceDNSSettings DNS settings of a network interface. +type InterfaceDNSSettings struct { + // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. + DNSServers *[]string `json:"dnsServers,omitempty"` + // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. + AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` + // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. + InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` + // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. + InternalFqdn *string `json:"internalFqdn,omitempty"` + // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. + InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` +} + +// InterfaceIPConfiguration iPConfiguration in a network interface. +type InterfaceIPConfiguration struct { autorest.Response `json:"-"` - // Value - The list of all ExpressRoutePort peering locations. - Value *[]ExpressRoutePortsLocation `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. + *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. +func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if iic.InterfaceIPConfigurationPropertiesFormat != nil { + objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat + } + if iic.Name != nil { + objectMap["name"] = iic.Name + } + if iic.Etag != nil { + objectMap["etag"] = iic.Etag + } + if iic.ID != nil { + objectMap["id"] = iic.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. +func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) + if err != nil { + return err + } + iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + iic.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + iic.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + iic.ID = &ID + } + } + } + + return nil +} + +// InterfaceIPConfigurationListResult response for list ip configurations API service call. +type InterfaceIPConfigurationListResult struct { + autorest.Response `json:"-"` + // Value - A list of ip configurations. + Value *[]InterfaceIPConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of -// ExpressRoutePortsLocation values. -type ExpressRoutePortsLocationListResultIterator struct { +// InterfaceIPConfigurationListResultIterator provides access to a complete listing of +// InterfaceIPConfiguration values. +type InterfaceIPConfigurationListResultIterator struct { i int - page ExpressRoutePortsLocationListResultPage + page InterfaceIPConfigurationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -11154,62 +14482,62 @@ func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx con // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRoutePortsLocationListResultIterator) Next() error { +func (iter *InterfaceIPConfigurationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool { +func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult { +func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation { +func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { if !iter.page.NotDone() { - return ExpressRoutePortsLocation{} + return InterfaceIPConfiguration{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type. -func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator { - return ExpressRoutePortsLocationListResultIterator{page: page} +// Creates a new instance of the InterfaceIPConfigurationListResultIterator type. +func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator { + return InterfaceIPConfigurationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool { - return erpllr.Value == nil || len(*erpllr.Value) == 0 +func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { + return iiclr.Value == nil || len(*iiclr.Value) == 0 } -// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results. +// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) { - if erpllr.NextLink == nil || len(to.String(erpllr.NextLink)) < 1 { +func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(erpllr.NextLink))) + autorest.WithBaseURL(to.String(iiclr.NextLink))) } -// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values. -type ExpressRoutePortsLocationListResultPage struct { - fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error) - erpllr ExpressRoutePortsLocationListResult +// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. +type InterfaceIPConfigurationListResultPage struct { + fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) + iiclr InterfaceIPConfigurationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -11218,218 +14546,92 @@ func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.erpllr) + next, err := page.fn(ctx, page.iiclr) if err != nil { return err } - page.erpllr = next + page.iiclr = 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 *ExpressRoutePortsLocationListResultPage) Next() error { +func (page *InterfaceIPConfigurationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRoutePortsLocationListResultPage) NotDone() bool { - return !page.erpllr.IsEmpty() +func (page InterfaceIPConfigurationListResultPage) NotDone() bool { + return !page.iiclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult { - return page.erpllr +func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { + return page.iiclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation { - if page.erpllr.IsEmpty() { +func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { + if page.iiclr.IsEmpty() { return nil } - return *page.erpllr.Value + return *page.iiclr.Value } -// Creates a new instance of the ExpressRoutePortsLocationListResultPage type. -func NewExpressRoutePortsLocationListResultPage(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage { - return ExpressRoutePortsLocationListResultPage{fn: getNextPage} +// Creates a new instance of the InterfaceIPConfigurationListResultPage type. +func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { + return InterfaceIPConfigurationListResultPage{fn: getNextPage} } -// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location -// resources. -type ExpressRoutePortsLocationPropertiesFormat struct { - // Address - READ-ONLY; Address of peering location. - Address *string `json:"address,omitempty"` - // Contact - READ-ONLY; Contact details of peering locations. - Contact *string `json:"contact,omitempty"` - // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths. - AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. +// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. +type InterfaceIPConfigurationPropertiesFormat struct { + // VirtualNetworkTaps - The reference to Virtual Network Taps. + VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` + // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. + ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` + // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. + LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` + // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. + LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` + // PrivateIPAddress - Private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + // Subnet - Subnet bound to the IP configuration. + Subnet *Subnet `json:"subnet,omitempty"` + // Primary - Gets whether this is a primary customer address on the network interface. + Primary *bool `json:"primary,omitempty"` + // PublicIPAddress - Public IP address bound to the IP configuration. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type ExpressRoutePortsUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *ExpressRoutePortsUpdateTagsFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent { - erp, err = client.UpdateTagsResponder(erp.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request") - } - } - return -} - -// ExpressRouteServiceProvider a ExpressRouteResourceProvider object. -type ExpressRouteServiceProvider struct { - *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider. -func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ersp.ExpressRouteServiceProviderPropertiesFormat != nil { - objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat - } - if ersp.ID != nil { - objectMap["id"] = ersp.ID - } - if ersp.Location != nil { - objectMap["location"] = ersp.Location - } - if ersp.Tags != nil { - objectMap["tags"] = ersp.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct. -func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat - err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat) - if err != nil { - return err - } - ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ersp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ersp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - ersp.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - ersp.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - ersp.Tags = tags - } - } - } - - return nil -} - -// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider -// resources. -type ExpressRouteServiceProviderBandwidthsOffered struct { - // OfferName - The OfferName. - OfferName *string `json:"offerName,omitempty"` - // ValueInMbps - The ValueInMbps. - ValueInMbps *int32 `json:"valueInMbps,omitempty"` -} - -// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call. -type ExpressRouteServiceProviderListResult struct { +// InterfaceListResult response for the ListNetworkInterface API service call. +type InterfaceListResult struct { autorest.Response `json:"-"` - // Value - A list of ExpressRouteResourceProvider resources. - Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` - // NextLink - The URL to get the next set of results. + // Value - A list of network interfaces in a resource group. + Value *[]Interface `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of -// ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultIterator struct { +// InterfaceListResultIterator provides access to a complete listing of Interface values. +type InterfaceListResultIterator struct { i int - page ExpressRouteServiceProviderListResultPage + page InterfaceListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -11454,62 +14656,62 @@ func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx c // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ExpressRouteServiceProviderListResultIterator) Next() error { +func (iter *InterfaceListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool { +func (iter InterfaceListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult { +func (iter InterfaceListResultIterator) Response() InterfaceListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider { +func (iter InterfaceListResultIterator) Value() Interface { if !iter.page.NotDone() { - return ExpressRouteServiceProvider{} + return Interface{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type. -func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator { - return ExpressRouteServiceProviderListResultIterator{page: page} +// Creates a new instance of the InterfaceListResultIterator type. +func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { + return InterfaceListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool { - return ersplr.Value == nil || len(*ersplr.Value) == 0 +func (ilr InterfaceListResult) IsEmpty() bool { + return ilr.Value == nil || len(*ilr.Value) == 0 } -// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results. +// interfaceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) { - if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 { +func (ilr InterfaceListResult) interfaceListResultPreparer(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(ersplr.NextLink))) + autorest.WithBaseURL(to.String(ilr.NextLink))) } -// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values. -type ExpressRouteServiceProviderListResultPage struct { - fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error) - ersplr ExpressRouteServiceProviderListResult +// InterfaceListResultPage contains a page of Interface values. +type InterfaceListResultPage struct { + fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) + ilr InterfaceListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -11518,535 +14720,394 @@ func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx conte tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ersplr) + next, err := page.fn(ctx, page.ilr) if err != nil { return err } - page.ersplr = next + 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 *ExpressRouteServiceProviderListResultPage) Next() error { +func (page *InterfaceListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ExpressRouteServiceProviderListResultPage) NotDone() bool { - return !page.ersplr.IsEmpty() +func (page InterfaceListResultPage) NotDone() bool { + return !page.ilr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult { - return page.ersplr +func (page InterfaceListResultPage) Response() InterfaceListResult { + return page.ilr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider { - if page.ersplr.IsEmpty() { +func (page InterfaceListResultPage) Values() []Interface { + if page.ilr.IsEmpty() { return nil } - return *page.ersplr.Value -} - -// Creates a new instance of the ExpressRouteServiceProviderListResultPage type. -func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage { - return ExpressRouteServiceProviderListResultPage{fn: getNextPage} + return *page.ilr.Value } -// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider. -type ExpressRouteServiceProviderPropertiesFormat struct { - // PeeringLocations - Get a list of peering locations. - PeeringLocations *[]string `json:"peeringLocations,omitempty"` - // BandwidthsOffered - Gets bandwidths offered. - BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - // ProvisioningState - Gets the provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` +// Creates a new instance of the InterfaceListResultPage type. +func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { + return InterfaceListResultPage{fn: getNextPage} } -// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) . -type FlowLogInformation struct { +// InterfaceLoadBalancerListResult response for list ip configurations API service call. +type InterfaceLoadBalancerListResult struct { autorest.Response `json:"-"` - // TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) . - TargetResourceID *string `json:"targetResourceId,omitempty"` - *FlowLogProperties `json:"properties,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` + // Value - A list of load balancers. + Value *[]LoadBalancer `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// MarshalJSON is the custom marshaler for FlowLogInformation. -func (fli FlowLogInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fli.TargetResourceID != nil { - objectMap["targetResourceId"] = fli.TargetResourceID - } - if fli.FlowLogProperties != nil { - objectMap["properties"] = fli.FlowLogProperties - } - if fli.FlowAnalyticsConfiguration != nil { - objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration - } - return json.Marshal(objectMap) +// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type InterfaceLoadBalancerListResultIterator struct { + i int + page InterfaceLoadBalancerListResultPage } -// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct. -func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "targetResourceId": - if v != nil { - var targetResourceID string - err = json.Unmarshal(*v, &targetResourceID) - if err != nil { - return err - } - fli.TargetResourceID = &targetResourceID - } - case "properties": - if v != nil { - var flowLogProperties FlowLogProperties - err = json.Unmarshal(*v, &flowLogProperties) - if err != nil { - return err - } - fli.FlowLogProperties = &flowLogProperties - } - case "flowAnalyticsConfiguration": - if v != nil { - var flowAnalyticsConfiguration TrafficAnalyticsProperties - err = json.Unmarshal(*v, &flowAnalyticsConfiguration) - if err != nil { - return err - } - fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode } - } - } - - return nil -} - -// FlowLogProperties parameters that define the configuration of flow log. -type FlowLogProperties struct { - // StorageID - ID of the storage account which is used to store the flow log. - StorageID *string `json:"storageId,omitempty"` - // Enabled - Flag to enable/disable flow logging. - Enabled *bool `json:"enabled,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` -} - -// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics -// (optional) status. -type FlowLogStatusParameters struct { - // TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status. - TargetResourceID *string `json:"targetResourceId,omitempty"` -} - -// FrontendIPConfiguration frontend IP address of the load balancer. -type FrontendIPConfiguration struct { - autorest.Response `json:"-"` - // FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe. - *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Zones - A list of availability zones denoting the IP allocated for the resource needs to come from. - Zones *[]string `json:"zones,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for FrontendIPConfiguration. -func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if fic.FrontendIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat - } - if fic.Name != nil { - objectMap["name"] = fic.Name - } - if fic.Etag != nil { - objectMap["etag"] = fic.Etag - } - if fic.Zones != nil { - objectMap["zones"] = fic.Zones - } - if fic.ID != nil { - objectMap["id"] = fic.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct. -func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err + tracing.EndSpan(ctx, sc, err) + }() } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat) - if err != nil { - return err - } - fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - fic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - fic.Etag = &etag - } - case "zones": - if v != nil { - var zones []string - err = json.Unmarshal(*v, &zones) - if err != nil { - return err - } - fic.Zones = &zones - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - fic.ID = &ID - } - } + 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 } -// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer. -type FrontendIPConfigurationPropertiesFormat struct { - // InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP. - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - // InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP. - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - // OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP. - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - // LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP. - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the Public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // PublicIPPrefix - The reference of the Public IP Prefix resource. - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *InterfaceLoadBalancerListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// GatewayRoute gateway routing details -type GatewayRoute struct { - // LocalAddress - READ-ONLY; The gateway's local address - LocalAddress *string `json:"localAddress,omitempty"` - // NetworkProperty - READ-ONLY; The route's network prefix - NetworkProperty *string `json:"network,omitempty"` - // NextHop - READ-ONLY; The route's next hop - NextHop *string `json:"nextHop,omitempty"` - // SourcePeer - READ-ONLY; The peer this route was learned from - SourcePeer *string `json:"sourcePeer,omitempty"` - // Origin - READ-ONLY; The source this route was learned from - Origin *string `json:"origin,omitempty"` - // AsPath - READ-ONLY; The route's AS path sequence - AsPath *string `json:"asPath,omitempty"` - // Weight - READ-ONLY; The route's weight - Weight *int32 `json:"weight,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// GatewayRouteListResult list of virtual network gateway routes -type GatewayRouteListResult struct { - autorest.Response `json:"-"` - // Value - List of gateway routes - Value *[]GatewayRoute `json:"value,omitempty"` +// Response returns the raw server response from the last page request. +func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { + return iter.page.Response() } -// GetVpnSitesConfigurationRequest list of Vpn-Sites -type GetVpnSitesConfigurationRequest struct { - // VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded. - VpnSites *[]string `json:"vpnSites,omitempty"` - // OutputBlobSasURL - The sas-url to download the configurations for vpn-sites - OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"` +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { + if !iter.page.NotDone() { + return LoadBalancer{} + } + return iter.page.Values()[iter.i] } -// HTTPConfiguration HTTP configuration of the connectivity check. -type HTTPConfiguration struct { - // Method - HTTP method. Possible values include: 'Get' - Method HTTPMethod `json:"method,omitempty"` - // Headers - List of HTTP headers. - Headers *[]HTTPHeader `json:"headers,omitempty"` - // ValidStatusCodes - Valid status codes. - ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"` +// Creates a new instance of the InterfaceLoadBalancerListResultIterator type. +func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator { + return InterfaceLoadBalancerListResultIterator{page: page} } -// HTTPHeader describes the HTTP header. -type HTTPHeader struct { - // Name - The name in HTTP header. - Name *string `json:"name,omitempty"` - // Value - The value in HTTP header. - Value *string `json:"value,omitempty"` +// IsEmpty returns true if the ListResult contains no values. +func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { + return ilblr.Value == nil || len(*ilblr.Value) == 0 } -// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource. -type HubVirtualNetworkConnection struct { - autorest.Response `json:"-"` - *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { + if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ilblr.NextLink))) } -// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection. -func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if hvnc.HubVirtualNetworkConnectionProperties != nil { - objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties +// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. +type InterfaceLoadBalancerListResultPage struct { + fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) + ilblr InterfaceLoadBalancerListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if hvnc.Name != nil { - objectMap["name"] = hvnc.Name + next, err := page.fn(ctx, page.ilblr) + if err != nil { + return err } - if hvnc.ID != nil { - objectMap["id"] = hvnc.ID + page.ilblr = 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 *InterfaceLoadBalancerListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page InterfaceLoadBalancerListResultPage) NotDone() bool { + return !page.ilblr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { + return page.ilblr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { + if page.ilblr.IsEmpty() { + return nil } - return json.Marshal(objectMap) + return *page.ilblr.Value } -// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct. -func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// Creates a new instance of the InterfaceLoadBalancerListResultPage type. +func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { + return InterfaceLoadBalancerListResultPage{fn: getNextPage} +} + +// InterfacePropertiesFormat networkInterface properties. +type InterfacePropertiesFormat struct { + // VirtualMachine - READ-ONLY; The reference of a virtual machine. + VirtualMachine *SubResource `json:"virtualMachine,omitempty"` + // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + // PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // IPConfigurations - A list of IPConfigurations of the network interface. + IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` + // TapConfigurations - A list of TapConfigurations of the network interface. + TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"` + // DNSSettings - The DNS settings in network interface. + DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` + // MacAddress - The MAC address of the network interface. + MacAddress *string `json:"macAddress,omitempty"` + // Primary - Gets whether this is a primary network interface on a virtual machine. + Primary *bool `json:"primary,omitempty"` + // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. + EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` + // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources. + HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` + // ResourceGUID - The resource GUID property of the network interface resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties - err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties) - if err != nil { - return err - } - hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - hvnc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - hvnc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - hvnc.ID = &ID - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.CreateOrUpdateResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") } } + return +} - return nil +// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InterfacesDeleteFuture struct { + azure.Future } -// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection -type HubVirtualNetworkConnectionProperties struct { - // RemoteVirtualNetwork - Reference to the remote virtual network. - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - // AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not. - AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` - // AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways. - AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` - // EnableInternetSecurity - Enable internet security - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") + return + } + ar.Response = future.Response() + return } -// InboundNatPool inbound NAT pool of the load balancer. -type InboundNatPool struct { - // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. - *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfacesGetEffectiveRouteTableFuture struct { + azure.Future } -// MarshalJSON is the custom marshaler for InboundNatPool. -func (inp InboundNatPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if inp.InboundNatPoolPropertiesFormat != nil { - objectMap["properties"] = inp.InboundNatPoolPropertiesFormat - } - if inp.Name != nil { - objectMap["name"] = inp.Name +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") + return } - if inp.Etag != nil { - objectMap["etag"] = inp.Etag + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") + return } - if inp.ID != nil { - objectMap["id"] = inp.ID + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { + erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") + } } - return json.Marshal(objectMap) + return } -// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct. -func (inp *InboundNatPool) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - return err + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") + return } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat - err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat) - if err != nil { - return err - } - inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - inp.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - inp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - inp.ID = &ID - } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { + ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") } } + return +} - return nil +// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type InterfacesUpdateTagsFuture struct { + azure.Future } -// InboundNatPoolPropertiesFormat properties of Inbound NAT pool. -type InboundNatPoolPropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPortRangeStart - The first port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65534. - FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` - // FrontendPortRangeEnd - The last port number in the range of external ports that will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range between 1 and 65535. - FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { + i, err = client.UpdateTagsResponder(i.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") + } + } + return } -// InboundNatRule inbound NAT rule of the load balancer. -type InboundNatRule struct { +// InterfaceTapConfiguration tap configuration in a Network Interface. +type InterfaceTapConfiguration struct { autorest.Response `json:"-"` - // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. - *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + // InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration. + *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for InboundNatRule. -func (inr InboundNatRule) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for InterfaceTapConfiguration. +func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if inr.InboundNatRulePropertiesFormat != nil { - objectMap["properties"] = inr.InboundNatRulePropertiesFormat + if itc.InterfaceTapConfigurationPropertiesFormat != nil { + objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat } - if inr.Name != nil { - objectMap["name"] = inr.Name + if itc.Name != nil { + objectMap["name"] = itc.Name } - if inr.Etag != nil { - objectMap["etag"] = inr.Etag + if itc.Etag != nil { + objectMap["etag"] = itc.Etag } - if inr.ID != nil { - objectMap["id"] = inr.ID + if itc.ID != nil { + objectMap["id"] = itc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct. -func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct. +func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -12056,12 +15117,12 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat - err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat) + var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat + err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat) if err != nil { return err } - inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat + itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat } case "name": if v != nil { @@ -12070,7 +15131,7 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - inr.Name = &name + itc.Name = &name } case "etag": if v != nil { @@ -12079,7 +15140,16 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - inr.Etag = &etag + itc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + itc.Type = &typeVar } case "id": if v != nil { @@ -12088,7 +15158,7 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - inr.ID = &ID + itc.ID = &ID } } } @@ -12096,26 +15166,27 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { return nil } -// InboundNatRuleListResult response for ListInboundNatRule API service call. -type InboundNatRuleListResult struct { +// InterfaceTapConfigurationListResult response for list tap configurations API service call. +type InterfaceTapConfigurationListResult struct { autorest.Response `json:"-"` - // Value - A list of inbound nat rules in a load balancer. - Value *[]InboundNatRule `json:"value,omitempty"` + // Value - A list of tap configurations. + Value *[]InterfaceTapConfiguration `json:"value,omitempty"` // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values. -type InboundNatRuleListResultIterator struct { +// InterfaceTapConfigurationListResultIterator provides access to a complete listing of +// InterfaceTapConfiguration values. +type InterfaceTapConfigurationListResultIterator struct { i int - page InboundNatRuleListResultPage + page InterfaceTapConfigurationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -12140,62 +15211,62 @@ func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InboundNatRuleListResultIterator) Next() error { +func (iter *InterfaceTapConfigurationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InboundNatRuleListResultIterator) NotDone() bool { +func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult { +func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InboundNatRuleListResultIterator) Value() InboundNatRule { +func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration { if !iter.page.NotDone() { - return InboundNatRule{} + return InterfaceTapConfiguration{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InboundNatRuleListResultIterator type. -func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator { - return InboundNatRuleListResultIterator{page: page} +// Creates a new instance of the InterfaceTapConfigurationListResultIterator type. +func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator { + return InterfaceTapConfigurationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (inrlr InboundNatRuleListResult) IsEmpty() bool { - return inrlr.Value == nil || len(*inrlr.Value) == 0 +func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool { + return itclr.Value == nil || len(*itclr.Value) == 0 } -// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. +// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 { +func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if itclr.NextLink == nil || len(to.String(itclr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(inrlr.NextLink))) + autorest.WithBaseURL(to.String(itclr.NextLink))) } -// InboundNatRuleListResultPage contains a page of InboundNatRule values. -type InboundNatRuleListResultPage struct { - fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error) - inrlr InboundNatRuleListResult +// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values. +type InterfaceTapConfigurationListResultPage struct { + fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error) + itclr InterfaceTapConfigurationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -12204,160 +15275,145 @@ func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.inrlr) + next, err := page.fn(ctx, page.itclr) if err != nil { return err } - page.inrlr = next + page.itclr = 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 *InboundNatRuleListResultPage) Next() error { +func (page *InterfaceTapConfigurationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InboundNatRuleListResultPage) NotDone() bool { - return !page.inrlr.IsEmpty() +func (page InterfaceTapConfigurationListResultPage) NotDone() bool { + return !page.itclr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult { - return page.inrlr +func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult { + return page.itclr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InboundNatRuleListResultPage) Values() []InboundNatRule { - if page.inrlr.IsEmpty() { +func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration { + if page.itclr.IsEmpty() { return nil } - return *page.inrlr.Value + return *page.itclr.Value } -// Creates a new instance of the InboundNatRuleListResultPage type. -func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage { - return InboundNatRuleListResultPage{fn: getNextPage} +// Creates a new instance of the InterfaceTapConfigurationListResultPage type. +func NewInterfaceTapConfigurationListResultPage(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { + return InterfaceTapConfigurationListResultPage{fn: getNextPage} } -// InboundNatRulePropertiesFormat properties of the inbound NAT rule. -type InboundNatRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendIPConfiguration - READ-ONLY; A reference to a private IP address defined on a network interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations is forwarded to the backend IP. - BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534. - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535. - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration. +type InterfaceTapConfigurationPropertiesFormat struct { + // VirtualNetworkTap - The reference of the Virtual Network Tap resource. + VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InboundNatRulesCreateOrUpdateFuture struct { +// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type InterfaceTapConfigurationsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *InboundNatRulesCreateOrUpdateFuture) Result(client InboundNatRulesClient) (inr InboundNatRule, err error) { +func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) Result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent { - inr, err = client.CreateOrUpdateResponder(inr.Response.Response) + if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent { + itc, err = client.CreateOrUpdateResponder(itc.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request") } } return } -// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InboundNatRulesDeleteFuture struct { +// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type InterfaceTapConfigurationsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *InboundNatRulesDeleteFuture) Result(client InboundNatRulesClient) (ar autorest.Response, err error) { +func (future *InterfaceTapConfigurationsDeleteFuture) Result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture") return } ar.Response = future.Response() return } -// Interface a network interface in a resource group. -type Interface struct { +// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call. +type IPAddressAvailabilityResult struct { autorest.Response `json:"-"` - // InterfacePropertiesFormat - Properties of the network interface. - *InterfacePropertiesFormat `json:"properties,omitempty"` + // Available - Private IP address availability. + Available *bool `json:"available,omitempty"` + // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. + AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` +} + +// IPConfiguration IP configuration. +type IPConfiguration struct { + // IPConfigurationPropertiesFormat - Properties of the IP configuration. + *IPConfigurationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for Interface. -func (i Interface) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for IPConfiguration. +func (ic IPConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if i.InterfacePropertiesFormat != nil { - objectMap["properties"] = i.InterfacePropertiesFormat - } - if i.Etag != nil { - objectMap["etag"] = i.Etag + if ic.IPConfigurationPropertiesFormat != nil { + objectMap["properties"] = ic.IPConfigurationPropertiesFormat } - if i.ID != nil { - objectMap["id"] = i.ID + if ic.Name != nil { + objectMap["name"] = ic.Name } - if i.Location != nil { - objectMap["location"] = i.Location + if ic.Etag != nil { + objectMap["etag"] = ic.Etag } - if i.Tags != nil { - objectMap["tags"] = i.Tags + if ic.ID != nil { + objectMap["id"] = ic.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Interface struct. -func (i *Interface) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. +func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -12367,30 +15423,12 @@ func (i *Interface) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var interfacePropertiesFormat InterfacePropertiesFormat - err = json.Unmarshal(*v, &interfacePropertiesFormat) - if err != nil { - return err - } - i.InterfacePropertiesFormat = &interfacePropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - i.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat + err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) if err != nil { return err } - i.ID = &ID + ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat } case "name": if v != nil { @@ -12399,105 +15437,66 @@ func (i *Interface) UnmarshalJSON(body []byte) error { 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 + ic.Name = &name } - case "location": + case "etag": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - i.Location = &location + ic.Etag = &etag } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { - return err - } - i.Tags = tags - } - } - } - - return nil -} - -// InterfaceAssociation network interface and its custom security rules. -type InterfaceAssociation struct { - // ID - READ-ONLY; Network interface ID. - ID *string `json:"id,omitempty"` - // SecurityRules - Collection of custom security rules. - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} - -// InterfaceDNSSettings DNS settings of a network interface. -type InterfaceDNSSettings struct { - // DNSServers - List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dnsServers collection. - DNSServers *[]string `json:"dnsServers,omitempty"` - // AppliedDNSServers - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. - AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` - // InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network. - InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"` - // InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network. - InternalFqdn *string `json:"internalFqdn,omitempty"` - // InternalDomainNameSuffix - Even if internalDnsNameLabel is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internalDomainNameSuffix. - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` + return err + } + ic.ID = &ID + } + } + } + + return nil } -// InterfaceEndpoint interface endpoint resource. -type InterfaceEndpoint struct { - autorest.Response `json:"-"` - // InterfaceEndpointProperties - Properties of the interface endpoint. - *InterfaceEndpointProperties `json:"properties,omitempty"` - // Etag - Gets a unique read-only string that changes whenever the resource is updated. +// IPConfigurationProfile IP configuration profile child resource. +type IPConfigurationProfile struct { + // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile. + *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Sub Resource type. + Type *string `json:"type,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for InterfaceEndpoint. -func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for IPConfigurationProfile. +func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ie.InterfaceEndpointProperties != nil { - objectMap["properties"] = ie.InterfaceEndpointProperties - } - if ie.Etag != nil { - objectMap["etag"] = ie.Etag + if icp.IPConfigurationProfilePropertiesFormat != nil { + objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat } - if ie.ID != nil { - objectMap["id"] = ie.ID + if icp.Name != nil { + objectMap["name"] = icp.Name } - if ie.Location != nil { - objectMap["location"] = ie.Location + if icp.Etag != nil { + objectMap["etag"] = icp.Etag } - if ie.Tags != nil { - objectMap["tags"] = ie.Tags + if icp.ID != nil { + objectMap["id"] = icp.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct. -func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct. +func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -12507,30 +15506,12 @@ func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var interfaceEndpointProperties InterfaceEndpointProperties - err = json.Unmarshal(*v, &interfaceEndpointProperties) - if err != nil { - return err - } - ie.InterfaceEndpointProperties = &interfaceEndpointProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ie.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat + err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat) if err != nil { return err } - ie.ID = &ID + icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat } case "name": if v != nil { @@ -12539,7 +15520,7 @@ func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error { if err != nil { return err } - ie.Name = &name + icp.Name = &name } case "type": if v != nil { @@ -12548,52 +15529,265 @@ func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error { if err != nil { return err } - ie.Type = &typeVar + icp.Type = &typeVar } - case "location": + case "etag": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - ie.Location = &location + icp.Etag = &etag } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - ie.Tags = tags + icp.ID = &ID } } } - return nil + return nil +} + +// IPConfigurationProfilePropertiesFormat IP configuration profile properties. +type IPConfigurationProfilePropertiesFormat struct { + // Subnet - The reference of the subnet resource to create a container network interface ip configuration. + Subnet *Subnet `json:"subnet,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// IPConfigurationPropertiesFormat properties of IP configuration. +type IPConfigurationPropertiesFormat struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection. +type IpsecPolicy struct { + // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` + // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` + // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' + IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` + // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' + IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` + // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` + // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' + IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` + // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + DhGroup DhGroup `json:"dhGroup,omitempty"` + // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +} + +// IPTag contains the IpTag associated with the object. +type IPTag struct { + // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. + IPTagType *string `json:"ipTagType,omitempty"` + // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc. + Tag *string `json:"tag,omitempty"` +} + +// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. +type Ipv6ExpressRouteCircuitPeeringConfig struct { + // PrimaryPeerAddressPrefix - The primary address prefix. + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + // SecondaryPeerAddressPrefix - The secondary address prefix. + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + // MicrosoftPeeringConfig - The Microsoft peering configuration. + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + // RouteFilter - The reference of the RouteFilter resource. + RouteFilter *SubResource `json:"routeFilter,omitempty"` + // State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +} + +// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get +// the next set of results. +type ListHubVirtualNetworkConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of HubVirtualNetworkConnections. + Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of +// HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultIterator struct { + i int + page ListHubVirtualNetworkConnectionsResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection { + if !iter.page.NotDone() { + return HubVirtualNetworkConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type. +func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator { + return ListHubVirtualNetworkConnectionsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool { + return lhvncr.Value == nil || len(*lhvncr.Value) == 0 +} + +// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lhvncr.NextLink))) +} + +// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values. +type ListHubVirtualNetworkConnectionsResultPage struct { + fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error) + lhvncr ListHubVirtualNetworkConnectionsResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lhvncr) + if err != nil { + return err + } + page.lhvncr = 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 *ListHubVirtualNetworkConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool { + return !page.lhvncr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult { + return page.lhvncr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection { + if page.lhvncr.IsEmpty() { + return nil + } + return *page.lhvncr.Value +} + +// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type. +func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { + return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage} } -// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call. -type InterfaceEndpointListResult struct { +// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of +// P2SVpnGateways and a URL nextLink to get the next set of results. +type ListP2SVpnGatewaysResult struct { autorest.Response `json:"-"` - // Value - Gets a list of InterfaceEndpoint resources in a resource group. - Value *[]InterfaceEndpoint `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - List of P2SVpnGateways. + Value *[]P2SVpnGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values. -type InterfaceEndpointListResultIterator struct { +// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values. +type ListP2SVpnGatewaysResultIterator struct { i int - page InterfaceEndpointListResultPage + page ListP2SVpnGatewaysResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -12618,62 +15812,62 @@ func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Con // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InterfaceEndpointListResultIterator) Next() error { +func (iter *ListP2SVpnGatewaysResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceEndpointListResultIterator) NotDone() bool { +func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult { +func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint { +func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway { if !iter.page.NotDone() { - return InterfaceEndpoint{} + return P2SVpnGateway{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InterfaceEndpointListResultIterator type. -func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator { - return InterfaceEndpointListResultIterator{page: page} +// Creates a new instance of the ListP2SVpnGatewaysResultIterator type. +func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator { + return ListP2SVpnGatewaysResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ielr InterfaceEndpointListResult) IsEmpty() bool { - return ielr.Value == nil || len(*ielr.Value) == 0 +func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool { + return lpvgr.Value == nil || len(*lpvgr.Value) == 0 } -// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results. +// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) { - if ielr.NextLink == nil || len(to.String(ielr.NextLink)) < 1 { +func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { + if lpvgr.NextLink == nil || len(to.String(lpvgr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ielr.NextLink))) + autorest.WithBaseURL(to.String(lpvgr.NextLink))) } -// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values. -type InterfaceEndpointListResultPage struct { - fn func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error) - ielr InterfaceEndpointListResult +// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values. +type ListP2SVpnGatewaysResultPage struct { + fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error) + lpvgr ListP2SVpnGatewaysResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -12682,215 +15876,220 @@ func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ielr) + next, err := page.fn(ctx, page.lpvgr) if err != nil { return err } - page.ielr = next + page.lpvgr = 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 *InterfaceEndpointListResultPage) Next() error { +func (page *ListP2SVpnGatewaysResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceEndpointListResultPage) NotDone() bool { - return !page.ielr.IsEmpty() +func (page ListP2SVpnGatewaysResultPage) NotDone() bool { + return !page.lpvgr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult { - return page.ielr +func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult { + return page.lpvgr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint { - if page.ielr.IsEmpty() { +func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway { + if page.lpvgr.IsEmpty() { return nil } - return *page.ielr.Value + return *page.lpvgr.Value } -// Creates a new instance of the InterfaceEndpointListResultPage type. -func NewInterfaceEndpointListResultPage(getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage { - return InterfaceEndpointListResultPage{fn: getNextPage} +// Creates a new instance of the ListP2SVpnGatewaysResultPage type. +func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { + return ListP2SVpnGatewaysResultPage{fn: getNextPage} } -// InterfaceEndpointProperties properties of the interface endpoint. -type InterfaceEndpointProperties struct { - // Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint. - Fqdn *string `json:"fqdn,omitempty"` - // EndpointService - A reference to the service being brought into the virtual network. - EndpointService *EndpointService `json:"endpointService,omitempty"` - // Subnet - The ID of the subnet from which the private IP will be allocated. - Subnet *Subnet `json:"subnet,omitempty"` - // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint. - NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` - // Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint. - Owner *string `json:"owner,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations +// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get +// the next set of results. +type ListP2SVpnServerConfigurationsResult struct { + autorest.Response `json:"-"` + // Value - List of P2SVpnServerConfigurations. + Value *[]P2SVpnServerConfiguration `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfaceEndpointsCreateOrUpdateFuture struct { - azure.Future +// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of +// P2SVpnServerConfiguration values. +type ListP2SVpnServerConfigurationsResultIterator struct { + i int + page ListP2SVpnServerConfigurationsResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfaceEndpointsCreateOrUpdateFuture) Result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent { - ie, err = client.CreateOrUpdateResponder(ie.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request") - } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfaceEndpointsDeleteFuture struct { - azure.Future +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfaceEndpointsDeleteFuture) Result(client InterfaceEndpointsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture") - return - } - ar.Response = future.Response() - return +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// InterfaceIPConfiguration iPConfiguration in a network interface. -type InterfaceIPConfiguration struct { - autorest.Response `json:"-"` - // InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties. - *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// Response returns the raw server response from the last page request. +func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult { + return iter.page.Response() } -// MarshalJSON is the custom marshaler for InterfaceIPConfiguration. -func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if iic.InterfaceIPConfigurationPropertiesFormat != nil { - objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat - } - if iic.Name != nil { - objectMap["name"] = iic.Name - } - if iic.Etag != nil { - objectMap["etag"] = iic.Etag - } - if iic.ID != nil { - objectMap["id"] = iic.ID +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration { + if !iter.page.NotDone() { + return P2SVpnServerConfiguration{} } - return json.Marshal(objectMap) + return iter.page.Values()[iter.i] } -// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct. -func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err +// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type. +func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator { + return ListP2SVpnServerConfigurationsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool { + return lpvscr.Value == nil || len(*lpvscr.Value) == 0 +} + +// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { + if lpvscr.NextLink == nil || len(to.String(lpvscr.NextLink)) < 1 { + return nil, nil } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat) - if err != nil { - return err - } - iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - iic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - iic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - iic.ID = &ID + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lpvscr.NextLink))) +} + +// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values. +type ListP2SVpnServerConfigurationsResultPage struct { + fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error) + lpvscr ListP2SVpnServerConfigurationsResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode } - } + tracing.EndSpan(ctx, sc, err) + }() } - + next, err := page.fn(ctx, page.lpvscr) + if err != nil { + return err + } + page.lpvscr = next return nil } -// InterfaceIPConfigurationListResult response for list ip configurations API service call. -type InterfaceIPConfigurationListResult struct { +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListP2SVpnServerConfigurationsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool { + return !page.lpvscr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult { + return page.lpvscr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration { + if page.lpvscr.IsEmpty() { + return nil + } + return *page.lpvscr.Value +} + +// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type. +func NewListP2SVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage { + return ListP2SVpnServerConfigurationsResultPage{fn: getNextPage} +} + +// ListString ... +type ListString struct { autorest.Response `json:"-"` - // Value - A list of ip configurations. - Value *[]InterfaceIPConfiguration `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + Value *[]string `json:"value,omitempty"` +} + +// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a +// URL nextLink to get the next set of results. +type ListVirtualHubsResult struct { + autorest.Response `json:"-"` + // Value - List of VirtualHubs. + Value *[]VirtualHub `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceIPConfigurationListResultIterator provides access to a complete listing of -// InterfaceIPConfiguration values. -type InterfaceIPConfigurationListResultIterator struct { +// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values. +type ListVirtualHubsResultIterator struct { i int - page InterfaceIPConfigurationListResultPage + page ListVirtualHubsResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -12915,62 +16114,62 @@ func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InterfaceIPConfigurationListResultIterator) Next() error { +func (iter *ListVirtualHubsResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool { +func (iter ListVirtualHubsResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult { +func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration { +func (iter ListVirtualHubsResultIterator) Value() VirtualHub { if !iter.page.NotDone() { - return InterfaceIPConfiguration{} + return VirtualHub{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InterfaceIPConfigurationListResultIterator type. -func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator { - return InterfaceIPConfigurationListResultIterator{page: page} +// Creates a new instance of the ListVirtualHubsResultIterator type. +func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator { + return ListVirtualHubsResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool { - return iiclr.Value == nil || len(*iiclr.Value) == 0 +func (lvhr ListVirtualHubsResult) IsEmpty() bool { + return lvhr.Value == nil || len(*lvhr.Value) == 0 } -// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 { +func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(iiclr.NextLink))) + autorest.WithBaseURL(to.String(lvhr.NextLink))) } -// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values. -type InterfaceIPConfigurationListResultPage struct { - fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error) - iiclr InterfaceIPConfigurationListResult +// ListVirtualHubsResultPage contains a page of VirtualHub values. +type ListVirtualHubsResultPage struct { + fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error) + lvhr ListVirtualHubsResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -12979,92 +16178,65 @@ func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.iiclr) + next, err := page.fn(ctx, page.lvhr) if err != nil { return err } - page.iiclr = next + page.lvhr = 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 *InterfaceIPConfigurationListResultPage) Next() error { +func (page *ListVirtualHubsResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceIPConfigurationListResultPage) NotDone() bool { - return !page.iiclr.IsEmpty() +func (page ListVirtualHubsResultPage) NotDone() bool { + return !page.lvhr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult { - return page.iiclr +func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult { + return page.lvhr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration { - if page.iiclr.IsEmpty() { +func (page ListVirtualHubsResultPage) Values() []VirtualHub { + if page.lvhr.IsEmpty() { return nil } - return *page.iiclr.Value -} - -// Creates a new instance of the InterfaceIPConfigurationListResultPage type. -func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage { - return InterfaceIPConfigurationListResultPage{fn: getNextPage} + return *page.lvhr.Value } -// InterfaceIPConfigurationPropertiesFormat properties of IP configuration. -type InterfaceIPConfigurationPropertiesFormat struct { - // VirtualNetworkTaps - The reference to Virtual Network Taps. - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` - // ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource. - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - // LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource. - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - // LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules. - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - // PrivateIPAddress - Private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' - PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` - // Subnet - Subnet bound to the IP configuration. - Subnet *Subnet `json:"subnet,omitempty"` - // Primary - Gets whether this is a primary customer address on the network interface. - Primary *bool `json:"primary,omitempty"` - // PublicIPAddress - Public IP address bound to the IP configuration. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ApplicationSecurityGroups - Application security groups in which the IP configuration is included. - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - // ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// Creates a new instance of the ListVirtualHubsResultPage type. +func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { + return ListVirtualHubsResultPage{fn: getNextPage} } -// InterfaceListResult response for the ListNetworkInterface API service call. -type InterfaceListResult struct { +// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a +// URL nextLink to get the next set of results. +type ListVirtualWANsResult struct { autorest.Response `json:"-"` - // Value - A list of network interfaces in a resource group. - Value *[]Interface `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - List of VirtualWANs. + Value *[]VirtualWAN `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceListResultIterator provides access to a complete listing of Interface values. -type InterfaceListResultIterator struct { +// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values. +type ListVirtualWANsResultIterator struct { i int - page InterfaceListResultPage + page ListVirtualWANsResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -13089,62 +16261,62 @@ func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (e // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InterfaceListResultIterator) Next() error { +func (iter *ListVirtualWANsResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceListResultIterator) NotDone() bool { +func (iter ListVirtualWANsResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InterfaceListResultIterator) Response() InterfaceListResult { +func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InterfaceListResultIterator) Value() Interface { +func (iter ListVirtualWANsResultIterator) Value() VirtualWAN { if !iter.page.NotDone() { - return Interface{} + return VirtualWAN{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InterfaceListResultIterator type. -func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator { - return InterfaceListResultIterator{page: page} +// Creates a new instance of the ListVirtualWANsResultIterator type. +func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator { + return ListVirtualWANsResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ilr InterfaceListResult) IsEmpty() bool { - return ilr.Value == nil || len(*ilr.Value) == 0 +func (lvwnr ListVirtualWANsResult) IsEmpty() bool { + return lvwnr.Value == nil || len(*lvwnr.Value) == 0 } -// interfaceListResultPreparer prepares a request to retrieve the next set of results. +// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) { - if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 { +func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ilr.NextLink))) + autorest.WithBaseURL(to.String(lvwnr.NextLink))) } -// InterfaceListResultPage contains a page of Interface values. -type InterfaceListResultPage struct { - fn func(context.Context, InterfaceListResult) (InterfaceListResult, error) - ilr InterfaceListResult +// ListVirtualWANsResultPage contains a page of VirtualWAN values. +type ListVirtualWANsResultPage struct { + fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error) + lvwnr ListVirtualWANsResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -13153,64 +16325,65 @@ func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.ilr) + next, err := page.fn(ctx, page.lvwnr) if err != nil { return err } - page.ilr = next + page.lvwnr = 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 *InterfaceListResultPage) Next() error { +func (page *ListVirtualWANsResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceListResultPage) NotDone() bool { - return !page.ilr.IsEmpty() +func (page ListVirtualWANsResultPage) NotDone() bool { + return !page.lvwnr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InterfaceListResultPage) Response() InterfaceListResult { - return page.ilr +func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult { + return page.lvwnr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceListResultPage) Values() []Interface { - if page.ilr.IsEmpty() { +func (page ListVirtualWANsResultPage) Values() []VirtualWAN { + if page.lvwnr.IsEmpty() { return nil } - return *page.ilr.Value + return *page.lvwnr.Value } -// Creates a new instance of the InterfaceListResultPage type. -func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage { - return InterfaceListResultPage{fn: getNextPage} +// Creates a new instance of the ListVirtualWANsResultPage type. +func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { + return ListVirtualWANsResultPage{fn: getNextPage} } -// InterfaceLoadBalancerListResult response for list ip configurations API service call. -type InterfaceLoadBalancerListResult struct { - autorest.Response `json:"-"` - // Value - A list of load balancers. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. +// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. +// It contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of Vpn Connections. + Value *[]VpnConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. -type InterfaceLoadBalancerListResultIterator struct { +// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values. +type ListVpnConnectionsResultIterator struct { i int - page InterfaceLoadBalancerListResultPage + page ListVpnConnectionsResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -13235,391 +16408,129 @@ func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InterfaceLoadBalancerListResultIterator) Next() error { +func (iter *ListVpnConnectionsResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool { +func (iter ListVpnConnectionsResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult { +func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer { +func (iter ListVpnConnectionsResultIterator) Value() VpnConnection { if !iter.page.NotDone() { - return LoadBalancer{} + return VpnConnection{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InterfaceLoadBalancerListResultIterator type. -func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator { - return InterfaceLoadBalancerListResultIterator{page: page} +// Creates a new instance of the ListVpnConnectionsResultIterator type. +func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator { + return ListVpnConnectionsResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool { - return ilblr.Value == nil || len(*ilblr.Value) == 0 +func (lvcr ListVpnConnectionsResult) IsEmpty() bool { + return lvcr.Value == nil || len(*lvcr.Value) == 0 } -// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { - if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 { +func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(ilblr.NextLink))) + autorest.WithBaseURL(to.String(lvcr.NextLink))) } -// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values. -type InterfaceLoadBalancerListResultPage struct { - fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error) - ilblr InterfaceLoadBalancerListResult +// ListVpnConnectionsResultPage contains a page of VpnConnection values. +type ListVpnConnectionsResultPage struct { + fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error) + lvcr ListVpnConnectionsResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { sc = page.Response().Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.ilblr) - if err != nil { - return err - } - page.ilblr = 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 *InterfaceLoadBalancerListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceLoadBalancerListResultPage) NotDone() bool { - return !page.ilblr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult { - return page.ilblr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer { - if page.ilblr.IsEmpty() { - return nil - } - return *page.ilblr.Value -} - -// Creates a new instance of the InterfaceLoadBalancerListResultPage type. -func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage { - return InterfaceLoadBalancerListResultPage{fn: getNextPage} -} - -// InterfacePropertiesFormat networkInterface properties. -type InterfacePropertiesFormat struct { - // VirtualMachine - READ-ONLY; The reference of a virtual machine. - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - // InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked. - InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"` - // IPConfigurations - A list of IPConfigurations of the network interface. - IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - // TapConfigurations - A list of TapConfigurations of the network interface. - TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - // DNSSettings - The DNS settings in network interface. - DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"` - // MacAddress - The MAC address of the network interface. - MacAddress *string `json:"macAddress,omitempty"` - // Primary - Gets whether this is a primary network interface on a virtual machine. - Primary *bool `json:"primary,omitempty"` - // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - // HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - // ResourceGUID - The resource GUID property of the network interface resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesCreateOrUpdateFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.CreateOrUpdateResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesDeleteFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesDeleteFuture) Result(client InterfacesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfacesGetEffectiveRouteTableFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent { - erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. -type InterfacesListEffectiveNetworkSecurityGroupsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent { - ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request") - } - } - return -} - -// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type InterfacesUpdateTagsFuture struct { - azure.Future -} - -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfacesUpdateTagsFuture) Result(client InterfacesClient) (i Interface, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent { - i, err = client.UpdateTagsResponder(i.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request") - } + }() } - return + next, err := page.fn(ctx, page.lvcr) + if err != nil { + return err + } + page.lvcr = next + return nil } -// InterfaceTapConfiguration tap configuration in a Network Interface -type InterfaceTapConfiguration struct { - autorest.Response `json:"-"` - // InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration - *InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListVpnConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// MarshalJSON is the custom marshaler for InterfaceTapConfiguration. -func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if itc.InterfaceTapConfigurationPropertiesFormat != nil { - objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat - } - if itc.Name != nil { - objectMap["name"] = itc.Name - } - if itc.Etag != nil { - objectMap["etag"] = itc.Etag - } - if itc.ID != nil { - objectMap["id"] = itc.ID - } - return json.Marshal(objectMap) +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnConnectionsResultPage) NotDone() bool { + return !page.lvcr.IsEmpty() } -// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct. -func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat - err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat) - if err != nil { - return err - } - itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - itc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - itc.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - itc.Type = &typeVar - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - itc.ID = &ID - } - } +// Response returns the raw server response from the last page request. +func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult { + return page.lvcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnConnectionsResultPage) Values() []VpnConnection { + if page.lvcr.IsEmpty() { + return nil } + return *page.lvcr.Value +} - return nil +// Creates a new instance of the ListVpnConnectionsResultPage type. +func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { + return ListVpnConnectionsResultPage{fn: getNextPage} } -// InterfaceTapConfigurationListResult response for list tap configurations API service call. -type InterfaceTapConfigurationListResult struct { +// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a +// URL nextLink to get the next set of results. +type ListVpnGatewaysResult struct { autorest.Response `json:"-"` - // Value - A list of tap configurations. - Value *[]InterfaceTapConfiguration `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - List of VpnGateways. + Value *[]VpnGateway `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// InterfaceTapConfigurationListResultIterator provides access to a complete listing of -// InterfaceTapConfiguration values. -type InterfaceTapConfigurationListResultIterator struct { +// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values. +type ListVpnGatewaysResultIterator struct { i int - page InterfaceTapConfigurationListResultPage + page ListVpnGatewaysResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -13644,62 +16555,62 @@ func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx con // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *InterfaceTapConfigurationListResultIterator) Next() error { +func (iter *ListVpnGatewaysResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool { +func (iter ListVpnGatewaysResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult { +func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration { +func (iter ListVpnGatewaysResultIterator) Value() VpnGateway { if !iter.page.NotDone() { - return InterfaceTapConfiguration{} + return VpnGateway{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the InterfaceTapConfigurationListResultIterator type. -func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator { - return InterfaceTapConfigurationListResultIterator{page: page} +// Creates a new instance of the ListVpnGatewaysResultIterator type. +func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator { + return ListVpnGatewaysResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool { - return itclr.Value == nil || len(*itclr.Value) == 0 +func (lvgr ListVpnGatewaysResult) IsEmpty() bool { + return lvgr.Value == nil || len(*lvgr.Value) == 0 } -// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if itclr.NextLink == nil || len(to.String(itclr.NextLink)) < 1 { +func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { + if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(itclr.NextLink))) + autorest.WithBaseURL(to.String(lvgr.NextLink))) } -// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values. -type InterfaceTapConfigurationListResultPage struct { - fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error) - itclr InterfaceTapConfigurationListResult +// ListVpnGatewaysResultPage contains a page of VpnGateway values. +type ListVpnGatewaysResultPage struct { + fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error) + lvgr ListVpnGatewaysResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -13708,372 +16619,213 @@ func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.itclr) + next, err := page.fn(ctx, page.lvgr) if err != nil { return err } - page.itclr = next + page.lvgr = 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 *InterfaceTapConfigurationListResultPage) Next() error { +func (page *ListVpnGatewaysResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page InterfaceTapConfigurationListResultPage) NotDone() bool { - return !page.itclr.IsEmpty() +func (page ListVpnGatewaysResultPage) NotDone() bool { + return !page.lvgr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult { - return page.itclr +func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult { + return page.lvgr } // Values returns the slice of values for the current page or nil if there are no values. -func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration { - if page.itclr.IsEmpty() { +func (page ListVpnGatewaysResultPage) Values() []VpnGateway { + if page.lvgr.IsEmpty() { return nil } - return *page.itclr.Value -} - -// Creates a new instance of the InterfaceTapConfigurationListResultPage type. -func NewInterfaceTapConfigurationListResultPage(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage { - return InterfaceTapConfigurationListResultPage{fn: getNextPage} -} - -// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration. -type InterfaceTapConfigurationPropertiesFormat struct { - // VirtualNetworkTap - The reference of the Virtual Network Tap resource. - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` + return *page.lvgr.Value } -// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type InterfaceTapConfigurationsCreateOrUpdateFuture struct { - azure.Future +// Creates a new instance of the ListVpnGatewaysResultPage type. +func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { + return ListVpnGatewaysResultPage{fn: getNextPage} } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) Result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent { - itc, err = client.CreateOrUpdateResponder(itc.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request") - } - } - return +// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn +// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. +type ListVpnSiteLinkConnectionsResult struct { + autorest.Response `json:"-"` + // Value - List of VpnSiteLinkConnections. + Value *[]VpnSiteLinkConnection `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` } -// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type InterfaceTapConfigurationsDeleteFuture struct { - azure.Future +// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection +// values. +type ListVpnSiteLinkConnectionsResultIterator struct { + i int + page ListVpnSiteLinkConnectionsResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *InterfaceTapConfigurationsDeleteFuture) Result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") - return +// 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 *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - ar.Response = future.Response() - return + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil } -// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call -type IPAddressAvailabilityResult struct { - autorest.Response `json:"-"` - // Available - Private IP address availability. - Available *bool `json:"available,omitempty"` - // AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken. - AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` +// 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 *ListVpnSiteLinkConnectionsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// IPConfiguration IP configuration -type IPConfiguration struct { - // IPConfigurationPropertiesFormat - Properties of the IP configuration - *IPConfigurationPropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// MarshalJSON is the custom marshaler for IPConfiguration. -func (ic IPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if ic.IPConfigurationPropertiesFormat != nil { - objectMap["properties"] = ic.IPConfigurationPropertiesFormat - } - if ic.Name != nil { - objectMap["name"] = ic.Name - } - if ic.Etag != nil { - objectMap["etag"] = ic.Etag - } - if ic.ID != nil { - objectMap["id"] = ic.ID - } - return json.Marshal(objectMap) +// Response returns the raw server response from the last page request. +func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult { + return iter.page.Response() } -// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct. -func (ic *IPConfiguration) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat - err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat) - if err != nil { - return err - } - ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - ic.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - ic.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - ic.ID = &ID - } - } +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection { + if !iter.page.NotDone() { + return VpnSiteLinkConnection{} } + return iter.page.Values()[iter.i] +} - return nil +// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type. +func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator { + return ListVpnSiteLinkConnectionsResultIterator{page: page} } -// IPConfigurationProfile IP configuration profile child resource. -type IPConfigurationProfile struct { - // IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile. - *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Sub Resource type. - Type *string `json:"type,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` +// IsEmpty returns true if the ListResult contains no values. +func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool { + return lvslcr.Value == nil || len(*lvslcr.Value) == 0 } -// MarshalJSON is the custom marshaler for IPConfigurationProfile. -func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if icp.IPConfigurationProfilePropertiesFormat != nil { - objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat - } - if icp.Name != nil { - objectMap["name"] = icp.Name - } - if icp.Etag != nil { - objectMap["etag"] = icp.Etag - } - if icp.ID != nil { - objectMap["id"] = icp.ID +// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { + if lvslcr.NextLink == nil || len(to.String(lvslcr.NextLink)) < 1 { + return nil, nil } - return json.Marshal(objectMap) + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvslcr.NextLink))) } -// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct. -func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) +// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values. +type ListVpnSiteLinkConnectionsResultPage struct { + fn func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error) + lvslcr ListVpnSiteLinkConnectionsResult +} + +// 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 *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.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.lvslcr) if err != nil { return err } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat - err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat) - if err != nil { - return err - } - icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - icp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - icp.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - icp.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - icp.ID = &ID - } - } - } - + page.lvslcr = next return nil } -// IPConfigurationProfilePropertiesFormat IP configuration profile properties. -type IPConfigurationProfilePropertiesFormat struct { - // Subnet - The reference of the subnet resource to create a container network interface ip configuration. - Subnet *Subnet `json:"subnet,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// IPConfigurationPropertiesFormat properties of IP configuration. -type IPConfigurationPropertiesFormat struct { - // PrivateIPAddress - The private IP address of the IP configuration. - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - // PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' - PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - // Subnet - The reference of the subnet resource. - Subnet *Subnet `json:"subnet,omitempty"` - // PublicIPAddress - The reference of the public IP resource. - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// 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 *ListVpnSiteLinkConnectionsResultPage) Next() error { + return page.NextWithContext(context.Background()) } -// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection -type IpsecPolicy struct { - // SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` - // SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` - // IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256' - IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"` - // IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256' - IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"` - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' - IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' - IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' - PfsGroup PfsGroup `json:"pfsGroup,omitempty"` +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool { + return !page.lvslcr.IsEmpty() } -// IPTag contains the IpTag associated with the object -type IPTag struct { - // IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage. - IPTagType *string `json:"ipTagType,omitempty"` - // Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc - Tag *string `json:"tag,omitempty"` +// Response returns the raw server response from the last page request. +func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult { + return page.lvslcr } -// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config. -type Ipv6ExpressRouteCircuitPeeringConfig struct { - // PrimaryPeerAddressPrefix - The primary address prefix. - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - // SecondaryPeerAddressPrefix - The secondary address prefix. - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - // MicrosoftPeeringConfig - The Microsoft peering configuration. - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - // RouteFilter - The reference of the RouteFilter resource. - RouteFilter *RouteFilter `json:"routeFilter,omitempty"` - // State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled' - State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection { + if page.lvslcr.IsEmpty() { + return nil + } + return *page.lvslcr.Value } -// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get -// the next set of results. -type ListHubVirtualNetworkConnectionsResult struct { +// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type. +func NewListVpnSiteLinkConnectionsResultPage(getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage { + return ListVpnSiteLinkConnectionsResultPage{fn: getNextPage} +} + +// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks +// and a URL nextLink to get the next set of results. +type ListVpnSiteLinksResult struct { autorest.Response `json:"-"` - // Value - List of HubVirtualNetworkConnections. - Value *[]HubVirtualNetworkConnection `json:"value,omitempty"` + // Value - List of VpnSitesLinks. + Value *[]VpnSiteLink `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of -// HubVirtualNetworkConnection values. -type ListHubVirtualNetworkConnectionsResultIterator struct { +// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values. +type ListVpnSiteLinksResultIterator struct { i int - page ListHubVirtualNetworkConnectionsResultPage + page ListVpnSiteLinksResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14098,62 +16850,62 @@ func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error { +func (iter *ListVpnSiteLinksResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool { +func (iter ListVpnSiteLinksResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult { +func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection { +func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink { if !iter.page.NotDone() { - return HubVirtualNetworkConnection{} + return VpnSiteLink{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type. -func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator { - return ListHubVirtualNetworkConnectionsResultIterator{page: page} +// Creates a new instance of the ListVpnSiteLinksResultIterator type. +func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator { + return ListVpnSiteLinksResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool { - return lhvncr.Value == nil || len(*lhvncr.Value) == 0 +func (lvslr ListVpnSiteLinksResult) IsEmpty() bool { + return lvslr.Value == nil || len(*lvslr.Value) == 0 } -// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results. +// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 { +func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) { + if lvslr.NextLink == nil || len(to.String(lvslr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lhvncr.NextLink))) + autorest.WithBaseURL(to.String(lvslr.NextLink))) } -// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values. -type ListHubVirtualNetworkConnectionsResultPage struct { - fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error) - lhvncr ListHubVirtualNetworkConnectionsResult +// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values. +type ListVpnSiteLinksResultPage struct { + fn func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error) + lvslr ListVpnSiteLinksResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -14162,65 +16914,65 @@ func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lhvncr) + next, err := page.fn(ctx, page.lvslr) if err != nil { return err } - page.lhvncr = next + page.lvslr = 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 *ListHubVirtualNetworkConnectionsResultPage) Next() error { +func (page *ListVpnSiteLinksResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool { - return !page.lhvncr.IsEmpty() +func (page ListVpnSiteLinksResultPage) NotDone() bool { + return !page.lvslr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult { - return page.lhvncr +func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult { + return page.lvslr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection { - if page.lhvncr.IsEmpty() { +func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink { + if page.lvslr.IsEmpty() { return nil } - return *page.lhvncr.Value + return *page.lvslr.Value } -// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type. -func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage { - return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage} +// Creates a new instance of the ListVpnSiteLinksResultPage type. +func NewListVpnSiteLinksResultPage(getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage { + return ListVpnSiteLinksResultPage{fn: getNextPage} } -// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of -// P2SVpnGateways and a URL nextLink to get the next set of results. -type ListP2SVpnGatewaysResult struct { +// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL +// nextLink to get the next set of results. +type ListVpnSitesResult struct { autorest.Response `json:"-"` - // Value - List of P2SVpnGateways. - Value *[]P2SVpnGateway `json:"value,omitempty"` + // Value - List of VpnSites. + Value *[]VpnSite `json:"value,omitempty"` // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values. -type ListP2SVpnGatewaysResultIterator struct { +// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values. +type ListVpnSitesResultIterator struct { i int - page ListP2SVpnGatewaysResultPage + page ListVpnSitesResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14245,131 +16997,261 @@ func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListP2SVpnGatewaysResultIterator) Next() error { +func (iter *ListVpnSitesResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool { +func (iter ListVpnSitesResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult { +func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway { +func (iter ListVpnSitesResultIterator) Value() VpnSite { if !iter.page.NotDone() { - return P2SVpnGateway{} + return VpnSite{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListP2SVpnGatewaysResultIterator type. -func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator { - return ListP2SVpnGatewaysResultIterator{page: page} +// Creates a new instance of the ListVpnSitesResultIterator type. +func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator { + return ListVpnSitesResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool { - return lpvgr.Value == nil || len(*lpvgr.Value) == 0 +func (lvsr ListVpnSitesResult) IsEmpty() bool { + return lvsr.Value == nil || len(*lvsr.Value) == 0 } -// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. +// listVpnSitesResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { - if lpvgr.NextLink == nil || len(to.String(lpvgr.NextLink)) < 1 { +func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) { + if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lpvgr.NextLink))) + autorest.WithBaseURL(to.String(lvsr.NextLink))) } -// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values. -type ListP2SVpnGatewaysResultPage struct { - fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error) - lpvgr ListP2SVpnGatewaysResult +// ListVpnSitesResultPage contains a page of VpnSite values. +type ListVpnSitesResultPage struct { + fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error) + lvsr ListVpnSitesResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { sc = page.Response().Response.Response.StatusCode } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.lpvgr) - if err != nil { - return err - } - page.lpvgr = 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 *ListP2SVpnGatewaysResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListP2SVpnGatewaysResultPage) NotDone() bool { - return !page.lpvgr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult { - return page.lpvgr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway { - if page.lpvgr.IsEmpty() { - return nil + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.lvsr) + if err != nil { + return err + } + page.lvsr = 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 *ListVpnSitesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnSitesResultPage) NotDone() bool { + return !page.lvsr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnSitesResultPage) Response() ListVpnSitesResult { + return page.lvsr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnSitesResultPage) Values() []VpnSite { + if page.lvsr.IsEmpty() { + return nil + } + return *page.lvsr.Value +} + +// Creates a new instance of the ListVpnSitesResultPage type. +func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { + return ListVpnSitesResultPage{fn: getNextPage} +} + +// LoadBalancer loadBalancer resource. +type LoadBalancer struct { + autorest.Response `json:"-"` + // Sku - The load balancer SKU. + Sku *LoadBalancerSku `json:"sku,omitempty"` + // LoadBalancerPropertiesFormat - Properties of load balancer. + *LoadBalancerPropertiesFormat `json:"properties,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for LoadBalancer. +func (lb LoadBalancer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lb.Sku != nil { + objectMap["sku"] = lb.Sku + } + if lb.LoadBalancerPropertiesFormat != nil { + objectMap["properties"] = lb.LoadBalancerPropertiesFormat + } + if lb.Etag != nil { + objectMap["etag"] = lb.Etag + } + if lb.ID != nil { + objectMap["id"] = lb.ID + } + if lb.Location != nil { + objectMap["location"] = lb.Location + } + if lb.Tags != nil { + objectMap["tags"] = lb.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. +func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "sku": + if v != nil { + var sku LoadBalancerSku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + lb.Sku = &sku + } + case "properties": + if v != nil { + var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat + err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) + if err != nil { + return err + } + lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lb.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lb.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lb.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lb.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + lb.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + lb.Tags = tags + } + } } - return *page.lpvgr.Value -} -// Creates a new instance of the ListP2SVpnGatewaysResultPage type. -func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage { - return ListP2SVpnGatewaysResultPage{fn: getNextPage} + return nil } -// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations -// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get -// the next set of results. -type ListP2SVpnServerConfigurationsResult struct { +// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. +type LoadBalancerBackendAddressPoolListResult struct { autorest.Response `json:"-"` - // Value - List of P2SVpnServerConfigurations. - Value *[]P2SVpnServerConfiguration `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of backend address pools in a load balancer. + Value *[]BackendAddressPool `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of -// P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultIterator struct { +// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of +// BackendAddressPool values. +type LoadBalancerBackendAddressPoolListResultIterator struct { i int - page ListP2SVpnServerConfigurationsResultPage + page LoadBalancerBackendAddressPoolListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14394,62 +17276,62 @@ func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx co // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error { +func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool { +func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult { +func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration { +func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { if !iter.page.NotDone() { - return P2SVpnServerConfiguration{} + return BackendAddressPool{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type. -func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator { - return ListP2SVpnServerConfigurationsResultIterator{page: page} +// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type. +func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator { + return LoadBalancerBackendAddressPoolListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool { - return lpvscr.Value == nil || len(*lpvscr.Value) == 0 +func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { + return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 } -// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) { - if lpvscr.NextLink == nil || len(to.String(lpvscr.NextLink)) < 1 { +func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) { + if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lpvscr.NextLink))) + autorest.WithBaseURL(to.String(lbbaplr.NextLink))) } -// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values. -type ListP2SVpnServerConfigurationsResultPage struct { - fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error) - lpvscr ListP2SVpnServerConfigurationsResult +// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. +type LoadBalancerBackendAddressPoolListResultPage struct { + fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) + lbbaplr LoadBalancerBackendAddressPoolListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -14458,65 +17340,65 @@ func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx contex tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lpvscr) + next, err := page.fn(ctx, page.lbbaplr) if err != nil { return err } - page.lpvscr = next + page.lbbaplr = 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 *ListP2SVpnServerConfigurationsResultPage) Next() error { +func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool { - return !page.lpvscr.IsEmpty() +func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { + return !page.lbbaplr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult { - return page.lpvscr +func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { + return page.lbbaplr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration { - if page.lpvscr.IsEmpty() { +func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { + if page.lbbaplr.IsEmpty() { return nil } - return *page.lpvscr.Value + return *page.lbbaplr.Value } -// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type. -func NewListP2SVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage { - return ListP2SVpnServerConfigurationsResultPage{fn: getNextPage} +// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. +func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { + return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage} } -// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a -// URL nextLink to get the next set of results. -type ListVirtualHubsResult struct { +// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. +type LoadBalancerFrontendIPConfigurationListResult struct { autorest.Response `json:"-"` - // Value - List of VirtualHubs. - Value *[]VirtualHub `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of frontend IP configurations in a load balancer. + Value *[]FrontendIPConfiguration `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values. -type ListVirtualHubsResultIterator struct { +// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of +// FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultIterator struct { i int - page ListVirtualHubsResultPage + page LoadBalancerFrontendIPConfigurationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14541,62 +17423,62 @@ func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVirtualHubsResultIterator) Next() error { +func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVirtualHubsResultIterator) NotDone() bool { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVirtualHubsResultIterator) Value() VirtualHub { +func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { if !iter.page.NotDone() { - return VirtualHub{} + return FrontendIPConfiguration{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVirtualHubsResultIterator type. -func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator { - return ListVirtualHubsResultIterator{page: page} +// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type. +func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator { + return LoadBalancerFrontendIPConfigurationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvhr ListVirtualHubsResult) IsEmpty() bool { - return lvhr.Value == nil || len(*lvhr.Value) == 0 +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { + return lbficlr.Value == nil || len(*lbficlr.Value) == 0 } -// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 { +func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { + if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvhr.NextLink))) + autorest.WithBaseURL(to.String(lbficlr.NextLink))) } -// ListVirtualHubsResultPage contains a page of VirtualHub values. -type ListVirtualHubsResultPage struct { - fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error) - lvhr ListVirtualHubsResult +// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. +type LoadBalancerFrontendIPConfigurationListResultPage struct { + fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) + lbficlr LoadBalancerFrontendIPConfigurationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -14605,65 +17487,64 @@ func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvhr) + next, err := page.fn(ctx, page.lbficlr) if err != nil { return err } - page.lvhr = next + page.lbficlr = 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 *ListVirtualHubsResultPage) Next() error { +func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVirtualHubsResultPage) NotDone() bool { - return !page.lvhr.IsEmpty() +func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { + return !page.lbficlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult { - return page.lvhr +func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { + return page.lbficlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVirtualHubsResultPage) Values() []VirtualHub { - if page.lvhr.IsEmpty() { +func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { + if page.lbficlr.IsEmpty() { return nil } - return *page.lvhr.Value + return *page.lbficlr.Value } -// Creates a new instance of the ListVirtualHubsResultPage type. -func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage { - return ListVirtualHubsResultPage{fn: getNextPage} +// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. +func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { + return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage} } -// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a -// URL nextLink to get the next set of results. -type ListVirtualWANsResult struct { +// LoadBalancerListResult response for ListLoadBalancers API service call. +type LoadBalancerListResult struct { autorest.Response `json:"-"` - // Value - List of VirtualWANs. - Value *[]VirtualWAN `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of load balancers in a resource group. + Value *[]LoadBalancer `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values. -type ListVirtualWANsResultIterator struct { +// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. +type LoadBalancerListResultIterator struct { i int - page ListVirtualWANsResultPage + page LoadBalancerListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14688,62 +17569,62 @@ func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVirtualWANsResultIterator) Next() error { +func (iter *LoadBalancerListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVirtualWANsResultIterator) NotDone() bool { +func (iter LoadBalancerListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult { +func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVirtualWANsResultIterator) Value() VirtualWAN { +func (iter LoadBalancerListResultIterator) Value() LoadBalancer { if !iter.page.NotDone() { - return VirtualWAN{} + return LoadBalancer{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVirtualWANsResultIterator type. -func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator { - return ListVirtualWANsResultIterator{page: page} +// Creates a new instance of the LoadBalancerListResultIterator type. +func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { + return LoadBalancerListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvwnr ListVirtualWANsResult) IsEmpty() bool { - return lvwnr.Value == nil || len(*lvwnr.Value) == 0 +func (lblr LoadBalancerListResult) IsEmpty() bool { + return lblr.Value == nil || len(*lblr.Value) == 0 } -// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 { +func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { + if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvwnr.NextLink))) + autorest.WithBaseURL(to.String(lblr.NextLink))) } -// ListVirtualWANsResultPage contains a page of VirtualWAN values. -type ListVirtualWANsResultPage struct { - fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error) - lvwnr ListVirtualWANsResult +// LoadBalancerListResultPage contains a page of LoadBalancer values. +type LoadBalancerListResultPage struct { + fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) + lblr LoadBalancerListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -14752,65 +17633,65 @@ func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvwnr) + next, err := page.fn(ctx, page.lblr) if err != nil { return err } - page.lvwnr = next + page.lblr = 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 *ListVirtualWANsResultPage) Next() error { +func (page *LoadBalancerListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVirtualWANsResultPage) NotDone() bool { - return !page.lvwnr.IsEmpty() +func (page LoadBalancerListResultPage) NotDone() bool { + return !page.lblr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult { - return page.lvwnr +func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { + return page.lblr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVirtualWANsResultPage) Values() []VirtualWAN { - if page.lvwnr.IsEmpty() { +func (page LoadBalancerListResultPage) Values() []LoadBalancer { + if page.lblr.IsEmpty() { return nil } - return *page.lvwnr.Value + return *page.lblr.Value } -// Creates a new instance of the ListVirtualWANsResultPage type. -func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage { - return ListVirtualWANsResultPage{fn: getNextPage} +// Creates a new instance of the LoadBalancerListResultPage type. +func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { + return LoadBalancerListResultPage{fn: getNextPage} } -// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. -// It contains a list of Vpn Connections and a URL nextLink to get the next set of results. -type ListVpnConnectionsResult struct { +// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. +type LoadBalancerLoadBalancingRuleListResult struct { autorest.Response `json:"-"` - // Value - List of Vpn Connections. - Value *[]VpnConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of load balancing rules in a load balancer. + Value *[]LoadBalancingRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values. -type ListVpnConnectionsResultIterator struct { +// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of +// LoadBalancingRule values. +type LoadBalancerLoadBalancingRuleListResultIterator struct { i int - page ListVpnConnectionsResultPage + page LoadBalancerLoadBalancingRuleListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14835,62 +17716,62 @@ func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Contex // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVpnConnectionsResultIterator) Next() error { +func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnConnectionsResultIterator) NotDone() bool { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVpnConnectionsResultIterator) Value() VpnConnection { +func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { if !iter.page.NotDone() { - return VpnConnection{} + return LoadBalancingRule{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVpnConnectionsResultIterator type. -func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator { - return ListVpnConnectionsResultIterator{page: page} +// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type. +func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator { + return LoadBalancerLoadBalancingRuleListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvcr ListVpnConnectionsResult) IsEmpty() bool { - return lvcr.Value == nil || len(*lvcr.Value) == 0 +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { + return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 } -// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) { - if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 { +func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvcr.NextLink))) + autorest.WithBaseURL(to.String(lblbrlr.NextLink))) } -// ListVpnConnectionsResultPage contains a page of VpnConnection values. -type ListVpnConnectionsResultPage struct { - fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error) - lvcr ListVpnConnectionsResult +// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. +type LoadBalancerLoadBalancingRuleListResultPage struct { + fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) + lblbrlr LoadBalancerLoadBalancingRuleListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -14899,65 +17780,64 @@ func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) ( tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvcr) + next, err := page.fn(ctx, page.lblbrlr) if err != nil { return err } - page.lvcr = next + page.lblbrlr = 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 *ListVpnConnectionsResultPage) Next() error { +func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnConnectionsResultPage) NotDone() bool { - return !page.lvcr.IsEmpty() +func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { + return !page.lblbrlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult { - return page.lvcr +func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { + return page.lblbrlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnConnectionsResultPage) Values() []VpnConnection { - if page.lvcr.IsEmpty() { +func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { + if page.lblbrlr.IsEmpty() { return nil } - return *page.lvcr.Value + return *page.lblbrlr.Value } -// Creates a new instance of the ListVpnConnectionsResultPage type. -func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage { - return ListVpnConnectionsResultPage{fn: getNextPage} +// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. +func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { + return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage} } -// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a -// URL nextLink to get the next set of results. -type ListVpnGatewaysResult struct { +// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call. +type LoadBalancerOutboundRuleListResult struct { autorest.Response `json:"-"` - // Value - List of VpnGateways. - Value *[]VpnGateway `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of outbound rules in a load balancer. + Value *[]OutboundRule `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values. -type ListVpnGatewaysResultIterator struct { +// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values. +type LoadBalancerOutboundRuleListResultIterator struct { i int - page ListVpnGatewaysResultPage + page LoadBalancerOutboundRuleListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -14982,62 +17862,62 @@ func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVpnGatewaysResultIterator) Next() error { +func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnGatewaysResultIterator) NotDone() bool { +func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult { +func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVpnGatewaysResultIterator) Value() VpnGateway { +func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule { if !iter.page.NotDone() { - return VpnGateway{} + return OutboundRule{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVpnGatewaysResultIterator type. -func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator { - return ListVpnGatewaysResultIterator{page: page} +// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type. +func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator { + return LoadBalancerOutboundRuleListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvgr ListVpnGatewaysResult) IsEmpty() bool { - return lvgr.Value == nil || len(*lvgr.Value) == 0 +func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool { + return lborlr.Value == nil || len(*lborlr.Value) == 0 } -// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) { - if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 { +func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) { + if lborlr.NextLink == nil || len(to.String(lborlr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvgr.NextLink))) + autorest.WithBaseURL(to.String(lborlr.NextLink))) } -// ListVpnGatewaysResultPage contains a page of VpnGateway values. -type ListVpnGatewaysResultPage struct { - fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error) - lvgr ListVpnGatewaysResult +// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values. +type LoadBalancerOutboundRuleListResultPage struct { + fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error) + lborlr LoadBalancerOutboundRuleListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -15046,65 +17926,64 @@ func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvgr) + next, err := page.fn(ctx, page.lborlr) if err != nil { return err } - page.lvgr = next + page.lborlr = 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 *ListVpnGatewaysResultPage) Next() error { +func (page *LoadBalancerOutboundRuleListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnGatewaysResultPage) NotDone() bool { - return !page.lvgr.IsEmpty() +func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool { + return !page.lborlr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult { - return page.lvgr +func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult { + return page.lborlr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnGatewaysResultPage) Values() []VpnGateway { - if page.lvgr.IsEmpty() { +func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule { + if page.lborlr.IsEmpty() { return nil } - return *page.lvgr.Value + return *page.lborlr.Value } -// Creates a new instance of the ListVpnGatewaysResultPage type. -func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage { - return ListVpnGatewaysResultPage{fn: getNextPage} +// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type. +func NewLoadBalancerOutboundRuleListResultPage(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { + return LoadBalancerOutboundRuleListResultPage{fn: getNextPage} } -// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL -// nextLink to get the next set of results. -type ListVpnSitesResult struct { +// LoadBalancerProbeListResult response for ListProbe API service call. +type LoadBalancerProbeListResult struct { autorest.Response `json:"-"` - // Value - List of VpnSites. - Value *[]VpnSite `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. + // Value - A list of probes in a load balancer. + Value *[]Probe `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values. -type ListVpnSitesResultIterator struct { +// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. +type LoadBalancerProbeListResultIterator struct { i int - page ListVpnSitesResultPage + page LoadBalancerProbeListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -15129,62 +18008,62 @@ func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (er // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVpnSitesResultIterator) Next() error { +func (iter *LoadBalancerProbeListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVpnSitesResultIterator) NotDone() bool { +func (iter LoadBalancerProbeListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult { +func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVpnSitesResultIterator) Value() VpnSite { +func (iter LoadBalancerProbeListResultIterator) Value() Probe { if !iter.page.NotDone() { - return VpnSite{} + return Probe{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVpnSitesResultIterator type. -func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator { - return ListVpnSitesResultIterator{page: page} +// Creates a new instance of the LoadBalancerProbeListResultIterator type. +func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator { + return LoadBalancerProbeListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvsr ListVpnSitesResult) IsEmpty() bool { - return lvsr.Value == nil || len(*lvsr.Value) == 0 +func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { + return lbplr.Value == nil || len(*lbplr.Value) == 0 } -// listVpnSitesResultPreparer prepares a request to retrieve the next set of results. +// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) { - if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 { +func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) { + if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvsr.NextLink))) + autorest.WithBaseURL(to.String(lbplr.NextLink))) } -// ListVpnSitesResultPage contains a page of VpnSite values. -type ListVpnSitesResultPage struct { - fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error) - lvsr ListVpnSitesResult +// LoadBalancerProbeListResultPage contains a page of Probe values. +type LoadBalancerProbeListResultPage struct { + fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) + lbplr LoadBalancerProbeListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -15193,51 +18072,279 @@ func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lvsr) + next, err := page.fn(ctx, page.lbplr) if err != nil { return err } - page.lvsr = next + page.lbplr = 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 *ListVpnSitesResultPage) Next() error { +func (page *LoadBalancerProbeListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVpnSitesResultPage) NotDone() bool { - return !page.lvsr.IsEmpty() +func (page LoadBalancerProbeListResultPage) NotDone() bool { + return !page.lbplr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVpnSitesResultPage) Response() ListVpnSitesResult { - return page.lvsr +func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { + return page.lbplr } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVpnSitesResultPage) Values() []VpnSite { - if page.lvsr.IsEmpty() { +func (page LoadBalancerProbeListResultPage) Values() []Probe { + if page.lbplr.IsEmpty() { return nil } - return *page.lvsr.Value + return *page.lbplr.Value +} + +// Creates a new instance of the LoadBalancerProbeListResultPage type. +func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { + return LoadBalancerProbeListResultPage{fn: getNextPage} +} + +// LoadBalancerPropertiesFormat properties of the load balancer. +type LoadBalancerPropertiesFormat struct { + // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer. + FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPools - Collection of backend address pools used by a load balancer. + BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` + // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning. + LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` + // Probes - Collection of probe objects used in the load balancer. + Probes *[]Probe `json:"probes,omitempty"` + // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` + // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` + // OutboundRules - The outbound rules. + OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` + // ResourceGUID - The resource GUID property of the load balancer resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LoadBalancersCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.CreateOrUpdateResponder(lb.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") + } + } + return +} + +// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type LoadBalancersDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// LoadBalancerSku SKU of a load balancer. +type LoadBalancerSku struct { + // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' + Name LoadBalancerSkuName `json:"name,omitempty"` +} + +// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type LoadBalancersUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { + lb, err = client.UpdateTagsResponder(lb.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") + } + } + return +} + +// LoadBalancingRule a load balancing rule for a load balancer. +type LoadBalancingRule struct { + autorest.Response `json:"-"` + // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. + *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancingRule. +func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbr.LoadBalancingRulePropertiesFormat != nil { + objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat + } + if lbr.Name != nil { + objectMap["name"] = lbr.Name + } + if lbr.Etag != nil { + objectMap["etag"] = lbr.Etag + } + if lbr.ID != nil { + objectMap["id"] = lbr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. +func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat + err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) + if err != nil { + return err + } + lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + lbr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + lbr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + lbr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lbr.ID = &ID + } + } + } + + return nil } -// Creates a new instance of the ListVpnSitesResultPage type. -func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage { - return ListVpnSitesResultPage{fn: getNextPage} +// LoadBalancingRulePropertiesFormat properties of the load balancer. +type LoadBalancingRulePropertiesFormat struct { + // FrontendIPConfiguration - A reference to frontend IP addresses. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // Probe - The reference of the load balancer probe used by the load balancing rule. + Probe *SubResource `json:"probe,omitempty"` + // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol' + LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` + // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port". + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port". + BackendPort *int32 `json:"backendPort,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. + EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. + DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancer loadBalancer resource -type LoadBalancer struct { +// LocalNetworkGateway a common class for general resource information. +type LocalNetworkGateway struct { autorest.Response `json:"-"` - // Sku - The load balancer SKU. - Sku *LoadBalancerSku `json:"sku,omitempty"` - // LoadBalancerPropertiesFormat - Properties of load balancer. - *LoadBalancerPropertiesFormat `json:"properties,omitempty"` + // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. + *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. @@ -15252,32 +18359,29 @@ type LoadBalancer struct { Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for LoadBalancer. -func (lb LoadBalancer) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for LocalNetworkGateway. +func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if lb.Sku != nil { - objectMap["sku"] = lb.Sku - } - if lb.LoadBalancerPropertiesFormat != nil { - objectMap["properties"] = lb.LoadBalancerPropertiesFormat + if lng.LocalNetworkGatewayPropertiesFormat != nil { + objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat } - if lb.Etag != nil { - objectMap["etag"] = lb.Etag + if lng.Etag != nil { + objectMap["etag"] = lng.Etag } - if lb.ID != nil { - objectMap["id"] = lb.ID + if lng.ID != nil { + objectMap["id"] = lng.ID } - if lb.Location != nil { - objectMap["location"] = lb.Location + if lng.Location != nil { + objectMap["location"] = lng.Location } - if lb.Tags != nil { - objectMap["tags"] = lb.Tags + if lng.Tags != nil { + objectMap["tags"] = lng.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct. -func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. +func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -15285,23 +18389,14 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "sku": - if v != nil { - var sku LoadBalancerSku - err = json.Unmarshal(*v, &sku) - if err != nil { - return err - } - lb.Sku = &sku - } case "properties": if v != nil { - var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat - err = json.Unmarshal(*v, &loadBalancerPropertiesFormat) + var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) if err != nil { return err } - lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat + lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat } case "etag": if v != nil { @@ -15310,7 +18405,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.Etag = &etag + lng.Etag = &etag } case "id": if v != nil { @@ -15319,7 +18414,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.ID = &ID + lng.ID = &ID } case "name": if v != nil { @@ -15328,7 +18423,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.Name = &name + lng.Name = &name } case "type": if v != nil { @@ -15337,7 +18432,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.Type = &typeVar + lng.Type = &typeVar } case "location": if v != nil { @@ -15346,7 +18441,7 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { if err != nil { return err } - lb.Location = &location + lng.Location = &location } case "tags": if v != nil { @@ -15354,183 +18449,36 @@ func (lb *LoadBalancer) UnmarshalJSON(body []byte) error { err = json.Unmarshal(*v, &tags) if err != nil { return err - } - lb.Tags = tags - } - } - } - - return nil -} - -// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call. -type LoadBalancerBackendAddressPoolListResult struct { - autorest.Response `json:"-"` - // Value - A list of backend address pools in a load balancer. - Value *[]BackendAddressPool `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of -// BackendAddressPool values. -type LoadBalancerBackendAddressPoolListResultIterator struct { - i int - page LoadBalancerBackendAddressPoolListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool { - if !iter.page.NotDone() { - return BackendAddressPool{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type. -func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator { - return LoadBalancerBackendAddressPoolListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool { - return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0 -} - -// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbbaplr.NextLink))) -} - -// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values. -type LoadBalancerBackendAddressPoolListResultPage struct { - fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error) - lbbaplr LoadBalancerBackendAddressPoolListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.lbbaplr) - if err != nil { - return err - } - page.lbbaplr = 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 *LoadBalancerBackendAddressPoolListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool { - return !page.lbbaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult { - return page.lbbaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool { - if page.lbbaplr.IsEmpty() { - return nil + } + lng.Tags = tags + } + } } - return *page.lbbaplr.Value -} -// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type. -func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage { - return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage} + return nil } -// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call. -type LoadBalancerFrontendIPConfigurationListResult struct { +// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. +type LocalNetworkGatewayListResult struct { autorest.Response `json:"-"` - // Value - A list of frontend IP configurations in a load balancer. - Value *[]FrontendIPConfiguration `json:"value,omitempty"` + // Value - A list of local network gateways that exists in a resource group. + Value *[]LocalNetworkGateway `json:"value,omitempty"` // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of -// FrontendIPConfiguration values. -type LoadBalancerFrontendIPConfigurationListResultIterator struct { +// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway +// values. +type LocalNetworkGatewayListResultIterator struct { i int - page LoadBalancerFrontendIPConfigurationListResultPage + page LocalNetworkGatewayListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -15555,62 +18503,62 @@ func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithConte // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error { +func (iter *LocalNetworkGatewayListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool { +func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult { +func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration { +func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { if !iter.page.NotDone() { - return FrontendIPConfiguration{} + return LocalNetworkGateway{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type. -func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator { - return LoadBalancerFrontendIPConfigurationListResultIterator{page: page} +// Creates a new instance of the LocalNetworkGatewayListResultIterator type. +func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { + return LocalNetworkGatewayListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool { - return lbficlr.Value == nil || len(*lbficlr.Value) == 0 +func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { + return lnglr.Value == nil || len(*lnglr.Value) == 0 } -// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. +// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 { +func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lbficlr.NextLink))) + autorest.WithBaseURL(to.String(lnglr.NextLink))) } -// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values. -type LoadBalancerFrontendIPConfigurationListResultPage struct { - fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error) - lbficlr LoadBalancerFrontendIPConfigurationListResult +// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. +type LocalNetworkGatewayListResultPage struct { + fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) + lnglr LocalNetworkGatewayListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -15619,64 +18567,409 @@ func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(c tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lbficlr) + next, err := page.fn(ctx, page.lnglr) if err != nil { return err } - page.lbficlr = next + page.lnglr = 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 *LoadBalancerFrontendIPConfigurationListResultPage) Next() error { +func (page *LocalNetworkGatewayListResultPage) Next() error { return page.NextWithContext(context.Background()) } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool { - return !page.lbficlr.IsEmpty() +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page LocalNetworkGatewayListResultPage) NotDone() bool { + return !page.lnglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { + return page.lnglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { + if page.lnglr.IsEmpty() { + return nil + } + return *page.lnglr.Value +} + +// Creates a new instance of the LocalNetworkGatewayListResultPage type. +func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { + return LocalNetworkGatewayListResultPage{fn: getNextPage} +} + +// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties. +type LocalNetworkGatewayPropertiesFormat struct { + // LocalNetworkAddressSpace - Local network site address space. + LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` + // GatewayIPAddress - IP address of local network gateway. + GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` + // BgpSettings - Local network gateway's BGP speaker settings. + BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.CreateOrUpdateResponder(lng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") + } + } + return +} + +// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LocalNetworkGatewaysUpdateTagsFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { + lng, err = client.UpdateTagsResponder(lng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") + } + } + return +} + +// LogSpecification description of logging specification. +type LogSpecification struct { + // Name - The name of the specification. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the specification. + DisplayName *string `json:"displayName,omitempty"` + // BlobDuration - Duration of the blob. + BlobDuration *string `json:"blobDuration,omitempty"` +} + +// ManagedServiceIdentity identity for the resource. +type ManagedServiceIdentity struct { + // PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty"` + // Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone' + Type ResourceIdentityType `json:"type,omitempty"` + // UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"` +} + +// MarshalJSON is the custom marshaler for ManagedServiceIdentity. +func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if msi.Type != "" { + objectMap["type"] = msi.Type + } + if msi.UserAssignedIdentities != nil { + objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities + } + return json.Marshal(objectMap) +} + +// ManagedServiceIdentityUserAssignedIdentitiesValue ... +type ManagedServiceIdentityUserAssignedIdentitiesValue struct { + // PrincipalID - READ-ONLY; The principal id of user assigned identity. + PrincipalID *string `json:"principalId,omitempty"` + // ClientID - READ-ONLY; The client id of user assigned identity. + ClientID *string `json:"clientId,omitempty"` +} + +// MatchCondition define match conditions. +type MatchCondition struct { + // MatchVariables - List of match variables. + MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"` + // Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex' + Operator WebApplicationFirewallOperator `json:"operator,omitempty"` + // NegationConditon - Describes if this is negate condition or not. + NegationConditon *bool `json:"negationConditon,omitempty"` + // MatchValues - Match value. + MatchValues *[]string `json:"matchValues,omitempty"` + // Transforms - List of transforms. + Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"` +} + +// MatchedRule matched rule. +type MatchedRule struct { + // RuleName - Name of the matched network security rule. + RuleName *string `json:"ruleName,omitempty"` + // Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + Action *string `json:"action,omitempty"` +} + +// MatchVariable define match variables. +type MatchVariable struct { + // VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies' + VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"` + // Selector - Describes field of the matchVariable collection. + Selector *string `json:"selector,omitempty"` +} + +// MetricSpecification description of metrics specification. +type MetricSpecification struct { + // Name - The name of the metric. + Name *string `json:"name,omitempty"` + // DisplayName - The display name of the metric. + DisplayName *string `json:"displayName,omitempty"` + // DisplayDescription - The description of the metric. + DisplayDescription *string `json:"displayDescription,omitempty"` + // Unit - Units the metric to be displayed in. + Unit *string `json:"unit,omitempty"` + // AggregationType - The aggregation type. + AggregationType *string `json:"aggregationType,omitempty"` + // Availabilities - List of availability. + Availabilities *[]Availability `json:"availabilities,omitempty"` + // EnableRegionalMdmAccount - Whether regional MDM account enabled. + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + // FillGapWithZero - Whether gaps would be filled with zeros. + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + // MetricFilterPattern - Pattern for the filter of the metric. + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + // Dimensions - List of dimensions. + Dimensions *[]Dimension `json:"dimensions,omitempty"` + // IsInternal - Whether the metric is internal. + IsInternal *bool `json:"isInternal,omitempty"` + // SourceMdmAccount - The source MDM account. + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + // SourceMdmNamespace - The source MDM namespace. + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + // ResourceIDDimensionNameOverride - The resource Id dimension name override. + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +} + +// NatGateway nat Gateway resource. +type NatGateway struct { + autorest.Response `json:"-"` + // Sku - The nat gateway SKU. + Sku *NatGatewaySku `json:"sku,omitempty"` + // NatGatewayPropertiesFormat - Nat Gateway properties. + *NatGatewayPropertiesFormat `json:"properties,omitempty"` + // Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed. + Zones *[]string `json:"zones,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Response returns the raw server response from the last page request. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult { - return page.lbficlr +// MarshalJSON is the custom marshaler for NatGateway. +func (ng NatGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ng.Sku != nil { + objectMap["sku"] = ng.Sku + } + if ng.NatGatewayPropertiesFormat != nil { + objectMap["properties"] = ng.NatGatewayPropertiesFormat + } + if ng.Zones != nil { + objectMap["zones"] = ng.Zones + } + if ng.Etag != nil { + objectMap["etag"] = ng.Etag + } + if ng.ID != nil { + objectMap["id"] = ng.ID + } + if ng.Location != nil { + objectMap["location"] = ng.Location + } + if ng.Tags != nil { + objectMap["tags"] = ng.Tags + } + return json.Marshal(objectMap) } -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration { - if page.lbficlr.IsEmpty() { - return nil +// UnmarshalJSON is the custom unmarshaler for NatGateway struct. +func (ng *NatGateway) UnmarshalJSON(body []byte) error { + 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 NatGatewaySku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + ng.Sku = &sku + } + case "properties": + if v != nil { + var natGatewayPropertiesFormat NatGatewayPropertiesFormat + err = json.Unmarshal(*v, &natGatewayPropertiesFormat) + if err != nil { + return err + } + ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + ng.Zones = &zones + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ng.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ng.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ng.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ng.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + ng.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + ng.Tags = tags + } + } } - return *page.lbficlr.Value -} -// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type. -func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage { - return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage} + return nil } -// LoadBalancerListResult response for ListLoadBalancers API service call. -type LoadBalancerListResult struct { +// NatGatewayListResult response for ListNatGateways API service call. +type NatGatewayListResult struct { autorest.Response `json:"-"` - // Value - A list of load balancers in a resource group. - Value *[]LoadBalancer `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - A list of Nat Gateways that exists in a resource group. + Value *[]NatGateway `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values. -type LoadBalancerListResultIterator struct { +// NatGatewayListResultIterator provides access to a complete listing of NatGateway values. +type NatGatewayListResultIterator struct { i int - page LoadBalancerListResultPage + page NatGatewayListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -15701,62 +18994,62 @@ func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerListResultIterator) Next() error { +func (iter *NatGatewayListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerListResultIterator) NotDone() bool { +func (iter NatGatewayListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult { +func (iter NatGatewayListResultIterator) Response() NatGatewayListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter LoadBalancerListResultIterator) Value() LoadBalancer { +func (iter NatGatewayListResultIterator) Value() NatGateway { if !iter.page.NotDone() { - return LoadBalancer{} + return NatGateway{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the LoadBalancerListResultIterator type. -func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator { - return LoadBalancerListResultIterator{page: page} +// Creates a new instance of the NatGatewayListResultIterator type. +func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator { + return NatGatewayListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lblr LoadBalancerListResult) IsEmpty() bool { - return lblr.Value == nil || len(*lblr.Value) == 0 +func (nglr NatGatewayListResult) IsEmpty() bool { + return nglr.Value == nil || len(*nglr.Value) == 0 } -// loadBalancerListResultPreparer prepares a request to retrieve the next set of results. +// natGatewayListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) { - if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 { +func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { + if nglr.NextLink == nil || len(to.String(nglr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lblr.NextLink))) + autorest.WithBaseURL(to.String(nglr.NextLink))) } -// LoadBalancerListResultPage contains a page of LoadBalancer values. -type LoadBalancerListResultPage struct { - fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error) - lblr LoadBalancerListResult +// NatGatewayListResultPage contains a page of NatGateway values. +type NatGatewayListResultPage struct { + fn func(context.Context, NatGatewayListResult) (NatGatewayListResult, error) + nglr NatGatewayListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -15765,211 +19058,255 @@ func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lblr) + next, err := page.fn(ctx, page.nglr) if err != nil { return err } - page.lblr = next + page.nglr = 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 *LoadBalancerListResultPage) Next() error { +func (page *NatGatewayListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerListResultPage) NotDone() bool { - return !page.lblr.IsEmpty() +func (page NatGatewayListResultPage) NotDone() bool { + return !page.nglr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerListResultPage) Response() LoadBalancerListResult { - return page.lblr +func (page NatGatewayListResultPage) Response() NatGatewayListResult { + return page.nglr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerListResultPage) Values() []LoadBalancer { - if page.lblr.IsEmpty() { +func (page NatGatewayListResultPage) Values() []NatGateway { + if page.nglr.IsEmpty() { return nil } - return *page.lblr.Value + return *page.nglr.Value } -// Creates a new instance of the LoadBalancerListResultPage type. -func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage { - return LoadBalancerListResultPage{fn: getNextPage} +// Creates a new instance of the NatGatewayListResultPage type. +func NewNatGatewayListResultPage(getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage { + return NatGatewayListResultPage{fn: getNextPage} } -// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call. -type LoadBalancerLoadBalancingRuleListResult struct { - autorest.Response `json:"-"` - // Value - A list of load balancing rules in a load balancer. - Value *[]LoadBalancingRule `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// NatGatewayPropertiesFormat nat Gateway properties. +type NatGatewayPropertiesFormat struct { + // IdleTimeoutInMinutes - The idle timeout of the nat gateway. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + // PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource. + PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` + // PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource. + PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` + // Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource. + Subnets *[]SubResource `json:"subnets,omitempty"` + // ResourceGUID - The resource GUID property of the nat gateway resource. + ResourceGUID *string `json:"resourceGuid,omitempty"` + // ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of -// LoadBalancingRule values. -type LoadBalancerLoadBalancingRuleListResultIterator struct { - i int - page LoadBalancerLoadBalancingRuleListResultPage +// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type NatGatewaysCreateOrUpdateFuture struct { + azure.Future } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *NatGatewaysCreateOrUpdateFuture) Result(client NatGatewaysClient) (ng NatGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - iter.i-- - return err + err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule { - if !iter.page.NotDone() { - return LoadBalancingRule{} + if !done { + err = azure.NewAsyncOpIncompleteError("network.NatGatewaysCreateOrUpdateFuture") + return } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type. -func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator { - return LoadBalancerLoadBalancingRuleListResultIterator{page: page} + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ng.Response.Response, err = future.GetResult(sender); err == nil && ng.Response.Response.StatusCode != http.StatusNoContent { + ng, err = client.CreateOrUpdateResponder(ng.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysCreateOrUpdateFuture", "Result", ng.Response.Response, "Failure responding to request") + } + } + return } -// IsEmpty returns true if the ListResult contains no values. -func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool { - return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0 +// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type NatGatewaysDeleteFuture struct { + azure.Future } -// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 { - return nil, nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *NatGatewaysDeleteFuture) Result(client NatGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lblbrlr.NextLink))) + if !done { + err = azure.NewAsyncOpIncompleteError("network.NatGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return } -// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values. -type LoadBalancerLoadBalancingRuleListResultPage struct { - fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error) - lblbrlr LoadBalancerLoadBalancingRuleListResult +// NatGatewaySku SKU of nat gateway. +type NatGatewaySku struct { + // Name - Name of Nat Gateway SKU. Possible values include: 'Standard' + Name NatGatewaySkuName `json:"name,omitempty"` } -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.lblbrlr) - if err != nil { - return err - } - page.lblbrlr = next - return nil +// NextHopParameters parameters that define the source and destination endpoint. +type NextHopParameters struct { + // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. + TargetResourceID *string `json:"targetResourceId,omitempty"` + // SourceIPAddress - The source IP address. + SourceIPAddress *string `json:"sourceIPAddress,omitempty"` + // DestinationIPAddress - The destination IP address. + DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` + // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). + TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error { - return page.NextWithContext(context.Background()) +// NextHopResult the information about next hop from the specified VM. +type NextHopResult struct { + autorest.Response `json:"-"` + // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' + NextHopType NextHopType `json:"nextHopType,omitempty"` + // NextHopIPAddress - Next hop IP Address. + NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` + // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. + RouteTableID *string `json:"routeTableId,omitempty"` } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool { - return !page.lblbrlr.IsEmpty() +// Operation network REST API operation definition. +type Operation struct { + // Name - Operation name: {provider}/{resource}/{operation}. + Name *string `json:"name,omitempty"` + // Display - Display metadata associated with the operation. + Display *OperationDisplay `json:"display,omitempty"` + // Origin - Origin of the operation. + Origin *string `json:"origin,omitempty"` + // OperationPropertiesFormat - Operation properties format. + *OperationPropertiesFormat `json:"properties,omitempty"` } -// Response returns the raw server response from the last page request. -func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult { - return page.lblbrlr +// MarshalJSON is the custom marshaler for Operation. +func (o Operation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if o.Name != nil { + objectMap["name"] = o.Name + } + if o.Display != nil { + objectMap["display"] = o.Display + } + if o.Origin != nil { + objectMap["origin"] = o.Origin + } + if o.OperationPropertiesFormat != nil { + objectMap["properties"] = o.OperationPropertiesFormat + } + return json.Marshal(objectMap) } -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule { - if page.lblbrlr.IsEmpty() { - return nil +// UnmarshalJSON is the custom unmarshaler for Operation struct. +func (o *Operation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - return *page.lblbrlr.Value + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + o.Name = &name + } + case "display": + if v != nil { + var display OperationDisplay + err = json.Unmarshal(*v, &display) + if err != nil { + return err + } + o.Display = &display + } + case "origin": + if v != nil { + var origin string + err = json.Unmarshal(*v, &origin) + if err != nil { + return err + } + o.Origin = &origin + } + case "properties": + if v != nil { + var operationPropertiesFormat OperationPropertiesFormat + err = json.Unmarshal(*v, &operationPropertiesFormat) + if err != nil { + return err + } + o.OperationPropertiesFormat = &operationPropertiesFormat + } + } + } + + return nil } -// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type. -func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage { - return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage} +// OperationDisplay display metadata associated with the operation. +type OperationDisplay struct { + // Provider - Service provider: Microsoft Network. + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed. + Resource *string `json:"resource,omitempty"` + // Operation - Type of the operation: get, read, delete, etc. + Operation *string `json:"operation,omitempty"` + // Description - Description of the operation. + Description *string `json:"description,omitempty"` } -// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call. -type LoadBalancerOutboundRuleListResult struct { +// OperationListResult result of the request to list Network operations. It contains a list of operations +// and a URL link to get the next set of results. +type OperationListResult struct { autorest.Response `json:"-"` - // Value - A list of outbound rules in a load balancer. - Value *[]OutboundRule `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. + // Value - List of Network operations supported by the Network resource provider. + Value *[]Operation `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values. -type LoadBalancerOutboundRuleListResultIterator struct { +// OperationListResultIterator provides access to a complete listing of Operation values. +type OperationListResultIterator struct { i int - page LoadBalancerOutboundRuleListResultPage + page OperationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -15994,62 +19331,62 @@ func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error { +func (iter *OperationListResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool { +func (iter OperationListResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult { +func (iter OperationListResultIterator) Response() OperationListResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule { +func (iter OperationListResultIterator) Value() Operation { if !iter.page.NotDone() { - return OutboundRule{} + return Operation{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type. -func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator { - return LoadBalancerOutboundRuleListResultIterator{page: page} +// Creates a new instance of the OperationListResultIterator type. +func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { + return OperationListResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool { - return lborlr.Value == nil || len(*lborlr.Value) == 0 +func (olr OperationListResult) IsEmpty() bool { + return olr.Value == nil || len(*olr.Value) == 0 } -// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results. +// operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) { - if lborlr.NextLink == nil || len(to.String(lborlr.NextLink)) < 1 { +func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { + if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lborlr.NextLink))) + autorest.WithBaseURL(to.String(olr.NextLink))) } -// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values. -type LoadBalancerOutboundRuleListResultPage struct { - fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error) - lborlr LoadBalancerOutboundRuleListResult +// OperationListResultPage contains a page of Operation values. +type OperationListResultPage struct { + fn func(context.Context, OperationListResult) (OperationListResult, error) + olr OperationListResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) { +func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -16058,332 +19395,659 @@ func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context. tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.lborlr) + next, err := page.fn(ctx, page.olr) if err != nil { return err } - page.lborlr = next + page.olr = 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 *LoadBalancerOutboundRuleListResultPage) Next() error { +func (page *OperationListResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool { - return !page.lborlr.IsEmpty() +func (page OperationListResultPage) NotDone() bool { + return !page.olr.IsEmpty() } // Response returns the raw server response from the last page request. -func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult { - return page.lborlr +func (page OperationListResultPage) Response() OperationListResult { + return page.olr } // Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule { - if page.lborlr.IsEmpty() { +func (page OperationListResultPage) Values() []Operation { + if page.olr.IsEmpty() { return nil } - return *page.lborlr.Value + return *page.olr.Value } -// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type. -func NewLoadBalancerOutboundRuleListResultPage(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage { - return LoadBalancerOutboundRuleListResultPage{fn: getNextPage} +// Creates a new instance of the OperationListResultPage type. +func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { + return OperationListResultPage{fn: getNextPage} } -// LoadBalancerProbeListResult response for ListProbe API service call. -type LoadBalancerProbeListResult struct { - autorest.Response `json:"-"` - // Value - A list of probes in a load balancer. - Value *[]Probe `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` +// OperationPropertiesFormat description of operation properties format. +type OperationPropertiesFormat struct { + // ServiceSpecification - Specification of the service. + ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// OperationPropertiesFormatServiceSpecification specification of the service. +type OperationPropertiesFormatServiceSpecification struct { + // MetricSpecifications - Operation service specification. + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` + // LogSpecifications - Operation log specification. + LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` } -// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values. -type LoadBalancerProbeListResultIterator struct { - i int - page LoadBalancerProbeListResultPage +// OutboundRule outbound rule of the load balancer. +type OutboundRule struct { + autorest.Response `json:"-"` + // OutboundRulePropertiesFormat - Properties of load balancer outbound rule. + *OutboundRulePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() +// MarshalJSON is the custom marshaler for OutboundRule. +func (or OutboundRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if or.OutboundRulePropertiesFormat != nil { + objectMap["properties"] = or.OutboundRulePropertiesFormat } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil + if or.Name != nil { + objectMap["name"] = or.Name } - err = iter.page.NextWithContext(ctx) + if or.Etag != nil { + objectMap["etag"] = or.Etag + } + if or.ID != nil { + objectMap["id"] = or.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for OutboundRule struct. +func (or *OutboundRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - iter.i-- return err } - iter.i = 0 + for k, v := range m { + switch k { + case "properties": + if v != nil { + var outboundRulePropertiesFormat OutboundRulePropertiesFormat + err = json.Unmarshal(*v, &outboundRulePropertiesFormat) + if err != nil { + return err + } + or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + or.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + or.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + or.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + or.ID = &ID + } + } + } + return nil } -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LoadBalancerProbeListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) +// OutboundRulePropertiesFormat outbound rule of the load balancer. +type OutboundRulePropertiesFormat struct { + // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. + AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` + // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. + FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` + // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll' + Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"` + // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. + EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // IdleTimeoutInMinutes - The timeout for the TCP idle connection. + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` } -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LoadBalancerProbeListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) +// P2SVpnGateway p2SVpnGateway Resource. +type P2SVpnGateway struct { + autorest.Response `json:"-"` + // P2SVpnGatewayProperties - Properties of the P2SVpnGateway. + *P2SVpnGatewayProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// Response returns the raw server response from the last page request. -func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult { - return iter.page.Response() +// MarshalJSON is the custom marshaler for P2SVpnGateway. +func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvg.P2SVpnGatewayProperties != nil { + objectMap["properties"] = pvg.P2SVpnGatewayProperties + } + if pvg.ID != nil { + objectMap["id"] = pvg.ID + } + if pvg.Location != nil { + objectMap["location"] = pvg.Location + } + if pvg.Tags != nil { + objectMap["tags"] = pvg.Tags + } + return json.Marshal(objectMap) } -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LoadBalancerProbeListResultIterator) Value() Probe { - if !iter.page.NotDone() { - return Probe{} +// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct. +func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err } - return iter.page.Values()[iter.i] + for k, v := range m { + switch k { + case "properties": + if v != nil { + var p2SVpnGatewayProperties P2SVpnGatewayProperties + err = json.Unmarshal(*v, &p2SVpnGatewayProperties) + if err != nil { + return err + } + pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pvg.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pvg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pvg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pvg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pvg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pvg.Tags = tags + } + } + } + + return nil } -// Creates a new instance of the LoadBalancerProbeListResultIterator type. -func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator { - return LoadBalancerProbeListResultIterator{page: page} +// P2SVpnGatewayProperties parameters for P2SVpnGateway. +type P2SVpnGatewayProperties struct { + // VirtualHub - The VirtualHub to which the gateway belongs. + VirtualHub *SubResource `json:"virtualHub,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. + VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` + // P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"` + // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. + VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` + // CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient. + CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` + // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. + VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` } -// IsEmpty returns true if the ListResult contains no values. -func (lbplr LoadBalancerProbeListResult) IsEmpty() bool { - return lbplr.Value == nil || len(*lbplr.Value) == 0 +// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysCreateOrUpdateFuture struct { + azure.Future } -// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) { - if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 { - return nil, nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnGatewaysCreateOrUpdateFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lbplr.NextLink))) -} - -// LoadBalancerProbeListResultPage contains a page of Probe values. -type LoadBalancerProbeListResultPage struct { - fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error) - lbplr LoadBalancerProbeListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture") + return } - next, err := page.fn(ctx, page.lbplr) - if err != nil { - return err + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request") + } } - page.lbplr = next - return nil + return } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *LoadBalancerProbeListResultPage) Next() error { - return page.NextWithContext(context.Background()) +// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type P2sVpnGatewaysDeleteFuture struct { + azure.Future } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LoadBalancerProbeListResultPage) NotDone() bool { - return !page.lbplr.IsEmpty() +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnGatewaysDeleteFuture) Result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture") + return + } + ar.Response = future.Response() + return } -// Response returns the raw server response from the last page request. -func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult { - return page.lbplr +// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnGatewaysGenerateVpnProfileFuture struct { + azure.Future } -// Values returns the slice of values for the current page or nil if there are no values. -func (page LoadBalancerProbeListResultPage) Values() []Probe { - if page.lbplr.IsEmpty() { - return nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnGatewaysGenerateVpnProfileFuture) Result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") + return } - return *page.lbplr.Value + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { + vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request") + } + } + return } -// Creates a new instance of the LoadBalancerProbeListResultPage type. -func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage { - return LoadBalancerProbeListResultPage{fn: getNextPage} +// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct { + azure.Future } -// LoadBalancerPropertiesFormat properties of the load balancer. -type LoadBalancerPropertiesFormat struct { - // FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPools - Collection of backend address pools used by a load balancer - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - // LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - // Probes - Collection of probe objects used in the load balancer - Probes *[]Probe `json:"probes,omitempty"` - // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - // OutboundRules - The outbound rules. - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - // ResourceGUID - The resource GUID property of the load balancer resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnGatewaysGetP2sVpnConnectionHealthFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.GetP2sVpnConnectionHealthResponder(pvg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGetP2sVpnConnectionHealthFuture", "Result", pvg.Response.Response, "Failure responding to request") + } + } + return } -// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a // long-running operation. -type LoadBalancersCreateOrUpdateFuture struct { +type P2sVpnGatewaysUpdateTagsFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { +func (future *P2sVpnGatewaysUpdateTagsFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.CreateOrUpdateResponder(lb.Response.Response) + if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { + pvg, err = client.UpdateTagsResponder(pvg.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request") } } return } -// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersDeleteFuture struct { - azure.Future +// P2SVpnProfileParameters vpn Client Parameters for package generation. +type P2SVpnProfileParameters struct { + // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` +} + +// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of +// P2SVpnServerConfiguration. +type P2SVpnServerConfigRadiusClientRootCertificate struct { + // P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate. + *P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate. +func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil { + objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat + } + if pvscrcrc.Name != nil { + objectMap["name"] = pvscrcrc.Name + } + if pvscrcrc.Etag != nil { + objectMap["etag"] = pvscrcrc.Etag + } + if pvscrcrc.ID != nil { + objectMap["id"] = pvscrcrc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct. +func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) + if err != nil { + return err + } + pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pvscrcrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pvscrcrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pvscrcrc.ID = &ID + } + } + } + + return nil } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LoadBalancersDeleteFuture) Result(client LoadBalancersClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture") - return - } - ar.Response = future.Response() - return +// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root +// certificate of P2SVpnServerConfiguration. +type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct { + // Thumbprint - The Radius client root certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancerSku SKU of a load balancer -type LoadBalancerSku struct { - // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' - Name LoadBalancerSkuName `json:"name,omitempty"` +// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of +// P2SVpnServerConfiguration. +type P2SVpnServerConfigRadiusServerRootCertificate struct { + // P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate. + *P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type LoadBalancersUpdateTagsFuture struct { - azure.Future +// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate. +func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil { + objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat + } + if pvscrsrc.Name != nil { + objectMap["name"] = pvscrsrc.Name + } + if pvscrsrc.Etag != nil { + objectMap["etag"] = pvscrsrc.Etag + } + if pvscrsrc.ID != nil { + objectMap["id"] = pvscrsrc.ID + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LoadBalancersUpdateTagsFuture) Result(client LoadBalancersClient) (lb LoadBalancer, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct. +func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent { - lb, err = client.UpdateTagsResponder(lb.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) + if err != nil { + return err + } + pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pvscrsrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pvscrsrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pvscrsrc.ID = &ID + } } } - return + + return nil } -// LoadBalancingRule a load balancing rule for a load balancer. -type LoadBalancingRule struct { +// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root +// certificate of P2SVpnServerConfiguration. +type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct { + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource. +type P2SVpnServerConfiguration struct { autorest.Response `json:"-"` - // LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule. - *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` + // P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration. + *P2SVpnServerConfigurationProperties `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for LoadBalancingRule. -func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration. +func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if lbr.LoadBalancingRulePropertiesFormat != nil { - objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat - } - if lbr.Name != nil { - objectMap["name"] = lbr.Name + if pvsc.P2SVpnServerConfigurationProperties != nil { + objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties } - if lbr.Etag != nil { - objectMap["etag"] = lbr.Etag + if pvsc.Name != nil { + objectMap["name"] = pvsc.Name } - if lbr.ID != nil { - objectMap["id"] = lbr.ID + if pvsc.ID != nil { + objectMap["id"] = pvsc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct. -func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct. +func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16393,12 +20057,12 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat - err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat) + var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties + err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties) if err != nil { return err } - lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat + pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties } case "name": if v != nil { @@ -16407,7 +20071,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.Name = &name + pvsc.Name = &name } case "etag": if v != nil { @@ -16416,7 +20080,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.Etag = &etag + pvsc.Etag = &etag } case "id": if v != nil { @@ -16425,7 +20089,7 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - lbr.ID = &ID + pvsc.ID = &ID } } } @@ -16433,76 +20097,119 @@ func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error { return nil } -// LoadBalancingRulePropertiesFormat properties of the load balancer. -type LoadBalancingRulePropertiesFormat struct { - // FrontendIPConfiguration - A reference to frontend IP addresses. - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // Probe - The reference of the load balancer probe used by the load balancing rule. - Probe *SubResource `json:"probe,omitempty"` - // Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' - Protocol TransportProtocol `json:"protocol,omitempty"` - // LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol' - LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"` - // FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port" - FrontendPort *int32 `json:"frontendPort,omitempty"` - // BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port" - BackendPort *int32 `json:"backendPort,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP. - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` - // EnableFloatingIP - Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint. - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule. - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration. +type P2SVpnServerConfigurationProperties struct { + // Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name. + Name *string `json:"name,omitempty"` + // VpnProtocols - VPN protocols for the P2SVpnServerConfiguration. + VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` + // P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration. + P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"` + // P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration. + P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"` + // P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration. + P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"` + // P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration. + P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"` + // VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration. + VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` + // RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection. + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + // RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection. + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` + // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. + P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type P2sVpnServerConfigurationsCreateOrUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) Result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent { + pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request") + } + } + return +} + +// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type P2sVpnServerConfigurationsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *P2sVpnServerConfigurationsDeleteFuture) Result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture") + return + } + ar.Response = future.Response() + return } -// LocalNetworkGateway a common class for general resource information -type LocalNetworkGateway struct { - autorest.Response `json:"-"` - // LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway. - *LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"` +// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of +// P2SVpnServerConfiguration. +type P2SVpnServerConfigVpnClientRevokedCertificate struct { + // P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. + *P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for LocalNetworkGateway. -func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate. +func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if lng.LocalNetworkGatewayPropertiesFormat != nil { - objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat - } - if lng.Etag != nil { - objectMap["etag"] = lng.Etag + if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil { + objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat } - if lng.ID != nil { - objectMap["id"] = lng.ID + if pvscvcrc.Name != nil { + objectMap["name"] = pvscvcrc.Name } - if lng.Location != nil { - objectMap["location"] = lng.Location + if pvscvcrc.Etag != nil { + objectMap["etag"] = pvscvcrc.Etag } - if lng.Tags != nil { - objectMap["tags"] = lng.Tags + if pvscvcrc.ID != nil { + objectMap["id"] = pvscvcrc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct. -func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct. +func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16512,30 +20219,12 @@ func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat) - if err != nil { - return err - } - lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - lng.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat + err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) if err != nil { return err } - lng.ID = &ID + pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat } case "name": if v != nil { @@ -16544,34 +20233,25 @@ func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { if err != nil { return err } - lng.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - lng.Type = &typeVar + pvscvcrc.Name = &name } - case "location": + case "etag": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - lng.Location = &location + pvscvcrc.Etag = &etag } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - lng.Tags = tags + pvscvcrc.ID = &ID } } } @@ -16579,353 +20259,225 @@ func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error { return nil } -// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call. -type LocalNetworkGatewayListResult struct { - autorest.Response `json:"-"` - // Value - A list of local network gateways that exists in a resource group. - Value *[]LocalNetworkGateway `json:"value,omitempty"` - // NextLink - READ-ONLY; The URL to get the next set of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway -// values. -type LocalNetworkGatewayListResultIterator struct { - i int - page LocalNetworkGatewayListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LocalNetworkGatewayListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LocalNetworkGatewayListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway { - if !iter.page.NotDone() { - return LocalNetworkGateway{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LocalNetworkGatewayListResultIterator type. -func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator { - return LocalNetworkGatewayListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool { - return lnglr.Value == nil || len(*lnglr.Value) == 0 -} - -// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) { - if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lnglr.NextLink))) -} - -// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values. -type LocalNetworkGatewayListResultPage struct { - fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error) - lnglr LocalNetworkGatewayListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - next, err := page.fn(ctx, page.lnglr) - if err != nil { - return err - } - page.lnglr = 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 *LocalNetworkGatewayListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LocalNetworkGatewayListResultPage) NotDone() bool { - return !page.lnglr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult { - return page.lnglr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway { - if page.lnglr.IsEmpty() { - return nil - } - return *page.lnglr.Value -} - -// Creates a new instance of the LocalNetworkGatewayListResultPage type. -func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage { - return LocalNetworkGatewayListResultPage{fn: getNextPage} +// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client +// certificate of P2SVpnServerConfiguration. +type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct { + // Thumbprint - The revoked VPN client certificate thumbprint. + Thumbprint *string `json:"thumbprint,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties -type LocalNetworkGatewayPropertiesFormat struct { - // LocalNetworkAddressSpace - Local network site address space. - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - // GatewayIPAddress - IP address of local network gateway. - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - // BgpSettings - Local network gateway's BGP speaker settings. - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - // ResourceGUID - The resource GUID property of the LocalNetworkGateway resource. - ResourceGUID *string `json:"resourceGuid,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` +// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration. +type P2SVpnServerConfigVpnClientRootCertificate struct { + // P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate. + *P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysCreateOrUpdateFuture struct { - azure.Future +// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate. +func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil { + objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat + } + if pvscvcrc.Name != nil { + objectMap["name"] = pvscvcrc.Name + } + if pvscvcrc.Etag != nil { + objectMap["etag"] = pvscvcrc.Etag + } + if pvscvcrc.ID != nil { + objectMap["id"] = pvscvcrc.ID + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct. +func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.CreateOrUpdateResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat + err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) + if err != nil { + return err + } + pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pvscvcrc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + pvscvcrc.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pvscvcrc.ID = &ID + } } } - return + + return nil } -// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysDeleteFuture struct { - azure.Future +// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of +// P2SVpnServerConfiguration. +type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct { + // PublicCertData - The certificate public data. + PublicCertData *string `json:"publicCertData,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return +// PacketCapture parameters that define the create packet capture operation. +type PacketCapture struct { + // PacketCaptureParameters - Properties of the packet capture. + *PacketCaptureParameters `json:"properties,omitempty"` } -// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type LocalNetworkGatewaysUpdateTagsFuture struct { - azure.Future +// MarshalJSON is the custom marshaler for PacketCapture. +func (pc PacketCapture) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pc.PacketCaptureParameters != nil { + objectMap["properties"] = pc.PacketCaptureParameters + } + return json.Marshal(objectMap) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *LocalNetworkGatewaysUpdateTagsFuture) Result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. +func (pc *PacketCapture) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture") - return + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent { - lng, err = client.UpdateTagsResponder(lng.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request") + for k, v := range m { + switch k { + case "properties": + if v != nil { + var packetCaptureParameters PacketCaptureParameters + err = json.Unmarshal(*v, &packetCaptureParameters) + if err != nil { + return err + } + pc.PacketCaptureParameters = &packetCaptureParameters + } } } - return -} - -// LogSpecification description of logging specification. -type LogSpecification struct { - // Name - The name of the specification. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the specification. - DisplayName *string `json:"displayName,omitempty"` - // BlobDuration - Duration of the blob. - BlobDuration *string `json:"blobDuration,omitempty"` -} -// MatchedRule matched rule. -type MatchedRule struct { - // RuleName - Name of the matched network security rule. - RuleName *string `json:"ruleName,omitempty"` - // Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. - Action *string `json:"action,omitempty"` + return nil } -// MetricSpecification description of metrics specification. -type MetricSpecification struct { - // Name - The name of the metric. - Name *string `json:"name,omitempty"` - // DisplayName - The display name of the metric. - DisplayName *string `json:"displayName,omitempty"` - // DisplayDescription - The description of the metric. - DisplayDescription *string `json:"displayDescription,omitempty"` - // Unit - Units the metric to be displayed in. - Unit *string `json:"unit,omitempty"` - // AggregationType - The aggregation type. - AggregationType *string `json:"aggregationType,omitempty"` - // Availabilities - List of availability. - Availabilities *[]Availability `json:"availabilities,omitempty"` - // EnableRegionalMdmAccount - Whether regional MDM account enabled. - EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` - // FillGapWithZero - Whether gaps would be filled with zeros. - FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` - // MetricFilterPattern - Pattern for the filter of the metric. - MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` - // Dimensions - List of dimensions. - Dimensions *[]Dimension `json:"dimensions,omitempty"` - // IsInternal - Whether the metric is internal. - IsInternal *bool `json:"isInternal,omitempty"` - // SourceMdmAccount - The source MDM account. - SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` - // SourceMdmNamespace - The source MDM namespace. - SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` - // ResourceIDDimensionNameOverride - The resource Id dimension name override. - ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. +type PacketCaptureFilter struct { + // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' + Protocol PcProtocol `json:"protocol,omitempty"` + // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalIPAddress *string `json:"localIPAddress,omitempty"` + // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` + // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + LocalPort *string `json:"localPort,omitempty"` + // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. + RemotePort *string `json:"remotePort,omitempty"` } -// NextHopParameters parameters that define the source and destination endpoint. -type NextHopParameters struct { - // TargetResourceID - The resource identifier of the target resource against which the action is to be performed. - TargetResourceID *string `json:"targetResourceId,omitempty"` - // SourceIPAddress - The source IP address. - SourceIPAddress *string `json:"sourceIPAddress,omitempty"` - // DestinationIPAddress - The destination IP address. - DestinationIPAddress *string `json:"destinationIPAddress,omitempty"` - // TargetNicResourceID - The NIC ID. (If VM has multiple NICs and IP forwarding is enabled on any of the nics, then this parameter must be specified. Otherwise optional). - TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` +// PacketCaptureListResult list of packet capture sessions. +type PacketCaptureListResult struct { + autorest.Response `json:"-"` + // Value - Information about packet capture sessions. + Value *[]PacketCaptureResult `json:"value,omitempty"` } -// NextHopResult the information about next hop from the specified VM. -type NextHopResult struct { +// PacketCaptureParameters parameters that define the create packet capture operation. +type PacketCaptureParameters struct { + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + // StorageLocation - Describes the storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + // Filters - A list of packet capture filters. + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +} + +// PacketCaptureQueryStatusResult status of packet capture session. +type PacketCaptureQueryStatusResult struct { autorest.Response `json:"-"` - // NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone' - NextHopType NextHopType `json:"nextHopType,omitempty"` - // NextHopIPAddress - Next hop IP Address - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - // RouteTableID - The resource identifier for the route table associated with the route being returned. If the route being returned does not correspond to any user created routes then this field will be the string 'System Route'. - RouteTableID *string `json:"routeTableId,omitempty"` + // Name - The name of the packet capture resource. + Name *string `json:"name,omitempty"` + // ID - The ID of the packet capture resource. + ID *string `json:"id,omitempty"` + // CaptureStartTime - The start time of the packet capture session. + CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` + // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' + PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` + // StopReason - The reason the current packet capture session was stopped. + StopReason *string `json:"stopReason,omitempty"` + // PacketCaptureError - List of errors of packet capture session. + PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` } -// Operation network REST API operation definition. -type Operation struct { - // Name - Operation name: {provider}/{resource}/{operation} +// PacketCaptureResult information about packet capture session. +type PacketCaptureResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Name of the packet capture session. Name *string `json:"name,omitempty"` - // Display - Display metadata associated with the operation. - Display *OperationDisplay `json:"display,omitempty"` - // Origin - Origin of the operation. - Origin *string `json:"origin,omitempty"` - // OperationPropertiesFormat - Operation properties format. - *OperationPropertiesFormat `json:"properties,omitempty"` + // ID - READ-ONLY; ID of the packet capture operation. + ID *string `json:"id,omitempty"` + // Etag - A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // PacketCaptureResultProperties - Properties of the packet capture result. + *PacketCaptureResultProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for Operation. -func (o Operation) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PacketCaptureResult. +func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if o.Name != nil { - objectMap["name"] = o.Name - } - if o.Display != nil { - objectMap["display"] = o.Display - } - if o.Origin != nil { - objectMap["origin"] = o.Origin + if pcr.Etag != nil { + objectMap["etag"] = pcr.Etag } - if o.OperationPropertiesFormat != nil { - objectMap["properties"] = o.OperationPropertiesFormat + if pcr.PacketCaptureResultProperties != nil { + objectMap["properties"] = pcr.PacketCaptureResultProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for Operation struct. -func (o *Operation) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. +func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -16940,34 +20492,34 @@ func (o *Operation) UnmarshalJSON(body []byte) error { if err != nil { return err } - o.Name = &name + pcr.Name = &name } - case "display": + case "id": if v != nil { - var display OperationDisplay - err = json.Unmarshal(*v, &display) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - o.Display = &display + pcr.ID = &ID } - case "origin": + case "etag": if v != nil { - var origin string - err = json.Unmarshal(*v, &origin) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - o.Origin = &origin + pcr.Etag = &etag } case "properties": if v != nil { - var operationPropertiesFormat OperationPropertiesFormat - err = json.Unmarshal(*v, &operationPropertiesFormat) + var packetCaptureResultProperties PacketCaptureResultProperties + err = json.Unmarshal(*v, &packetCaptureResultProperties) if err != nil { return err } - o.OperationPropertiesFormat = &operationPropertiesFormat + pcr.PacketCaptureResultProperties = &packetCaptureResultProperties } } } @@ -16975,212 +20527,171 @@ func (o *Operation) UnmarshalJSON(body []byte) error { return nil } -// OperationDisplay display metadata associated with the operation. -type OperationDisplay struct { - // Provider - Service provider: Microsoft Network. - Provider *string `json:"provider,omitempty"` - // Resource - Resource on which the operation is performed. - Resource *string `json:"resource,omitempty"` - // Operation - Type of the operation: get, read, delete, etc. - Operation *string `json:"operation,omitempty"` - // Description - Description of the operation. - Description *string `json:"description,omitempty"` -} - -// OperationListResult result of the request to list Network operations. It contains a list of operations -// and a URL link to get the next set of results. -type OperationListResult struct { - autorest.Response `json:"-"` - // Value - List of Network operations supported by the Network resource provider. - Value *[]Operation `json:"value,omitempty"` - // NextLink - URL to get the next set of operation list results if there are any. - NextLink *string `json:"nextLink,omitempty"` +// PacketCaptureResultProperties describes the properties of a packet capture session. +type PacketCaptureResultProperties struct { + // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Target - The ID of the targeted resource, only VM is currently supported. + Target *string `json:"target,omitempty"` + // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. + BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` + // TotalBytesPerSession - Maximum size of the capture output. + TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` + // TimeLimitInSeconds - Maximum duration of the capture session in seconds. + TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` + // StorageLocation - Describes the storage location for a packet capture session. + StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` + // Filters - A list of packet capture filters. + Filters *[]PacketCaptureFilter `json:"filters,omitempty"` } -// OperationListResultIterator provides access to a complete listing of Operation values. -type OperationListResultIterator struct { - i int - page OperationListResultPage +// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesCreateFuture struct { + azure.Future } -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *OperationListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter OperationListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter OperationListResultIterator) Response() OperationListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter OperationListResultIterator) Value() Operation { - if !iter.page.NotDone() { - return Operation{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the OperationListResultIterator type. -func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator { - return OperationListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (olr OperationListResult) IsEmpty() bool { - return olr.Value == nil || len(*olr.Value) == 0 -} - -// operationListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { - return nil, nil + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") + return } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(olr.NextLink))) -} - -// OperationListResultPage contains a page of Operation values. -type OperationListResultPage struct { - fn func(context.Context, OperationListResult) (OperationListResult, error) - olr OperationListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") + return } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { + pcr, err = client.CreateResponder(pcr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") + } } - page.olr = next - return nil + return } -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *OperationListResultPage) Next() error { - return page.NextWithContext(context.Background()) +// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesDeleteFuture struct { + azure.Future } -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page OperationListResultPage) NotDone() bool { - return !page.olr.IsEmpty() +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") + return + } + ar.Response = future.Response() + return } -// Response returns the raw server response from the last page request. -func (page OperationListResultPage) Response() OperationListResult { - return page.olr +// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesGetStatusFuture struct { + azure.Future } -// Values returns the slice of values for the current page or nil if there are no values. -func (page OperationListResultPage) Values() []Operation { - if page.olr.IsEmpty() { - return nil +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") + return } - return *page.olr.Value + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { + pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") + } + } + return } -// Creates a new instance of the OperationListResultPage type. -func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage { - return OperationListResultPage{fn: getNextPage} +// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PacketCapturesStopFuture struct { + azure.Future } -// OperationPropertiesFormat description of operation properties format. -type OperationPropertiesFormat struct { - // ServiceSpecification - Specification of the service. - ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"` +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") + return + } + ar.Response = future.Response() + return } -// OperationPropertiesFormatServiceSpecification specification of the service. -type OperationPropertiesFormatServiceSpecification struct { - // MetricSpecifications - Operation service specification. - MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` - // LogSpecifications - Operation log specification. - LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` +// PacketCaptureStorageLocation describes the storage location for a packet capture session. +type PacketCaptureStorageLocation struct { + // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. + StorageID *string `json:"storageId,omitempty"` + // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. + StoragePath *string `json:"storagePath,omitempty"` + // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. + FilePath *string `json:"filePath,omitempty"` } -// OutboundRule outbound pool of the load balancer. -type OutboundRule struct { - autorest.Response `json:"-"` - // OutboundRulePropertiesFormat - Properties of load balancer outbound rule. - *OutboundRulePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. +// PatchRouteFilter route Filter Resource. +type PatchRouteFilter struct { + // RouteFilterPropertiesFormat - Properties of the route filter. + *RouteFilterPropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for OutboundRule. -func (or OutboundRule) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PatchRouteFilter. +func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if or.OutboundRulePropertiesFormat != nil { - objectMap["properties"] = or.OutboundRulePropertiesFormat - } - if or.Name != nil { - objectMap["name"] = or.Name + if prf.RouteFilterPropertiesFormat != nil { + objectMap["properties"] = prf.RouteFilterPropertiesFormat } - if or.Etag != nil { - objectMap["etag"] = or.Etag + if prf.Tags != nil { + objectMap["tags"] = prf.Tags } - if or.ID != nil { - objectMap["id"] = or.ID + if prf.ID != nil { + objectMap["id"] = prf.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for OutboundRule struct. -func (or *OutboundRule) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. +func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17190,12 +20701,12 @@ func (or *OutboundRule) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var outboundRulePropertiesFormat OutboundRulePropertiesFormat - err = json.Unmarshal(*v, &outboundRulePropertiesFormat) + var routeFilterPropertiesFormat RouteFilterPropertiesFormat + err = json.Unmarshal(*v, &routeFilterPropertiesFormat) if err != nil { return err } - or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat + prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat } case "name": if v != nil { @@ -17204,7 +20715,7 @@ func (or *OutboundRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - or.Name = &name + prf.Name = &name } case "etag": if v != nil { @@ -17213,7 +20724,25 @@ func (or *OutboundRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - or.Etag = &etag + prf.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + prf.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + prf.Tags = tags } case "id": if v != nil { @@ -17222,7 +20751,7 @@ func (or *OutboundRule) UnmarshalJSON(body []byte) error { if err != nil { return err } - or.ID = &ID + prf.ID = &ID } } } @@ -17230,62 +20759,114 @@ func (or *OutboundRule) UnmarshalJSON(body []byte) error { return nil } -// OutboundRulePropertiesFormat outbound pool of the load balancer. -type OutboundRulePropertiesFormat struct { - // AllocatedOutboundPorts - The number of outbound ports to be used for NAT. - AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"` - // FrontendIPConfigurations - The Frontend IP addresses of the load balancer. - FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"` - // BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - // ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All' - Protocol Protocol1 `json:"protocol,omitempty"` - // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. - EnableTCPReset *bool `json:"enableTcpReset,omitempty"` - // IdleTimeoutInMinutes - The timeout for the TCP idle connection - IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` -} - -// P2SVpnGateway p2SVpnGateway Resource. -type P2SVpnGateway struct { - autorest.Response `json:"-"` - *P2SVpnGatewayProperties `json:"properties,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. +// PatchRouteFilterRule route Filter Rule Resource. +type PatchRouteFilterRule struct { + // RouteFilterRulePropertiesFormat - Properties of the route filter rule. + *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. +} + +// MarshalJSON is the custom marshaler for PatchRouteFilterRule. +func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if prfr.RouteFilterRulePropertiesFormat != nil { + objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat + } + if prfr.ID != nil { + objectMap["id"] = prfr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. +func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat + err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) + if err != nil { + return err + } + prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + prfr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + prfr.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + prfr.ID = &ID + } + } + } + + return nil +} + +// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering +// resource. +type PeerExpressRouteCircuitConnection struct { + autorest.Response `json:"-"` + // PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. + *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` + // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // 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"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for P2SVpnGateway. -func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection. +func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pvg.P2SVpnGatewayProperties != nil { - objectMap["properties"] = pvg.P2SVpnGatewayProperties - } - if pvg.ID != nil { - objectMap["id"] = pvg.ID + if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil { + objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat } - if pvg.Location != nil { - objectMap["location"] = pvg.Location + if percc.Name != nil { + objectMap["name"] = percc.Name } - if pvg.Tags != nil { - objectMap["tags"] = pvg.Tags + if percc.ID != nil { + objectMap["id"] = percc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct. -func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct. +func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17295,30 +20876,12 @@ func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var p2SVpnGatewayProperties P2SVpnGatewayProperties - err = json.Unmarshal(*v, &p2SVpnGatewayProperties) - if err != nil { - return err - } - pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvg.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat + err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat) if err != nil { return err } - pvg.ID = &ID + percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat } case "name": if v != nil { @@ -17327,34 +20890,34 @@ func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { if err != nil { return err } - pvg.Name = &name + percc.Name = &name } - case "type": + case "etag": if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) + var etag string + err = json.Unmarshal(*v, &etag) if err != nil { return err } - pvg.Type = &typeVar + percc.Etag = &etag } - case "location": + case "type": if v != nil { - var location string - err = json.Unmarshal(*v, &location) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - pvg.Location = &location + percc.Type = &typeVar } - case "tags": + case "id": if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) + var ID string + err = json.Unmarshal(*v, &ID) if err != nil { return err } - pvg.Tags = tags + percc.ID = &ID } } } @@ -17362,171 +20925,233 @@ func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error { return nil } -// P2SVpnGatewayProperties parameters for P2SVpnGateway -type P2SVpnGatewayProperties struct { - // VirtualHub - The VirtualHub to which the gateway belongs - VirtualHub *SubResource `json:"virtualHub,omitempty"` - // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway. - VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` - // P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. - P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"` - // VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient. - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - // VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status. - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` +// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call +// retrieves all global reach peer circuit connections that belongs to a Private Peering for an +// ExpressRouteCircuit. +type PeerExpressRouteCircuitConnectionListResult struct { + autorest.Response `json:"-"` + // Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit. + Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysCreateOrUpdateFuture struct { - azure.Future +// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of +// PeerExpressRouteCircuitConnection values. +type PeerExpressRouteCircuitConnectionListResultIterator struct { + i int + page PeerExpressRouteCircuitConnectionListResultPage } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysCreateOrUpdateFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture") - return + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request") - } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err } - return + iter.i = 0 + return nil } -// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type P2sVpnGatewaysDeleteFuture struct { - azure.Future +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysDeleteFuture) Result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture") - return - } - ar.Response = future.Response() - return +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) } -// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysGenerateVpnProfileFuture struct { - azure.Future +// Response returns the raw server response from the last page request. +func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult { + return iter.page.Response() } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysGenerateVpnProfileFuture) Result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture") - return +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection { + if !iter.page.NotDone() { + return PeerExpressRouteCircuitConnection{} } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent { - vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request") - } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type. +func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator { + return PeerExpressRouteCircuitConnectionListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool { + return percclr.Value == nil || len(*percclr.Value) == 0 +} + +// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) { + if percclr.NextLink == nil || len(to.String(percclr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(percclr.NextLink))) } -// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnGatewaysUpdateTagsFuture struct { - azure.Future +// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection +// values. +type PeerExpressRouteCircuitConnectionListResultPage struct { + fn func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error) + percclr PeerExpressRouteCircuitConnectionListResult } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *P2sVpnGatewaysUpdateTagsFuture) Result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure") - return +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() } - if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture") - return + next, err := page.fn(ctx, page.percclr) + if err != nil { + return err } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent { - pvg, err = client.UpdateTagsResponder(pvg.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request") - } + page.percclr = 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 *PeerExpressRouteCircuitConnectionListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool { + return !page.percclr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult { + return page.percclr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection { + if page.percclr.IsEmpty() { + return nil } - return + return *page.percclr.Value } -// P2SVpnProfileParameters vpn Client Parameters for package generation -type P2SVpnProfileParameters struct { - // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' - AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` +// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type. +func NewPeerExpressRouteCircuitConnectionListResultPage(getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage { + return PeerExpressRouteCircuitConnectionListResultPage{fn: getNextPage} } -// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificate struct { - // P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate. - *P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. +// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit +// connection. +type PeerExpressRouteCircuitConnectionPropertiesFormat struct { + // ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit. + ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` + // PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit. + PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` + // AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels. + AddressPrefix *string `json:"addressPrefix,omitempty"` + // CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` + // ConnectionName - The name of the express route circuit connection resource. + ConnectionName *string `json:"connectionName,omitempty"` + // AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection. + AuthResourceGUID *string `json:"authResourceGuid,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// PolicySettings defines contents of a web application firewall global configuration. +type PolicySettings struct { + // EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled' + EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"` + // Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection' + Mode WebApplicationFirewallMode `json:"mode,omitempty"` +} + +// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet. +type PrepareNetworkPoliciesRequest struct { + // ServiceName - The name of the service for which subnet is being prepared for. + ServiceName *string `json:"serviceName,omitempty"` + // NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration. + NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` +} + +// PrivateEndpoint private endpoint resource. +type PrivateEndpoint struct { + autorest.Response `json:"-"` + // PrivateEndpointProperties - Properties of the private endpoint. + *PrivateEndpointProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate. -func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateEndpoint. +func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat + if peVar.PrivateEndpointProperties != nil { + objectMap["properties"] = peVar.PrivateEndpointProperties } - if pvscrcrc.Name != nil { - objectMap["name"] = pvscrcrc.Name + if peVar.Etag != nil { + objectMap["etag"] = peVar.Etag } - if pvscrcrc.Etag != nil { - objectMap["etag"] = pvscrcrc.Etag + if peVar.ID != nil { + objectMap["id"] = peVar.ID } - if pvscrcrc.ID != nil { - objectMap["id"] = pvscrcrc.ID + if peVar.Location != nil { + objectMap["location"] = peVar.Location + } + if peVar.Tags != nil { + objectMap["tags"] = peVar.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct. -func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct. +func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17536,21 +21161,12 @@ func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(bod switch k { case "properties": if v != nil { - var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var privateEndpointProperties PrivateEndpointProperties + err = json.Unmarshal(*v, &privateEndpointProperties) if err != nil { return err } - pvscrcrc.Name = &name + peVar.PrivateEndpointProperties = &privateEndpointProperties } case "etag": if v != nil { @@ -17559,7 +21175,7 @@ func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(bod if err != nil { return err } - pvscrcrc.Etag = &etag + peVar.Etag = &etag } case "id": if v != nil { @@ -17568,98 +21184,43 @@ func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(bod if err != nil { return err } - pvscrcrc.ID = &ID + peVar.ID = &ID } - } - } - - return nil -} - -// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct { - // Thumbprint - The Radius client root certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificate struct { - // P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate. - *P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate. -func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - } - if pvscrsrc.Name != nil { - objectMap["name"] = pvscrsrc.Name - } - if pvscrsrc.Etag != nil { - objectMap["etag"] = pvscrsrc.Etag - } - if pvscrsrc.ID != nil { - objectMap["id"] = pvscrsrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct. -func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": + case "name": if v != nil { - var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat + peVar.Name = &name } - case "name": + case "type": if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - pvscrsrc.Name = &name + peVar.Type = &typeVar } - case "etag": + case "location": if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) + var location string + err = json.Unmarshal(*v, &location) if err != nil { return err } - pvscrsrc.Etag = &etag + peVar.Location = &location } - case "id": + case "tags": if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) + var tags map[string]*string + err = json.Unmarshal(*v, &tags) if err != nil { return err } - pvscrsrc.ID = &ID + peVar.Tags = tags } } } @@ -17667,44 +21228,34 @@ func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(bod return nil } -// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource. -type P2SVpnServerConfiguration struct { - autorest.Response `json:"-"` - *P2SVpnServerConfigurationProperties `json:"properties,omitempty"` +// PrivateEndpointConnection privateEndpointConnection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Properties of the private end point connection. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } -// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration. -func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pvsc.P2SVpnServerConfigurationProperties != nil { - objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties } - if pvsc.Name != nil { - objectMap["name"] = pvsc.Name + if pec.Name != nil { + objectMap["name"] = pec.Name } - if pvsc.ID != nil { - objectMap["id"] = pvsc.ID + if pec.ID != nil { + objectMap["id"] = pec.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct. -func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { +// 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 { @@ -17714,12 +21265,12 @@ func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties - err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties) + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) if err != nil { return err } - pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties } case "name": if v != nil { @@ -17728,16 +21279,7 @@ func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - pvsc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvsc.Etag = &etag + pec.Name = &name } case "id": if v != nil { @@ -17746,127 +21288,276 @@ func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error { if err != nil { return err } - pvsc.ID = &ID + pec.ID = &ID } } } - return nil + 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"` +} + +// PrivateEndpointListResult response for the ListPrivateEndpoints API service call. +type PrivateEndpointListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of private endpoint resources in a resource group. + Value *[]PrivateEndpoint `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values. +type PrivateEndpointListResultIterator struct { + i int + page PrivateEndpointListResultPage +} + +// 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 *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.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 *PrivateEndpointListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateEndpointListResultIterator) 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 PrivateEndpointListResultIterator) Response() PrivateEndpointListResult { + 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 PrivateEndpointListResultIterator) Value() PrivateEndpoint { + if !iter.page.NotDone() { + return PrivateEndpoint{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateEndpointListResultIterator type. +func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator { + return PrivateEndpointListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (pelr PrivateEndpointListResult) IsEmpty() bool { + return pelr.Value == nil || len(*pelr.Value) == 0 +} + +// privateEndpointListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) { + if pelr.NextLink == nil || len(to.String(pelr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(pelr.NextLink))) +} + +// PrivateEndpointListResultPage contains a page of PrivateEndpoint values. +type PrivateEndpointListResultPage struct { + fn func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error) + pelr PrivateEndpointListResult +} + +// 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 *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.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.pelr) + if err != nil { + return err + } + page.pelr = 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 *PrivateEndpointListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateEndpointListResultPage) NotDone() bool { + return !page.pelr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult { + return page.pelr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint { + if page.pelr.IsEmpty() { + return nil + } + return *page.pelr.Value +} + +// Creates a new instance of the PrivateEndpointListResultPage type. +func NewPrivateEndpointListResultPage(getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage { + return PrivateEndpointListResultPage{fn: getNextPage} } -// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration -type P2SVpnServerConfigurationProperties struct { - // Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Parent VirtualWan resource name. - Name *string `json:"name,omitempty"` - // VpnProtocols - vpnProtocols for the P2SVpnServerConfiguration. - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` - // P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"` - // P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"` - // P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"` - // P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration. - P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"` - // VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration. - VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - // RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - // RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection. - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. +// PrivateEndpointProperties properties of the private endpoint. +type PrivateEndpointProperties struct { + // Subnet - The ID of the subnet from which the private IP will be allocated. + Subnet *Subnet `json:"subnet,omitempty"` + // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private endpoint. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` - // P2SVpnGateways - READ-ONLY - P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` + // PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. + PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` + // ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource. + ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` } -// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. -type P2sVpnServerConfigurationsCreateOrUpdateFuture struct { +// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateEndpointsCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) Result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) { +func (future *PrivateEndpointsCreateOrUpdateFuture) Result(client PrivateEndpointsClient) (peVar PrivateEndpoint, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture") + err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsCreateOrUpdateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent { - pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response) + if peVar.Response.Response, err = future.GetResult(sender); err == nil && peVar.Response.Response.StatusCode != http.StatusNoContent { + peVar, err = client.CreateOrUpdateResponder(peVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsCreateOrUpdateFuture", "Result", peVar.Response.Response, "Failure responding to request") } } return } -// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type P2sVpnServerConfigurationsDeleteFuture struct { +// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type PrivateEndpointsDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *P2sVpnServerConfigurationsDeleteFuture) Result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) { +func (future *PrivateEndpointsDeleteFuture) Result(client PrivateEndpointsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.PrivateEndpointsDeleteFuture") return } ar.Response = future.Response() return } -// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificate struct { - // P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate. - *P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. +// PrivateLinkService private link service resource. +type PrivateLinkService struct { + autorest.Response `json:"-"` + // PrivateLinkServiceProperties - Properties of the private link service. + *PrivateLinkServiceProperties `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` } -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateLinkService. +func (pls PrivateLinkService) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat + if pls.PrivateLinkServiceProperties != nil { + objectMap["properties"] = pls.PrivateLinkServiceProperties } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name + if pls.Etag != nil { + objectMap["etag"] = pls.Etag } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag + if pls.ID != nil { + objectMap["id"] = pls.ID } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID + if pls.Location != nil { + objectMap["location"] = pls.Location + } + if pls.Tags != nil { + objectMap["tags"] = pls.Tags } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct. +func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -17876,21 +21567,12 @@ func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(bod switch k { case "properties": if v != nil { - var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) + var privateLinkServiceProperties PrivateLinkServiceProperties + err = json.Unmarshal(*v, &privateLinkServiceProperties) if err != nil { return err } - pvscvcrc.Name = &name + pls.PrivateLinkServiceProperties = &privateLinkServiceProperties } case "etag": if v != nil { @@ -17899,7 +21581,7 @@ func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(bod if err != nil { return err } - pvscvcrc.Etag = &etag + pls.Etag = &etag } case "id": if v != nil { @@ -17908,70 +21590,7 @@ func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(bod if err != nil { return err } - pvscvcrc.ID = &ID - } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client -// certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct { - // Thumbprint - The revoked VPN client certificate thumbprint. - Thumbprint *string `json:"thumbprint,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificate struct { - // P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate. - *P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` - // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate. -func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil { - objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - } - if pvscvcrc.Name != nil { - objectMap["name"] = pvscvcrc.Name - } - if pvscvcrc.Etag != nil { - objectMap["etag"] = pvscvcrc.Etag - } - if pvscvcrc.ID != nil { - objectMap["id"] = pvscvcrc.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct. -func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) - if err != nil { - return err - } - pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat + pls.ID = &ID } case "name": if v != nil { @@ -17980,156 +21599,68 @@ func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body [ if err != nil { return err } - pvscvcrc.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pvscvcrc.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pvscvcrc.ID = &ID + pls.Name = &name } - } - } - - return nil -} - -// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of -// P2SVpnServerConfiguration. -type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct { - // PublicCertData - The certificate public data. - PublicCertData *string `json:"publicCertData,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - ProvisioningState *string `json:"provisioningState,omitempty"` -} - -// PacketCapture parameters that define the create packet capture operation. -type PacketCapture struct { - *PacketCaptureParameters `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for PacketCapture. -func (pc PacketCapture) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pc.PacketCaptureParameters != nil { - objectMap["properties"] = pc.PacketCaptureParameters - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PacketCapture struct. -func (pc *PacketCapture) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": + case "type": if v != nil { - var packetCaptureParameters PacketCaptureParameters - err = json.Unmarshal(*v, &packetCaptureParameters) + var typeVar string + err = json.Unmarshal(*v, &typeVar) if err != nil { return err } - pc.PacketCaptureParameters = &packetCaptureParameters - } - } - } - - return nil -} - -// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied. -type PacketCaptureFilter struct { - // Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny' - Protocol PcProtocol `json:"protocol,omitempty"` - // LocalIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalIPAddress *string `json:"localIPAddress,omitempty"` - // RemoteIPAddress - Local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - // LocalPort - Local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - LocalPort *string `json:"localPort,omitempty"` - // RemotePort - Remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Default = null. - RemotePort *string `json:"remotePort,omitempty"` -} - -// PacketCaptureListResult list of packet capture sessions. -type PacketCaptureListResult struct { - autorest.Response `json:"-"` - // Value - Information about packet capture sessions. - Value *[]PacketCaptureResult `json:"value,omitempty"` -} + pls.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pls.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + pls.Tags = tags + } + } + } -// PacketCaptureParameters parameters that define the create packet capture operation. -type PacketCaptureParameters struct { - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` + return nil } -// PacketCaptureQueryStatusResult status of packet capture session. -type PacketCaptureQueryStatusResult struct { - autorest.Response `json:"-"` - // Name - The name of the packet capture resource. +// PrivateLinkServiceConnection privateLinkServiceConnection resource. +type PrivateLinkServiceConnection struct { + // PrivateLinkServiceConnectionProperties - Properties of the private link service connection. + *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` - // ID - The ID of the packet capture resource. + // ID - Resource ID. ID *string `json:"id,omitempty"` - // CaptureStartTime - The start time of the packet capture session. - CaptureStartTime *date.Time `json:"captureStartTime,omitempty"` - // PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown' - PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"` - // StopReason - The reason the current packet capture session was stopped. - StopReason *string `json:"stopReason,omitempty"` - // PacketCaptureError - List of errors of packet capture session. - PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` -} - -// PacketCaptureResult information about packet capture session. -type PacketCaptureResult struct { - autorest.Response `json:"-"` - // Name - READ-ONLY; Name of the packet capture session. - Name *string `json:"name,omitempty"` - // ID - READ-ONLY; ID of the packet capture operation. - ID *string `json:"id,omitempty"` - Etag *string `json:"etag,omitempty"` - *PacketCaptureResultProperties `json:"properties,omitempty"` } -// MarshalJSON is the custom marshaler for PacketCaptureResult. -func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection. +func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if pcr.Etag != nil { - objectMap["etag"] = pcr.Etag + if plsc.PrivateLinkServiceConnectionProperties != nil { + objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties } - if pcr.PacketCaptureResultProperties != nil { - objectMap["properties"] = pcr.PacketCaptureResultProperties + if plsc.Name != nil { + objectMap["name"] = plsc.Name + } + if plsc.ID != nil { + objectMap["id"] = plsc.ID } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct. -func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct. +func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -18137,6 +21668,15 @@ func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { + case "properties": + if v != nil { + var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties + err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties) + if err != nil { + return err + } + plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties + } case "name": if v != nil { var name string @@ -18144,7 +21684,7 @@ func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.Name = &name + plsc.Name = &name } case "id": if v != nil { @@ -18153,25 +21693,83 @@ func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { if err != nil { return err } - pcr.ID = &ID + plsc.ID = &ID } - case "etag": + } + } + + return nil +} + +// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection. +type PrivateLinkServiceConnectionProperties struct { + // PrivateLinkServiceID - The resource id of private link service. + PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"` + // GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to. + GroupIds *[]string `json:"groupIds,omitempty"` + // RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars. + RequestMessage *string `json:"requestMessage,omitempty"` + // PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,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. + 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"` +} + +// PrivateLinkServiceIPConfiguration the private link service ip configuration. +type PrivateLinkServiceIPConfiguration struct { + // PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration. + *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` + // Name - The name of private link service ip configuration. + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration. +func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plsic.PrivateLinkServiceIPConfigurationProperties != nil { + objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties + } + if plsic.Name != nil { + objectMap["name"] = plsic.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct. +func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error { + 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 etag string - err = json.Unmarshal(*v, &etag) + var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties + err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties) if err != nil { return err } - pcr.Etag = &etag + plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties } - case "properties": + case "name": if v != nil { - var packetCaptureResultProperties PacketCaptureResultProperties - err = json.Unmarshal(*v, &packetCaptureResultProperties) + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - pcr.PacketCaptureResultProperties = &packetCaptureResultProperties + plsic.Name = &name } } } @@ -18179,307 +21777,282 @@ func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error { return nil } -// PacketCaptureResultProperties describes the properties of a packet capture session. -type PacketCaptureResultProperties struct { - // ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // Target - The ID of the targeted resource, only VM is currently supported. - Target *string `json:"target,omitempty"` - // BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated. - BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` - // TotalBytesPerSession - Maximum size of the capture output. - TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"` - // TimeLimitInSeconds - Maximum duration of the capture session in seconds. - TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"` - StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` +// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration. +type PrivateLinkServiceIPConfigurationProperties struct { + // PrivateIPAddress - The private IP address of the IP configuration. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' + PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` + // Subnet - The reference of the subnet resource. + Subnet *Subnet `json:"subnet,omitempty"` + // PublicIPAddress - The reference of the public IP resource. + PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + // ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6' + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` } -// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesCreateFuture struct { - azure.Future +// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call. +type PrivateLinkServiceListResult struct { + autorest.Response `json:"-"` + // Value - Gets a list of PrivateLinkService resources in a resource group. + Value *[]PrivateLinkService `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } -// Result returns the result of the asynchronous operation. -// If the operation has not completed it will return an error. -func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) +// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values. +type PrivateLinkServiceListResultIterator struct { + i int + page PrivateLinkServiceListResultPage +} + +// 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 *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.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 { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure") - return + iter.i-- + return err } - if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture") - return + 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 *PrivateLinkServiceListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter PrivateLinkServiceListResultIterator) 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 PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult { + 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 PrivateLinkServiceListResultIterator) Value() PrivateLinkService { + if !iter.page.NotDone() { + return PrivateLinkService{} } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent { - pcr, err = client.CreateResponder(pcr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request") - } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the PrivateLinkServiceListResultIterator type. +func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator { + return PrivateLinkServiceListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (plslr PrivateLinkServiceListResult) IsEmpty() bool { + return plslr.Value == nil || len(*plslr.Value) == 0 +} + +// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) { + if plslr.NextLink == nil || len(to.String(plslr.NextLink)) < 1 { + return nil, nil } - return + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(plslr.NextLink))) } -// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesDeleteFuture struct { +// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values. +type PrivateLinkServiceListResultPage struct { + fn func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error) + plslr PrivateLinkServiceListResult +} + +// 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 *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.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.plslr) + if err != nil { + return err + } + page.plslr = 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 *PrivateLinkServiceListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page PrivateLinkServiceListResultPage) NotDone() bool { + return !page.plslr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult { + return page.plslr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService { + if page.plslr.IsEmpty() { + return nil + } + return *page.plslr.Value +} + +// Creates a new instance of the PrivateLinkServiceListResultPage type. +func NewPrivateLinkServiceListResultPage(getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage { + return PrivateLinkServiceListResultPage{fn: getNextPage} +} + +// PrivateLinkServiceProperties properties of the private link service. +type PrivateLinkServiceProperties struct { + // LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations. + LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` + // IPConfigurations - An array of references to the private link service IP configuration. + IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` + // NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private link service. + NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the private link service. Possible values are: 'Updating', 'Succeeded', and 'Failed'. + ProvisioningState *string `json:"provisioningState,omitempty"` + // PrivateEndpointConnections - An array of list about connections to the private endpoint. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` + // Visibility - The visibility list of the private link service. + Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"` + // AutoApproval - The auto-approval list of the private link service. + AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"` + // Fqdns - The list of Fqdn. + Fqdns *[]string `json:"fqdns,omitempty"` + // Alias - READ-ONLY; The alias of the private link service. + Alias *string `json:"alias,omitempty"` +} + +// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service. +type PrivateLinkServicePropertiesAutoApproval struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + +// PrivateLinkServicePropertiesVisibility the visibility list of the private link service. +type PrivateLinkServicePropertiesVisibility struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + +// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateLinkServicesCreateOrUpdateFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *PacketCapturesDeleteFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { +func (future *PrivateLinkServicesCreateOrUpdateFuture) Result(client PrivateLinkServicesClient) (pls PrivateLinkService, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesCreateOrUpdateFuture") return } - ar.Response = future.Response() + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if pls.Response.Response, err = future.GetResult(sender); err == nil && pls.Response.Response.StatusCode != http.StatusNoContent { + pls, err = client.CreateOrUpdateResponder(pls.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesCreateOrUpdateFuture", "Result", pls.Response.Response, "Failure responding to request") + } + } return } -// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesGetStatusFuture struct { +// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type PrivateLinkServicesDeleteFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) { +func (future *PrivateLinkServicesDeleteFuture) Result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture") + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent { - pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } -// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PacketCapturesStopFuture struct { +// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct { azure.Future } // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *PacketCapturesStopFuture) Result(client PacketCapturesClient) (ar autorest.Response, err error) { +func (future *PrivateLinkServicesDeletePrivateEndpointConnectionFuture) Result(client PrivateLinkServicesClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture") + err = azure.NewAsyncOpIncompleteError("network.PrivateLinkServicesDeletePrivateEndpointConnectionFuture") return } ar.Response = future.Response() return } -// PacketCaptureStorageLocation describes the storage location for a packet capture session. -type PacketCaptureStorageLocation struct { - // StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided. - StorageID *string `json:"storageId,omitempty"` - // StoragePath - The URI of the storage path to save the packet capture. Must be a well-formed URI describing the location to save the packet capture. - StoragePath *string `json:"storagePath,omitempty"` - // FilePath - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with /var/captures. Required if no storage ID is provided, otherwise optional. - FilePath *string `json:"filePath,omitempty"` -} - -// PatchRouteFilter route Filter Resource. -type PatchRouteFilter struct { - *RouteFilterPropertiesFormat `json:"properties,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PatchRouteFilter. -func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if prf.RouteFilterPropertiesFormat != nil { - objectMap["properties"] = prf.RouteFilterPropertiesFormat - } - if prf.Tags != nil { - objectMap["tags"] = prf.Tags - } - if prf.ID != nil { - objectMap["id"] = prf.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct. -func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var routeFilterPropertiesFormat RouteFilterPropertiesFormat - err = json.Unmarshal(*v, &routeFilterPropertiesFormat) - if err != nil { - return err - } - prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - prf.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - prf.Etag = &etag - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - prf.Type = &typeVar - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - prf.Tags = tags - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - prf.ID = &ID - } - } - } - - return nil -} - -// PatchRouteFilterRule route Filter Rule Resource -type PatchRouteFilterRule struct { - *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` - // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. - Name *string `json:"name,omitempty"` - // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// MarshalJSON is the custom marshaler for PatchRouteFilterRule. -func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if prfr.RouteFilterRulePropertiesFormat != nil { - objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat - } - if prfr.ID != nil { - objectMap["id"] = prfr.ID - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct. -func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat - err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat) - if err != nil { - return err - } - prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - prfr.Name = &name - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - prfr.Etag = &etag - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - prfr.ID = &ID - } - } - } - - return nil +// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call. +type PrivateLinkServiceVisibility struct { + autorest.Response `json:"-"` + // Visible - Private Link Service Visibility (True/False). + Visible *bool `json:"visible,omitempty"` } // Probe a load balancer probe. @@ -18487,10 +22060,12 @@ type Probe struct { autorest.Response `json:"-"` // ProbePropertiesFormat - Properties of load balancer probe. *ProbePropertiesFormat `json:"properties,omitempty"` - // Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource. + // Name - Gets name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } @@ -18549,6 +22124,15 @@ func (p *Probe) UnmarshalJSON(body []byte) error { } p.Etag = &etag } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + p.Type = &typeVar + } case "id": if v != nil { var ID string @@ -18568,7 +22152,7 @@ func (p *Probe) UnmarshalJSON(body []byte) error { type ProbePropertiesFormat struct { // LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe. LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - // Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' + // Protocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS' Protocol ProbeProtocol `json:"protocol,omitempty"` // Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive. Port *int32 `json:"port,omitempty"` @@ -18883,9 +22467,22 @@ func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.R // ProtocolConfiguration configuration of the protocol. type ProtocolConfiguration struct { + // HTTPConfiguration - HTTP configuration of the connectivity check. HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` } +// ProtocolCustomSettingsFormat dDoS custom policy properties. +type ProtocolCustomSettingsFormat struct { + // Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn' + Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"` + // TriggerRateOverride - The customized DDoS protection trigger rate. + TriggerRateOverride *string `json:"triggerRateOverride,omitempty"` + // SourceRateOverride - The customized DDoS protection source rate. + SourceRateOverride *string `json:"sourceRateOverride,omitempty"` + // TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High' + TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"` +} + // PublicIPAddress public IP address resource. type PublicIPAddress struct { autorest.Response `json:"-"` @@ -19032,7 +22629,7 @@ func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error { return nil } -// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address +// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address. type PublicIPAddressDNSSettings struct { // DomainNameLabel - Gets or sets the Domain name label.The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified domain name associated with the public IP address. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel *string `json:"domainNameLabel,omitempty"` @@ -19271,14 +22868,16 @@ func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIP // PublicIPAddressPropertiesFormat public IP address properties. type PublicIPAddressPropertiesFormat struct { - // PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + // PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic' PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` // IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address. IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` // DNSSettings - The FQDN of the DNS record associated with the public IP address. DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` + // DdosSettings - The DDoS protection custom policy associated with the public IP address. + DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` // IPTags - The list of tags associated with the public IP address. IPTags *[]IPTag `json:"ipTags,omitempty"` // IPAddress - The IP address associated with the public IP address resource. @@ -19293,7 +22892,7 @@ type PublicIPAddressPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// PublicIPAddressSku SKU of a public IP address +// PublicIPAddressSku SKU of a public IP address. type PublicIPAddressSku struct { // Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' Name PublicIPAddressSkuName `json:"name,omitempty"` @@ -19674,15 +23273,15 @@ func NewPublicIPPrefixListResultPage(getNextPage func(context.Context, PublicIPP // PublicIPPrefixPropertiesFormat public IP prefix properties. type PublicIPPrefixPropertiesFormat struct { - // PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6' + // PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6' PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"` // IPTags - The list of tags associated with the public IP prefix. IPTags *[]IPTag `json:"ipTags,omitempty"` // PrefixLength - The Length of the Public IP Prefix. PrefixLength *int32 `json:"prefixLength,omitempty"` - // IPPrefix - The allocated Prefix + // IPPrefix - The allocated Prefix. IPPrefix *string `json:"ipPrefix,omitempty"` - // PublicIPAddresses - The list of all referenced PublicIPAddresses + // PublicIPAddresses - The list of all referenced PublicIPAddresses. PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` // ResourceGUID - The resource GUID property of the public IP prefix resource. ResourceGUID *string `json:"resourceGuid,omitempty"` @@ -19690,9 +23289,9 @@ type PublicIPPrefixPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// PublicIPPrefixSku SKU of a public IP prefix +// PublicIPPrefixSku SKU of a public IP prefix. type PublicIPPrefixSku struct { - // Name - Name of a public IP prefix SKU. Possible values include: 'Standard' + // Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard' Name PublicIPPrefixSkuName `json:"name,omitempty"` } @@ -19702,9 +23301,9 @@ type QueryTroubleshootingParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` } -// ReferencedPublicIPAddress ... +// ReferencedPublicIPAddress reference to a public IP address. type ReferencedPublicIPAddress struct { - // ID - The PublicIPAddress Reference + // ID - The PublicIPAddress Reference. ID *string `json:"id,omitempty"` } @@ -19745,6 +23344,8 @@ type ResourceNavigationLink struct { Name *string `json:"name,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } @@ -19800,6 +23401,15 @@ func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error { } rnl.Etag = &etag } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rnl.Type = &typeVar + } case "id": if v != nil { var ID string @@ -19819,12 +23429,27 @@ func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error { type ResourceNavigationLinkFormat struct { // LinkedResourceType - Resource type of the linked resource. LinkedResourceType *string `json:"linkedResourceType,omitempty"` - // Link - Link to the external resource + // Link - Link to the external resource. Link *string `json:"link,omitempty"` // ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource. ProvisioningState *string `json:"provisioningState,omitempty"` } +// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation. +type ResourceNavigationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The resource navigation links in a subnet. + Value *[]ResourceNavigationLink `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSet the base resource set for visibility and auto-approval. +type ResourceSet struct { + // Subscriptions - The list of subscriptions. + Subscriptions *[]string `json:"subscriptions,omitempty"` +} + // RetentionPolicyParameters parameters that define the retention policy for flow log. type RetentionPolicyParameters struct { // Days - Number of days to retain flow log records. @@ -19833,7 +23458,7 @@ type RetentionPolicyParameters struct { Enabled *bool `json:"enabled,omitempty"` } -// Route route resource +// Route route resource. type Route struct { autorest.Response `json:"-"` // RoutePropertiesFormat - Properties of the route. @@ -19917,7 +23542,8 @@ func (r *Route) UnmarshalJSON(body []byte) error { // RouteFilter route Filter Resource. type RouteFilter struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // RouteFilterPropertiesFormat - Properties of the route filter. *RouteFilterPropertiesFormat `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -20175,19 +23801,22 @@ func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterL return RouteFilterListResultPage{fn: getNextPage} } -// RouteFilterPropertiesFormat route Filter Resource +// RouteFilterPropertiesFormat route Filter Resource. type RouteFilterPropertiesFormat struct { // Rules - Collection of RouteFilterRules contained within a route filter. Rules *[]RouteFilterRule `json:"rules,omitempty"` // Peerings - A collection of references to express route circuit peerings. Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` + // Ipv6Peerings - A collection of references to express route circuit ipv6 peerings. + Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` } -// RouteFilterRule route Filter Rule Resource +// RouteFilterRule route Filter Rule Resource. type RouteFilterRule struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // RouteFilterRulePropertiesFormat - Properties of the route filter rule. *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -20277,7 +23906,7 @@ func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error { return nil } -// RouteFilterRuleListResult response for the ListRouteFilterRules API service call +// RouteFilterRuleListResult response for the ListRouteFilterRules API service call. type RouteFilterRuleListResult struct { autorest.Response `json:"-"` // Value - Gets a list of RouteFilterRules in a resource group. @@ -20423,13 +24052,13 @@ func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFil return RouteFilterRuleListResultPage{fn: getNextPage} } -// RouteFilterRulePropertiesFormat route Filter Rule Resource +// RouteFilterRulePropertiesFormat route Filter Rule Resource. type RouteFilterRulePropertiesFormat struct { - // Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny' + // Access - The access type of the rule. Possible values include: 'Allow', 'Deny' Access Access `json:"access,omitempty"` - // RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community' + // RouteFilterRuleType - The rule type of the rule. RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"` - // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] + // Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']. Communities *[]string `json:"communities,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` @@ -20597,7 +24226,7 @@ func (future *RouteFiltersUpdateFuture) Result(client RouteFiltersClient) (rf Ro return } -// RouteListResult response for the ListRoute API service call +// RouteListResult response for the ListRoute API service call. type RouteListResult struct { autorest.Response `json:"-"` // Value - Gets a list of routes in a resource group. @@ -20743,11 +24372,11 @@ func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) ( return RouteListResultPage{fn: getNextPage} } -// RoutePropertiesFormat route resource +// RoutePropertiesFormat route resource. type RoutePropertiesFormat struct { // AddressPrefix - The destination CIDR to which the route applies. AddressPrefix *string `json:"addressPrefix,omitempty"` - // NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' + // NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone' NextHopType RouteNextHopType `json:"nextHopType,omitempty"` // NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` @@ -21070,7 +24699,7 @@ func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableLis return RouteTableListResultPage{fn: getNextPage} } -// RouteTablePropertiesFormat route Table resource +// RouteTablePropertiesFormat route Table resource. type RouteTablePropertiesFormat struct { // Routes - Collection of routes contained within a route table. Routes *[]Route `json:"routes,omitempty"` @@ -21166,7 +24795,7 @@ func (future *RouteTablesUpdateTagsFuture) Result(client RouteTablesClient) (rt // SecurityGroup networkSecurityGroup resource. type SecurityGroup struct { autorest.Response `json:"-"` - // SecurityGroupPropertiesFormat - Properties of the network security group + // SecurityGroupPropertiesFormat - Properties of the network security group. *SecurityGroupPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -21430,7 +25059,8 @@ func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGr // SecurityGroupNetworkInterface network interface and all its associated security rules. type SecurityGroupNetworkInterface struct { // ID - ID of the network interface. - ID *string `json:"id,omitempty"` + ID *string `json:"id,omitempty"` + // SecurityRuleAssociations - All security rules associated with the network interface. SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` } @@ -21452,7 +25082,7 @@ type SecurityGroupPropertiesFormat struct { // SecurityGroupResult network configuration diagnostic result corresponded provided traffic query. type SecurityGroupResult struct { - // SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + // SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` // EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic. EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"` @@ -21555,7 +25185,7 @@ type SecurityGroupViewResult struct { // SecurityRule network security rule. type SecurityRule struct { autorest.Response `json:"-"` - // SecurityRulePropertiesFormat - Properties of the security rule + // SecurityRulePropertiesFormat - Properties of the security rule. *SecurityRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -21636,8 +25266,10 @@ func (sr *SecurityRule) UnmarshalJSON(body []byte) error { // SecurityRuleAssociations all security rules associated with the network interface. type SecurityRuleAssociations struct { + // NetworkInterfaceAssociation - Network interface and it's custom security rules. NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` + // SubnetAssociation - Subnet and it's custom security rules. + SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` // DefaultSecurityRules - Collection of default security rules of the network security group. DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` // EffectiveSecurityRules - Collection of effective security rules. @@ -21795,7 +25427,7 @@ func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRul type SecurityRulePropertiesFormat struct { // Description - A description for this rule. Restricted to 140 chars. Description *string `json:"description,omitempty"` - // Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk' + // Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk' Protocol SecurityRuleProtocol `json:"protocol,omitempty"` // SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports. SourcePortRange *string `json:"sourcePortRange,omitempty"` @@ -21817,11 +25449,11 @@ type SecurityRulePropertiesFormat struct { SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` // DestinationPortRanges - The destination port ranges. DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - // Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' + // Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny' Access SecurityRuleAccess `json:"access,omitempty"` // Priority - The priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority *int32 `json:"priority,omitempty"` - // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' + // Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound' Direction SecurityRuleDirection `json:"direction,omitempty"` // ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` @@ -21903,6 +25535,8 @@ type ServiceAssociationLink struct { Name *string `json:"name,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } @@ -21916,6 +25550,9 @@ func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) { if sal.Name != nil { objectMap["name"] = sal.Name } + if sal.Type != nil { + objectMap["type"] = sal.Type + } if sal.ID != nil { objectMap["id"] = sal.ID } @@ -21956,7 +25593,16 @@ func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error { if err != nil { return err } - sal.Etag = &etag + sal.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sal.Type = &typeVar } case "id": if v != nil { @@ -21981,13 +25627,26 @@ type ServiceAssociationLinkPropertiesFormat struct { Link *string `json:"link,omitempty"` // ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource. ProvisioningState *string `json:"provisioningState,omitempty"` + // AllowDelete - If true, the resource can be deleted. + AllowDelete *bool `json:"allowDelete,omitempty"` + // Locations - A list of locations. + Locations *[]string `json:"locations,omitempty"` +} + +// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation. +type ServiceAssociationLinksListResult struct { + autorest.Response `json:"-"` + // Value - The service association links in a subnet. + Value *[]ServiceAssociationLink `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` } // ServiceDelegationPropertiesFormat properties of a service delegation. type ServiceDelegationPropertiesFormat struct { - // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers) + // ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). ServiceName *string `json:"serviceName,omitempty"` - // Actions - Describes the actions permitted to the service upon delegation + // Actions - Describes the actions permitted to the service upon delegation. Actions *[]string `json:"actions,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the resource. ProvisioningState *string `json:"provisioningState,omitempty"` @@ -22077,7 +25736,7 @@ func (future *ServiceEndpointPoliciesUpdateFuture) Result(client ServiceEndpoint // ServiceEndpointPolicy service End point policy resource. type ServiceEndpointPolicy struct { autorest.Response `json:"-"` - // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy + // ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy. *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` // Etag - A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -22195,7 +25854,7 @@ func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error { // ServiceEndpointPolicyDefinition service Endpoint policy definitions. type ServiceEndpointPolicyDefinition struct { autorest.Response `json:"-"` - // ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition + // ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition. *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -22426,7 +26085,7 @@ func NewServiceEndpointPolicyDefinitionListResultPage(getNextPage func(context.C type ServiceEndpointPolicyDefinitionPropertiesFormat struct { // Description - A description for this rule. Restricted to 140 chars. Description *string `json:"description,omitempty"` - // Service - service endpoint name. + // Service - Service endpoint name. Service *string `json:"service,omitempty"` // ServiceResources - A list of service resources. ServiceResources *[]string `json:"serviceResources,omitempty"` @@ -22655,6 +26314,45 @@ type ServiceEndpointPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// ServiceTagInformation the service tag information. +type ServiceTagInformation struct { + // Properties - READ-ONLY; Properties of the service tag information. + Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"` + // Name - READ-ONLY; The name of service tag. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; The ID of service tag. + ID *string `json:"id,omitempty"` +} + +// ServiceTagInformationPropertiesFormat properties of the service tag information. +type ServiceTagInformationPropertiesFormat struct { + // ChangeNumber - READ-ONLY; The iteration number of service tag. + ChangeNumber *string `json:"changeNumber,omitempty"` + // Region - READ-ONLY; The region of service tag. + Region *string `json:"region,omitempty"` + // SystemService - READ-ONLY; The name of system service. + SystemService *string `json:"systemService,omitempty"` + // AddressPrefixes - READ-ONLY; The list of IP address prefixes. + AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` +} + +// ServiceTagsListResult response for the ListServiceTags API service call. +type ServiceTagsListResult struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; The name of the cloud. + Name *string `json:"name,omitempty"` + // ID - READ-ONLY; The ID of the cloud. + ID *string `json:"id,omitempty"` + // Type - READ-ONLY; The azure resource type. + Type *string `json:"type,omitempty"` + // ChangeNumber - READ-ONLY; The iteration number. + ChangeNumber *string `json:"changeNumber,omitempty"` + // Cloud - READ-ONLY; The name of the cloud. + Cloud *string `json:"cloud,omitempty"` + // Values - READ-ONLY; The list of service tag information resources. + Values *[]ServiceTagInformation `json:"values,omitempty"` +} + // String ... type String struct { autorest.Response `json:"-"` @@ -22743,7 +26441,7 @@ func (s *Subnet) UnmarshalJSON(body []byte) error { return nil } -// SubnetAssociation network interface and its custom security rules. +// SubnetAssociation subnet and it's custom security rules. type SubnetAssociation struct { // ID - READ-ONLY; Subnet ID. ID *string `json:"id,omitempty"` @@ -22752,7 +26450,7 @@ type SubnetAssociation struct { } // SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual -// network +// network. type SubnetListResult struct { autorest.Response `json:"-"` // Value - The subnets in a virtual network. @@ -22902,18 +26600,20 @@ func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) type SubnetPropertiesFormat struct { // AddressPrefix - The address prefix for the subnet. AddressPrefix *string `json:"addressPrefix,omitempty"` - // AddressPrefixes - List of address prefixes for the subnet. + // AddressPrefixes - List of address prefixes for the subnet. AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` // NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource. NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` // RouteTable - The reference of the RouteTable resource. RouteTable *RouteTable `json:"routeTable,omitempty"` + // NatGateway - Nat gateway associated with this subnet. + NatGateway *SubResource `json:"natGateway,omitempty"` // ServiceEndpoints - An array of service endpoints. ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` // ServiceEndpointPolicies - An array of service endpoint policies. ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - // InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints - InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"` + // PrivateEndpoints - READ-ONLY; An array of references to private endpoints. + PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` // IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet. IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` // IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet. @@ -22928,6 +26628,10 @@ type SubnetPropertiesFormat struct { Purpose *string `json:"purpose,omitempty"` // ProvisioningState - The provisioning state of the resource. ProvisioningState *string `json:"provisioningState,omitempty"` + // PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. + PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"` + // PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet. + PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"` } // SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -22982,6 +26686,29 @@ func (future *SubnetsDeleteFuture) Result(client SubnetsClient) (ar autorest.Res return } +// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type SubnetsPrepareNetworkPoliciesFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *SubnetsPrepareNetworkPoliciesFuture) Result(client SubnetsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsPrepareNetworkPoliciesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.SubnetsPrepareNetworkPoliciesFuture") + return + } + ar.Response = future.Response() + return +} + // SubResource reference to another subresource. type SubResource struct { // ID - Resource ID. @@ -23011,8 +26738,9 @@ type Topology struct { // CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group. CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` // LastModified - READ-ONLY; The datetime when the topology was last modified. - LastModified *date.Time `json:"lastModified,omitempty"` - Resources *[]TopologyResource `json:"resources,omitempty"` + LastModified *date.Time `json:"lastModified,omitempty"` + // Resources - A list of topology resources. + Resources *[]TopologyResource `json:"resources,omitempty"` } // TopologyAssociation resources that have an association with the parent resource. @@ -23051,16 +26779,19 @@ type TopologyResource struct { type TrafficAnalyticsConfigurationProperties struct { // Enabled - Flag to enable/disable traffic analytics. Enabled *bool `json:"enabled,omitempty"` - // WorkspaceID - The resource guid of the attached workspace + // WorkspaceID - The resource guid of the attached workspace. WorkspaceID *string `json:"workspaceId,omitempty"` - // WorkspaceRegion - The location of the attached workspace + // WorkspaceRegion - The location of the attached workspace. WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - // WorkspaceResourceID - Resource Id of the attached workspace + // WorkspaceResourceID - Resource Id of the attached workspace. WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` + // TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics. + TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"` } // TrafficAnalyticsProperties parameters that define the configuration of traffic analytics. type TrafficAnalyticsProperties struct { + // NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics. NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` } @@ -23081,7 +26812,8 @@ type TroubleshootingDetails struct { // TroubleshootingParameters parameters that define the resource to troubleshoot. type TroubleshootingParameters struct { // TargetResourceID - The target resource to troubleshoot. - TargetResourceID *string `json:"targetResourceId,omitempty"` + TargetResourceID *string `json:"targetResourceId,omitempty"` + // TroubleshootingProperties - Properties of the troubleshooting resource. *TroubleshootingProperties `json:"properties,omitempty"` } @@ -23163,15 +26895,15 @@ type TroubleshootingResult struct { Results *[]TroubleshootingDetails `json:"results,omitempty"` } -// TunnelConnectionHealth virtualNetworkGatewayConnection properties +// TunnelConnectionHealth virtualNetworkGatewayConnection properties. type TunnelConnectionHealth struct { // Tunnel - READ-ONLY; Tunnel name. Tunnel *string `json:"tunnel,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection + // IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection. IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection + // EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection. EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` // LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format. LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` @@ -23376,7 +27108,8 @@ type VerificationIPFlowResult struct { // VirtualHub virtualHub Resource. type VirtualHub struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // VirtualHubProperties - Properties of the virtual hub. *VirtualHubProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -23494,17 +27227,17 @@ type VirtualHubID struct { ID *string `json:"id,omitempty"` } -// VirtualHubProperties parameters for VirtualHub +// VirtualHubProperties parameters for VirtualHub. type VirtualHubProperties struct { - // VirtualWan - The VirtualWAN to which the VirtualHub belongs + // VirtualWan - The VirtualWAN to which the VirtualHub belongs. VirtualWan *SubResource `json:"virtualWan,omitempty"` - // VpnGateway - The VpnGateway associated with this VirtualHub + // VpnGateway - The VpnGateway associated with this VirtualHub. VpnGateway *SubResource `json:"vpnGateway,omitempty"` - // P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub + // P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub. P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` - // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub + // ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub. ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` - // VirtualNetworkConnections - list of all vnet connections with this VirtualHub. + // VirtualNetworkConnections - List of all vnet connections with this VirtualHub. VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"` // AddressPrefix - Address-prefix for this VirtualHub. AddressPrefix *string `json:"addressPrefix,omitempty"` @@ -23514,17 +27247,17 @@ type VirtualHubProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// VirtualHubRoute virtualHub route +// VirtualHubRoute virtualHub route. type VirtualHubRoute struct { - // AddressPrefixes - list of all addressPrefixes. + // AddressPrefixes - List of all addressPrefixes. AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` // NextHopIPAddress - NextHop ip address. NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` } -// VirtualHubRouteTable virtualHub route table +// VirtualHubRouteTable virtualHub route table. type VirtualHubRouteTable struct { - // Routes - list of all routes. + // Routes - List of all routes. Routes *[]VirtualHubRoute `json:"routes,omitempty"` } @@ -23734,7 +27467,7 @@ type VirtualNetworkConnectionGatewayReference struct { ID *string `json:"id,omitempty"` } -// VirtualNetworkGateway a common class for general resource information +// VirtualNetworkGateway a common class for general resource information. type VirtualNetworkGateway struct { autorest.Response `json:"-"` // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. @@ -23852,7 +27585,7 @@ func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { return nil } -// VirtualNetworkGatewayConnection a common class for general resource information +// VirtualNetworkGatewayConnection a common class for general resource information. type VirtualNetworkGatewayConnection struct { autorest.Response `json:"-"` // VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection. @@ -23970,7 +27703,7 @@ func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error { return nil } -// VirtualNetworkGatewayConnectionListEntity a common class for general resource information +// VirtualNetworkGatewayConnectionListEntity a common class for general resource information. type VirtualNetworkGatewayConnectionListEntity struct { // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection. *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` @@ -24087,7 +27820,7 @@ func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []by return nil } -// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties +// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties. type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { // AuthorizationKey - The authorizationKey. AuthorizationKey *string `json:"authorizationKey,omitempty"` @@ -24097,7 +27830,7 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` // LocalNetworkGateway2 - The reference to local network gateway resource. LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + // ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` @@ -24105,7 +27838,7 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { RoutingWeight *int32 `json:"routingWeight,omitempty"` // SharedKey - The IPSec shared key. SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` @@ -24115,7 +27848,7 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` // Peer - The reference to peerings resource. Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag + // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` @@ -24125,12 +27858,12 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` - // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` } // VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API -// service call +// service call. type VirtualNetworkGatewayConnectionListResult struct { autorest.Response `json:"-"` // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. @@ -24277,7 +28010,7 @@ func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.C return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage} } -// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties +// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties. type VirtualNetworkGatewayConnectionPropertiesFormat struct { // AuthorizationKey - The authorizationKey. AuthorizationKey *string `json:"authorizationKey,omitempty"` @@ -24287,7 +28020,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` // LocalNetworkGateway2 - The reference to local network gateway resource. LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - // ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + // ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` @@ -24295,7 +28028,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { RoutingWeight *int32 `json:"routingWeight,omitempty"` // SharedKey - The IPSec shared key. SharedKey *string `json:"sharedKey,omitempty"` - // ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' + // ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected' ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` // TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status. TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` @@ -24305,7 +28038,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` // Peer - The reference to peerings resource. Peer *SubResource `json:"peer,omitempty"` - // EnableBgp - EnableBgp flag + // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` @@ -24315,7 +28048,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` - // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding + // ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding. ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` } @@ -24458,7 +28191,7 @@ func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) Result(client Vi return } -// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway +// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway. type VirtualNetworkGatewayIPConfiguration struct { // VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration. *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` @@ -24539,9 +28272,9 @@ func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) er return nil } -// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration +// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration. type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - // PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic' + // PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic' PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` // Subnet - The reference of the subnet resource. Subnet *SubResource `json:"subnet,omitempty"` @@ -24552,7 +28285,7 @@ type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { } // VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API -// service call +// service call. type VirtualNetworkGatewayListConnectionsResult struct { autorest.Response `json:"-"` // Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group. @@ -24847,17 +28580,17 @@ func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, Vi return VirtualNetworkGatewayListResultPage{fn: getNextPage} } -// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties +// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties. type VirtualNetworkGatewayPropertiesFormat struct { // IPConfigurations - IP configurations for virtual network gateway. IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - // GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' + // GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute' GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - // VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased' + // VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased' VpnType VpnType `json:"vpnType,omitempty"` // EnableBgp - Whether BGP is enabled for this virtual network gateway or not. EnableBgp *bool `json:"enableBgp,omitempty"` - // ActiveActive - ActiveActive flag + // ActiveActive - ActiveActive flag. ActiveActive *bool `json:"activeActive,omitempty"` // GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` @@ -24867,6 +28600,8 @@ type VirtualNetworkGatewayPropertiesFormat struct { VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` // BgpSettings - Virtual network gateway's BGP speaker settings. BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` + // CustomRoutes - The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. + CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` // ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource. ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. @@ -25070,6 +28805,35 @@ func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtua return } +// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving +// the results of a long-running operation. +type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture) Result(client VirtualNetworkGatewaysClient) (vcchdlr VpnClientConnectionHealthDetailListResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vcchdlr.Response.Response, err = future.GetResult(sender); err == nil && vcchdlr.Response.Response.StatusCode != http.StatusNoContent { + vcchdlr, err = client.GetVpnclientConnectionHealthResponder(vcchdlr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture", "Result", vcchdlr.Response.Response, "Failure responding to request") + } + } + return +} + // VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct { @@ -25128,7 +28892,7 @@ func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) Result(client return } -// VirtualNetworkGatewaySku virtualNetworkGatewaySku details +// VirtualNetworkGatewaySku virtualNetworkGatewaySku details. type VirtualNetworkGatewaySku struct { // Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ' Name VirtualNetworkGatewaySkuName `json:"name,omitempty"` @@ -25773,9 +29537,9 @@ func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, Vi // VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering. type VirtualNetworkPeeringPropertiesFormat struct { - // AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space. + // AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed. + // AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` // AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network. AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` @@ -25785,7 +29549,7 @@ type VirtualNetworkPeeringPropertiesFormat struct { RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` // RemoteAddressSpace - The reference of the remote virtual network address space. RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - // PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' + // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` // ProvisioningState - The provisioning state of the resource. ProvisioningState *string `json:"provisioningState,omitempty"` @@ -25946,7 +29710,7 @@ func (future *VirtualNetworksUpdateTagsFuture) Result(client VirtualNetworksClie return } -// VirtualNetworkTap virtual Network Tap resource +// VirtualNetworkTap virtual Network Tap resource. type VirtualNetworkTap struct { autorest.Response `json:"-"` // VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties. @@ -26218,9 +29982,9 @@ type VirtualNetworkTapPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'. ProvisioningState *string `json:"provisioningState,omitempty"` - // DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap + // DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap. DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - // DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap + // DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap. DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` // DestinationPort - The VXLAN destination port that will receive the tapped traffic. DestinationPort *int32 `json:"destinationPort,omitempty"` @@ -26317,7 +30081,7 @@ type VirtualNetworkUsage struct { Limit *float64 `json:"limit,omitempty"` // Name - READ-ONLY; The name containing common and localized value for usage. Name *VirtualNetworkUsageName `json:"name,omitempty"` - // Unit - READ-ONLY; Usage units. Returns 'Count' + // Unit - READ-ONLY; Usage units. Returns 'Count'. Unit *string `json:"unit,omitempty"` } @@ -26331,7 +30095,8 @@ type VirtualNetworkUsageName struct { // VirtualWAN virtualWAN Resource. type VirtualWAN struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // VirtualWanProperties - Properties of the virtual WAN. *VirtualWanProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -26443,13 +30208,13 @@ func (vw *VirtualWAN) UnmarshalJSON(body []byte) error { return nil } -// VirtualWanProperties parameters for VirtualWAN +// VirtualWanProperties parameters for VirtualWAN. type VirtualWanProperties struct { // DisableVpnEncryption - Vpn encryption to be disabled or not. DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` // VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN. VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` - // VpnSites - READ-ONLY + // VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN. VpnSites *[]SubResource `json:"vpnSites,omitempty"` // SecurityProviderName - The Security Provider name. SecurityProviderName *string `json:"securityProviderName,omitempty"` @@ -26459,7 +30224,7 @@ type VirtualWanProperties struct { AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` // Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone' Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` - // P2SVpnServerConfigurations - list of all P2SVpnServerConfigurations associated with the virtual wan. + // P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan. P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"` // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -26529,7 +30294,8 @@ type VirtualWanSecurityProvider struct { // VirtualWanSecurityProviders collection of SecurityProviders. type VirtualWanSecurityProviders struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // SupportedProviders - List of VirtualWAN security providers. SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` } @@ -26578,13 +30344,19 @@ type VpnClientConfiguration struct { RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` // RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection. RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` + // AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadTenant *string `json:"aadTenant,omitempty"` + // AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadAudience *string `json:"aadAudience,omitempty"` + // AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. + AadIssuer *string `json:"aadIssuer,omitempty"` } -// VpnClientConnectionHealth vpnClientConnectionHealth properties +// VpnClientConnectionHealth vpnClientConnectionHealth properties. type VpnClientConnectionHealth struct { - // TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection + // TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection. TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - // TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection + // TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection. TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` // VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway. VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"` @@ -26592,6 +30364,41 @@ type VpnClientConnectionHealth struct { AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` } +// VpnClientConnectionHealthDetail VPN client connection health detail. +type VpnClientConnectionHealthDetail struct { + // VpnConnectionID - READ-ONLY; The vpn client Id. + VpnConnectionID *string `json:"vpnConnectionId,omitempty"` + // VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client. + VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"` + // VpnConnectionTime - READ-ONLY; The start time of a connected vpn client. + VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"` + // PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client. + PublicIPAddress *string `json:"publicIpAddress,omitempty"` + // PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client. + PrivateIPAddress *string `json:"privateIpAddress,omitempty"` + // VpnUserName - READ-ONLY; The user name of a connected vpn client. + VpnUserName *string `json:"vpnUserName,omitempty"` + // MaxBandwidth - READ-ONLY; The max band width. + MaxBandwidth *int64 `json:"maxBandwidth,omitempty"` + // EgressPacketsTransferred - READ-ONLY; The egress packets per second. + EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; The egress bytes per second. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // IngressPacketsTransferred - READ-ONLY; The ingress packets per second. + IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"` + // IngressBytesTransferred - READ-ONLY; The ingress bytes per second. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second. + MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"` +} + +// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health. +type VpnClientConnectionHealthDetailListResult struct { + autorest.Response `json:"-"` + // Value - List of vpn client connection health. + Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"` +} + // VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection. type VpnClientIPsecParameters struct { autorest.Response `json:"-"` @@ -26607,17 +30414,17 @@ type VpnClientIPsecParameters struct { IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"` // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128' IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"` - // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + // DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' DhGroup DhGroup `json:"dhGroup,omitempty"` - // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' + // PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM' PfsGroup PfsGroup `json:"pfsGroup,omitempty"` } -// VpnClientParameters vpn Client Parameters for package generation +// VpnClientParameters vpn Client Parameters for package generation. type VpnClientParameters struct { - // ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86' + // ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86' ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` - // AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' + // AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2' AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` // RadiusServerAuthCertificate - The public certificate data for the radius server authentication certificate as a Base-64 encoded string. Required only if external radius authentication has been configured with EAPTLS authentication. RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` @@ -26715,7 +30522,7 @@ type VpnClientRevokedCertificatePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VpnClientRootCertificate VPN client root certificate of virtual network gateway +// VpnClientRootCertificate VPN client root certificate of virtual network gateway. type VpnClientRootCertificate struct { // VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate. *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` @@ -26796,7 +30603,7 @@ func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error { return nil } -// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway +// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway. type VpnClientRootCertificatePropertiesFormat struct { // PublicCertData - The certificate public data. PublicCertData *string `json:"publicCertData,omitempty"` @@ -26806,7 +30613,8 @@ type VpnClientRootCertificatePropertiesFormat struct { // VpnConnection vpnConnection Resource. type VpnConnection struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // VpnConnectionProperties - Properties of the VPN connection. *VpnConnectionProperties `json:"properties,omitempty"` // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -26882,11 +30690,11 @@ func (vc *VpnConnection) UnmarshalJSON(body []byte) error { return nil } -// VpnConnectionProperties parameters for VpnConnection +// VpnConnectionProperties parameters for VpnConnection. type VpnConnectionProperties struct { // RemoteVpnSite - Id of the connected vpn site. RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - // RoutingWeight - routing weight for vpn connection. + // RoutingWeight - Routing weight for vpn connection. RoutingWeight *int32 `json:"routingWeight,omitempty"` // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` @@ -26900,16 +30708,22 @@ type VpnConnectionProperties struct { ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` // SharedKey - SharedKey for the vpn connection. SharedKey *string `json:"sharedKey,omitempty"` - // EnableBgp - EnableBgp flag + // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` // IpsecPolicies - The IPSec Policies to be considered by this connection. IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` - // EnableRateLimiting - EnableBgp flag + // EnableRateLimiting - EnableBgp flag. EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - // EnableInternetSecurity - Enable internet security + // EnableInternetSecurity - Enable internet security. EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // UseLocalAzureIPAddress - Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // VpnLinkConnections - List of all vpn site link connections to the gateway. + VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` } // VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -26964,7 +30778,7 @@ func (future *VpnConnectionsDeleteFuture) Result(client VpnConnectionsClient) (a return } -// VpnDeviceScriptParameters vpn device configuration script generation parameters +// VpnDeviceScriptParameters vpn device configuration script generation parameters. type VpnDeviceScriptParameters struct { // Vendor - The vendor for the vpn device. Vendor *string `json:"vendor,omitempty"` @@ -26976,7 +30790,8 @@ type VpnDeviceScriptParameters struct { // VpnGateway vpnGateway Resource. type VpnGateway struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // VpnGatewayProperties - Properties of the VPN gateway. *VpnGatewayProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -27088,11 +30903,11 @@ func (vg *VpnGateway) UnmarshalJSON(body []byte) error { return nil } -// VpnGatewayProperties parameters for VpnGateway +// VpnGatewayProperties parameters for VpnGateway. type VpnGatewayProperties struct { - // VirtualHub - The VirtualHub to which the gateway belongs + // VirtualHub - The VirtualHub to which the gateway belongs. VirtualHub *SubResource `json:"virtualHub,omitempty"` - // Connections - list of all vpn connections to the gateway. + // Connections - List of all vpn connections to the gateway. Connections *[]VpnConnection `json:"connections,omitempty"` // BgpSettings - Local network gateway's BGP speaker settings. BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` @@ -27154,6 +30969,35 @@ func (future *VpnGatewaysDeleteFuture) Result(client VpnGatewaysClient) (ar auto return } +// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type VpnGatewaysResetFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *VpnGatewaysResetFuture) Result(client VpnGatewaysClient) (vg VpnGateway, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysResetFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent { + vg, err = client.ResetResponder(vg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysResetFuture", "Result", vg.Response.Response, "Failure responding to request") + } + } + return +} + // VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type VpnGatewaysUpdateTagsFuture struct { @@ -27183,16 +31027,33 @@ func (future *VpnGatewaysUpdateTagsFuture) Result(client VpnGatewaysClient) (vg return } -// VpnProfileResponse vpn Profile Response for package generation +// VpnLinkBgpSettings BGP settings details for a link. +type VpnLinkBgpSettings struct { + // Asn - The BGP speaker's ASN. + Asn *int64 `json:"asn,omitempty"` + // BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker. + BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` +} + +// VpnLinkProviderProperties list of properties of a link provider. +type VpnLinkProviderProperties struct { + // LinkProviderName - Name of the link provider. + LinkProviderName *string `json:"linkProviderName,omitempty"` + // LinkSpeedInMbps - Link speed. + LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"` +} + +// VpnProfileResponse vpn Profile Response for package generation. type VpnProfileResponse struct { autorest.Response `json:"-"` - // ProfileURL - URL to the VPN profile + // ProfileURL - URL to the VPN profile. ProfileURL *string `json:"profileUrl,omitempty"` } // VpnSite vpnSite Resource. type VpnSite struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + // VpnSiteProperties - Properties of the VPN site. *VpnSiteProperties `json:"properties,omitempty"` // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` @@ -27296,7 +31157,193 @@ func (vs *VpnSite) UnmarshalJSON(body []byte) error { if err != nil { return err } - vs.Tags = tags + vs.Tags = tags + } + } + } + + return nil +} + +// VpnSiteID vpnSite Resource. +type VpnSiteID struct { + // VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. + VpnSite *string `json:"vpnSite,omitempty"` +} + +// VpnSiteLink vpnSiteLink Resource. +type VpnSiteLink struct { + autorest.Response `json:"-"` + // VpnSiteLinkProperties - Properties of the VPN site link. + *VpnSiteLinkProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLink. +func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vsl.VpnSiteLinkProperties != nil { + objectMap["properties"] = vsl.VpnSiteLinkProperties + } + if vsl.Name != nil { + objectMap["name"] = vsl.Name + } + if vsl.ID != nil { + objectMap["id"] = vsl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct. +func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error { + 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 vpnSiteLinkProperties VpnSiteLinkProperties + err = json.Unmarshal(*v, &vpnSiteLinkProperties) + if err != nil { + return err + } + vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vsl.Etag = &etag + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vsl.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vsl.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vsl.ID = &ID + } + } + } + + return nil +} + +// VpnSiteLinkConnection vpnSiteLinkConnection Resource. +type VpnSiteLinkConnection struct { + autorest.Response `json:"-"` + // VpnSiteLinkConnectionProperties - Properties of the VPN site link connection. + *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnSiteLinkConnection. +func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vslc.VpnSiteLinkConnectionProperties != nil { + objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties + } + if vslc.Name != nil { + objectMap["name"] = vslc.Name + } + if vslc.ID != nil { + objectMap["id"] = vslc.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct. +func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error { + 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 vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties + err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties) + if err != nil { + return err + } + vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vslc.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vslc.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vslc.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vslc.ID = &ID } } } @@ -27304,17 +31351,55 @@ func (vs *VpnSite) UnmarshalJSON(body []byte) error { return nil } -// VpnSiteID vpnSite Resource. -type VpnSiteID struct { - // VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. - VpnSite *string `json:"vpnSite,omitempty"` +// VpnSiteLinkConnectionProperties parameters for VpnConnection. +type VpnSiteLinkConnectionProperties struct { + // VpnSiteLink - Id of the connected vpn site link. + VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` + // RoutingWeight - Routing weight for vpn connection. + RoutingWeight *int32 `json:"routingWeight,omitempty"` + // ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected' + ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"` + // VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1' + VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` + // IngressBytesTransferred - READ-ONLY; Ingress bytes transferred. + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + // EgressBytesTransferred - READ-ONLY; Egress bytes transferred. + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + // ConnectionBandwidth - Expected bandwidth in MBPS. + ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"` + // SharedKey - SharedKey for the vpn connection. + SharedKey *string `json:"sharedKey,omitempty"` + // EnableBgp - EnableBgp flag. + EnableBgp *bool `json:"enableBgp,omitempty"` + // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + // IpsecPolicies - The IPSec Policies to be considered by this connection. + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + // EnableRateLimiting - EnableBgp flag. + EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` + // UseLocalAzureIPAddress - Use local azure ip to initiate connection. + UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// VpnSiteLinkProperties parameters for VpnSite. +type VpnSiteLinkProperties struct { + // LinkProperties - The link provider properties. + LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` + // IPAddress - The ip-address for the vpn-site-link. + IPAddress *string `json:"ipAddress,omitempty"` + // BgpProperties - The set of bgp properties. + BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// VpnSiteProperties parameters for VpnSite +// VpnSiteProperties parameters for VpnSite. type VpnSiteProperties struct { - // VirtualWan - The VirtualWAN to which the vpnSite belongs + // VirtualWan - The VirtualWAN to which the vpnSite belongs. VirtualWan *SubResource `json:"virtualWan,omitempty"` - // DeviceProperties - The device properties + // DeviceProperties - The device properties. DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` // IPAddress - The ip-address for the vpn-site. IPAddress *string `json:"ipAddress,omitempty"` @@ -27326,8 +31411,10 @@ type VpnSiteProperties struct { BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // IsSecuritySite - IsSecuritySite flag + // IsSecuritySite - IsSecuritySite flag. IsSecuritySite *bool `json:"isSecuritySite,omitempty"` + // VpnSiteLinks - List of all vpn site links + VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` } // VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a @@ -27438,7 +31525,8 @@ func (future *VpnSitesUpdateTagsFuture) Result(client VpnSitesClient) (vs VpnSit type Watcher struct { autorest.Response `json:"-"` // Etag - A unique read-only string that changes whenever the resource is updated. - Etag *string `json:"etag,omitempty"` + Etag *string `json:"etag,omitempty"` + // WatcherPropertiesFormat - Properties of the network watcher. *WatcherPropertiesFormat `json:"properties,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` @@ -27551,15 +31639,16 @@ func (w *Watcher) UnmarshalJSON(body []byte) error { return nil } -// WatcherListResult list of network watcher resources. +// WatcherListResult response for ListNetworkWatchers API service call. type WatcherListResult struct { autorest.Response `json:"-"` - Value *[]Watcher `json:"value,omitempty"` + // Value - List of network watcher resources. + Value *[]Watcher `json:"value,omitempty"` } // WatcherPropertiesFormat the network watcher properties. type WatcherPropertiesFormat struct { - // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + // ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -27904,3 +31993,322 @@ func (future *WatchersVerifyIPFlowFuture) Result(client WatchersClient) (vifr Ve } return } + +// WebApplicationFirewallCustomRule defines contents of a web application rule. +type WebApplicationFirewallCustomRule struct { + // Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. + Priority *int32 `json:"priority,omitempty"` + // RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid' + RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"` + // MatchConditions - List of match conditions. + MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"` + // Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog' + Action WebApplicationFirewallAction `json:"action,omitempty"` +} + +// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type WebApplicationFirewallPoliciesDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *WebApplicationFirewallPoliciesDeleteFuture) Result(client WebApplicationFirewallPoliciesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("network.WebApplicationFirewallPoliciesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// WebApplicationFirewallPolicy defines web application firewall policy. +type WebApplicationFirewallPolicy struct { + autorest.Response `json:"-"` + // WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy. + *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` + // Etag - Gets a unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // Location - Resource location. + Location *string `json:"location,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy. +func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil { + objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat + } + if wafp.Etag != nil { + objectMap["etag"] = wafp.Etag + } + if wafp.ID != nil { + objectMap["id"] = wafp.ID + } + if wafp.Location != nil { + objectMap["location"] = wafp.Location + } + if wafp.Tags != nil { + objectMap["tags"] = wafp.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct. +func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat + err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat) + if err != nil { + return err + } + wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + wafp.Etag = &etag + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + wafp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + wafp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + wafp.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + wafp.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + wafp.Tags = tags + } + } + } + + return nil +} + +// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It +// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. +type WebApplicationFirewallPolicyListResult struct { + autorest.Response `json:"-"` + // Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group. + Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"` + // NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of +// WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListResultIterator struct { + i int + page WebApplicationFirewallPolicyListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy { + if !iter.page.NotDone() { + return WebApplicationFirewallPolicy{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type. +func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator { + return WebApplicationFirewallPolicyListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool { + return wafplr.Value == nil || len(*wafplr.Value) == 0 +} + +// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { + if wafplr.NextLink == nil || len(to.String(wafplr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(wafplr.NextLink))) +} + +// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values. +type WebApplicationFirewallPolicyListResultPage struct { + fn func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error) + wafplr WebApplicationFirewallPolicyListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.wafplr) + if err != nil { + return err + } + page.wafplr = 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 *WebApplicationFirewallPolicyListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool { + return !page.wafplr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult { + return page.wafplr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy { + if page.wafplr.IsEmpty() { + return nil + } + return *page.wafplr.Value +} + +// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type. +func NewWebApplicationFirewallPolicyListResultPage(getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage { + return WebApplicationFirewallPolicyListResultPage{fn: getNextPage} +} + +// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties. +type WebApplicationFirewallPolicyPropertiesFormat struct { + // PolicySettings - Describes policySettings for policy. + PolicySettings *PolicySettings `json:"policySettings,omitempty"` + // CustomRules - Describes custom rules inside the policy. + CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"` + // ApplicationGateways - READ-ONLY; A collection of references to application gateways. + ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"` + // ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting' + ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"` +} 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 new file mode 100644 index 0000000000..97e31a4ffc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go @@ -0,0 +1,581 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// NatGatewaysClient is the network Client +type NatGatewaysClient struct { + BaseClient +} + +// NewNatGatewaysClient creates an instance of the NatGatewaysClient client. +func NewNatGatewaysClient(subscriptionID string) NatGatewaysClient { + return NewNatGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewNatGatewaysClientWithBaseURI creates an instance of the NatGatewaysClient client. +func NewNatGatewaysClientWithBaseURI(baseURI string, subscriptionID string) NatGatewaysClient { + return NatGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a nat gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// parameters - parameters supplied to the create or update nat gateway operation. +func (client NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (result NatGatewaysCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, natGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "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.Network/natGateways/{natGatewayName}", 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 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...) + 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 NatGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (result NatGateway, 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 nat gateway. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName string, natGatewayName string) (result NatGatewaysDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, natGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGroupName string, natGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "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.Network/natGateways/{natGatewayName}", 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 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...) + 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 NatGatewaysClient) 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 specified nat gateway in a specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// expand - expands referenced resources. +func (client NatGatewaysClient) Get(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (result NatGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.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, natGatewayName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "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(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) GetResponder(resp *http.Response) (result NatGateway, 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 nat gateways in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client NatGatewaysClient) List(ctx context.Context, resourceGroupName string) (result NatGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.List") + defer func() { + sc := -1 + if result.nglr.Response.Response != nil { + sc = result.nglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.nglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure sending request") + return + } + + result.nglr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client NatGatewaysClient) 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-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.Network/natGateways", 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 NatGatewaysClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) ListResponder(resp *http.Response) (result NatGatewayListResult, 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 NatGatewaysClient) listNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { + req, err := lastResults.natGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client NatGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result NatGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName) + return +} + +// ListAll gets all the Nat Gateways in a subscription. +func (client NatGatewaysClient) ListAll(ctx context.Context) (result NatGatewayListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.nglr.Response.Response != nil { + sc = result.nglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.nglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure sending request") + return + } + + result.nglr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "ListAll", resp, "Failure responding to request") + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "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}/providers/Microsoft.Network/natGateways", 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 NatGatewaysClient) ListAllSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) ListAllResponder(resp *http.Response) (result NatGatewayListResult, 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 NatGatewaysClient) listAllNextResults(ctx context.Context, lastResults NatGatewayListResult) (result NatGatewayListResult, err error) { + req, err := lastResults.natGatewayListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client NatGatewaysClient) ListAllComplete(ctx context.Context) (result NatGatewayListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListAll(ctx) + return +} + +// UpdateTags updates nat gateway tags. +// Parameters: +// resourceGroupName - the name of the resource group. +// natGatewayName - the name of the nat gateway. +// parameters - parameters supplied to update nat gateway tags. +func (client NatGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (result NatGateway, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewaysClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, natGatewayName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "UpdateTags", resp, "Failure responding to request") + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, natGatewayName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natGatewayName": autorest.Encode("path", natGatewayName), + "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.Network/natGateways/{natGatewayName}", 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 NatGatewaysClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client NatGatewaysClient) UpdateTagsResponder(resp *http.Response) (result NatGateway, 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/network/mgmt/2018-08-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go index 96851bf745..588855d36b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/operations.go @@ -76,7 +76,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go index 588b5d8da1..e7537aad48 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go @@ -79,7 +79,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +236,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -321,7 +321,7 @@ func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -354,6 +354,84 @@ func (client P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2S return } +// GetP2sVpnConnectionHealth gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the +// specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// gatewayName - the name of the P2SVpnGateway. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GetP2sVpnConnectionHealth") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetP2sVpnConnectionHealthPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure preparing request") + return + } + + result, err = client.GetP2sVpnConnectionHealthSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", result.Response(), "Failure sending request") + return + } + + return +} + +// GetP2sVpnConnectionHealthPreparer prepares the GetP2sVpnConnectionHealth request. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// GetP2sVpnConnectionHealthResponder handles the response to the GetP2sVpnConnectionHealth request. The method always +// closes the http.Response Body. +func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthResponder(resp *http.Response) (result P2SVpnGateway, 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 P2SVpnGateways in a subscription. func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) { if tracing.IsEnabled() { @@ -394,7 +472,7 @@ func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -507,7 +585,7 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -616,7 +694,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go index 79368eda50..e1cc2d0abc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go @@ -82,7 +82,7 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx contex "virtualWanName": autorest.Encode("path", virtualWanName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Contex "virtualWanName": autorest.Encode("path", virtualWanName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client P2sVpnServerConfigurationsClient) GetPreparer(ctx context.Context, "virtualWanName": autorest.Encode("path", virtualWanName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client P2sVpnServerConfigurationsClient) ListByVirtualWanPreparer(ctx cont "virtualWanName": autorest.Encode("path", virtualWanName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go index 5d13d0d82f..b6661c0564 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go @@ -91,7 +91,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,7 +172,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -412,7 +412,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -485,7 +485,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..14a291ff3b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/peerexpressroutecircuitconnections.go @@ -0,0 +1,241 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PeerExpressRouteCircuitConnectionsClient is the network Client +type PeerExpressRouteCircuitConnectionsClient struct { + BaseClient +} + +// NewPeerExpressRouteCircuitConnectionsClient creates an instance of the PeerExpressRouteCircuitConnectionsClient +// client. +func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string) PeerExpressRouteCircuitConnectionsClient { + return NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPeerExpressRouteCircuitConnectionsClientWithBaseURI creates an instance of the +// PeerExpressRouteCircuitConnectionsClient client. +func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PeerExpressRouteCircuitConnectionsClient { + return PeerExpressRouteCircuitConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified Peer Express Route Circuit Connection from the specified express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the express route circuit. +// peeringName - the name of the peering. +// connectionName - the name of the peer express route circuit connection. +func (client PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result PeerExpressRouteCircuitConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "connectionName": autorest.Encode("path", connectionName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PeerExpressRouteCircuitConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) GetResponder(resp *http.Response) (result PeerExpressRouteCircuitConnection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all global reach peer connections associated with a private peering in an express route circuit. +// Parameters: +// resourceGroupName - the name of the resource group. +// circuitName - the name of the circuit. +// peeringName - the name of the peering. +func (client PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.percclr.Response.Response != nil { + sc = result.percclr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, circuitName, peeringName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.percclr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure sending request") + return + } + + result.percclr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "circuitName": autorest.Encode("path", circuitName), + "peeringName": autorest.Encode("path", peeringName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PeerExpressRouteCircuitConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PeerExpressRouteCircuitConnectionsClient) ListResponder(resp *http.Response) (result PeerExpressRouteCircuitConnectionListResult, err error) { + err = autorest.Respond( + resp, + 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 PeerExpressRouteCircuitConnectionsClient) listNextResults(ctx context.Context, lastResults PeerExpressRouteCircuitConnectionListResult) (result PeerExpressRouteCircuitConnectionListResult, err error) { + req, err := lastResults.peerExpressRouteCircuitConnectionListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PeerExpressRouteCircuitConnectionsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result PeerExpressRouteCircuitConnectionListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, circuitName, peeringName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go similarity index 51% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go index a94aaf1254..d2a9b84893 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go @@ -25,29 +25,29 @@ import ( "net/http" ) -// InterfaceEndpointsClient is the network Client -type InterfaceEndpointsClient struct { +// PrivateEndpointsClient is the network Client +type PrivateEndpointsClient struct { BaseClient } -// NewInterfaceEndpointsClient creates an instance of the InterfaceEndpointsClient client. -func NewInterfaceEndpointsClient(subscriptionID string) InterfaceEndpointsClient { - return NewInterfaceEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +// NewPrivateEndpointsClient creates an instance of the PrivateEndpointsClient client. +func NewPrivateEndpointsClient(subscriptionID string) PrivateEndpointsClient { + return NewPrivateEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfaceEndpointsClientWithBaseURI creates an instance of the InterfaceEndpointsClient client. -func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceEndpointsClient { - return InterfaceEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} +// NewPrivateEndpointsClientWithBaseURI creates an instance of the PrivateEndpointsClient client. +func NewPrivateEndpointsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointsClient { + return PrivateEndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an interface endpoint in the specified resource group. +// CreateOrUpdate creates or updates an private endpoint in the specified resource group. // Parameters: // resourceGroupName - the name of the resource group. -// interfaceEndpointName - the name of the interface endpoint. -// parameters - parameters supplied to the create or update interface endpoint operation -func (client InterfaceEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, interfaceEndpointName string, parameters InterfaceEndpoint) (result InterfaceEndpointsCreateOrUpdateFuture, err error) { +// privateEndpointName - the name of the private endpoint. +// parameters - parameters supplied to the create or update private endpoint operation. +func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (result PrivateEndpointsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.CreateOrUpdate") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.CreateOrUpdate") defer func() { sc := -1 if result.Response() != nil { @@ -56,15 +56,15 @@ func (client InterfaceEndpointsClient) CreateOrUpdate(ctx context.Context, resou tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, interfaceEndpointName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateEndpointName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request") return } result, err = client.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request") return } @@ -72,14 +72,14 @@ func (client InterfaceEndpointsClient) CreateOrUpdate(ctx context.Context, resou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client InterfaceEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string, parameters InterfaceEndpoint) (*http.Request, error) { +func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint) (*http.Request, error) { pathParameters := map[string]interface{}{ - "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -88,7 +88,7 @@ func (client InterfaceEndpointsClient) CreateOrUpdatePreparer(ctx context.Contex autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interfaceEndpoints/{interfaceEndpointName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) @@ -96,7 +96,7 @@ func (client InterfaceEndpointsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. -func (client InterfaceEndpointsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceEndpointsCreateOrUpdateFuture, err error) { +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...) @@ -109,7 +109,7 @@ func (client InterfaceEndpointsClient) CreateOrUpdateSender(req *http.Request) ( // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client InterfaceEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result InterfaceEndpoint, err error) { +func (client PrivateEndpointsClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateEndpoint, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -120,13 +120,13 @@ func (client InterfaceEndpointsClient) CreateOrUpdateResponder(resp *http.Respon return } -// Delete deletes the specified interface endpoint. +// Delete deletes the specified private endpoint. // Parameters: // resourceGroupName - the name of the resource group. -// interfaceEndpointName - the name of the interface endpoint. -func (client InterfaceEndpointsClient) Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result InterfaceEndpointsDeleteFuture, err error) { +// privateEndpointName - the name of the private endpoint. +func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupName string, privateEndpointName string) (result PrivateEndpointsDeleteFuture, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.Delete") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.Delete") defer func() { sc := -1 if result.Response() != nil { @@ -135,15 +135,15 @@ func (client InterfaceEndpointsClient) Delete(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeletePreparer(ctx, resourceGroupName, interfaceEndpointName) + req, err := client.DeletePreparer(ctx, resourceGroupName, privateEndpointName) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Delete", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", result.Response(), "Failure sending request") return } @@ -151,14 +151,14 @@ func (client InterfaceEndpointsClient) Delete(ctx context.Context, resourceGroup } // DeletePreparer prepares the Delete request. -func (client InterfaceEndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (*http.Request, error) { +func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateEndpointName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,14 +166,14 @@ func (client InterfaceEndpointsClient) DeletePreparer(ctx context.Context, resou preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interfaceEndpoints/{interfaceEndpointName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. -func (client InterfaceEndpointsClient) DeleteSender(req *http.Request) (future InterfaceEndpointsDeleteFuture, err error) { +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...) @@ -186,7 +186,7 @@ func (client InterfaceEndpointsClient) DeleteSender(req *http.Request) (future I // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client InterfaceEndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client PrivateEndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -196,14 +196,14 @@ func (client InterfaceEndpointsClient) DeleteResponder(resp *http.Response) (res return } -// Get gets the specified interface endpoint by resource group. +// Get gets the specified private endpoint by resource group. // Parameters: // resourceGroupName - the name of the resource group. -// interfaceEndpointName - the name of the interface endpoint. +// privateEndpointName - the name of the private endpoint. // expand - expands referenced resources. -func (client InterfaceEndpointsClient) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result InterfaceEndpoint, err error) { +func (client PrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (result PrivateEndpoint, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.Get") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.Get") defer func() { sc := -1 if result.Response.Response != nil { @@ -212,36 +212,36 @@ func (client InterfaceEndpointsClient) Get(ctx context.Context, resourceGroupNam tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetPreparer(ctx, resourceGroupName, interfaceEndpointName, expand) + req, err := client.GetPreparer(ctx, resourceGroupName, privateEndpointName, expand) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Get", resp, "Failure responding to request") } return } // GetPreparer prepares the Get request. -func (client InterfaceEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (*http.Request, error) { +func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateEndpointName string, expand string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "interfaceEndpointName": autorest.Encode("path", interfaceEndpointName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "privateEndpointName": autorest.Encode("path", privateEndpointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -252,21 +252,21 @@ func (client InterfaceEndpointsClient) GetPreparer(ctx context.Context, resource preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interfaceEndpoints/{interfaceEndpointName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. -func (client InterfaceEndpointsClient) GetSender(req *http.Request) (*http.Response, error) { +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...) } // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client InterfaceEndpointsClient) GetResponder(resp *http.Response) (result InterfaceEndpoint, err error) { +func (client PrivateEndpointsClient) GetResponder(resp *http.Response) (result PrivateEndpoint, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -277,16 +277,16 @@ func (client InterfaceEndpointsClient) GetResponder(resp *http.Response) (result return } -// List gets all interface endpoints in a resource group. +// List gets all private endpoints in a resource group. // Parameters: // resourceGroupName - the name of the resource group. -func (client InterfaceEndpointsClient) List(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultPage, err error) { +func (client PrivateEndpointsClient) List(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.List") defer func() { sc := -1 - if result.ielr.Response.Response != nil { - sc = result.ielr.Response.Response.StatusCode + if result.pelr.Response.Response != nil { + sc = result.pelr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -294,33 +294,33 @@ func (client InterfaceEndpointsClient) List(ctx context.Context, resourceGroupNa result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { - result.ielr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "List", resp, "Failure sending request") + result.pelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure sending request") return } - result.ielr, err = client.ListResponder(resp) + result.pelr, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "List", resp, "Failure responding to request") } return } // ListPreparer prepares the List request. -func (client InterfaceEndpointsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { +func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,21 +328,21 @@ func (client InterfaceEndpointsClient) ListPreparer(ctx context.Context, resourc preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/interfaceEndpoints", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client InterfaceEndpointsClient) ListSender(req *http.Request) (*http.Response, error) { +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...) } // ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client InterfaceEndpointsClient) ListResponder(resp *http.Response) (result InterfaceEndpointListResult, err error) { +func (client PrivateEndpointsClient) ListResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -354,10 +354,10 @@ func (client InterfaceEndpointsClient) ListResponder(resp *http.Response) (resul } // listNextResults retrieves the next set of results, if any. -func (client InterfaceEndpointsClient) listNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) { - req, err := lastResults.interfaceEndpointListResultPreparer(ctx) +func (client PrivateEndpointsClient) listNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { + req, err := lastResults.privateEndpointListResultPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -365,19 +365,19 @@ func (client InterfaceEndpointsClient) listNextResults(ctx context.Context, last resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listNextResults", resp, "Failure responding to next results request") } return } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfaceEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultIterator, err error) { +func (client PrivateEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateEndpointListResultIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.List") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.List") defer func() { sc := -1 if result.Response().Response.Response != nil { @@ -390,14 +390,14 @@ func (client InterfaceEndpointsClient) ListComplete(ctx context.Context, resourc return } -// ListBySubscription gets all interface endpoints in a subscription. -func (client InterfaceEndpointsClient) ListBySubscription(ctx context.Context) (result InterfaceEndpointListResultPage, err error) { +// ListBySubscription gets all private endpoints in a subscription. +func (client PrivateEndpointsClient) ListBySubscription(ctx context.Context) (result PrivateEndpointListResultPage, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.ListBySubscription") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.ListBySubscription") defer func() { sc := -1 - if result.ielr.Response.Response != nil { - sc = result.ielr.Response.Response.StatusCode + if result.pelr.Response.Response != nil { + sc = result.pelr.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -405,32 +405,32 @@ func (client InterfaceEndpointsClient) ListBySubscription(ctx context.Context) ( result.fn = client.listBySubscriptionNextResults req, err := client.ListBySubscriptionPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", nil, "Failure preparing request") return } resp, err := client.ListBySubscriptionSender(req) if err != nil { - result.ielr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", resp, "Failure sending request") + result.pelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure sending request") return } - result.ielr, err = client.ListBySubscriptionResponder(resp) + result.pelr, err = client.ListBySubscriptionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "ListBySubscription", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "ListBySubscription", resp, "Failure responding to request") } return } // ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client InterfaceEndpointsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { +func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -438,21 +438,21 @@ func (client InterfaceEndpointsClient) ListBySubscriptionPreparer(ctx context.Co preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/interfaceEndpoints", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare((&http.Request{}).WithContext(ctx)) } // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. -func (client InterfaceEndpointsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { +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...) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always // closes the http.Response Body. -func (client InterfaceEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result InterfaceEndpointListResult, err error) { +func (client PrivateEndpointsClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateEndpointListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -464,10 +464,10 @@ func (client InterfaceEndpointsClient) ListBySubscriptionResponder(resp *http.Re } // listBySubscriptionNextResults retrieves the next set of results, if any. -func (client InterfaceEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) { - req, err := lastResults.interfaceEndpointListResultPreparer(ctx) +func (client PrivateEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateEndpointListResult) (result PrivateEndpointListResult, err error) { + req, err := lastResults.privateEndpointListResultPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -475,19 +475,19 @@ func (client InterfaceEndpointsClient) listBySubscriptionNextResults(ctx context resp, err := client.ListBySubscriptionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") } result, err = client.ListBySubscriptionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") } return } // ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. -func (client InterfaceEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result InterfaceEndpointListResultIterator, err error) { +func (client PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateEndpointListResultIterator, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.ListBySubscription") + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointsClient.ListBySubscription") defer func() { sc := -1 if result.Response().Response.Response != nil { 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 new file mode 100644 index 0000000000..4c31537a0f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go @@ -0,0 +1,1050 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateLinkServicesClient is the network Client +type PrivateLinkServicesClient struct { + BaseClient +} + +// NewPrivateLinkServicesClient creates an instance of the PrivateLinkServicesClient client. +func NewPrivateLinkServicesClient(subscriptionID string) PrivateLinkServicesClient { + return NewPrivateLinkServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateLinkServicesClientWithBaseURI creates an instance of the PrivateLinkServicesClient client. +func NewPrivateLinkServicesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkServicesClient { + return PrivateLinkServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckPrivateLinkServiceVisibility checks the subscription is visible to private link service +// Parameters: +// location - the location of the domain name. +// parameters - the request body of CheckPrivateLinkService API call. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServiceVisibility, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPrivateLinkServiceVisibilityPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure preparing request") + return + } + + resp, err := client.CheckPrivateLinkServiceVisibilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", resp, "Failure sending request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", resp, "Failure responding to request") + } + + return +} + +// CheckPrivateLinkServiceVisibilityPreparer prepares the CheckPrivateLinkServiceVisibility request. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPreparer(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "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}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// CheckPrivateLinkServiceVisibilityResponder handles the response to the CheckPrivateLinkServiceVisibility request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CheckPrivateLinkServiceVisibilityByResourceGroup checks the subscription is visible to private link service +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +// parameters - the request body of CheckPrivateLinkService API call. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (result PrivateLinkServiceVisibility, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx, location, resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// CheckPrivateLinkServiceVisibilityByResourceGroupPreparer prepares the CheckPrivateLinkServiceVisibilityByResourceGroup request. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/locations/{location}/checkPrivateLinkServiceVisibility", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// CheckPrivateLinkServiceVisibilityByResourceGroupResponder handles the response to the CheckPrivateLinkServiceVisibilityByResourceGroup request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupResponder(resp *http.Response) (result PrivateLinkServiceVisibility, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates an private link service in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// parameters - parameters supplied to the create or update private link service operation. +func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (result PrivateLinkServicesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "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.Network/privateLinkServices/{serviceName}", 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 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...) + 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 PrivateLinkServicesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateLinkService, 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 specified private link service. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result PrivateLinkServicesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "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.Network/privateLinkServices/{serviceName}", 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 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...) + 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 PrivateLinkServicesClient) 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 +} + +// DeletePrivateEndpointConnection delete private end point connection for a private link service in a subscription. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (result PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.DeletePrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request") + return + } + + result, err = client.DeletePrivateEndpointConnectionSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionResponder(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 specified private link service by resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// expand - expands referenced resources. +func (client PrivateLinkServicesClient) Get(ctx context.Context, resourceGroupName string, serviceName string, expand string) (result PrivateLinkService, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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, serviceName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}", 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 PrivateLinkServicesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) GetResponder(resp *http.Response) (result PrivateLinkService, 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 private link services in a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client PrivateLinkServicesClient) List(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.List") + defer func() { + sc := -1 + if result.plslr.Response.Response != nil { + sc = result.plslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.plslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure sending request") + return + } + + result.plslr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateLinkServicesClient) 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-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.Network/privateLinkServices", 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 PrivateLinkServicesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListResponder(resp *http.Response) (result PrivateLinkServiceListResult, 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 PrivateLinkServicesClient) listNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { + req, err := lastResults.privateLinkServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PrivateLinkServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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 +} + +// ListAutoApprovedPrivateLinkServices returns all of the private link service ids that can be linked to a Private +// Endpoint with auto approved in this subscription in this region. +// Parameters: +// location - the location of the domain name. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") + defer func() { + sc := -1 + if result.aaplsr.Response.Response != nil { + sc = result.aaplsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAutoApprovedPrivateLinkServicesNextResults + req, err := client.ListAutoApprovedPrivateLinkServicesPreparer(ctx, location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", nil, "Failure preparing request") + return + } + + resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) + if err != nil { + result.aaplsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure sending request") + return + } + + result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServices", resp, "Failure responding to request") + } + + return +} + +// ListAutoApprovedPrivateLinkServicesPreparer prepares the ListAutoApprovedPrivateLinkServices request. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPreparer(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-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// ListAutoApprovedPrivateLinkServicesResponder handles the response to the ListAutoApprovedPrivateLinkServices request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAutoApprovedPrivateLinkServicesNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { + req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAutoApprovedPrivateLinkServicesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAutoApprovedPrivateLinkServicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAutoApprovedPrivateLinkServicesComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, location string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices") + 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.ListAutoApprovedPrivateLinkServices(ctx, location) + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroup returns all of the private link service ids that can be linked to +// a Private Endpoint with auto approved in this subscription in this region. +// Parameters: +// location - the location of the domain name. +// resourceGroupName - the name of the resource group. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") + defer func() { + sc := -1 + if result.aaplsr.Response.Response != nil { + sc = result.aaplsr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAutoApprovedPrivateLinkServicesByResourceGroupNextResults + req, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx, location, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) + if err != nil { + result.aaplsr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure sending request") + return + } + + result.aaplsr, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListAutoApprovedPrivateLinkServicesByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer prepares the ListAutoApprovedPrivateLinkServicesByResourceGroup request. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupPreparer(ctx context.Context, location string, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/locations/{location}/autoApprovedPrivateLinkServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupResponder handles the response to the ListAutoApprovedPrivateLinkServicesByResourceGroup request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp *http.Response) (result AutoApprovedPrivateLinkServicesResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listAutoApprovedPrivateLinkServicesByResourceGroupNextResults retrieves the next set of results, if any. +func (client PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupNextResults(ctx context.Context, lastResults AutoApprovedPrivateLinkServicesResult) (result AutoApprovedPrivateLinkServicesResult, err error) { + req, err := lastResults.autoApprovedPrivateLinkServicesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAutoApprovedPrivateLinkServicesByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listAutoApprovedPrivateLinkServicesByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAutoApprovedPrivateLinkServicesByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, location string, resourceGroupName string) (result AutoApprovedPrivateLinkServicesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup") + 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.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, location, resourceGroupName) + return +} + +// ListBySubscription gets all private link service in a subscription. +func (client PrivateLinkServicesClient) ListBySubscription(ctx context.Context) (result PrivateLinkServiceListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.ListBySubscription") + defer func() { + sc := -1 + if result.plslr.Response.Response != nil { + sc = result.plslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.plslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.plslr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "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}/providers/Microsoft.Network/privateLinkServices", 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 PrivateLinkServicesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) ListBySubscriptionResponder(resp *http.Response) (result PrivateLinkServiceListResult, 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 PrivateLinkServicesClient) listBySubscriptionNextResults(ctx context.Context, lastResults PrivateLinkServiceListResult) (result PrivateLinkServiceListResult, err error) { + req, err := lastResults.privateLinkServiceListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.Context) (result PrivateLinkServiceListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.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 +} + +// UpdatePrivateEndpointConnection approve or reject private end point connection for a private link service in a +// subscription. +// Parameters: +// resourceGroupName - the name of the resource group. +// serviceName - the name of the private link service. +// peConnectionName - the name of the private end point connection. +// parameters - parameters supplied to approve or reject the private end point connection. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServicesClient.UpdatePrivateEndpointConnection") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", nil, "Failure preparing request") + return + } + + resp, err := client.UpdatePrivateEndpointConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure sending request") + return + } + + result, err = client.UpdatePrivateEndpointConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", resp, "Failure responding to request") + } + + return +} + +// UpdatePrivateEndpointConnectionPreparer prepares the UpdatePrivateEndpointConnection request. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "peConnectionName": autorest.Encode("path", peConnectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "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.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// UpdatePrivateEndpointConnectionResponder handles the response to the UpdatePrivateEndpointConnection request. The method always +// closes the http.Response Body. +func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, 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/network/mgmt/2018-08-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go index b540040c96..876800a52f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go @@ -85,7 +85,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore // Get gets the specified network profile in a specified resource group. // Parameters: // resourceGroupName - the name of the resource group. -// networkProfileName - the name of the Public IP Prefix. +// networkProfileName - the name of the public IP prefix. // expand - expands referenced resources. func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result Profile, err error) { if tracing.IsEnabled() { @@ -241,7 +241,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -545,7 +545,7 @@ func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go index b89bf865c0..89e48d9cd5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go @@ -91,7 +91,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -253,7 +253,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -421,7 +421,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +531,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -878,7 +878,7 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go index 9f74cd4842..307dc426ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go @@ -79,7 +79,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +199,7 @@ func (client PublicIPPrefixesClient) DeleteResponder(resp *http.Response) (resul // Get gets the specified public IP prefix in a specified resource group. // Parameters: // resourceGroupName - the name of the resource group. -// publicIPPrefixName - the name of the Public IP Prefix. +// publicIPPrefixName - the name of the public IP prefix. // expand - expands referenced resources. func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) { if tracing.IsEnabled() { @@ -241,7 +241,7 @@ func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..489f7abeea --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/resourcenavigationlinks.go @@ -0,0 +1,120 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ResourceNavigationLinksClient is the network Client +type ResourceNavigationLinksClient struct { + BaseClient +} + +// NewResourceNavigationLinksClient creates an instance of the ResourceNavigationLinksClient client. +func NewResourceNavigationLinksClient(subscriptionID string) ResourceNavigationLinksClient { + return NewResourceNavigationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceNavigationLinksClientWithBaseURI creates an instance of the ResourceNavigationLinksClient client. +func NewResourceNavigationLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceNavigationLinksClient { + return ResourceNavigationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of resource navigation links for a subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client ResourceNavigationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ResourceNavigationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ResourceNavigationLinksClient.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, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ResourceNavigationLinksClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks", 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 ResourceNavigationLinksClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceNavigationLinksClient) ListResponder(resp *http.Response) (result ResourceNavigationLinksListResult, 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/network/mgmt/2018-08-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go index 4b44d48d62..e31ba18c89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go @@ -91,7 +91,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +335,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -446,7 +446,7 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go index b470c9de58..3dcc02fb41 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go @@ -79,7 +79,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +242,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -318,7 +318,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -431,7 +431,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -540,7 +540,7 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go index 79e4844e9a..937a076f0d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go @@ -81,7 +81,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go index 0e54ea9511..a66a1e0519 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go @@ -79,7 +79,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go index 7611a7bad3..84a24cee46 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go @@ -79,7 +79,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go index 58adaa3589..1dbcf67033 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go @@ -81,7 +81,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..2f20bb324e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceassociationlinks.go @@ -0,0 +1,120 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServiceAssociationLinksClient is the network Client +type ServiceAssociationLinksClient struct { + BaseClient +} + +// NewServiceAssociationLinksClient creates an instance of the ServiceAssociationLinksClient client. +func NewServiceAssociationLinksClient(subscriptionID string) ServiceAssociationLinksClient { + return NewServiceAssociationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceAssociationLinksClientWithBaseURI creates an instance of the ServiceAssociationLinksClient client. +func NewServiceAssociationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServiceAssociationLinksClient { + return ServiceAssociationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service association links for a subnet. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +func (client ServiceAssociationLinksClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result ServiceAssociationLinksListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceAssociationLinksClient.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, virtualNetworkName, subnetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceAssociationLinksClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks", 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 ServiceAssociationLinksClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceAssociationLinksClient) ListResponder(resp *http.Response) (result ServiceAssociationLinksListResult, 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/network/mgmt/2018-08-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go index 344480755e..09c5054b7e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go @@ -79,7 +79,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +317,7 @@ func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go index 76d55adff0..fd7a8bcc27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go @@ -83,7 +83,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..962c21b801 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/servicetags.go @@ -0,0 +1,116 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServiceTagsClient is the network Client +type ServiceTagsClient struct { + BaseClient +} + +// NewServiceTagsClient creates an instance of the ServiceTagsClient client. +func NewServiceTagsClient(subscriptionID string) ServiceTagsClient { + return NewServiceTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceTagsClientWithBaseURI creates an instance of the ServiceTagsClient client. +func NewServiceTagsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagsClient { + return ServiceTagsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service tag information resources. +// Parameters: +// location - the location. +func (client ServiceTagsClient) List(ctx context.Context, location string) (result ServiceTagsListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagsClient.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) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceTagsClient) 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-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags", 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 ServiceTagsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceTagsClient) ListResponder(resp *http.Response) (result ServiceTagsListResult, 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/network/mgmt/2018-08-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go index a4381818b5..ec9af9af3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go @@ -81,7 +81,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +247,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +328,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,3 +397,85 @@ func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName result.page, err = client.List(ctx, resourceGroupName, virtualNetworkName) return } + +// PrepareNetworkPolicies prepares a subnet by applying network intent policies. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkName - the name of the virtual network. +// subnetName - the name of the subnet. +// prepareNetworkPoliciesRequestParameters - parameters supplied to prepare subnet by applying network intent +// policies. +func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.PrepareNetworkPolicies") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PrepareNetworkPoliciesPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure preparing request") + return + } + + result, err = client.PrepareNetworkPoliciesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request") + return + } + + return +} + +// PrepareNetworkPoliciesPreparer prepares the PrepareNetworkPolicies request. +func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subnetName": autorest.Encode("path", subnetName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "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.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies", pathParameters), + autorest.WithJSON(prepareNetworkPoliciesRequestParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PrepareNetworkPoliciesSender sends the PrepareNetworkPolicies request. The method will close the +// http.Response Body if it receives an error. +func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// PrepareNetworkPoliciesResponder handles the response to the PrepareNetworkPolicies request. The method always +// closes the http.Response Body. +func (client SubnetsClient) PrepareNetworkPoliciesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + 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/network/mgmt/2018-08-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go index b6643eeddf..69e4fba8a0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/usages.go @@ -90,7 +90,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/version.go index 5a65815f39..3b472ba57e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-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/2018-08-01" + return "Azure-SDK-For-Go/" + version.Number + " 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/2018-08-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go index 38191211d4..6a86528d1a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go @@ -79,7 +79,7 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupNa "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +536,7 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go index 71436a8da9..3595187601 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go @@ -94,7 +94,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context. "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -255,7 +255,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -333,7 +333,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -410,7 +410,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +531,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -620,7 +620,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -700,7 +700,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go index 9f58e9c192..97e2ee4195 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go @@ -86,7 +86,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -409,7 +409,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,7 +447,7 @@ func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. // virtualNetworkGatewayName - the name of the virtual network gateway. -// peer - the IP address of the peer +// peer - the IP address of the peer. func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetAdvertisedRoutes") @@ -482,7 +482,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "peer": autorest.Encode("query", peer), @@ -561,7 +561,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -642,7 +642,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -681,6 +681,84 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http. return } +// GetVpnclientConnectionHealth get VPN client connection health detail per P2S client connection of the virtual +// network gateway in the specified resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// virtualNetworkGatewayName - the name of the virtual network gateway. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetVpnclientConnectionHealthPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure preparing request") + return + } + + result, err = client.GetVpnclientConnectionHealthSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", result.Response(), "Failure sending request") + return + } + + return +} + +// GetVpnclientConnectionHealthPreparer prepares the GetVpnclientConnectionHealth request. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// GetVpnclientConnectionHealthResponder handles the response to the GetVpnclientConnectionHealth request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthResponder(resp *http.Response) (result VpnClientConnectionHealthDetailListResult, 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 +} + // GetVpnclientIpsecParameters the Get VpnclientIpsecParameters operation retrieves information about the vpnclient // ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource // provider. @@ -721,7 +799,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -799,7 +877,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -881,7 +959,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -996,7 +1074,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1106,7 +1184,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1187,7 +1265,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1273,7 +1351,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1358,7 +1436,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1430,7 +1508,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1517,7 +1595,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer( "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go index 8979dcad3f..fe6d6b5435 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go @@ -82,7 +82,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -163,7 +163,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +247,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go index cc586a16de..023a9e8600 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go @@ -85,7 +85,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "ipAddress": autorest.Encode("query", IPAddress), @@ -123,7 +123,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *ht // Parameters: // resourceGroupName - the name of the resource group. // virtualNetworkName - the name of the virtual network. -// parameters - parameters supplied to the create or update virtual network operation +// parameters - parameters supplied to the create or update virtual network operation. func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate") @@ -158,7 +158,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -399,7 +399,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -509,7 +509,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -624,7 +624,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -733,7 +733,7 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go index 12d02c76b8..98756f901d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go @@ -111,7 +111,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -190,7 +190,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -272,7 +272,7 @@ func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resource "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -345,7 +345,7 @@ func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -458,7 +458,7 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -567,7 +567,7 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go index 295c55a630..8f07a0cf22 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go @@ -79,7 +79,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupNa "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +536,7 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go index c2997a38af..37ff6797c2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go @@ -82,7 +82,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go similarity index 87% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go index 7ec09a11db..ab7bd39c30 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go @@ -79,7 +79,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -497,6 +497,83 @@ func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, return } +// Reset resets the primary of the vpn gateway in the specified resource group. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysResetFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Reset") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ResetPreparer(ctx, resourceGroupName, gatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure preparing request") + return + } + + result, err = client.ResetSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", result.Response(), "Failure sending request") + return + } + + return +} + +// ResetPreparer prepares the Reset request. +func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroupName string, gatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// ResetResponder handles the response to the Reset request. The method always +// closes the http.Response Body. +func (client VpnGatewaysClient) ResetResponder(resp *http.Response) (result VpnGateway, 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 +} + // UpdateTags updates virtual wan vpn gateway tags. // Parameters: // resourceGroupName - the resource group name of the VpnGateway. @@ -536,7 +613,7 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..3e8da0eec6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnlinkconnections.go @@ -0,0 +1,158 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VpnLinkConnectionsClient is the network Client +type VpnLinkConnectionsClient struct { + BaseClient +} + +// NewVpnLinkConnectionsClient creates an instance of the VpnLinkConnectionsClient client. +func NewVpnLinkConnectionsClient(subscriptionID string) VpnLinkConnectionsClient { + return NewVpnLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnLinkConnectionsClientWithBaseURI creates an instance of the VpnLinkConnectionsClient client. +func NewVpnLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnLinkConnectionsClient { + return VpnLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByVpnConnection retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +func (client VpnLinkConnectionsClient) ListByVpnConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") + defer func() { + sc := -1 + if result.lvslcr.Response.Response != nil { + sc = result.lvslcr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnConnectionNextResults + req, err := client.ListByVpnConnectionPreparer(ctx, resourceGroupName, gatewayName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnConnectionSender(req) + if err != nil { + result.lvslcr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure sending request") + return + } + + result.lvslcr, err = client.ListByVpnConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ListByVpnConnection", resp, "Failure responding to request") + } + + return +} + +// ListByVpnConnectionPreparer prepares the ListByVpnConnection request. +func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// ListByVpnConnectionResponder handles the response to the ListByVpnConnection request. The method always +// closes the http.Response Body. +func (client VpnLinkConnectionsClient) ListByVpnConnectionResponder(resp *http.Response) (result ListVpnSiteLinkConnectionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnConnectionNextResults retrieves the next set of results, if any. +func (client VpnLinkConnectionsClient) listByVpnConnectionNextResults(ctx context.Context, lastResults ListVpnSiteLinkConnectionsResult) (result ListVpnSiteLinkConnectionsResult, err error) { + req, err := lastResults.listVpnSiteLinkConnectionsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnConnectionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnConnectionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "listByVpnConnectionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnConnectionComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnLinkConnectionsClient) ListByVpnConnectionComplete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result ListVpnSiteLinkConnectionsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnLinkConnectionsClient.ListByVpnConnection") + 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.ListByVpnConnection(ctx, resourceGroupName, gatewayName, connectionName) + return +} 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 new file mode 100644 index 0000000000..5ded318f62 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinkconnections.go @@ -0,0 +1,122 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VpnSiteLinkConnectionsClient is the network Client +type VpnSiteLinkConnectionsClient struct { + BaseClient +} + +// NewVpnSiteLinkConnectionsClient creates an instance of the VpnSiteLinkConnectionsClient client. +func NewVpnSiteLinkConnectionsClient(subscriptionID string) VpnSiteLinkConnectionsClient { + return NewVpnSiteLinkConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSiteLinkConnectionsClientWithBaseURI creates an instance of the VpnSiteLinkConnectionsClient client. +func NewVpnSiteLinkConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinkConnectionsClient { + return VpnSiteLinkConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the details of a vpn site link connection. +// Parameters: +// resourceGroupName - the resource group name of the VpnGateway. +// gatewayName - the name of the gateway. +// connectionName - the name of the vpn connection. +// linkConnectionName - the name of the vpn connection. +func (client VpnSiteLinkConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (result VpnSiteLinkConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinkConnectionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinkConnectionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "gatewayName": autorest.Encode("path", gatewayName), + "linkConnectionName": autorest.Encode("path", linkConnectionName), + "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.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}", 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 VpnSiteLinkConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinkConnectionsClient) GetResponder(resp *http.Response) (result VpnSiteLinkConnection, 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/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 new file mode 100644 index 0000000000..e84e41efb2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitelinks.go @@ -0,0 +1,235 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VpnSiteLinksClient is the network Client +type VpnSiteLinksClient struct { + BaseClient +} + +// NewVpnSiteLinksClient creates an instance of the VpnSiteLinksClient client. +func NewVpnSiteLinksClient(subscriptionID string) VpnSiteLinksClient { + return NewVpnSiteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVpnSiteLinksClientWithBaseURI creates an instance of the VpnSiteLinksClient client. +func NewVpnSiteLinksClientWithBaseURI(baseURI string, subscriptionID string) VpnSiteLinksClient { + return VpnSiteLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get retrieves the details of a VPN site link. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite. +// vpnSiteLinkName - the name of the VpnSiteLink being retrieved. +func (client VpnSiteLinksClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (result VpnSiteLink, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteLinkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteLinkName": autorest.Encode("path", vpnSiteLinkName), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + 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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}", 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 VpnSiteLinksClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VpnSiteLinksClient) GetResponder(resp *http.Response) (result VpnSiteLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnSite lists all the vpnSiteLinks in a resource group for a vpn site. +// Parameters: +// resourceGroupName - the resource group name of the VpnSite. +// vpnSiteName - the name of the VpnSite. +func (client VpnSiteLinksClient) ListByVpnSite(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") + defer func() { + sc := -1 + if result.lvslr.Response.Response != nil { + sc = result.lvslr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnSiteNextResults + req, err := client.ListByVpnSitePreparer(ctx, resourceGroupName, vpnSiteName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnSiteSender(req) + if err != nil { + result.lvslr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure sending request") + return + } + + result.lvslr, err = client.ListByVpnSiteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "ListByVpnSite", resp, "Failure responding to request") + } + + return +} + +// ListByVpnSitePreparer prepares the ListByVpnSite request. +func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, resourceGroupName string, vpnSiteName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnSiteName": autorest.Encode("path", vpnSiteName), + } + + const APIVersion = "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.Network/vpnSites/{vpnSiteName}/vpnSiteLinks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// ListByVpnSiteResponder handles the response to the ListByVpnSite request. The method always +// closes the http.Response Body. +func (client VpnSiteLinksClient) ListByVpnSiteResponder(resp *http.Response) (result ListVpnSiteLinksResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnSiteNextResults retrieves the next set of results, if any. +func (client VpnSiteLinksClient) listByVpnSiteNextResults(ctx context.Context, lastResults ListVpnSiteLinksResult) (result ListVpnSiteLinksResult, err error) { + req, err := lastResults.listVpnSiteLinksResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnSiteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnSiteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VpnSiteLinksClient", "listByVpnSiteNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnSiteComplete enumerates all values, automatically crossing page boundaries as required. +func (client VpnSiteLinksClient) ListByVpnSiteComplete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result ListVpnSiteLinksResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VpnSiteLinksClient.ListByVpnSite") + 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.ListByVpnSite(ctx, resourceGroupName, vpnSiteName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go index 3f8f7f02b3..99f004ea19 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go @@ -79,7 +79,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +241,7 @@ func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +536,7 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go index 4bc1c05a1e..65d1a24ff3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go @@ -21,6 +21,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -56,6 +57,12 @@ func (client VpnSitesConfigurationClient) Download(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: request, + Constraints: []validation.Constraint{{Target: "request.OutputBlobSasURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.VpnSitesConfigurationClient", "Download", err.Error()) + } + req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request) if err != nil { err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request") @@ -79,7 +86,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go index fd377e9826..e330a1b979 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go @@ -89,7 +89,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +175,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +330,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -412,7 +412,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -457,7 +457,7 @@ func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Resp // Parameters: // resourceGroupName - the name of the network watcher resource group. // networkWatcherName - the name of the network watcher resource. -// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status. +// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status. func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus") @@ -498,7 +498,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -585,7 +585,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -673,7 +673,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -759,7 +759,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -794,7 +794,7 @@ func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result T return } -// GetTroubleshooting initiate troubleshooting on a specified resource +// GetTroubleshooting initiate troubleshooting on a specified resource. // Parameters: // resourceGroupName - the name of the resource group. // networkWatcherName - the name of the network watcher resource. @@ -843,7 +843,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -884,7 +884,7 @@ func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (r return } -// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource +// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource. // Parameters: // resourceGroupName - the name of the resource group. // networkWatcherName - the name of the network watcher resource. @@ -929,7 +929,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1015,7 +1015,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1098,7 +1098,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1170,7 +1170,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1242,7 +1242,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1283,7 +1283,7 @@ func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response return } -// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource. +// SetFlowLogConfiguration configures flow log and traffic analytics (optional) on a specified resource. // Parameters: // resourceGroupName - the name of the network watcher resource group. // networkWatcherName - the name of the network watcher resource. @@ -1340,7 +1340,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1426,7 +1426,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1510,7 +1510,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-08-01" + const APIVersion = "2019-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } 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 new file mode 100644 index 0000000000..f250d22399 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go @@ -0,0 +1,517 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// WebApplicationFirewallPoliciesClient is the network Client +type WebApplicationFirewallPoliciesClient struct { + BaseClient +} + +// NewWebApplicationFirewallPoliciesClient creates an instance of the WebApplicationFirewallPoliciesClient client. +func NewWebApplicationFirewallPoliciesClient(subscriptionID string) WebApplicationFirewallPoliciesClient { + return NewWebApplicationFirewallPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWebApplicationFirewallPoliciesClientWithBaseURI creates an instance of the WebApplicationFirewallPoliciesClient +// client. +func NewWebApplicationFirewallPoliciesClientWithBaseURI(baseURI string, subscriptionID string) WebApplicationFirewallPoliciesClient { + return WebApplicationFirewallPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or update policy with specified rule set name within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +// parameters - policy to be created. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (result WebApplicationFirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, policyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, policyName string, parameters WebApplicationFirewallPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes Policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPoliciesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve protection policy with specified name within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +// policyName - the name of the policy. +func (client WebApplicationFirewallPoliciesClient) Get(ctx context.Context, resourceGroupName string, policyName string) (result WebApplicationFirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: policyName, + Constraints: []validation.Constraint{{Target: "policyName", Name: validation.MaxLength, Rule: 128, Chain: nil}}}}); err != nil { + return result, validation.NewError("network.WebApplicationFirewallPoliciesClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, policyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGroupName string, policyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "policyName": autorest.Encode("path", policyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) GetResponder(resp *http.Response) (result WebApplicationFirewallPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the protection policies within a resource group. +// Parameters: +// resourceGroupName - the name of the resource group. +func (client WebApplicationFirewallPoliciesClient) List(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.List") + defer func() { + sc := -1 + if result.wafplr.Response.Response != nil { + sc = result.wafplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.wafplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure sending request") + return + } + + result.wafplr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "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.Network/ApplicationGatewayWebApplicationFirewallPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) ListResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 WebApplicationFirewallPoliciesClient) listNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { + req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, resourceGroupName string) (result WebApplicationFirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName) + return +} + +// ListAll gets all the WAF policies in a subscription. +func (client WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context) (result WebApplicationFirewallPolicyListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") + defer func() { + sc := -1 + if result.wafplr.Response.Response != nil { + sc = result.wafplr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listAllNextResults + req, err := client.ListAllPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.wafplr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure sending request") + return + } + + result.wafplr, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "ListAll", resp, "Failure responding to request") + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client WebApplicationFirewallPoliciesClient) ListAllSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client WebApplicationFirewallPoliciesClient) ListAllResponder(resp *http.Response) (result WebApplicationFirewallPolicyListResult, err error) { + err = autorest.Respond( + resp, + 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 WebApplicationFirewallPoliciesClient) listAllNextResults(ctx context.Context, lastResults WebApplicationFirewallPolicyListResult) (result WebApplicationFirewallPolicyListResult, err error) { + req, err := lastResults.webApplicationFirewallPolicyListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure sending next results request") + } + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "listAllNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListAllComplete enumerates all values, automatically crossing page boundaries as required. +func (client WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context) (result WebApplicationFirewallPolicyListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPoliciesClient.ListAll") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListAll(ctx) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/BUILD.bazel b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD.bazel similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/BUILD.bazel rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD.bazel index 09b126578c..ec10721bcb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/BUILD.bazel +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/BUILD.bazel @@ -14,14 +14,15 @@ go_library( "usages.go", "version.go", ], - importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage", - importpath = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage", + importmap = "k8s.io/cloud-provider-azure/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage", + importpath = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage", visibility = ["//visibility:public"], deps = [ "//vendor/github.com/Azure/azure-sdk-for-go/version:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/date:go_default_library", + "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/validation:go_default_library", "//vendor/github.com/Azure/go-autorest/tracing:go_default_library", ], diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/accounts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go index 755d3fb86c..86bb049aae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/accounts.go @@ -92,7 +92,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -193,7 +193,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -293,7 +293,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -380,7 +380,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -480,7 +480,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,7 +562,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -657,7 +657,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -746,7 +746,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -838,7 +838,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -935,7 +935,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1032,7 +1032,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1067,6 +1067,97 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result return } +// RevokeUserDelegationKeys revoke user delegation keys. +// 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 AccountsClient) RevokeUserDelegationKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RevokeUserDelegationKeys") + 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}}}}); err != nil { + return result, validation.NewError("storage.AccountsClient", "RevokeUserDelegationKeys", err.Error()) + } + + req, err := client.RevokeUserDelegationKeysPreparer(ctx, resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", nil, "Failure preparing request") + return + } + + resp, err := client.RevokeUserDelegationKeysSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", resp, "Failure sending request") + return + } + + result, err = client.RevokeUserDelegationKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RevokeUserDelegationKeys", resp, "Failure responding to request") + } + + return +} + +// RevokeUserDelegationKeysPreparer prepares the RevokeUserDelegationKeys request. +func (client AccountsClient) RevokeUserDelegationKeysPreparer(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-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.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// 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...) +} + +// RevokeUserDelegationKeysResponder handles the response to the RevokeUserDelegationKeys request. The method always +// closes the http.Response Body. +func (client AccountsClient) RevokeUserDelegationKeysResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + // Update the update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. // It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; // the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value @@ -1132,7 +1223,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobcontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobcontainers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go index 49b40a6424..ed9b69fef1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobcontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobcontainers.go @@ -111,7 +111,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -223,7 +223,7 @@ func (client BlobContainersClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +335,7 @@ func (client BlobContainersClient) CreateOrUpdateImmutabilityPolicyPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +443,7 @@ func (client BlobContainersClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,7 +548,7 @@ func (client BlobContainersClient) DeleteImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -658,7 +658,7 @@ func (client BlobContainersClient) ExtendImmutabilityPolicyPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -763,7 +763,7 @@ func (client BlobContainersClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -867,7 +867,7 @@ func (client BlobContainersClient) GetImmutabilityPolicyPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -972,7 +972,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -981,7 +981,7 @@ func (client BlobContainersClient) LeasePreparer(ctx context.Context, resourceGr autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease", pathParameters), autorest.WithQueryParameters(queryParameters)) if parameters != nil { preparer = autorest.DecoratePreparer(preparer, @@ -1017,13 +1017,16 @@ func (client BlobContainersClient) LeaseResponder(resp *http.Response) (result L // 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 BlobContainersClient) List(ctx context.Context, resourceGroupName string, accountName string) (result ListContainerItems, err error) { +// skipToken - optional. Continuation token for the list operation. +// 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, skipToken string, maxpagesize string, filter string) (result ListContainerItemsPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.List") defer func() { sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode + if result.lci.Response.Response != nil { + sc = result.lci.Response.Response.StatusCode } tracing.EndSpan(ctx, sc, err) }() @@ -1041,7 +1044,8 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s return result, validation.NewError("storage.BlobContainersClient", "List", err.Error()) } - req, err := client.ListPreparer(ctx, resourceGroupName, accountName) + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, accountName, skipToken, maxpagesize, filter) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", nil, "Failure preparing request") return @@ -1049,12 +1053,12 @@ func (client BlobContainersClient) List(ctx context.Context, resourceGroupName s resp, err := client.ListSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.lci.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", resp, "Failure sending request") return } - result, err = client.ListResponder(resp) + result.lci, err = client.ListResponder(resp) if err != nil { err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "List", resp, "Failure responding to request") } @@ -1063,17 +1067,26 @@ 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) (*http.Request, error) { +func (client BlobContainersClient) ListPreparer(ctx context.Context, resourceGroupName string, accountName string, skipToken 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 = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(skipToken) > 0 { + queryParameters["$skipToken"] = autorest.Encode("query", skipToken) + } + 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(), @@ -1103,6 +1116,43 @@ func (client BlobContainersClient) ListResponder(resp *http.Response) (result Li return } +// listNextResults retrieves the next set of results, if any. +func (client BlobContainersClient) listNextResults(ctx context.Context, lastResults ListContainerItems) (result ListContainerItems, err error) { + req, err := lastResults.listContainerItemsPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "storage.BlobContainersClient", "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.BlobContainersClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.BlobContainersClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BlobContainersClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, skipToken string, maxpagesize string, filter string) (result ListContainerItemsIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BlobContainersClient.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, skipToken, maxpagesize, filter) + return +} + // LockImmutabilityPolicy sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is // ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. // Parameters: @@ -1173,7 +1223,7 @@ func (client BlobContainersClient) LockImmutabilityPolicyPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1277,7 +1327,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1381,7 +1431,7 @@ func (client BlobContainersClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go index 8a93b29bb0..1ae2999d20 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/blobservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/blobservices.go @@ -102,7 +102,7 @@ func (client BlobServicesClient) GetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -207,7 +207,7 @@ func (client BlobServicesClient) SetServicePropertiesPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go index 4ffb5928a8..95300b8890 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/client.go @@ -1,4 +1,4 @@ -// Package storage implements the Azure ARM Storage service API version . +// Package storage implements the Azure ARM Storage service API version 2019-04-01. // // The Azure Storage Management API. package storage diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/managementpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go similarity index 91% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/managementpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go index d16df3d69b..5fe6688904 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/managementpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/managementpolicies.go @@ -41,14 +41,14 @@ func NewManagementPoliciesClientWithBaseURI(baseURI string, subscriptionID strin return ManagementPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate sets the data policy rules associated with the specified storage account. +// CreateOrUpdate sets the managementpolicy to 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. -// properties - the data policy rules to set to a storage account. -func (client ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPoliciesRulesSetParameter) (result AccountManagementPolicies, err error) { +// properties - the ManagementPolicy set to a storage account. +func (client ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPolicy) (result ManagementPolicy, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ManagementPoliciesClient.CreateOrUpdate") defer func() { @@ -68,7 +68,12 @@ func (client ManagementPoliciesClient) CreateOrUpdate(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: properties, + Constraints: []validation.Constraint{{Target: "properties.ManagementPolicyProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "properties.ManagementPolicyProperties.Policy", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "properties.ManagementPolicyProperties.Policy.Rules", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("storage.ManagementPoliciesClient", "CreateOrUpdate", err.Error()) } @@ -94,7 +99,7 @@ func (client ManagementPoliciesClient) CreateOrUpdate(ctx context.Context, resou } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPoliciesRulesSetParameter) (*http.Request, error) { +func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, accountName string, properties ManagementPolicy) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "managementPolicyName": autorest.Encode("path", "default"), @@ -102,7 +107,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-03-01-preview" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,7 +131,7 @@ func (client ManagementPoliciesClient) CreateOrUpdateSender(req *http.Request) ( // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client ManagementPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result AccountManagementPolicies, err error) { +func (client ManagementPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ManagementPolicy, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -137,7 +142,7 @@ func (client ManagementPoliciesClient) CreateOrUpdateResponder(resp *http.Respon return } -// Delete deletes the data policy rules associated with the specified storage account. +// Delete deletes the managementpolicy associated with the specified storage account. // Parameters: // resourceGroupName - the name of the resource group within the user's subscription. The name is case // insensitive. @@ -197,7 +202,7 @@ func (client ManagementPoliciesClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-03-01-preview" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -229,13 +234,13 @@ func (client ManagementPoliciesClient) DeleteResponder(resp *http.Response) (res return } -// Get gets the data policy rules associated with the specified storage account. +// Get gets the managementpolicy 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. -func (client ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result AccountManagementPolicies, err error) { +func (client ManagementPoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result ManagementPolicy, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ManagementPoliciesClient.Get") defer func() { @@ -289,7 +294,7 @@ func (client ManagementPoliciesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-03-01-preview" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -311,7 +316,7 @@ func (client ManagementPoliciesClient) GetSender(req *http.Request) (*http.Respo // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client ManagementPoliciesClient) GetResponder(resp *http.Response) (result AccountManagementPolicies, err error) { +func (client ManagementPoliciesClient) GetResponder(resp *http.Response) (result ManagementPolicy, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go similarity index 87% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go index fa9a8acbc7..83ae6dded4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/models.go @@ -23,11 +23,13 @@ import ( "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/storage/mgmt/2018-07-01/storage" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" // AccessTier enumerates the values for access tier. type AccessTier string @@ -140,6 +142,21 @@ func PossibleDefaultActionValues() []DefaultAction { return []DefaultAction{DefaultActionAllow, DefaultActionDeny} } +// DirectoryServiceOptions enumerates the values for directory service options. +type DirectoryServiceOptions string + +const ( + // DirectoryServiceOptionsAADDS ... + DirectoryServiceOptionsAADDS DirectoryServiceOptions = "AADDS" + // DirectoryServiceOptionsNone ... + DirectoryServiceOptionsNone DirectoryServiceOptions = "None" +) + +// PossibleDirectoryServiceOptionsValues returns an array of possible values for the DirectoryServiceOptions const type. +func PossibleDirectoryServiceOptionsValues() []DirectoryServiceOptions { + return []DirectoryServiceOptions{DirectoryServiceOptionsAADDS, DirectoryServiceOptionsNone} +} + // GeoReplicationStatus enumerates the values for geo replication status. type GeoReplicationStatus string @@ -462,17 +479,21 @@ const ( PremiumZRS SkuName = "Premium_ZRS" // StandardGRS ... StandardGRS SkuName = "Standard_GRS" + // StandardGZRS ... + StandardGZRS SkuName = "Standard_GZRS" // StandardLRS ... StandardLRS SkuName = "Standard_LRS" // StandardRAGRS ... StandardRAGRS SkuName = "Standard_RAGRS" + // StandardRAGZRS ... + StandardRAGZRS SkuName = "Standard_RAGZRS" // StandardZRS ... StandardZRS SkuName = "Standard_ZRS" ) // PossibleSkuNameValues returns an array of possible values for the SkuName const type. func PossibleSkuNameValues() []SkuName { - return []SkuName{PremiumLRS, PremiumZRS, StandardGRS, StandardLRS, StandardRAGRS, StandardZRS} + return []SkuName{PremiumLRS, PremiumZRS, StandardGRS, StandardGZRS, StandardLRS, StandardRAGRS, StandardRAGZRS, StandardZRS} } // SkuTier enumerates the values for sku tier. @@ -813,84 +834,6 @@ type AccountListResult struct { Value *[]Account `json:"value,omitempty"` } -// AccountManagementPolicies the Get Storage Account ManagementPolicies operation response. -type AccountManagementPolicies struct { - autorest.Response `json:"-"` - // AccountManagementPoliciesRulesProperty - READ-ONLY; Returns the Storage Account Data Policies Rules. - *AccountManagementPoliciesRulesProperty `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 AccountManagementPolicies. -func (amp AccountManagementPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for AccountManagementPolicies struct. -func (amp *AccountManagementPolicies) UnmarshalJSON(body []byte) error { - 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 accountManagementPoliciesRulesProperty AccountManagementPoliciesRulesProperty - err = json.Unmarshal(*v, &accountManagementPoliciesRulesProperty) - if err != nil { - return err - } - amp.AccountManagementPoliciesRulesProperty = &accountManagementPoliciesRulesProperty - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - amp.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - amp.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - amp.Type = &typeVar - } - } - } - - return nil -} - -// AccountManagementPoliciesRulesProperty the Storage Account Data Policies properties. -type AccountManagementPoliciesRulesProperty struct { - // LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified. - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - // Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - Policy interface{} `json:"policy,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: 'Creating', 'ResolvingDNS', 'Succeeded' @@ -917,8 +860,8 @@ type AccountProperties struct { Encryption *Encryption `json:"encryption,omitempty"` // AccessTier - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` - // EnableAzureFilesAadIntegration - Enables Azure Files AAD Integration for SMB if sets to true. - EnableAzureFilesAadIntegration *bool `json:"azureFilesAadIntegration,omitempty"` + // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // NetworkRuleSet - READ-ONLY; Network rule set @@ -941,9 +884,9 @@ type AccountPropertiesCreateParameters struct { NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` - // EnableAzureFilesAadIntegration - Enables Azure Files AAD Integration for SMB if sets to true. - EnableAzureFilesAadIntegration *bool `json:"azureFilesAadIntegration,omitempty"` - // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. + // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` + // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` @@ -957,8 +900,8 @@ type AccountPropertiesUpdateParameters struct { Encryption *Encryption `json:"encryption,omitempty"` // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` - // EnableAzureFilesAadIntegration - Enables Azure Files AAD Integration for SMB if sets to true. - EnableAzureFilesAadIntegration *bool `json:"azureFilesAadIntegration,omitempty"` + // AzureFilesIdentityBasedAuthentication - Provides the identity based authentication settings for Azure Files. + AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` // NetworkRuleSet - Network rule set @@ -1151,6 +1094,12 @@ type AzureEntityResource struct { Type *string `json:"type,omitempty"` } +// AzureFilesIdentityBasedAuthentication settings for Azure Files identity based authentication. +type AzureFilesIdentityBasedAuthentication struct { + // DirectoryServiceOptions - Indicates the directory service used. Possible values include: 'DirectoryServiceOptionsNone', 'DirectoryServiceOptionsAADDS' + DirectoryServiceOptions DirectoryServiceOptions `json:"directoryServiceOptions,omitempty"` +} + // BlobContainer properties of the blob container, including Id, resource name, resource type, Etag. type BlobContainer struct { autorest.Response `json:"-"` @@ -1316,6 +1265,8 @@ type BlobServicePropertiesProperties struct { DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty"` // DeleteRetentionPolicy - The blob service properties for soft delete. DeleteRetentionPolicy *DeleteRetentionPolicy `json:"deleteRetentionPolicy,omitempty"` + // AutomaticSnapshotPolicyEnabled - Automatic Snapshot is enabled if set to true. + AutomaticSnapshotPolicyEnabled *bool `json:"automaticSnapshotPolicyEnabled,omitempty"` } // CheckNameAvailabilityResult the CheckNameAvailability operation response. @@ -1393,6 +1344,18 @@ type CustomDomain struct { UseSubDomainName *bool `json:"useSubDomainName,omitempty"` } +// DateAfterCreation object to define the number of days after creation. +type DateAfterCreation struct { + // DaysAfterCreationGreaterThan - Value indicating the age in days after creation + DaysAfterCreationGreaterThan *float64 `json:"daysAfterCreationGreaterThan,omitempty"` +} + +// DateAfterModification object to define the number of days after last modification. +type DateAfterModification struct { + // DaysAfterModificationGreaterThan - Value indicating the age in days after last modification + DaysAfterModificationGreaterThan *float64 `json:"daysAfterModificationGreaterThan,omitempty"` +} + // DeleteRetentionPolicy the blob service properties for soft delete. type DeleteRetentionPolicy struct { // Enabled - Indicates whether DeleteRetentionPolicy is enabled for the Blob service. @@ -1779,11 +1742,151 @@ func (lci *ListContainerItem) UnmarshalJSON(body []byte) error { return nil } -// ListContainerItems the list of blob containers. +// ListContainerItems response schema. Contains list of blobs returned, and if paging is requested or +// required, a URL to next page of containers. type ListContainerItems struct { autorest.Response `json:"-"` - // Value - The list of blob containers. + // Value - READ-ONLY; List of blobs containers returned. Value *[]ListContainerItem `json:"value,omitempty"` + // NextLink - READ-ONLY; Request URL that can be used to query next page of containers. Returned when total number of requested containers exceed maximum page size. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListContainerItemsIterator provides access to a complete listing of ListContainerItem values. +type ListContainerItemsIterator struct { + i int + page ListContainerItemsPage +} + +// 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 *ListContainerItemsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsIterator.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 *ListContainerItemsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListContainerItemsIterator) 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 ListContainerItemsIterator) Response() ListContainerItems { + 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 ListContainerItemsIterator) Value() ListContainerItem { + if !iter.page.NotDone() { + return ListContainerItem{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListContainerItemsIterator type. +func NewListContainerItemsIterator(page ListContainerItemsPage) ListContainerItemsIterator { + return ListContainerItemsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lci ListContainerItems) IsEmpty() bool { + return lci.Value == nil || len(*lci.Value) == 0 +} + +// listContainerItemsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lci ListContainerItems) listContainerItemsPreparer(ctx context.Context) (*http.Request, error) { + if lci.NextLink == nil || len(to.String(lci.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lci.NextLink))) +} + +// ListContainerItemsPage contains a page of ListContainerItem values. +type ListContainerItemsPage struct { + fn func(context.Context, ListContainerItems) (ListContainerItems, error) + lci ListContainerItems +} + +// 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 *ListContainerItemsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListContainerItemsPage.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.lci) + if err != nil { + return err + } + page.lci = 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 *ListContainerItemsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListContainerItemsPage) NotDone() bool { + return !page.lci.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListContainerItemsPage) Response() ListContainerItems { + return page.lci +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListContainerItemsPage) Values() []ListContainerItem { + if page.lci.IsEmpty() { + return nil + } + return *page.lci.Value +} + +// Creates a new instance of the ListContainerItemsPage type. +func NewListContainerItemsPage(getNextPage func(context.Context, ListContainerItems) (ListContainerItems, error)) ListContainerItemsPage { + return ListContainerItemsPage{fn: getNextPage} } // ListServiceSasResponse the List service SAS credentials operation response. @@ -1793,32 +1896,30 @@ type ListServiceSasResponse struct { ServiceSasToken *string `json:"serviceSasToken,omitempty"` } -// ManagementPoliciesRules the Storage Account ManagementPolicies Rules, in JSON format. See more details -// in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. -type ManagementPoliciesRules struct { - // Policy - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - Policy interface{} `json:"policy,omitempty"` -} - -// ManagementPoliciesRulesSetParameter the Storage Account ManagementPolicies Rules, in JSON format. See -// more details in: -// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. -type ManagementPoliciesRulesSetParameter struct { - // ManagementPoliciesRules - The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. - *ManagementPoliciesRules `json:"properties,omitempty"` +// ManagementPolicy the Get Storage Account ManagementPolicies operation response. +type ManagementPolicy struct { + autorest.Response `json:"-"` + // ManagementPolicyProperties - Returns the Storage Account Data Policies Rules. + *ManagementPolicyProperties `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 ManagementPoliciesRulesSetParameter. -func (mprsp ManagementPoliciesRulesSetParameter) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for ManagementPolicy. +func (mp ManagementPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if mprsp.ManagementPoliciesRules != nil { - objectMap["properties"] = mprsp.ManagementPoliciesRules + if mp.ManagementPolicyProperties != nil { + objectMap["properties"] = mp.ManagementPolicyProperties } return json.Marshal(objectMap) } -// UnmarshalJSON is the custom unmarshaler for ManagementPoliciesRulesSetParameter struct. -func (mprsp *ManagementPoliciesRulesSetParameter) UnmarshalJSON(body []byte) error { +// UnmarshalJSON is the custom unmarshaler for ManagementPolicy struct. +func (mp *ManagementPolicy) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage err := json.Unmarshal(body, &m) if err != nil { @@ -1828,12 +1929,39 @@ func (mprsp *ManagementPoliciesRulesSetParameter) UnmarshalJSON(body []byte) err switch k { case "properties": if v != nil { - var managementPoliciesRules ManagementPoliciesRules - err = json.Unmarshal(*v, &managementPoliciesRules) + var managementPolicyProperties ManagementPolicyProperties + err = json.Unmarshal(*v, &managementPolicyProperties) + if err != nil { + return err + } + mp.ManagementPolicyProperties = &managementPolicyProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + mp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) if err != nil { return err } - mprsp.ManagementPoliciesRules = &managementPoliciesRules + mp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + mp.Type = &typeVar } } } @@ -1841,6 +1969,75 @@ func (mprsp *ManagementPoliciesRulesSetParameter) UnmarshalJSON(body []byte) err return nil } +// ManagementPolicyAction actions are applied to the filtered blobs when the execution condition is met. +type ManagementPolicyAction struct { + // BaseBlob - The management policy action for base blob + BaseBlob *ManagementPolicyBaseBlob `json:"baseBlob,omitempty"` + // Snapshot - The management policy action for snapshot + Snapshot *ManagementPolicySnapShot `json:"snapshot,omitempty"` +} + +// ManagementPolicyBaseBlob management policy action for base blob. +type ManagementPolicyBaseBlob struct { + // TierToCool - The function to tier blobs to cool storage. Support blobs currently at Hot tier + TierToCool *DateAfterModification `json:"tierToCool,omitempty"` + // TierToArchive - The function to tier blobs to archive storage. Support blobs currently at Hot or Cool tier + TierToArchive *DateAfterModification `json:"tierToArchive,omitempty"` + // Delete - The function to delete the blob + Delete *DateAfterModification `json:"delete,omitempty"` +} + +// ManagementPolicyDefinition an object that defines the Lifecycle rule. Each definition is made up with a +// filters set and an actions set. +type ManagementPolicyDefinition struct { + // Actions - An object that defines the action set. + Actions *ManagementPolicyAction `json:"actions,omitempty"` + // Filters - An object that defines the filter set. + Filters *ManagementPolicyFilter `json:"filters,omitempty"` +} + +// ManagementPolicyFilter filters limit rule actions to a subset of blobs within the storage account. If +// multiple filters are defined, a logical AND is performed on all filters. +type ManagementPolicyFilter struct { + // PrefixMatch - An array of strings for prefixes to be match. + PrefixMatch *[]string `json:"prefixMatch,omitempty"` + // BlobTypes - An array of predefined enum values. Only blockBlob is supported. + BlobTypes *[]string `json:"blobTypes,omitempty"` +} + +// ManagementPolicyProperties the Storage Account ManagementPolicy properties. +type ManagementPolicyProperties struct { + // LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified. + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + // Policy - The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Policy *ManagementPolicySchema `json:"policy,omitempty"` +} + +// ManagementPolicyRule an object that wraps the Lifecycle rule. Each rule is uniquely defined by name. +type ManagementPolicyRule struct { + // Enabled - Rule is enabled if set to true. + Enabled *bool `json:"enabled,omitempty"` + // Name - A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + Name *string `json:"name,omitempty"` + // Type - The valid value is Lifecycle + Type *string `json:"type,omitempty"` + // Definition - An object that defines the Lifecycle rule. + Definition *ManagementPolicyDefinition `json:"definition,omitempty"` +} + +// ManagementPolicySchema the Storage Account ManagementPolicies Rules. See more details in: +// https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. +type ManagementPolicySchema struct { + // Rules - The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + Rules *[]ManagementPolicyRule `json:"rules,omitempty"` +} + +// ManagementPolicySnapShot management policy action for snapshot. +type ManagementPolicySnapShot struct { + // Delete - The function to delete the blob snapshot + Delete *DateAfterCreation `json:"delete,omitempty"` +} + // MetricSpecification metric specification of operation. type MetricSpecification struct { // Name - Name of metric specification. @@ -2061,7 +2258,7 @@ 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' + // 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 SkuName `json:"name,omitempty"` // Tier - READ-ONLY; Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go index 255d984361..3ddad68b15 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/operations.go @@ -75,7 +75,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/skus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go index d94509bbc0..b2eff204a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/skus.go @@ -86,7 +86,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go index b14109e1a9..8f85c7cab7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/usages.go @@ -89,7 +89,7 @@ func (client UsagesClient) ListByLocationPreparer(ctx context.Context, location "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2018-07-01" + const APIVersion = "2019-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/version.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage/version.go index 2b30253f6b..5f4c3ec9dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-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/2018-07-01" + return "Azure-SDK-For-Go/" + version.Number + " storage/2019-04-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/blang/semver/BUILD.bazel b/vendor/github.com/blang/semver/BUILD.bazel new file mode 100644 index 0000000000..0ff3cade59 --- /dev/null +++ b/vendor/github.com/blang/semver/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "json.go", + "range.go", + "semver.go", + "sort.go", + "sql.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/github.com/blang/semver", + importpath = "github.com/blang/semver", + visibility = ["//visibility:public"], +) diff --git a/vendor/github.com/blang/semver/LICENSE b/vendor/github.com/blang/semver/LICENSE new file mode 100644 index 0000000000..5ba5c86fcb --- /dev/null +++ b/vendor/github.com/blang/semver/LICENSE @@ -0,0 +1,22 @@ +The MIT License + +Copyright (c) 2014 Benedikt Lang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/github.com/blang/semver/json.go b/vendor/github.com/blang/semver/json.go new file mode 100644 index 0000000000..a74bf7c449 --- /dev/null +++ b/vendor/github.com/blang/semver/json.go @@ -0,0 +1,23 @@ +package semver + +import ( + "encoding/json" +) + +// MarshalJSON implements the encoding/json.Marshaler interface. +func (v Version) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +// UnmarshalJSON implements the encoding/json.Unmarshaler interface. +func (v *Version) UnmarshalJSON(data []byte) (err error) { + var versionString string + + if err = json.Unmarshal(data, &versionString); err != nil { + return + } + + *v, err = Parse(versionString) + + return +} diff --git a/vendor/github.com/blang/semver/range.go b/vendor/github.com/blang/semver/range.go new file mode 100644 index 0000000000..fca406d479 --- /dev/null +++ b/vendor/github.com/blang/semver/range.go @@ -0,0 +1,416 @@ +package semver + +import ( + "fmt" + "strconv" + "strings" + "unicode" +) + +type wildcardType int + +const ( + noneWildcard wildcardType = iota + majorWildcard wildcardType = 1 + minorWildcard wildcardType = 2 + patchWildcard wildcardType = 3 +) + +func wildcardTypefromInt(i int) wildcardType { + switch i { + case 1: + return majorWildcard + case 2: + return minorWildcard + case 3: + return patchWildcard + default: + return noneWildcard + } +} + +type comparator func(Version, Version) bool + +var ( + compEQ comparator = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == 0 + } + compNE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) != 0 + } + compGT = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == 1 + } + compGE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) >= 0 + } + compLT = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) == -1 + } + compLE = func(v1 Version, v2 Version) bool { + return v1.Compare(v2) <= 0 + } +) + +type versionRange struct { + v Version + c comparator +} + +// rangeFunc creates a Range from the given versionRange. +func (vr *versionRange) rangeFunc() Range { + return Range(func(v Version) bool { + return vr.c(v, vr.v) + }) +} + +// Range represents a range of versions. +// A Range can be used to check if a Version satisfies it: +// +// range, err := semver.ParseRange(">1.0.0 <2.0.0") +// range(semver.MustParse("1.1.1") // returns true +type Range func(Version) bool + +// OR combines the existing Range with another Range using logical OR. +func (rf Range) OR(f Range) Range { + return Range(func(v Version) bool { + return rf(v) || f(v) + }) +} + +// AND combines the existing Range with another Range using logical AND. +func (rf Range) AND(f Range) Range { + return Range(func(v Version) bool { + return rf(v) && f(v) + }) +} + +// ParseRange parses a range and returns a Range. +// If the range could not be parsed an error is returned. +// +// Valid ranges are: +// - "<1.0.0" +// - "<=1.0.0" +// - ">1.0.0" +// - ">=1.0.0" +// - "1.0.0", "=1.0.0", "==1.0.0" +// - "!1.0.0", "!=1.0.0" +// +// A Range can consist of multiple ranges separated by space: +// Ranges can be linked by logical AND: +// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0" +// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2 +// +// Ranges can also be linked by logical OR: +// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x" +// +// AND has a higher precedence than OR. It's not possible to use brackets. +// +// Ranges can be combined by both AND and OR +// +// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` +func ParseRange(s string) (Range, error) { + parts := splitAndTrim(s) + orParts, err := splitORParts(parts) + if err != nil { + return nil, err + } + expandedParts, err := expandWildcardVersion(orParts) + if err != nil { + return nil, err + } + var orFn Range + for _, p := range expandedParts { + var andFn Range + for _, ap := range p { + opStr, vStr, err := splitComparatorVersion(ap) + if err != nil { + return nil, err + } + vr, err := buildVersionRange(opStr, vStr) + if err != nil { + return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err) + } + rf := vr.rangeFunc() + + // Set function + if andFn == nil { + andFn = rf + } else { // Combine with existing function + andFn = andFn.AND(rf) + } + } + if orFn == nil { + orFn = andFn + } else { + orFn = orFn.OR(andFn) + } + + } + return orFn, nil +} + +// splitORParts splits the already cleaned parts by '||'. +// Checks for invalid positions of the operator and returns an +// error if found. +func splitORParts(parts []string) ([][]string, error) { + var ORparts [][]string + last := 0 + for i, p := range parts { + if p == "||" { + if i == 0 { + return nil, fmt.Errorf("First element in range is '||'") + } + ORparts = append(ORparts, parts[last:i]) + last = i + 1 + } + } + if last == len(parts) { + return nil, fmt.Errorf("Last element in range is '||'") + } + ORparts = append(ORparts, parts[last:]) + return ORparts, nil +} + +// buildVersionRange takes a slice of 2: operator and version +// and builds a versionRange, otherwise an error. +func buildVersionRange(opStr, vStr string) (*versionRange, error) { + c := parseComparator(opStr) + if c == nil { + return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, "")) + } + v, err := Parse(vStr) + if err != nil { + return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err) + } + + return &versionRange{ + v: v, + c: c, + }, nil + +} + +// inArray checks if a byte is contained in an array of bytes +func inArray(s byte, list []byte) bool { + for _, el := range list { + if el == s { + return true + } + } + return false +} + +// splitAndTrim splits a range string by spaces and cleans whitespaces +func splitAndTrim(s string) (result []string) { + last := 0 + var lastChar byte + excludeFromSplit := []byte{'>', '<', '='} + for i := 0; i < len(s); i++ { + if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { + if last < i-1 { + result = append(result, s[last:i]) + } + last = i + 1 + } else if s[i] != ' ' { + lastChar = s[i] + } + } + if last < len(s)-1 { + result = append(result, s[last:]) + } + + for i, v := range result { + result[i] = strings.Replace(v, " ", "", -1) + } + + // parts := strings.Split(s, " ") + // for _, x := range parts { + // if s := strings.TrimSpace(x); len(s) != 0 { + // result = append(result, s) + // } + // } + return +} + +// splitComparatorVersion splits the comparator from the version. +// Input must be free of leading or trailing spaces. +func splitComparatorVersion(s string) (string, string, error) { + i := strings.IndexFunc(s, unicode.IsDigit) + if i == -1 { + return "", "", fmt.Errorf("Could not get version from string: %q", s) + } + return strings.TrimSpace(s[0:i]), s[i:], nil +} + +// getWildcardType will return the type of wildcard that the +// passed version contains +func getWildcardType(vStr string) wildcardType { + parts := strings.Split(vStr, ".") + nparts := len(parts) + wildcard := parts[nparts-1] + + possibleWildcardType := wildcardTypefromInt(nparts) + if wildcard == "x" { + return possibleWildcardType + } + + return noneWildcard +} + +// createVersionFromWildcard will convert a wildcard version +// into a regular version, replacing 'x's with '0's, handling +// special cases like '1.x.x' and '1.x' +func createVersionFromWildcard(vStr string) string { + // handle 1.x.x + vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) + vStr2 = strings.Replace(vStr2, ".x", ".0", 1) + parts := strings.Split(vStr2, ".") + + // handle 1.x + if len(parts) == 2 { + return vStr2 + ".0" + } + + return vStr2 +} + +// incrementMajorVersion will increment the major version +// of the passed version +func incrementMajorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[0]) + if err != nil { + return "", err + } + parts[0] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// incrementMajorVersion will increment the minor version +// of the passed version +func incrementMinorVersion(vStr string) (string, error) { + parts := strings.Split(vStr, ".") + i, err := strconv.Atoi(parts[1]) + if err != nil { + return "", err + } + parts[1] = strconv.Itoa(i + 1) + + return strings.Join(parts, "."), nil +} + +// expandWildcardVersion will expand wildcards inside versions +// following these rules: +// +// * when dealing with patch wildcards: +// >= 1.2.x will become >= 1.2.0 +// <= 1.2.x will become < 1.3.0 +// > 1.2.x will become >= 1.3.0 +// < 1.2.x will become < 1.2.0 +// != 1.2.x will become < 1.2.0 >= 1.3.0 +// +// * when dealing with minor wildcards: +// >= 1.x will become >= 1.0.0 +// <= 1.x will become < 2.0.0 +// > 1.x will become >= 2.0.0 +// < 1.0 will become < 1.0.0 +// != 1.x will become < 1.0.0 >= 2.0.0 +// +// * when dealing with wildcards without +// version operator: +// 1.2.x will become >= 1.2.0 < 1.3.0 +// 1.x will become >= 1.0.0 < 2.0.0 +func expandWildcardVersion(parts [][]string) ([][]string, error) { + var expandedParts [][]string + for _, p := range parts { + var newParts []string + for _, ap := range p { + if strings.Index(ap, "x") != -1 { + opStr, vStr, err := splitComparatorVersion(ap) + if err != nil { + return nil, err + } + + versionWildcardType := getWildcardType(vStr) + flatVersion := createVersionFromWildcard(vStr) + + var resultOperator string + var shouldIncrementVersion bool + switch opStr { + case ">": + resultOperator = ">=" + shouldIncrementVersion = true + case ">=": + resultOperator = ">=" + case "<": + resultOperator = "<" + case "<=": + resultOperator = "<" + shouldIncrementVersion = true + case "", "=", "==": + newParts = append(newParts, ">="+flatVersion) + resultOperator = "<" + shouldIncrementVersion = true + case "!=", "!": + newParts = append(newParts, "<"+flatVersion) + resultOperator = ">=" + shouldIncrementVersion = true + } + + var resultVersion string + if shouldIncrementVersion { + switch versionWildcardType { + case patchWildcard: + resultVersion, _ = incrementMinorVersion(flatVersion) + case minorWildcard: + resultVersion, _ = incrementMajorVersion(flatVersion) + } + } else { + resultVersion = flatVersion + } + + ap = resultOperator + resultVersion + } + newParts = append(newParts, ap) + } + expandedParts = append(expandedParts, newParts) + } + + return expandedParts, nil +} + +func parseComparator(s string) comparator { + switch s { + case "==": + fallthrough + case "": + fallthrough + case "=": + return compEQ + case ">": + return compGT + case ">=": + return compGE + case "<": + return compLT + case "<=": + return compLE + case "!": + fallthrough + case "!=": + return compNE + } + + return nil +} + +// MustParseRange is like ParseRange but panics if the range cannot be parsed. +func MustParseRange(s string) Range { + r, err := ParseRange(s) + if err != nil { + panic(`semver: ParseRange(` + s + `): ` + err.Error()) + } + return r +} diff --git a/vendor/github.com/blang/semver/semver.go b/vendor/github.com/blang/semver/semver.go new file mode 100644 index 0000000000..8ee0842e6a --- /dev/null +++ b/vendor/github.com/blang/semver/semver.go @@ -0,0 +1,418 @@ +package semver + +import ( + "errors" + "fmt" + "strconv" + "strings" +) + +const ( + numbers string = "0123456789" + alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + alphanum = alphas + numbers +) + +// SpecVersion is the latest fully supported spec version of semver +var SpecVersion = Version{ + Major: 2, + Minor: 0, + Patch: 0, +} + +// Version represents a semver compatible version +type Version struct { + Major uint64 + Minor uint64 + Patch uint64 + Pre []PRVersion + Build []string //No Precendence +} + +// Version to string +func (v Version) String() string { + b := make([]byte, 0, 5) + b = strconv.AppendUint(b, v.Major, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Minor, 10) + b = append(b, '.') + b = strconv.AppendUint(b, v.Patch, 10) + + if len(v.Pre) > 0 { + b = append(b, '-') + b = append(b, v.Pre[0].String()...) + + for _, pre := range v.Pre[1:] { + b = append(b, '.') + b = append(b, pre.String()...) + } + } + + if len(v.Build) > 0 { + b = append(b, '+') + b = append(b, v.Build[0]...) + + for _, build := range v.Build[1:] { + b = append(b, '.') + b = append(b, build...) + } + } + + return string(b) +} + +// Equals checks if v is equal to o. +func (v Version) Equals(o Version) bool { + return (v.Compare(o) == 0) +} + +// EQ checks if v is equal to o. +func (v Version) EQ(o Version) bool { + return (v.Compare(o) == 0) +} + +// NE checks if v is not equal to o. +func (v Version) NE(o Version) bool { + return (v.Compare(o) != 0) +} + +// GT checks if v is greater than o. +func (v Version) GT(o Version) bool { + return (v.Compare(o) == 1) +} + +// GTE checks if v is greater than or equal to o. +func (v Version) GTE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// GE checks if v is greater than or equal to o. +func (v Version) GE(o Version) bool { + return (v.Compare(o) >= 0) +} + +// LT checks if v is less than o. +func (v Version) LT(o Version) bool { + return (v.Compare(o) == -1) +} + +// LTE checks if v is less than or equal to o. +func (v Version) LTE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// LE checks if v is less than or equal to o. +func (v Version) LE(o Version) bool { + return (v.Compare(o) <= 0) +} + +// Compare compares Versions v to o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v Version) Compare(o Version) int { + if v.Major != o.Major { + if v.Major > o.Major { + return 1 + } + return -1 + } + if v.Minor != o.Minor { + if v.Minor > o.Minor { + return 1 + } + return -1 + } + if v.Patch != o.Patch { + if v.Patch > o.Patch { + return 1 + } + return -1 + } + + // Quick comparison if a version has no prerelease versions + if len(v.Pre) == 0 && len(o.Pre) == 0 { + return 0 + } else if len(v.Pre) == 0 && len(o.Pre) > 0 { + return 1 + } else if len(v.Pre) > 0 && len(o.Pre) == 0 { + return -1 + } + + i := 0 + for ; i < len(v.Pre) && i < len(o.Pre); i++ { + if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { + continue + } else if comp == 1 { + return 1 + } else { + return -1 + } + } + + // If all pr versions are the equal but one has further prversion, this one greater + if i == len(v.Pre) && i == len(o.Pre) { + return 0 + } else if i == len(v.Pre) && i < len(o.Pre) { + return -1 + } else { + return 1 + } + +} + +// Validate validates v and returns error in case +func (v Version) Validate() error { + // Major, Minor, Patch already validated using uint64 + + for _, pre := range v.Pre { + if !pre.IsNum { //Numeric prerelease versions already uint64 + if len(pre.VersionStr) == 0 { + return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) + } + if !containsOnly(pre.VersionStr, alphanum) { + return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) + } + } + } + + for _, build := range v.Build { + if len(build) == 0 { + return fmt.Errorf("Build meta data can not be empty %q", build) + } + if !containsOnly(build, alphanum) { + return fmt.Errorf("Invalid character(s) found in build meta data %q", build) + } + } + + return nil +} + +// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error +func New(s string) (vp *Version, err error) { + v, err := Parse(s) + vp = &v + return +} + +// Make is an alias for Parse, parses version string and returns a validated Version or error +func Make(s string) (Version, error) { + return Parse(s) +} + +// ParseTolerant allows for certain version specifications that do not strictly adhere to semver +// specs to be parsed by this library. It does so by normalizing versions before passing them to +// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions +// with only major and minor components specified +func ParseTolerant(s string) (Version, error) { + s = strings.TrimSpace(s) + s = strings.TrimPrefix(s, "v") + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + if len(parts) < 3 { + if strings.ContainsAny(parts[len(parts)-1], "+-") { + return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") + } + for len(parts) < 3 { + parts = append(parts, "0") + } + s = strings.Join(parts, ".") + } + + return Parse(s) +} + +// Parse parses version string and returns a validated Version or error +func Parse(s string) (Version, error) { + if len(s) == 0 { + return Version{}, errors.New("Version string empty") + } + + // Split into major.minor.(patch+pr+meta) + parts := strings.SplitN(s, ".", 3) + if len(parts) != 3 { + return Version{}, errors.New("No Major.Minor.Patch elements found") + } + + // Major + if !containsOnly(parts[0], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) + } + if hasLeadingZeroes(parts[0]) { + return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) + } + major, err := strconv.ParseUint(parts[0], 10, 64) + if err != nil { + return Version{}, err + } + + // Minor + if !containsOnly(parts[1], numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) + } + if hasLeadingZeroes(parts[1]) { + return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) + } + minor, err := strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return Version{}, err + } + + v := Version{} + v.Major = major + v.Minor = minor + + var build, prerelease []string + patchStr := parts[2] + + if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { + build = strings.Split(patchStr[buildIndex+1:], ".") + patchStr = patchStr[:buildIndex] + } + + if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { + prerelease = strings.Split(patchStr[preIndex+1:], ".") + patchStr = patchStr[:preIndex] + } + + if !containsOnly(patchStr, numbers) { + return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) + } + if hasLeadingZeroes(patchStr) { + return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) + } + patch, err := strconv.ParseUint(patchStr, 10, 64) + if err != nil { + return Version{}, err + } + + v.Patch = patch + + // Prerelease + for _, prstr := range prerelease { + parsedPR, err := NewPRVersion(prstr) + if err != nil { + return Version{}, err + } + v.Pre = append(v.Pre, parsedPR) + } + + // Build meta data + for _, str := range build { + if len(str) == 0 { + return Version{}, errors.New("Build meta data is empty") + } + if !containsOnly(str, alphanum) { + return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) + } + v.Build = append(v.Build, str) + } + + return v, nil +} + +// MustParse is like Parse but panics if the version cannot be parsed. +func MustParse(s string) Version { + v, err := Parse(s) + if err != nil { + panic(`semver: Parse(` + s + `): ` + err.Error()) + } + return v +} + +// PRVersion represents a PreRelease Version +type PRVersion struct { + VersionStr string + VersionNum uint64 + IsNum bool +} + +// NewPRVersion creates a new valid prerelease version +func NewPRVersion(s string) (PRVersion, error) { + if len(s) == 0 { + return PRVersion{}, errors.New("Prerelease is empty") + } + v := PRVersion{} + if containsOnly(s, numbers) { + if hasLeadingZeroes(s) { + return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) + } + num, err := strconv.ParseUint(s, 10, 64) + + // Might never be hit, but just in case + if err != nil { + return PRVersion{}, err + } + v.VersionNum = num + v.IsNum = true + } else if containsOnly(s, alphanum) { + v.VersionStr = s + v.IsNum = false + } else { + return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) + } + return v, nil +} + +// IsNumeric checks if prerelease-version is numeric +func (v PRVersion) IsNumeric() bool { + return v.IsNum +} + +// Compare compares two PreRelease Versions v and o: +// -1 == v is less than o +// 0 == v is equal to o +// 1 == v is greater than o +func (v PRVersion) Compare(o PRVersion) int { + if v.IsNum && !o.IsNum { + return -1 + } else if !v.IsNum && o.IsNum { + return 1 + } else if v.IsNum && o.IsNum { + if v.VersionNum == o.VersionNum { + return 0 + } else if v.VersionNum > o.VersionNum { + return 1 + } else { + return -1 + } + } else { // both are Alphas + if v.VersionStr == o.VersionStr { + return 0 + } else if v.VersionStr > o.VersionStr { + return 1 + } else { + return -1 + } + } +} + +// PreRelease version to string +func (v PRVersion) String() string { + if v.IsNum { + return strconv.FormatUint(v.VersionNum, 10) + } + return v.VersionStr +} + +func containsOnly(s string, set string) bool { + return strings.IndexFunc(s, func(r rune) bool { + return !strings.ContainsRune(set, r) + }) == -1 +} + +func hasLeadingZeroes(s string) bool { + return len(s) > 1 && s[0] == '0' +} + +// NewBuildVersion creates a new valid build version +func NewBuildVersion(s string) (string, error) { + if len(s) == 0 { + return "", errors.New("Buildversion is empty") + } + if !containsOnly(s, alphanum) { + return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) + } + return s, nil +} diff --git a/vendor/github.com/blang/semver/sort.go b/vendor/github.com/blang/semver/sort.go new file mode 100644 index 0000000000..e18f880826 --- /dev/null +++ b/vendor/github.com/blang/semver/sort.go @@ -0,0 +1,28 @@ +package semver + +import ( + "sort" +) + +// Versions represents multiple versions. +type Versions []Version + +// Len returns length of version collection +func (s Versions) Len() int { + return len(s) +} + +// Swap swaps two versions inside the collection by its indices +func (s Versions) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +// Less checks if version at index i is less than version at index j +func (s Versions) Less(i, j int) bool { + return s[i].LT(s[j]) +} + +// Sort sorts a slice of versions +func Sort(versions []Version) { + sort.Sort(Versions(versions)) +} diff --git a/vendor/github.com/blang/semver/sql.go b/vendor/github.com/blang/semver/sql.go new file mode 100644 index 0000000000..eb4d802666 --- /dev/null +++ b/vendor/github.com/blang/semver/sql.go @@ -0,0 +1,30 @@ +package semver + +import ( + "database/sql/driver" + "fmt" +) + +// Scan implements the database/sql.Scanner interface. +func (v *Version) Scan(src interface{}) (err error) { + var str string + switch src := src.(type) { + case string: + str = src + case []byte: + str = string(src) + default: + return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) + } + + if t, err := Parse(str); err == nil { + *v = t + } + + return +} + +// Value implements the database/sql/driver.Valuer interface. +func (v Version) Value() (driver.Value, error) { + return v.String(), nil +} diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/BUILD.bazel b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/BUILD.bazel index c52d3a8a94..d33e89c645 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/BUILD.bazel +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/BUILD.bazel @@ -4,8 +4,11 @@ go_library( name = "go_default_library", srcs = [ "client.go", + "client_metrics.go", "client_reporter.go", + "metric_options.go", "server.go", + "server_metrics.go", "server_reporter.go", "util.go", ], @@ -17,5 +20,6 @@ go_library( "//vendor/golang.org/x/net/context:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", "//vendor/google.golang.org/grpc/codes:go_default_library", + "//vendor/google.golang.org/grpc/status:go_default_library", ], ) diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.go index d9e87b2f73..751a4c72d7 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client.go @@ -6,67 +6,34 @@ package grpc_prometheus import ( - "io" - - "golang.org/x/net/context" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" + prom "github.com/prometheus/client_golang/prometheus" ) -// UnaryClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Unary RPCs. -func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - monitor := newClientReporter(Unary, method) - monitor.SentMessage() - err := invoker(ctx, method, req, reply, cc, opts...) - if err != nil { - monitor.ReceivedMessage() - } - monitor.Handled(grpc.Code(err)) - return err -} +var ( + // DefaultClientMetrics is the default instance of ClientMetrics. It is + // intended to be used in conjunction the default Prometheus metrics + // registry. + DefaultClientMetrics = NewClientMetrics() -// StreamServerInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Streaming RPCs. -func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { - monitor := newClientReporter(clientStreamType(desc), method) - clientStream, err := streamer(ctx, desc, cc, method, opts...) - if err != nil { - monitor.Handled(grpc.Code(err)) - return nil, err - } - return &monitoredClientStream{clientStream, monitor}, nil -} + // UnaryClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Unary RPCs. + UnaryClientInterceptor = DefaultClientMetrics.UnaryClientInterceptor() -func clientStreamType(desc *grpc.StreamDesc) grpcType { - if desc.ClientStreams && !desc.ServerStreams { - return ClientStream - } else if !desc.ClientStreams && desc.ServerStreams { - return ServerStream - } - return BidiStream -} - -// monitoredClientStream wraps grpc.ClientStream allowing each Sent/Recv of message to increment counters. -type monitoredClientStream struct { - grpc.ClientStream - monitor *clientReporter -} + // StreamClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Streaming RPCs. + StreamClientInterceptor = DefaultClientMetrics.StreamClientInterceptor() +) -func (s *monitoredClientStream) SendMsg(m interface{}) error { - err := s.ClientStream.SendMsg(m) - if err == nil { - s.monitor.SentMessage() - } - return err +func init() { + prom.MustRegister(DefaultClientMetrics.clientStartedCounter) + prom.MustRegister(DefaultClientMetrics.clientHandledCounter) + prom.MustRegister(DefaultClientMetrics.clientStreamMsgReceived) + prom.MustRegister(DefaultClientMetrics.clientStreamMsgSent) } -func (s *monitoredClientStream) RecvMsg(m interface{}) error { - err := s.ClientStream.RecvMsg(m) - if err == nil { - s.monitor.ReceivedMessage() - } else if err == io.EOF { - s.monitor.Handled(codes.OK) - } else { - s.monitor.Handled(grpc.Code(err)) - } - return err +// EnableClientHandlingTimeHistogram turns on recording of handling time of +// RPCs. Histogram metrics can be very expensive for Prometheus to retain and +// query. This function acts on the DefaultClientMetrics variable and the +// default Prometheus metrics registry. +func EnableClientHandlingTimeHistogram(opts ...HistogramOption) { + DefaultClientMetrics.EnableClientHandlingTimeHistogram(opts...) + prom.Register(DefaultClientMetrics.clientHandledHistogram) } diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.go new file mode 100644 index 0000000000..9b476f9832 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_metrics.go @@ -0,0 +1,170 @@ +package grpc_prometheus + +import ( + "io" + + prom "github.com/prometheus/client_golang/prometheus" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ClientMetrics represents a collection of metrics to be registered on a +// Prometheus metrics registry for a gRPC client. +type ClientMetrics struct { + clientStartedCounter *prom.CounterVec + clientHandledCounter *prom.CounterVec + clientStreamMsgReceived *prom.CounterVec + clientStreamMsgSent *prom.CounterVec + clientHandledHistogramEnabled bool + clientHandledHistogramOpts prom.HistogramOpts + clientHandledHistogram *prom.HistogramVec +} + +// NewClientMetrics returns a ClientMetrics object. Use a new instance of +// ClientMetrics when not using the default Prometheus metrics registry, for +// example when wanting to control which metrics are added to a registry as +// opposed to automatically adding metrics via init functions. +func NewClientMetrics(counterOpts ...CounterOption) *ClientMetrics { + opts := counterOptions(counterOpts) + return &ClientMetrics{ + clientStartedCounter: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_client_started_total", + Help: "Total number of RPCs started on the client.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + + clientHandledCounter: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_client_handled_total", + Help: "Total number of RPCs completed by the client, regardless of success or failure.", + }), []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}), + + clientStreamMsgReceived: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_client_msg_received_total", + Help: "Total number of RPC stream messages received by the client.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + + clientStreamMsgSent: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_client_msg_sent_total", + Help: "Total number of gRPC stream messages sent by the client.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + + clientHandledHistogramEnabled: false, + clientHandledHistogramOpts: prom.HistogramOpts{ + Name: "grpc_client_handling_seconds", + Help: "Histogram of response latency (seconds) of the gRPC until it is finished by the application.", + Buckets: prom.DefBuckets, + }, + clientHandledHistogram: nil, + } +} + +// Describe sends the super-set of all possible descriptors of metrics +// collected by this Collector to the provided channel and returns once +// the last descriptor has been sent. +func (m *ClientMetrics) Describe(ch chan<- *prom.Desc) { + m.clientStartedCounter.Describe(ch) + m.clientHandledCounter.Describe(ch) + m.clientStreamMsgReceived.Describe(ch) + m.clientStreamMsgSent.Describe(ch) + if m.clientHandledHistogramEnabled { + m.clientHandledHistogram.Describe(ch) + } +} + +// Collect is called by the Prometheus registry when collecting +// metrics. The implementation sends each collected metric via the +// provided channel and returns once the last metric has been sent. +func (m *ClientMetrics) Collect(ch chan<- prom.Metric) { + m.clientStartedCounter.Collect(ch) + m.clientHandledCounter.Collect(ch) + m.clientStreamMsgReceived.Collect(ch) + m.clientStreamMsgSent.Collect(ch) + if m.clientHandledHistogramEnabled { + m.clientHandledHistogram.Collect(ch) + } +} + +// EnableClientHandlingTimeHistogram turns on recording of handling time of RPCs. +// Histogram metrics can be very expensive for Prometheus to retain and query. +func (m *ClientMetrics) EnableClientHandlingTimeHistogram(opts ...HistogramOption) { + for _, o := range opts { + o(&m.clientHandledHistogramOpts) + } + if !m.clientHandledHistogramEnabled { + m.clientHandledHistogram = prom.NewHistogramVec( + m.clientHandledHistogramOpts, + []string{"grpc_type", "grpc_service", "grpc_method"}, + ) + } + m.clientHandledHistogramEnabled = true +} + +// UnaryClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Unary RPCs. +func (m *ClientMetrics) UnaryClientInterceptor() func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + monitor := newClientReporter(m, Unary, method) + monitor.SentMessage() + err := invoker(ctx, method, req, reply, cc, opts...) + if err != nil { + monitor.ReceivedMessage() + } + st, _ := status.FromError(err) + monitor.Handled(st.Code()) + return err + } +} + +// StreamClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Streaming RPCs. +func (m *ClientMetrics) StreamClientInterceptor() func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { + return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { + monitor := newClientReporter(m, clientStreamType(desc), method) + clientStream, err := streamer(ctx, desc, cc, method, opts...) + if err != nil { + st, _ := status.FromError(err) + monitor.Handled(st.Code()) + return nil, err + } + return &monitoredClientStream{clientStream, monitor}, nil + } +} + +func clientStreamType(desc *grpc.StreamDesc) grpcType { + if desc.ClientStreams && !desc.ServerStreams { + return ClientStream + } else if !desc.ClientStreams && desc.ServerStreams { + return ServerStream + } + return BidiStream +} + +// monitoredClientStream wraps grpc.ClientStream allowing each Sent/Recv of message to increment counters. +type monitoredClientStream struct { + grpc.ClientStream + monitor *clientReporter +} + +func (s *monitoredClientStream) SendMsg(m interface{}) error { + err := s.ClientStream.SendMsg(m) + if err == nil { + s.monitor.SentMessage() + } + return err +} + +func (s *monitoredClientStream) RecvMsg(m interface{}) error { + err := s.ClientStream.RecvMsg(m) + if err == nil { + s.monitor.ReceivedMessage() + } else if err == io.EOF { + s.monitor.Handled(codes.OK) + } else { + st, _ := status.FromError(err) + s.monitor.Handled(st.Code()) + } + return err +} diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go index 16b7615530..cbf1532299 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go @@ -7,105 +7,40 @@ import ( "time" "google.golang.org/grpc/codes" - - prom "github.com/prometheus/client_golang/prometheus" -) - -var ( - clientStartedCounter = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "client", - Name: "started_total", - Help: "Total number of RPCs started on the client.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - clientHandledCounter = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "client", - Name: "handled_total", - Help: "Total number of RPCs completed by the client, regardless of success or failure.", - }, []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}) - - clientStreamMsgReceived = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "client", - Name: "msg_received_total", - Help: "Total number of RPC stream messages received by the client.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - clientStreamMsgSent = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "client", - Name: "msg_sent_total", - Help: "Total number of gRPC stream messages sent by the client.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - clientHandledHistogramEnabled = false - clientHandledHistogramOpts = prom.HistogramOpts{ - Namespace: "grpc", - Subsystem: "client", - Name: "handling_seconds", - Help: "Histogram of response latency (seconds) of the gRPC until it is finished by the application.", - Buckets: prom.DefBuckets, - } - clientHandledHistogram *prom.HistogramVec ) -func init() { - prom.MustRegister(clientStartedCounter) - prom.MustRegister(clientHandledCounter) - prom.MustRegister(clientStreamMsgReceived) - prom.MustRegister(clientStreamMsgSent) -} - -// EnableClientHandlingTimeHistogram turns on recording of handling time of RPCs. -// Histogram metrics can be very expensive for Prometheus to retain and query. -func EnableClientHandlingTimeHistogram(opts ...HistogramOption) { - for _, o := range opts { - o(&clientHandledHistogramOpts) - } - if !clientHandledHistogramEnabled { - clientHandledHistogram = prom.NewHistogramVec( - clientHandledHistogramOpts, - []string{"grpc_type", "grpc_service", "grpc_method"}, - ) - prom.Register(clientHandledHistogram) - } - clientHandledHistogramEnabled = true -} - type clientReporter struct { + metrics *ClientMetrics rpcType grpcType serviceName string methodName string startTime time.Time } -func newClientReporter(rpcType grpcType, fullMethod string) *clientReporter { - r := &clientReporter{rpcType: rpcType} - if clientHandledHistogramEnabled { +func newClientReporter(m *ClientMetrics, rpcType grpcType, fullMethod string) *clientReporter { + r := &clientReporter{ + metrics: m, + rpcType: rpcType, + } + if r.metrics.clientHandledHistogramEnabled { r.startTime = time.Now() } r.serviceName, r.methodName = splitMethodName(fullMethod) - clientStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.clientStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() return r } func (r *clientReporter) ReceivedMessage() { - clientStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.clientStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() } func (r *clientReporter) SentMessage() { - clientStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.clientStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() } func (r *clientReporter) Handled(code codes.Code) { - clientHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() - if clientHandledHistogramEnabled { - clientHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) + r.metrics.clientHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() + if r.metrics.clientHandledHistogramEnabled { + r.metrics.clientHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) } } diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.go new file mode 100644 index 0000000000..9d51aec981 --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/metric_options.go @@ -0,0 +1,41 @@ +package grpc_prometheus + +import ( + prom "github.com/prometheus/client_golang/prometheus" +) + +// A CounterOption lets you add options to Counter metrics using With* funcs. +type CounterOption func(*prom.CounterOpts) + +type counterOptions []CounterOption + +func (co counterOptions) apply(o prom.CounterOpts) prom.CounterOpts { + for _, f := range co { + f(&o) + } + return o +} + +// WithConstLabels allows you to add ConstLabels to Counter metrics. +func WithConstLabels(labels prom.Labels) CounterOption { + return func(o *prom.CounterOpts) { + o.ConstLabels = labels + } +} + +// A HistogramOption lets you add options to Histogram metrics using With* +// funcs. +type HistogramOption func(*prom.HistogramOpts) + +// WithHistogramBuckets allows you to specify custom bucket ranges for histograms if EnableHandlingTimeHistogram is on. +func WithHistogramBuckets(buckets []float64) HistogramOption { + return func(o *prom.HistogramOpts) { o.Buckets = buckets } +} + +// WithHistogramConstLabels allows you to add custom ConstLabels to +// histograms metrics. +func WithHistogramConstLabels(labels prom.Labels) HistogramOption { + return func(o *prom.HistogramOpts) { + o.ConstLabels = labels + } +} diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.go index f85c8c2374..322f99046f 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server.go @@ -6,69 +6,43 @@ package grpc_prometheus import ( - "golang.org/x/net/context" + prom "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc" ) -// PreregisterServices takes a gRPC server and pre-initializes all counters to 0. -// This allows for easier monitoring in Prometheus (no missing metrics), and should be called *after* all services have -// been registered with the server. -func Register(server *grpc.Server) { - serviceInfo := server.GetServiceInfo() - for serviceName, info := range serviceInfo { - for _, mInfo := range info.Methods { - preRegisterMethod(serviceName, &mInfo) - } - } -} - -// UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs. -func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - monitor := newServerReporter(Unary, info.FullMethod) - monitor.ReceivedMessage() - resp, err := handler(ctx, req) - monitor.Handled(grpc.Code(err)) - if err == nil { - monitor.SentMessage() - } - return resp, err -} +var ( + // DefaultServerMetrics is the default instance of ServerMetrics. It is + // intended to be used in conjunction the default Prometheus metrics + // registry. + DefaultServerMetrics = NewServerMetrics() -// StreamServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Streaming RPCs. -func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { - monitor := newServerReporter(streamRpcType(info), info.FullMethod) - err := handler(srv, &monitoredServerStream{ss, monitor}) - monitor.Handled(grpc.Code(err)) - return err -} + // UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs. + UnaryServerInterceptor = DefaultServerMetrics.UnaryServerInterceptor() -func streamRpcType(info *grpc.StreamServerInfo) grpcType { - if info.IsClientStream && !info.IsServerStream { - return ClientStream - } else if !info.IsClientStream && info.IsServerStream { - return ServerStream - } - return BidiStream -} + // StreamServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Streaming RPCs. + StreamServerInterceptor = DefaultServerMetrics.StreamServerInterceptor() +) -// monitoredStream wraps grpc.ServerStream allowing each Sent/Recv of message to increment counters. -type monitoredServerStream struct { - grpc.ServerStream - monitor *serverReporter +func init() { + prom.MustRegister(DefaultServerMetrics.serverStartedCounter) + prom.MustRegister(DefaultServerMetrics.serverHandledCounter) + prom.MustRegister(DefaultServerMetrics.serverStreamMsgReceived) + prom.MustRegister(DefaultServerMetrics.serverStreamMsgSent) } -func (s *monitoredServerStream) SendMsg(m interface{}) error { - err := s.ServerStream.SendMsg(m) - if err == nil { - s.monitor.SentMessage() - } - return err +// Register takes a gRPC server and pre-initializes all counters to 0. This +// allows for easier monitoring in Prometheus (no missing metrics), and should +// be called *after* all services have been registered with the server. This +// function acts on the DefaultServerMetrics variable. +func Register(server *grpc.Server) { + DefaultServerMetrics.InitializeMetrics(server) } -func (s *monitoredServerStream) RecvMsg(m interface{}) error { - err := s.ServerStream.RecvMsg(m) - if err == nil { - s.monitor.ReceivedMessage() - } - return err +// EnableHandlingTimeHistogram turns on recording of handling time +// of RPCs. Histogram metrics can be very expensive for Prometheus +// to retain and query. This function acts on the DefaultServerMetrics +// variable and the default Prometheus metrics registry. +func EnableHandlingTimeHistogram(opts ...HistogramOption) { + DefaultServerMetrics.EnableHandlingTimeHistogram(opts...) + prom.Register(DefaultServerMetrics.serverHandledHistogram) } diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.go new file mode 100644 index 0000000000..5b1467e7aa --- /dev/null +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_metrics.go @@ -0,0 +1,185 @@ +package grpc_prometheus + +import ( + prom "github.com/prometheus/client_golang/prometheus" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/status" +) + +// ServerMetrics represents a collection of metrics to be registered on a +// Prometheus metrics registry for a gRPC server. +type ServerMetrics struct { + serverStartedCounter *prom.CounterVec + serverHandledCounter *prom.CounterVec + serverStreamMsgReceived *prom.CounterVec + serverStreamMsgSent *prom.CounterVec + serverHandledHistogramEnabled bool + serverHandledHistogramOpts prom.HistogramOpts + serverHandledHistogram *prom.HistogramVec +} + +// NewServerMetrics returns a ServerMetrics object. Use a new instance of +// ServerMetrics when not using the default Prometheus metrics registry, for +// example when wanting to control which metrics are added to a registry as +// opposed to automatically adding metrics via init functions. +func NewServerMetrics(counterOpts ...CounterOption) *ServerMetrics { + opts := counterOptions(counterOpts) + return &ServerMetrics{ + serverStartedCounter: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_server_started_total", + Help: "Total number of RPCs started on the server.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + serverHandledCounter: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_server_handled_total", + Help: "Total number of RPCs completed on the server, regardless of success or failure.", + }), []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}), + serverStreamMsgReceived: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_server_msg_received_total", + Help: "Total number of RPC stream messages received on the server.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + serverStreamMsgSent: prom.NewCounterVec( + opts.apply(prom.CounterOpts{ + Name: "grpc_server_msg_sent_total", + Help: "Total number of gRPC stream messages sent by the server.", + }), []string{"grpc_type", "grpc_service", "grpc_method"}), + serverHandledHistogramEnabled: false, + serverHandledHistogramOpts: prom.HistogramOpts{ + Name: "grpc_server_handling_seconds", + Help: "Histogram of response latency (seconds) of gRPC that had been application-level handled by the server.", + Buckets: prom.DefBuckets, + }, + serverHandledHistogram: nil, + } +} + +// EnableHandlingTimeHistogram enables histograms being registered when +// registering the ServerMetrics on a Prometheus registry. Histograms can be +// expensive on Prometheus servers. It takes options to configure histogram +// options such as the defined buckets. +func (m *ServerMetrics) EnableHandlingTimeHistogram(opts ...HistogramOption) { + for _, o := range opts { + o(&m.serverHandledHistogramOpts) + } + if !m.serverHandledHistogramEnabled { + m.serverHandledHistogram = prom.NewHistogramVec( + m.serverHandledHistogramOpts, + []string{"grpc_type", "grpc_service", "grpc_method"}, + ) + } + m.serverHandledHistogramEnabled = true +} + +// Describe sends the super-set of all possible descriptors of metrics +// collected by this Collector to the provided channel and returns once +// the last descriptor has been sent. +func (m *ServerMetrics) Describe(ch chan<- *prom.Desc) { + m.serverStartedCounter.Describe(ch) + m.serverHandledCounter.Describe(ch) + m.serverStreamMsgReceived.Describe(ch) + m.serverStreamMsgSent.Describe(ch) + if m.serverHandledHistogramEnabled { + m.serverHandledHistogram.Describe(ch) + } +} + +// Collect is called by the Prometheus registry when collecting +// metrics. The implementation sends each collected metric via the +// provided channel and returns once the last metric has been sent. +func (m *ServerMetrics) Collect(ch chan<- prom.Metric) { + m.serverStartedCounter.Collect(ch) + m.serverHandledCounter.Collect(ch) + m.serverStreamMsgReceived.Collect(ch) + m.serverStreamMsgSent.Collect(ch) + if m.serverHandledHistogramEnabled { + m.serverHandledHistogram.Collect(ch) + } +} + +// UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs. +func (m *ServerMetrics) UnaryServerInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + monitor := newServerReporter(m, Unary, info.FullMethod) + monitor.ReceivedMessage() + resp, err := handler(ctx, req) + st, _ := status.FromError(err) + monitor.Handled(st.Code()) + if err == nil { + monitor.SentMessage() + } + return resp, err + } +} + +// StreamServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Streaming RPCs. +func (m *ServerMetrics) StreamServerInterceptor() func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + monitor := newServerReporter(m, streamRPCType(info), info.FullMethod) + err := handler(srv, &monitoredServerStream{ss, monitor}) + st, _ := status.FromError(err) + monitor.Handled(st.Code()) + return err + } +} + +// InitializeMetrics initializes all metrics, with their appropriate null +// value, for all gRPC methods registered on a gRPC server. This is useful, to +// ensure that all metrics exist when collecting and querying. +func (m *ServerMetrics) InitializeMetrics(server *grpc.Server) { + serviceInfo := server.GetServiceInfo() + for serviceName, info := range serviceInfo { + for _, mInfo := range info.Methods { + preRegisterMethod(m, serviceName, &mInfo) + } + } +} + +func streamRPCType(info *grpc.StreamServerInfo) grpcType { + if info.IsClientStream && !info.IsServerStream { + return ClientStream + } else if !info.IsClientStream && info.IsServerStream { + return ServerStream + } + return BidiStream +} + +// monitoredStream wraps grpc.ServerStream allowing each Sent/Recv of message to increment counters. +type monitoredServerStream struct { + grpc.ServerStream + monitor *serverReporter +} + +func (s *monitoredServerStream) SendMsg(m interface{}) error { + err := s.ServerStream.SendMsg(m) + if err == nil { + s.monitor.SentMessage() + } + return err +} + +func (s *monitoredServerStream) RecvMsg(m interface{}) error { + err := s.ServerStream.RecvMsg(m) + if err == nil { + s.monitor.ReceivedMessage() + } + return err +} + +// preRegisterMethod is invoked on Register of a Server, allowing all gRPC services labels to be pre-populated. +func preRegisterMethod(metrics *ServerMetrics, serviceName string, mInfo *grpc.MethodInfo) { + methodName := mInfo.Name + methodType := string(typeFromMethodInfo(mInfo)) + // These are just references (no increments), as just referencing will create the labels but not set values. + metrics.serverStartedCounter.GetMetricWithLabelValues(methodType, serviceName, methodName) + metrics.serverStreamMsgReceived.GetMetricWithLabelValues(methodType, serviceName, methodName) + metrics.serverStreamMsgSent.GetMetricWithLabelValues(methodType, serviceName, methodName) + if metrics.serverHandledHistogramEnabled { + metrics.serverHandledHistogram.GetMetricWithLabelValues(methodType, serviceName, methodName) + } + for _, code := range allCodes { + metrics.serverHandledCounter.GetMetricWithLabelValues(methodType, serviceName, methodName, code.String()) + } +} diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go index 628a890560..aa9db5401a 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go @@ -7,151 +7,40 @@ import ( "time" "google.golang.org/grpc/codes" - - prom "github.com/prometheus/client_golang/prometheus" - "google.golang.org/grpc" -) - -type grpcType string - -const ( - Unary grpcType = "unary" - ClientStream grpcType = "client_stream" - ServerStream grpcType = "server_stream" - BidiStream grpcType = "bidi_stream" ) -var ( - serverStartedCounter = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "server", - Name: "started_total", - Help: "Total number of RPCs started on the server.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - serverHandledCounter = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "server", - Name: "handled_total", - Help: "Total number of RPCs completed on the server, regardless of success or failure.", - }, []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}) - - serverStreamMsgReceived = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "server", - Name: "msg_received_total", - Help: "Total number of RPC stream messages received on the server.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - serverStreamMsgSent = prom.NewCounterVec( - prom.CounterOpts{ - Namespace: "grpc", - Subsystem: "server", - Name: "msg_sent_total", - Help: "Total number of gRPC stream messages sent by the server.", - }, []string{"grpc_type", "grpc_service", "grpc_method"}) - - serverHandledHistogramEnabled = false - serverHandledHistogramOpts = prom.HistogramOpts{ - Namespace: "grpc", - Subsystem: "server", - Name: "handling_seconds", - Help: "Histogram of response latency (seconds) of gRPC that had been application-level handled by the server.", - Buckets: prom.DefBuckets, - } - serverHandledHistogram *prom.HistogramVec -) - -func init() { - prom.MustRegister(serverStartedCounter) - prom.MustRegister(serverHandledCounter) - prom.MustRegister(serverStreamMsgReceived) - prom.MustRegister(serverStreamMsgSent) -} - -type HistogramOption func(*prom.HistogramOpts) - -// WithHistogramBuckets allows you to specify custom bucket ranges for histograms if EnableHandlingTimeHistogram is on. -func WithHistogramBuckets(buckets []float64) HistogramOption { - return func(o *prom.HistogramOpts) { o.Buckets = buckets } -} - -// EnableHandlingTimeHistogram turns on recording of handling time of RPCs for server-side interceptors. -// Histogram metrics can be very expensive for Prometheus to retain and query. -func EnableHandlingTimeHistogram(opts ...HistogramOption) { - for _, o := range opts { - o(&serverHandledHistogramOpts) - } - if !serverHandledHistogramEnabled { - serverHandledHistogram = prom.NewHistogramVec( - serverHandledHistogramOpts, - []string{"grpc_type", "grpc_service", "grpc_method"}, - ) - prom.Register(serverHandledHistogram) - } - serverHandledHistogramEnabled = true -} - type serverReporter struct { + metrics *ServerMetrics rpcType grpcType serviceName string methodName string startTime time.Time } -func newServerReporter(rpcType grpcType, fullMethod string) *serverReporter { - r := &serverReporter{rpcType: rpcType} - if serverHandledHistogramEnabled { +func newServerReporter(m *ServerMetrics, rpcType grpcType, fullMethod string) *serverReporter { + r := &serverReporter{ + metrics: m, + rpcType: rpcType, + } + if r.metrics.serverHandledHistogramEnabled { r.startTime = time.Now() } r.serviceName, r.methodName = splitMethodName(fullMethod) - serverStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.serverStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() return r } func (r *serverReporter) ReceivedMessage() { - serverStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.serverStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() } func (r *serverReporter) SentMessage() { - serverStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + r.metrics.serverStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() } func (r *serverReporter) Handled(code codes.Code) { - serverHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() - if serverHandledHistogramEnabled { - serverHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) - } -} - -// preRegisterMethod is invoked on Register of a Server, allowing all gRPC services labels to be pre-populated. -func preRegisterMethod(serviceName string, mInfo *grpc.MethodInfo) { - methodName := mInfo.Name - methodType := string(typeFromMethodInfo(mInfo)) - // These are just references (no increments), as just referencing will create the labels but not set values. - serverStartedCounter.GetMetricWithLabelValues(methodType, serviceName, methodName) - serverStreamMsgReceived.GetMetricWithLabelValues(methodType, serviceName, methodName) - serverStreamMsgSent.GetMetricWithLabelValues(methodType, serviceName, methodName) - if serverHandledHistogramEnabled { - serverHandledHistogram.GetMetricWithLabelValues(methodType, serviceName, methodName) - } - for _, code := range allCodes { - serverHandledCounter.GetMetricWithLabelValues(methodType, serviceName, methodName, code.String()) - } -} - -func typeFromMethodInfo(mInfo *grpc.MethodInfo) grpcType { - if mInfo.IsClientStream == false && mInfo.IsServerStream == false { - return Unary - } - if mInfo.IsClientStream == true && mInfo.IsServerStream == false { - return ClientStream - } - if mInfo.IsClientStream == false && mInfo.IsServerStream == true { - return ServerStream + r.metrics.serverHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() + if r.metrics.serverHandledHistogramEnabled { + r.metrics.serverHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) } - return BidiStream } diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.go index 372460ac49..7987de35f4 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/util.go @@ -6,9 +6,19 @@ package grpc_prometheus import ( "strings" + "google.golang.org/grpc" "google.golang.org/grpc/codes" ) +type grpcType string + +const ( + Unary grpcType = "unary" + ClientStream grpcType = "client_stream" + ServerStream grpcType = "server_stream" + BidiStream grpcType = "bidi_stream" +) + var ( allCodes = []codes.Code{ codes.OK, codes.Canceled, codes.Unknown, codes.InvalidArgument, codes.DeadlineExceeded, codes.NotFound, @@ -25,3 +35,16 @@ func splitMethodName(fullMethodName string) (string, string) { } return "unknown", "unknown" } + +func typeFromMethodInfo(mInfo *grpc.MethodInfo) grpcType { + if !mInfo.IsClientStream && !mInfo.IsServerStream { + return Unary + } + if mInfo.IsClientStream && !mInfo.IsServerStream { + return ClientStream + } + if !mInfo.IsClientStream && mInfo.IsServerStream { + return ServerStream + } + return BidiStream +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/BUILD.bazel b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/BUILD.bazel new file mode 100644 index 0000000000..94c91aabed --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "delegator.go", + "delegator_1_8.go", + "delegator_pre_1_8.go", + "http.go", + "instrument_client.go", + "instrument_client_1_8.go", + "instrument_server.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/github.com/prometheus/client_golang/prometheus/promhttp", + importpath = "github.com/prometheus/client_golang/prometheus/promhttp", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/github.com/prometheus/client_model/go:go_default_library", + "//vendor/github.com/prometheus/common/expfmt:go_default_library", + ], +) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go new file mode 100644 index 0000000000..5de5bbc685 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go @@ -0,0 +1,198 @@ +// Copyright 2017 The Prometheus 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 promhttp + +import ( + "bufio" + "io" + "net" + "net/http" +) + +const ( + closeNotifier = 1 << iota + flusher + hijacker + readerFrom + pusher +) + +type delegator interface { + http.ResponseWriter + + Status() int + Written() int64 +} + +type responseWriterDelegator struct { + http.ResponseWriter + + status int + written int64 + wroteHeader bool + observeWriteHeader func(int) +} + +func (r *responseWriterDelegator) Status() int { + return r.status +} + +func (r *responseWriterDelegator) Written() int64 { + return r.written +} + +func (r *responseWriterDelegator) WriteHeader(code int) { + r.status = code + r.wroteHeader = true + r.ResponseWriter.WriteHeader(code) + if r.observeWriteHeader != nil { + r.observeWriteHeader(code) + } +} + +func (r *responseWriterDelegator) Write(b []byte) (int, error) { + if !r.wroteHeader { + r.WriteHeader(http.StatusOK) + } + n, err := r.ResponseWriter.Write(b) + r.written += int64(n) + return n, err +} + +type closeNotifierDelegator struct{ *responseWriterDelegator } +type flusherDelegator struct{ *responseWriterDelegator } +type hijackerDelegator struct{ *responseWriterDelegator } +type readerFromDelegator struct{ *responseWriterDelegator } + +func (d closeNotifierDelegator) CloseNotify() <-chan bool { + return d.ResponseWriter.(http.CloseNotifier).CloseNotify() +} +func (d flusherDelegator) Flush() { + d.ResponseWriter.(http.Flusher).Flush() +} +func (d hijackerDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { + return d.ResponseWriter.(http.Hijacker).Hijack() +} +func (d readerFromDelegator) ReadFrom(re io.Reader) (int64, error) { + if !d.wroteHeader { + d.WriteHeader(http.StatusOK) + } + n, err := d.ResponseWriter.(io.ReaderFrom).ReadFrom(re) + d.written += n + return n, err +} + +var pickDelegator = make([]func(*responseWriterDelegator) delegator, 32) + +func init() { + // TODO(beorn7): Code generation would help here. + pickDelegator[0] = func(d *responseWriterDelegator) delegator { // 0 + return d + } + pickDelegator[closeNotifier] = func(d *responseWriterDelegator) delegator { // 1 + return closeNotifierDelegator{d} + } + pickDelegator[flusher] = func(d *responseWriterDelegator) delegator { // 2 + return flusherDelegator{d} + } + pickDelegator[flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 3 + return struct { + *responseWriterDelegator + http.Flusher + http.CloseNotifier + }{d, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[hijacker] = func(d *responseWriterDelegator) delegator { // 4 + return hijackerDelegator{d} + } + pickDelegator[hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 5 + return struct { + *responseWriterDelegator + http.Hijacker + http.CloseNotifier + }{d, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 6 + return struct { + *responseWriterDelegator + http.Hijacker + http.Flusher + }{d, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 7 + return struct { + *responseWriterDelegator + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[readerFrom] = func(d *responseWriterDelegator) delegator { // 8 + return readerFromDelegator{d} + } + pickDelegator[readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 9 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.CloseNotifier + }{d, readerFromDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 10 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Flusher + }{d, readerFromDelegator{d}, flusherDelegator{d}} + } + pickDelegator[readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 11 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Flusher + http.CloseNotifier + }{d, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 12 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Hijacker + }{d, readerFromDelegator{d}, hijackerDelegator{d}} + } + pickDelegator[readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 13 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Hijacker + http.CloseNotifier + }{d, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 14 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Hijacker + http.Flusher + }{d, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 15 + return struct { + *responseWriterDelegator + io.ReaderFrom + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go new file mode 100644 index 0000000000..31a7069569 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_1_8.go @@ -0,0 +1,181 @@ +// Copyright 2017 The Prometheus 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. + +// +build go1.8 + +package promhttp + +import ( + "io" + "net/http" +) + +type pusherDelegator struct{ *responseWriterDelegator } + +func (d pusherDelegator) Push(target string, opts *http.PushOptions) error { + return d.ResponseWriter.(http.Pusher).Push(target, opts) +} + +func init() { + pickDelegator[pusher] = func(d *responseWriterDelegator) delegator { // 16 + return pusherDelegator{d} + } + pickDelegator[pusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 17 + return struct { + *responseWriterDelegator + http.Pusher + http.CloseNotifier + }{d, pusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+flusher] = func(d *responseWriterDelegator) delegator { // 18 + return struct { + *responseWriterDelegator + http.Pusher + http.Flusher + }{d, pusherDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 19 + return struct { + *responseWriterDelegator + http.Pusher + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+hijacker] = func(d *responseWriterDelegator) delegator { // 20 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + }{d, pusherDelegator{d}, hijackerDelegator{d}} + } + pickDelegator[pusher+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 21 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.CloseNotifier + }{d, pusherDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 22 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.Flusher + }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { //23 + return struct { + *responseWriterDelegator + http.Pusher + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom] = func(d *responseWriterDelegator) delegator { // 24 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + }{d, pusherDelegator{d}, readerFromDelegator{d}} + } + pickDelegator[pusher+readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 25 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 26 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Flusher + }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 27 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 28 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 29 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 30 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.Flusher + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} + } + pickDelegator[pusher+readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 31 + return struct { + *responseWriterDelegator + http.Pusher + io.ReaderFrom + http.Hijacker + http.Flusher + http.CloseNotifier + }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} + } +} + +func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { + d := &responseWriterDelegator{ + ResponseWriter: w, + observeWriteHeader: observeWriteHeaderFunc, + } + + id := 0 + if _, ok := w.(http.CloseNotifier); ok { + id += closeNotifier + } + if _, ok := w.(http.Flusher); ok { + id += flusher + } + if _, ok := w.(http.Hijacker); ok { + id += hijacker + } + if _, ok := w.(io.ReaderFrom); ok { + id += readerFrom + } + if _, ok := w.(http.Pusher); ok { + id += pusher + } + + return pickDelegator[id](d) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go new file mode 100644 index 0000000000..8bb9b8b68f --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator_pre_1_8.go @@ -0,0 +1,44 @@ +// Copyright 2017 The Prometheus 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. + +// +build !go1.8 + +package promhttp + +import ( + "io" + "net/http" +) + +func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { + d := &responseWriterDelegator{ + ResponseWriter: w, + observeWriteHeader: observeWriteHeaderFunc, + } + + id := 0 + if _, ok := w.(http.CloseNotifier); ok { + id += closeNotifier + } + if _, ok := w.(http.Flusher); ok { + id += flusher + } + if _, ok := w.(http.Hijacker); ok { + id += hijacker + } + if _, ok := w.(io.ReaderFrom); ok { + id += readerFrom + } + + return pickDelegator[id](d) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go new file mode 100644 index 0000000000..b137c88307 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go @@ -0,0 +1,310 @@ +// Copyright 2016 The Prometheus 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 promhttp provides tooling around HTTP servers and clients. +// +// First, the package allows the creation of http.Handler instances to expose +// Prometheus metrics via HTTP. promhttp.Handler acts on the +// prometheus.DefaultGatherer. With HandlerFor, you can create a handler for a +// custom registry or anything that implements the Gatherer interface. It also +// allows the creation of handlers that act differently on errors or allow to +// log errors. +// +// Second, the package provides tooling to instrument instances of http.Handler +// via middleware. Middleware wrappers follow the naming scheme +// InstrumentHandlerX, where X describes the intended use of the middleware. +// See each function's doc comment for specific details. +// +// Finally, the package allows for an http.RoundTripper to be instrumented via +// middleware. Middleware wrappers follow the naming scheme +// InstrumentRoundTripperX, where X describes the intended use of the +// middleware. See each function's doc comment for specific details. +package promhttp + +import ( + "compress/gzip" + "fmt" + "io" + "net/http" + "strings" + "sync" + "time" + + "github.com/prometheus/common/expfmt" + + "github.com/prometheus/client_golang/prometheus" +) + +const ( + contentTypeHeader = "Content-Type" + contentEncodingHeader = "Content-Encoding" + acceptEncodingHeader = "Accept-Encoding" +) + +var gzipPool = sync.Pool{ + New: func() interface{} { + return gzip.NewWriter(nil) + }, +} + +// Handler returns an http.Handler for the prometheus.DefaultGatherer, using +// default HandlerOpts, i.e. it reports the first error as an HTTP error, it has +// no error logging, and it applies compression if requested by the client. +// +// The returned http.Handler is already instrumented using the +// InstrumentMetricHandler function and the prometheus.DefaultRegisterer. If you +// create multiple http.Handlers by separate calls of the Handler function, the +// metrics used for instrumentation will be shared between them, providing +// global scrape counts. +// +// This function is meant to cover the bulk of basic use cases. If you are doing +// anything that requires more customization (including using a non-default +// Gatherer, different instrumentation, and non-default HandlerOpts), use the +// HandlerFor function. See there for details. +func Handler() http.Handler { + return InstrumentMetricHandler( + prometheus.DefaultRegisterer, HandlerFor(prometheus.DefaultGatherer, HandlerOpts{}), + ) +} + +// HandlerFor returns an uninstrumented http.Handler for the provided +// Gatherer. The behavior of the Handler is defined by the provided +// HandlerOpts. Thus, HandlerFor is useful to create http.Handlers for custom +// Gatherers, with non-default HandlerOpts, and/or with custom (or no) +// instrumentation. Use the InstrumentMetricHandler function to apply the same +// kind of instrumentation as it is used by the Handler function. +func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { + var inFlightSem chan struct{} + if opts.MaxRequestsInFlight > 0 { + inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight) + } + + h := http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { + if inFlightSem != nil { + select { + case inFlightSem <- struct{}{}: // All good, carry on. + defer func() { <-inFlightSem }() + default: + http.Error(rsp, fmt.Sprintf( + "Limit of concurrent requests reached (%d), try again later.", opts.MaxRequestsInFlight, + ), http.StatusServiceUnavailable) + return + } + } + mfs, err := reg.Gather() + if err != nil { + if opts.ErrorLog != nil { + opts.ErrorLog.Println("error gathering metrics:", err) + } + switch opts.ErrorHandling { + case PanicOnError: + panic(err) + case ContinueOnError: + if len(mfs) == 0 { + // Still report the error if no metrics have been gathered. + httpError(rsp, err) + return + } + case HTTPErrorOnError: + httpError(rsp, err) + return + } + } + + contentType := expfmt.Negotiate(req.Header) + header := rsp.Header() + header.Set(contentTypeHeader, string(contentType)) + + w := io.Writer(rsp) + if !opts.DisableCompression && gzipAccepted(req.Header) { + header.Set(contentEncodingHeader, "gzip") + gz := gzipPool.Get().(*gzip.Writer) + defer gzipPool.Put(gz) + + gz.Reset(w) + defer gz.Close() + + w = gz + } + + enc := expfmt.NewEncoder(w, contentType) + + var lastErr error + for _, mf := range mfs { + if err := enc.Encode(mf); err != nil { + lastErr = err + if opts.ErrorLog != nil { + opts.ErrorLog.Println("error encoding and sending metric family:", err) + } + switch opts.ErrorHandling { + case PanicOnError: + panic(err) + case ContinueOnError: + // Handled later. + case HTTPErrorOnError: + httpError(rsp, err) + return + } + } + } + + if lastErr != nil { + httpError(rsp, lastErr) + } + }) + + if opts.Timeout <= 0 { + return h + } + return http.TimeoutHandler(h, opts.Timeout, fmt.Sprintf( + "Exceeded configured timeout of %v.\n", + opts.Timeout, + )) +} + +// InstrumentMetricHandler is usually used with an http.Handler returned by the +// HandlerFor function. It instruments the provided http.Handler with two +// metrics: A counter vector "promhttp_metric_handler_requests_total" to count +// scrapes partitioned by HTTP status code, and a gauge +// "promhttp_metric_handler_requests_in_flight" to track the number of +// simultaneous scrapes. This function idempotently registers collectors for +// both metrics with the provided Registerer. It panics if the registration +// fails. The provided metrics are useful to see how many scrapes hit the +// monitored target (which could be from different Prometheus servers or other +// scrapers), and how often they overlap (which would result in more than one +// scrape in flight at the same time). Note that the scrapes-in-flight gauge +// will contain the scrape by which it is exposed, while the scrape counter will +// only get incremented after the scrape is complete (as only then the status +// code is known). For tracking scrape durations, use the +// "scrape_duration_seconds" gauge created by the Prometheus server upon each +// scrape. +func InstrumentMetricHandler(reg prometheus.Registerer, handler http.Handler) http.Handler { + cnt := prometheus.NewCounterVec( + prometheus.CounterOpts{ + Name: "promhttp_metric_handler_requests_total", + Help: "Total number of scrapes by HTTP status code.", + }, + []string{"code"}, + ) + // Initialize the most likely HTTP status codes. + cnt.WithLabelValues("200") + cnt.WithLabelValues("500") + cnt.WithLabelValues("503") + if err := reg.Register(cnt); err != nil { + if are, ok := err.(prometheus.AlreadyRegisteredError); ok { + cnt = are.ExistingCollector.(*prometheus.CounterVec) + } else { + panic(err) + } + } + + gge := prometheus.NewGauge(prometheus.GaugeOpts{ + Name: "promhttp_metric_handler_requests_in_flight", + Help: "Current number of scrapes being served.", + }) + if err := reg.Register(gge); err != nil { + if are, ok := err.(prometheus.AlreadyRegisteredError); ok { + gge = are.ExistingCollector.(prometheus.Gauge) + } else { + panic(err) + } + } + + return InstrumentHandlerCounter(cnt, InstrumentHandlerInFlight(gge, handler)) +} + +// HandlerErrorHandling defines how a Handler serving metrics will handle +// errors. +type HandlerErrorHandling int + +// These constants cause handlers serving metrics to behave as described if +// errors are encountered. +const ( + // Serve an HTTP status code 500 upon the first error + // encountered. Report the error message in the body. + HTTPErrorOnError HandlerErrorHandling = iota + // Ignore errors and try to serve as many metrics as possible. However, + // if no metrics can be served, serve an HTTP status code 500 and the + // last error message in the body. Only use this in deliberate "best + // effort" metrics collection scenarios. It is recommended to at least + // log errors (by providing an ErrorLog in HandlerOpts) to not mask + // errors completely. + ContinueOnError + // Panic upon the first error encountered (useful for "crash only" apps). + PanicOnError +) + +// Logger is the minimal interface HandlerOpts needs for logging. Note that +// log.Logger from the standard library implements this interface, and it is +// easy to implement by custom loggers, if they don't do so already anyway. +type Logger interface { + Println(v ...interface{}) +} + +// HandlerOpts specifies options how to serve metrics via an http.Handler. The +// zero value of HandlerOpts is a reasonable default. +type HandlerOpts struct { + // ErrorLog specifies an optional logger for errors collecting and + // serving metrics. If nil, errors are not logged at all. + ErrorLog Logger + // ErrorHandling defines how errors are handled. Note that errors are + // logged regardless of the configured ErrorHandling provided ErrorLog + // is not nil. + ErrorHandling HandlerErrorHandling + // If DisableCompression is true, the handler will never compress the + // response, even if requested by the client. + DisableCompression bool + // The number of concurrent HTTP requests is limited to + // MaxRequestsInFlight. Additional requests are responded to with 503 + // Service Unavailable and a suitable message in the body. If + // MaxRequestsInFlight is 0 or negative, no limit is applied. + MaxRequestsInFlight int + // If handling a request takes longer than Timeout, it is responded to + // with 503 ServiceUnavailable and a suitable Message. No timeout is + // applied if Timeout is 0 or negative. Note that with the current + // implementation, reaching the timeout simply ends the HTTP requests as + // described above (and even that only if sending of the body hasn't + // started yet), while the bulk work of gathering all the metrics keeps + // running in the background (with the eventual result to be thrown + // away). Until the implementation is improved, it is recommended to + // implement a separate timeout in potentially slow Collectors. + Timeout time.Duration +} + +// gzipAccepted returns whether the client will accept gzip-encoded content. +func gzipAccepted(header http.Header) bool { + a := header.Get(acceptEncodingHeader) + parts := strings.Split(a, ",") + for _, part := range parts { + part = strings.TrimSpace(part) + if part == "gzip" || strings.HasPrefix(part, "gzip;") { + return true + } + } + return false +} + +// httpError removes any content-encoding header and then calls http.Error with +// the provided error and http.StatusInternalServerErrer. Error contents is +// supposed to be uncompressed plain text. However, same as with a plain +// http.Error, any header settings will be void if the header has already been +// sent. The error message will still be written to the writer, but it will +// probably be of limited use. +func httpError(rsp http.ResponseWriter, err error) { + rsp.Header().Del(contentEncodingHeader) + http.Error( + rsp, + "An error has occurred while serving metrics:\n\n"+err.Error(), + http.StatusInternalServerError, + ) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go new file mode 100644 index 0000000000..86fd564470 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go @@ -0,0 +1,97 @@ +// Copyright 2017 The Prometheus 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 promhttp + +import ( + "net/http" + "time" + + "github.com/prometheus/client_golang/prometheus" +) + +// The RoundTripperFunc type is an adapter to allow the use of ordinary +// functions as RoundTrippers. If f is a function with the appropriate +// signature, RountTripperFunc(f) is a RoundTripper that calls f. +type RoundTripperFunc func(req *http.Request) (*http.Response, error) + +// RoundTrip implements the RoundTripper interface. +func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { + return rt(r) +} + +// InstrumentRoundTripperInFlight is a middleware that wraps the provided +// http.RoundTripper. It sets the provided prometheus.Gauge to the number of +// requests currently handled by the wrapped http.RoundTripper. +// +// See the example for ExampleInstrumentRoundTripperDuration for example usage. +func InstrumentRoundTripperInFlight(gauge prometheus.Gauge, next http.RoundTripper) RoundTripperFunc { + return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + gauge.Inc() + defer gauge.Dec() + return next.RoundTrip(r) + }) +} + +// InstrumentRoundTripperCounter is a middleware that wraps the provided +// http.RoundTripper to observe the request result with the provided CounterVec. +// The CounterVec must have zero, one, or two non-const non-curried labels. For +// those, the only allowed label names are "code" and "method". The function +// panics otherwise. Partitioning of the CounterVec happens by HTTP status code +// and/or HTTP method if the respective instance label names are present in the +// CounterVec. For unpartitioned counting, use a CounterVec with zero labels. +// +// If the wrapped RoundTripper panics or returns a non-nil error, the Counter +// is not incremented. +// +// See the example for ExampleInstrumentRoundTripperDuration for example usage. +func InstrumentRoundTripperCounter(counter *prometheus.CounterVec, next http.RoundTripper) RoundTripperFunc { + code, method := checkLabels(counter) + + return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + resp, err := next.RoundTrip(r) + if err == nil { + counter.With(labels(code, method, r.Method, resp.StatusCode)).Inc() + } + return resp, err + }) +} + +// InstrumentRoundTripperDuration is a middleware that wraps the provided +// http.RoundTripper to observe the request duration with the provided +// ObserverVec. The ObserverVec must have zero, one, or two non-const +// non-curried labels. For those, the only allowed label names are "code" and +// "method". The function panics otherwise. The Observe method of the Observer +// in the ObserverVec is called with the request duration in +// seconds. Partitioning happens by HTTP status code and/or HTTP method if the +// respective instance label names are present in the ObserverVec. For +// unpartitioned observations, use an ObserverVec with zero labels. Note that +// partitioning of Histograms is expensive and should be used judiciously. +// +// If the wrapped RoundTripper panics or returns a non-nil error, no values are +// reported. +// +// Note that this method is only guaranteed to never observe negative durations +// if used with Go1.9+. +func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundTripper) RoundTripperFunc { + code, method := checkLabels(obs) + + return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + start := time.Now() + resp, err := next.RoundTrip(r) + if err == nil { + obs.With(labels(code, method, r.Method, resp.StatusCode)).Observe(time.Since(start).Seconds()) + } + return resp, err + }) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go new file mode 100644 index 0000000000..a034d1ec0f --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client_1_8.go @@ -0,0 +1,144 @@ +// Copyright 2017 The Prometheus 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. + +// +build go1.8 + +package promhttp + +import ( + "context" + "crypto/tls" + "net/http" + "net/http/httptrace" + "time" +) + +// InstrumentTrace is used to offer flexibility in instrumenting the available +// httptrace.ClientTrace hook functions. Each function is passed a float64 +// representing the time in seconds since the start of the http request. A user +// may choose to use separately buckets Histograms, or implement custom +// instance labels on a per function basis. +type InstrumentTrace struct { + GotConn func(float64) + PutIdleConn func(float64) + GotFirstResponseByte func(float64) + Got100Continue func(float64) + DNSStart func(float64) + DNSDone func(float64) + ConnectStart func(float64) + ConnectDone func(float64) + TLSHandshakeStart func(float64) + TLSHandshakeDone func(float64) + WroteHeaders func(float64) + Wait100Continue func(float64) + WroteRequest func(float64) +} + +// InstrumentRoundTripperTrace is a middleware that wraps the provided +// RoundTripper and reports times to hook functions provided in the +// InstrumentTrace struct. Hook functions that are not present in the provided +// InstrumentTrace struct are ignored. Times reported to the hook functions are +// time since the start of the request. Only with Go1.9+, those times are +// guaranteed to never be negative. (Earlier Go versions are not using a +// monotonic clock.) Note that partitioning of Histograms is expensive and +// should be used judiciously. +// +// For hook functions that receive an error as an argument, no observations are +// made in the event of a non-nil error value. +// +// See the example for ExampleInstrumentRoundTripperDuration for example usage. +func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc { + return RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + start := time.Now() + + trace := &httptrace.ClientTrace{ + GotConn: func(_ httptrace.GotConnInfo) { + if it.GotConn != nil { + it.GotConn(time.Since(start).Seconds()) + } + }, + PutIdleConn: func(err error) { + if err != nil { + return + } + if it.PutIdleConn != nil { + it.PutIdleConn(time.Since(start).Seconds()) + } + }, + DNSStart: func(_ httptrace.DNSStartInfo) { + if it.DNSStart != nil { + it.DNSStart(time.Since(start).Seconds()) + } + }, + DNSDone: func(_ httptrace.DNSDoneInfo) { + if it.DNSDone != nil { + it.DNSDone(time.Since(start).Seconds()) + } + }, + ConnectStart: func(_, _ string) { + if it.ConnectStart != nil { + it.ConnectStart(time.Since(start).Seconds()) + } + }, + ConnectDone: func(_, _ string, err error) { + if err != nil { + return + } + if it.ConnectDone != nil { + it.ConnectDone(time.Since(start).Seconds()) + } + }, + GotFirstResponseByte: func() { + if it.GotFirstResponseByte != nil { + it.GotFirstResponseByte(time.Since(start).Seconds()) + } + }, + Got100Continue: func() { + if it.Got100Continue != nil { + it.Got100Continue(time.Since(start).Seconds()) + } + }, + TLSHandshakeStart: func() { + if it.TLSHandshakeStart != nil { + it.TLSHandshakeStart(time.Since(start).Seconds()) + } + }, + TLSHandshakeDone: func(_ tls.ConnectionState, err error) { + if err != nil { + return + } + if it.TLSHandshakeDone != nil { + it.TLSHandshakeDone(time.Since(start).Seconds()) + } + }, + WroteHeaders: func() { + if it.WroteHeaders != nil { + it.WroteHeaders(time.Since(start).Seconds()) + } + }, + Wait100Continue: func() { + if it.Wait100Continue != nil { + it.Wait100Continue(time.Since(start).Seconds()) + } + }, + WroteRequest: func(_ httptrace.WroteRequestInfo) { + if it.WroteRequest != nil { + it.WroteRequest(time.Since(start).Seconds()) + } + }, + } + r = r.WithContext(httptrace.WithClientTrace(context.Background(), trace)) + + return next.RoundTrip(r) + }) +} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go new file mode 100644 index 0000000000..9db2438053 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go @@ -0,0 +1,447 @@ +// Copyright 2017 The Prometheus 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 promhttp + +import ( + "errors" + "net/http" + "strconv" + "strings" + "time" + + dto "github.com/prometheus/client_model/go" + + "github.com/prometheus/client_golang/prometheus" +) + +// magicString is used for the hacky label test in checkLabels. Remove once fixed. +const magicString = "zZgWfBxLqvG8kc8IMv3POi2Bb0tZI3vAnBx+gBaFi9FyPzB/CzKUer1yufDa" + +// InstrumentHandlerInFlight is a middleware that wraps the provided +// http.Handler. It sets the provided prometheus.Gauge to the number of +// requests currently handled by the wrapped http.Handler. +// +// See the example for InstrumentHandlerDuration for example usage. +func InstrumentHandlerInFlight(g prometheus.Gauge, next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + g.Inc() + defer g.Dec() + next.ServeHTTP(w, r) + }) +} + +// InstrumentHandlerDuration is a middleware that wraps the provided +// http.Handler to observe the request duration with the provided ObserverVec. +// The ObserverVec must have zero, one, or two non-const non-curried labels. For +// those, the only allowed label names are "code" and "method". The function +// panics otherwise. The Observe method of the Observer in the ObserverVec is +// called with the request duration in seconds. Partitioning happens by HTTP +// status code and/or HTTP method if the respective instance label names are +// present in the ObserverVec. For unpartitioned observations, use an +// ObserverVec with zero labels. Note that partitioning of Histograms is +// expensive and should be used judiciously. +// +// If the wrapped Handler does not set a status code, a status code of 200 is assumed. +// +// If the wrapped Handler panics, no values are reported. +// +// Note that this method is only guaranteed to never observe negative durations +// if used with Go1.9+. +func InstrumentHandlerDuration(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { + code, method := checkLabels(obs) + + if code { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + now := time.Now() + d := newDelegator(w, nil) + next.ServeHTTP(d, r) + + obs.With(labels(code, method, r.Method, d.Status())).Observe(time.Since(now).Seconds()) + }) + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + now := time.Now() + next.ServeHTTP(w, r) + obs.With(labels(code, method, r.Method, 0)).Observe(time.Since(now).Seconds()) + }) +} + +// InstrumentHandlerCounter is a middleware that wraps the provided http.Handler +// to observe the request result with the provided CounterVec. The CounterVec +// must have zero, one, or two non-const non-curried labels. For those, the only +// allowed label names are "code" and "method". The function panics +// otherwise. Partitioning of the CounterVec happens by HTTP status code and/or +// HTTP method if the respective instance label names are present in the +// CounterVec. For unpartitioned counting, use a CounterVec with zero labels. +// +// If the wrapped Handler does not set a status code, a status code of 200 is assumed. +// +// If the wrapped Handler panics, the Counter is not incremented. +// +// See the example for InstrumentHandlerDuration for example usage. +func InstrumentHandlerCounter(counter *prometheus.CounterVec, next http.Handler) http.HandlerFunc { + code, method := checkLabels(counter) + + if code { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + d := newDelegator(w, nil) + next.ServeHTTP(d, r) + counter.With(labels(code, method, r.Method, d.Status())).Inc() + }) + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + next.ServeHTTP(w, r) + counter.With(labels(code, method, r.Method, 0)).Inc() + }) +} + +// InstrumentHandlerTimeToWriteHeader is a middleware that wraps the provided +// http.Handler to observe with the provided ObserverVec the request duration +// until the response headers are written. The ObserverVec must have zero, one, +// or two non-const non-curried labels. For those, the only allowed label names +// are "code" and "method". The function panics otherwise. The Observe method of +// the Observer in the ObserverVec is called with the request duration in +// seconds. Partitioning happens by HTTP status code and/or HTTP method if the +// respective instance label names are present in the ObserverVec. For +// unpartitioned observations, use an ObserverVec with zero labels. Note that +// partitioning of Histograms is expensive and should be used judiciously. +// +// If the wrapped Handler panics before calling WriteHeader, no value is +// reported. +// +// Note that this method is only guaranteed to never observe negative durations +// if used with Go1.9+. +// +// See the example for InstrumentHandlerDuration for example usage. +func InstrumentHandlerTimeToWriteHeader(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { + code, method := checkLabels(obs) + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + now := time.Now() + d := newDelegator(w, func(status int) { + obs.With(labels(code, method, r.Method, status)).Observe(time.Since(now).Seconds()) + }) + next.ServeHTTP(d, r) + }) +} + +// InstrumentHandlerRequestSize is a middleware that wraps the provided +// http.Handler to observe the request size with the provided ObserverVec. The +// ObserverVec must have zero, one, or two non-const non-curried labels. For +// those, the only allowed label names are "code" and "method". The function +// panics otherwise. The Observe method of the Observer in the ObserverVec is +// called with the request size in bytes. Partitioning happens by HTTP status +// code and/or HTTP method if the respective instance label names are present in +// the ObserverVec. For unpartitioned observations, use an ObserverVec with zero +// labels. Note that partitioning of Histograms is expensive and should be used +// judiciously. +// +// If the wrapped Handler does not set a status code, a status code of 200 is assumed. +// +// If the wrapped Handler panics, no values are reported. +// +// See the example for InstrumentHandlerDuration for example usage. +func InstrumentHandlerRequestSize(obs prometheus.ObserverVec, next http.Handler) http.HandlerFunc { + code, method := checkLabels(obs) + + if code { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + d := newDelegator(w, nil) + next.ServeHTTP(d, r) + size := computeApproximateRequestSize(r) + obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(size)) + }) + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + next.ServeHTTP(w, r) + size := computeApproximateRequestSize(r) + obs.With(labels(code, method, r.Method, 0)).Observe(float64(size)) + }) +} + +// InstrumentHandlerResponseSize is a middleware that wraps the provided +// http.Handler to observe the response size with the provided ObserverVec. The +// ObserverVec must have zero, one, or two non-const non-curried labels. For +// those, the only allowed label names are "code" and "method". The function +// panics otherwise. The Observe method of the Observer in the ObserverVec is +// called with the response size in bytes. Partitioning happens by HTTP status +// code and/or HTTP method if the respective instance label names are present in +// the ObserverVec. For unpartitioned observations, use an ObserverVec with zero +// labels. Note that partitioning of Histograms is expensive and should be used +// judiciously. +// +// If the wrapped Handler does not set a status code, a status code of 200 is assumed. +// +// If the wrapped Handler panics, no values are reported. +// +// See the example for InstrumentHandlerDuration for example usage. +func InstrumentHandlerResponseSize(obs prometheus.ObserverVec, next http.Handler) http.Handler { + code, method := checkLabels(obs) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + d := newDelegator(w, nil) + next.ServeHTTP(d, r) + obs.With(labels(code, method, r.Method, d.Status())).Observe(float64(d.Written())) + }) +} + +func checkLabels(c prometheus.Collector) (code bool, method bool) { + // TODO(beorn7): Remove this hacky way to check for instance labels + // once Descriptors can have their dimensionality queried. + var ( + desc *prometheus.Desc + m prometheus.Metric + pm dto.Metric + lvs []string + ) + + // Get the Desc from the Collector. + descc := make(chan *prometheus.Desc, 1) + c.Describe(descc) + + select { + case desc = <-descc: + default: + panic("no description provided by collector") + } + select { + case <-descc: + panic("more than one description provided by collector") + default: + } + + close(descc) + + // Create a ConstMetric with the Desc. Since we don't know how many + // variable labels there are, try for as long as it needs. + for err := errors.New("dummy"); err != nil; lvs = append(lvs, magicString) { + m, err = prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0, lvs...) + } + + // Write out the metric into a proto message and look at the labels. + // If the value is not the magicString, it is a constLabel, which doesn't interest us. + // If the label is curried, it doesn't interest us. + // In all other cases, only "code" or "method" is allowed. + if err := m.Write(&pm); err != nil { + panic("error checking metric for labels") + } + for _, label := range pm.Label { + name, value := label.GetName(), label.GetValue() + if value != magicString || isLabelCurried(c, name) { + continue + } + switch name { + case "code": + code = true + case "method": + method = true + default: + panic("metric partitioned with non-supported labels") + } + } + return +} + +func isLabelCurried(c prometheus.Collector, label string) bool { + // This is even hackier than the label test above. + // We essentially try to curry again and see if it works. + // But for that, we need to type-convert to the two + // types we use here, ObserverVec or *CounterVec. + switch v := c.(type) { + case *prometheus.CounterVec: + if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil { + return false + } + case prometheus.ObserverVec: + if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil { + return false + } + default: + panic("unsupported metric vec type") + } + return true +} + +// emptyLabels is a one-time allocation for non-partitioned metrics to avoid +// unnecessary allocations on each request. +var emptyLabels = prometheus.Labels{} + +func labels(code, method bool, reqMethod string, status int) prometheus.Labels { + if !(code || method) { + return emptyLabels + } + labels := prometheus.Labels{} + + if code { + labels["code"] = sanitizeCode(status) + } + if method { + labels["method"] = sanitizeMethod(reqMethod) + } + + return labels +} + +func computeApproximateRequestSize(r *http.Request) int { + s := 0 + if r.URL != nil { + s += len(r.URL.String()) + } + + s += len(r.Method) + s += len(r.Proto) + for name, values := range r.Header { + s += len(name) + for _, value := range values { + s += len(value) + } + } + s += len(r.Host) + + // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. + + if r.ContentLength != -1 { + s += int(r.ContentLength) + } + return s +} + +func sanitizeMethod(m string) string { + switch m { + case "GET", "get": + return "get" + case "PUT", "put": + return "put" + case "HEAD", "head": + return "head" + case "POST", "post": + return "post" + case "DELETE", "delete": + return "delete" + case "CONNECT", "connect": + return "connect" + case "OPTIONS", "options": + return "options" + case "NOTIFY", "notify": + return "notify" + default: + return strings.ToLower(m) + } +} + +// If the wrapped http.Handler has not set a status code, i.e. the value is +// currently 0, santizeCode will return 200, for consistency with behavior in +// the stdlib. +func sanitizeCode(s int) string { + switch s { + case 100: + return "100" + case 101: + return "101" + + case 200, 0: + return "200" + case 201: + return "201" + case 202: + return "202" + case 203: + return "203" + case 204: + return "204" + case 205: + return "205" + case 206: + return "206" + + case 300: + return "300" + case 301: + return "301" + case 302: + return "302" + case 304: + return "304" + case 305: + return "305" + case 307: + return "307" + + case 400: + return "400" + case 401: + return "401" + case 402: + return "402" + case 403: + return "403" + case 404: + return "404" + case 405: + return "405" + case 406: + return "406" + case 407: + return "407" + case 408: + return "408" + case 409: + return "409" + case 410: + return "410" + case 411: + return "411" + case 412: + return "412" + case 413: + return "413" + case 414: + return "414" + case 415: + return "415" + case 416: + return "416" + case 417: + return "417" + case 418: + return "418" + + case 500: + return "500" + case 501: + return "501" + case 502: + return "502" + case 503: + return "503" + case 504: + return "504" + case 505: + return "505" + + case 428: + return "428" + case 429: + return "429" + case 431: + return "431" + case 511: + return "511" + + default: + return strconv.Itoa(s) + } +} diff --git a/vendor/k8s.io/api/admissionregistration/v1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1/generated.proto index ef18100c29..f102f3a7ec 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1/generated.proto @@ -177,7 +177,7 @@ message MutatingWebhook { // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. message MutatingWebhookConfiguration { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -191,7 +191,7 @@ message MutatingWebhookConfiguration { // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. message MutatingWebhookConfigurationList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -409,7 +409,7 @@ message ValidatingWebhook { // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. message ValidatingWebhookConfiguration { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -423,7 +423,7 @@ message ValidatingWebhookConfiguration { // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. message ValidatingWebhookConfigurationList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/admissionregistration/v1/types.go b/vendor/k8s.io/api/admissionregistration/v1/types.go index fb9152f8e5..114a4c68a9 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types.go @@ -117,7 +117,7 @@ const ( // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. type ValidatingWebhookConfiguration struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Webhooks is a list of webhooks and the affected resources and operations. @@ -133,7 +133,7 @@ type ValidatingWebhookConfiguration struct { type ValidatingWebhookConfigurationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingWebhookConfiguration. @@ -147,7 +147,7 @@ type ValidatingWebhookConfigurationList struct { // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. type MutatingWebhookConfiguration struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Webhooks is a list of webhooks and the affected resources and operations. @@ -163,7 +163,7 @@ type MutatingWebhookConfiguration struct { type MutatingWebhookConfigurationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of MutatingWebhookConfiguration. diff --git a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go index 7ce3bd3993..2fde0ce37d 100644 --- a/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go @@ -48,7 +48,7 @@ func (MutatingWebhook) SwaggerDoc() map[string]string { var map_MutatingWebhookConfiguration = map[string]string{ "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } @@ -58,7 +58,7 @@ func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string { var map_MutatingWebhookConfigurationList = map[string]string{ "": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of MutatingWebhookConfiguration.", } @@ -119,7 +119,7 @@ func (ValidatingWebhook) SwaggerDoc() map[string]string { var map_ValidatingWebhookConfiguration = map[string]string{ "": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } @@ -129,7 +129,7 @@ func (ValidatingWebhookConfiguration) SwaggerDoc() map[string]string { var map_ValidatingWebhookConfigurationList = map[string]string{ "": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ValidatingWebhookConfiguration.", } diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index c133192647..17de1a587a 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -179,8 +179,9 @@ message MutatingWebhook { } // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. message MutatingWebhookConfiguration { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -194,7 +195,7 @@ message MutatingWebhookConfiguration { // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. message MutatingWebhookConfigurationList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -414,8 +415,9 @@ message ValidatingWebhook { } // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. message ValidatingWebhookConfiguration { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -429,7 +431,7 @@ message ValidatingWebhookConfiguration { // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. message ValidatingWebhookConfigurationList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go index 6b8c5a23a7..cf065a286c 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types.go @@ -115,9 +115,10 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. type ValidatingWebhookConfiguration struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Webhooks is a list of webhooks and the affected resources and operations. @@ -133,7 +134,7 @@ type ValidatingWebhookConfiguration struct { type ValidatingWebhookConfigurationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingWebhookConfiguration. @@ -145,9 +146,10 @@ type ValidatingWebhookConfigurationList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +// Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. type MutatingWebhookConfiguration struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Webhooks is a list of webhooks and the affected resources and operations. @@ -163,7 +165,7 @@ type MutatingWebhookConfiguration struct { type MutatingWebhookConfigurationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of MutatingWebhookConfiguration. diff --git a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go index 39e86db976..f40a15d50c 100644 --- a/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -47,8 +47,8 @@ func (MutatingWebhook) SwaggerDoc() map[string]string { } var map_MutatingWebhookConfiguration = map[string]string{ - "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } @@ -58,7 +58,7 @@ func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string { var map_MutatingWebhookConfigurationList = map[string]string{ "": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of MutatingWebhookConfiguration.", } @@ -118,8 +118,8 @@ func (ValidatingWebhook) SwaggerDoc() map[string]string { } var map_ValidatingWebhookConfiguration = map[string]string{ - "": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "": "ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } @@ -129,7 +129,7 @@ func (ValidatingWebhookConfiguration) SwaggerDoc() map[string]string { var map_ValidatingWebhookConfigurationList = map[string]string{ "": "ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ValidatingWebhookConfiguration.", } diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto index fea81922f3..6c55279745 100644 --- a/vendor/k8s.io/api/apps/v1/generated.proto +++ b/vendor/k8s.io/api/apps/v1/generated.proto @@ -41,7 +41,7 @@ option go_package = "v1"; // depend on its stability. It is primarily for internal use by controllers. message ControllerRevision { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -54,7 +54,7 @@ message ControllerRevision { // ControllerRevisionList is a resource containing a list of ControllerRevision objects. message ControllerRevisionList { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -65,12 +65,12 @@ message ControllerRevisionList { // DaemonSet represents the configuration of a daemon set. message DaemonSet { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional DaemonSetSpec spec = 2; @@ -78,7 +78,7 @@ message DaemonSet { // out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional DaemonSetStatus status = 3; } @@ -107,7 +107,7 @@ message DaemonSetCondition { // DaemonSetList is a collection of daemon sets. message DaemonSetList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -366,12 +366,12 @@ message DeploymentStrategy { message ReplicaSet { // If the Labels of a ReplicaSet are empty, they are defaulted to // be the same as the Pod(s) that the ReplicaSet manages. - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the ReplicaSet. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ReplicaSetSpec spec = 2; @@ -379,7 +379,7 @@ message ReplicaSet { // This data may be out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ReplicaSetStatus status = 3; } @@ -408,7 +408,7 @@ message ReplicaSetCondition { // ReplicaSetList is a collection of ReplicaSets. message ReplicaSetList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/apps/v1/types.go b/vendor/k8s.io/api/apps/v1/types.go index 2fe8574581..e003a0c4f7 100644 --- a/vendor/k8s.io/api/apps/v1/types.go +++ b/vendor/k8s.io/api/apps/v1/types.go @@ -95,13 +95,13 @@ const ( // ordering constraints. When a scale operation is performed with this // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. - RollingUpdateStatefulSetStrategyType = "RollingUpdate" + RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version // tracking and ordered rolling restarts are disabled. Pods are recreated // from the StatefulSetSpec when they are manually deleted. When a scale // operation is performed with this strategy,specification version indicated // by the StatefulSet's currentRevision. - OnDeleteStatefulSetStrategyType = "OnDelete" + OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. @@ -618,12 +618,12 @@ type DaemonSetCondition struct { type DaemonSet struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -631,7 +631,7 @@ type DaemonSet struct { // out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -649,7 +649,7 @@ const ( type DaemonSetList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -668,12 +668,12 @@ type ReplicaSet struct { // If the Labels of a ReplicaSet are empty, they are defaulted to // be the same as the Pod(s) that the ReplicaSet manages. - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the ReplicaSet. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -681,7 +681,7 @@ type ReplicaSet struct { // This data may be out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -692,7 +692,7 @@ type ReplicaSet struct { type ReplicaSetList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -800,7 +800,7 @@ type ReplicaSetCondition struct { type ControllerRevision struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -817,7 +817,7 @@ type ControllerRevision struct { type ControllerRevisionList struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index 7e992c5846..3f0299d033 100644 --- a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ControllerRevision = map[string]string{ "": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "data": "Data is the serialized representation of the state.", "revision": "Revision indicates the revision of the state represented by Data.", } @@ -40,7 +40,7 @@ func (ControllerRevision) SwaggerDoc() map[string]string { var map_ControllerRevisionList = map[string]string{ "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of ControllerRevisions", } @@ -50,9 +50,9 @@ func (ControllerRevisionList) SwaggerDoc() map[string]string { var map_DaemonSet = map[string]string{ "": "DaemonSet represents the configuration of a daemon set.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (DaemonSet) SwaggerDoc() map[string]string { @@ -74,7 +74,7 @@ func (DaemonSetCondition) SwaggerDoc() map[string]string { var map_DaemonSetList = map[string]string{ "": "DaemonSetList is a collection of daemon sets.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "A list of daemon sets.", } @@ -202,9 +202,9 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string { var map_ReplicaSet = map[string]string{ "": "ReplicaSet ensures that a specified number of pod replicas are running at any given time.", - "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (ReplicaSet) SwaggerDoc() map[string]string { @@ -226,7 +226,7 @@ func (ReplicaSetCondition) SwaggerDoc() map[string]string { var map_ReplicaSetList = map[string]string{ "": "ReplicaSetList is a collection of ReplicaSets.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", } diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto index 7942b997b6..694f6570d8 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -43,7 +43,7 @@ option go_package = "v1beta1"; // depend on its stability. It is primarily for internal use by controllers. message ControllerRevision { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -56,7 +56,7 @@ message ControllerRevision { // ControllerRevisionList is a resource containing a list of ControllerRevision objects. message ControllerRevisionList { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -277,15 +277,15 @@ message RollingUpdateStatefulSetStrategy { // Scale represents a scaling request for a resource. message Scale { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional optional ScaleSpec spec = 2; - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. // +optional optional ScaleStatus status = 3; } diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go index cf6039df69..b77fcf7af2 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/vendor/k8s.io/api/apps/v1beta1/types.go @@ -60,15 +60,15 @@ type ScaleStatus struct { // Scale represents a scaling request for a resource. type Scale struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. // +optional Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -134,13 +134,13 @@ const ( // ordering constraints. When a scale operation is performed with this // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. - RollingUpdateStatefulSetStrategyType = "RollingUpdate" + RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version // tracking and ordered rolling restarts are disabled. Pods are recreated // from the StatefulSetSpec when they are manually deleted. When a scale // operation is performed with this strategy,specification version indicated // by the StatefulSet's currentRevision. - OnDeleteStatefulSetStrategyType = "OnDelete" + OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. @@ -541,7 +541,7 @@ type DeploymentList struct { type ControllerRevision struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -558,7 +558,7 @@ type ControllerRevision struct { type ControllerRevisionList struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index da1eb5996e..504b858639 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ControllerRevision = map[string]string{ "": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "data": "Data is the serialized representation of the state.", "revision": "Revision indicates the revision of the state represented by Data.", } @@ -40,7 +40,7 @@ func (ControllerRevision) SwaggerDoc() map[string]string { var map_ControllerRevisionList = map[string]string{ "": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of ControllerRevisions", } @@ -167,9 +167,9 @@ func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string { var map_Scale = map[string]string{ "": "Scale represents a scaling request for a resource.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", } func (Scale) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go index 39e07e278a..d358455f0e 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/vendor/k8s.io/api/apps/v1beta2/types.go @@ -141,13 +141,13 @@ const ( // ordering constraints. When a scale operation is performed with this // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. - RollingUpdateStatefulSetStrategyType = "RollingUpdate" + RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version // tracking and ordered rolling restarts are disabled. Pods are recreated // from the StatefulSetSpec when they are manually deleted. When a scale // operation is performed with this strategy,specification version indicated // by the StatefulSet's currentRevision. - OnDeleteStatefulSetStrategyType = "OnDelete" + OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.proto b/vendor/k8s.io/api/autoscaling/v1/generated.proto index d1590b5ee5..f50ed9d1f0 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v1/generated.proto @@ -32,7 +32,7 @@ option go_package = "v1"; // CrossVersionObjectReference contains enough information to let you identify the referred resource. message CrossVersionObjectReference { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" optional string kind = 1; // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names @@ -88,11 +88,11 @@ message ExternalMetricStatus { // configuration of a horizontal pod autoscaler. message HorizontalPodAutoscaler { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional optional HorizontalPodAutoscalerSpec spec = 2; @@ -384,15 +384,15 @@ message ResourceMetricStatus { // Scale represents a scaling request for a resource. message Scale { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional optional ScaleSpec spec = 2; - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. // +optional optional ScaleStatus status = 3; } diff --git a/vendor/k8s.io/api/autoscaling/v1/types.go b/vendor/k8s.io/api/autoscaling/v1/types.go index fa61bec76c..519bd78694 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types.go +++ b/vendor/k8s.io/api/autoscaling/v1/types.go @@ -24,7 +24,7 @@ import ( // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names Name string `json:"name" protobuf:"bytes,2,opt,name=name"` @@ -82,11 +82,11 @@ type HorizontalPodAutoscalerStatus struct { // configuration of a horizontal pod autoscaler. type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -113,15 +113,15 @@ type HorizontalPodAutoscalerList struct { // Scale represents a scaling request for a resource. type Scale struct { metav1.TypeMeta `json:",inline"` - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. // +optional Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } diff --git a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go index 4fffb46306..129ce2b484 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", + "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "apiVersion": "API version of the referent", } @@ -64,8 +64,8 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string { var map_HorizontalPodAutoscaler = map[string]string{ "": "configuration of a horizontal pod autoscaler.", - "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", "status": "current information about the autoscaler.", } @@ -219,9 +219,9 @@ func (ResourceMetricStatus) SwaggerDoc() map[string]string { var map_Scale = map[string]string{ "": "Scale represents a scaling request for a resource.", - "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", + "status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.", } func (Scale) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto index 9b4d1a9c03..f90f93f9f4 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -32,7 +32,7 @@ option go_package = "v2beta1"; // CrossVersionObjectReference contains enough information to let you identify the referred resource. message CrossVersionObjectReference { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" optional string kind = 1; // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names @@ -92,12 +92,12 @@ message ExternalMetricStatus { // implementing the scale subresource based on the metrics specified. message HorizontalPodAutoscaler { // metadata is the standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional optional HorizontalPodAutoscalerSpec spec = 2; diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/vendor/k8s.io/api/autoscaling/v2beta1/types.go index f904a9ce38..92fe5a2b15 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -24,7 +24,7 @@ import ( // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names Name string `json:"name" protobuf:"bytes,2,opt,name=name"` @@ -380,12 +380,12 @@ type ExternalMetricStatus struct { type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go index ce57089d92..a0d5f53375 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v2beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", + "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "apiVersion": "API version of the referent", } @@ -64,8 +64,8 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string { var map_HorizontalPodAutoscaler = map[string]string{ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", - "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", + "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", "status": "status is the current information about the autoscaler.", } diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index 6ddf9bf29f..80f1d345d4 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -32,7 +32,7 @@ option go_package = "v2beta2"; // CrossVersionObjectReference contains enough information to let you identify the referred resource. message CrossVersionObjectReference { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" optional string kind = 1; // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names @@ -69,12 +69,12 @@ message ExternalMetricStatus { // implementing the scale subresource based on the metrics specified. message HorizontalPodAutoscaler { // metadata is the standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // spec is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional optional HorizontalPodAutoscalerSpec spec = 2; diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/vendor/k8s.io/api/autoscaling/v2beta2/types.go index d5a8669d65..314d70950c 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -33,12 +33,12 @@ import ( type HorizontalPodAutoscaler struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -76,7 +76,7 @@ type HorizontalPodAutoscalerSpec struct { // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names Name string `json:"name" protobuf:"bytes,2,opt,name=name"` diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go index 8a628d8844..bb85b9f0f4 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v2beta2 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", + "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", "apiVersion": "API version of the referent", } @@ -60,8 +60,8 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string { var map_HorizontalPodAutoscaler = map[string]string{ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", - "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", + "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.", "status": "status is the current information about the autoscaler.", } diff --git a/vendor/k8s.io/api/batch/v1/generated.proto b/vendor/k8s.io/api/batch/v1/generated.proto index 039149daba..75de45f171 100644 --- a/vendor/k8s.io/api/batch/v1/generated.proto +++ b/vendor/k8s.io/api/batch/v1/generated.proto @@ -32,17 +32,17 @@ option go_package = "v1"; // Job represents the configuration of a single job. message Job { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional JobSpec spec = 2; // Current status of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional JobStatus status = 3; } @@ -75,7 +75,7 @@ message JobCondition { // JobList is a collection of jobs. message JobList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/batch/v1/types.go b/vendor/k8s.io/api/batch/v1/types.go index 8dad9043d5..646a3cd7ef 100644 --- a/vendor/k8s.io/api/batch/v1/types.go +++ b/vendor/k8s.io/api/batch/v1/types.go @@ -28,17 +28,17 @@ import ( type Job struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Current status of a job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -49,7 +49,7 @@ type Job struct { type JobList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go index d8e2bdd780..0120e07d45 100644 --- a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -29,9 +29,9 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Job = map[string]string{ "": "Job represents the configuration of a single job.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Job) SwaggerDoc() map[string]string { @@ -54,7 +54,7 @@ func (JobCondition) SwaggerDoc() map[string]string { var map_JobList = map[string]string{ "": "JobList is a collection of jobs.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of Jobs.", } diff --git a/vendor/k8s.io/api/batch/v1beta1/generated.proto b/vendor/k8s.io/api/batch/v1beta1/generated.proto index 043b3551b0..995b4f3f9d 100644 --- a/vendor/k8s.io/api/batch/v1beta1/generated.proto +++ b/vendor/k8s.io/api/batch/v1beta1/generated.proto @@ -33,17 +33,17 @@ option go_package = "v1beta1"; // CronJob represents the configuration of a single cron job. message CronJob { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional CronJobSpec spec = 2; // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional CronJobStatus status = 3; } @@ -51,7 +51,7 @@ message CronJob { // CronJobList is a collection of cron jobs. message CronJobList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -112,12 +112,12 @@ message CronJobStatus { // JobTemplate describes a template for creating copies of a predefined pod. message JobTemplate { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional JobTemplateSpec template = 2; } @@ -125,12 +125,12 @@ message JobTemplate { // JobTemplateSpec describes the data a Job should have when created from a template message JobTemplateSpec { // Standard object's metadata of the jobs created from this template. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional k8s.io.api.batch.v1.JobSpec spec = 2; } diff --git a/vendor/k8s.io/api/batch/v1beta1/types.go b/vendor/k8s.io/api/batch/v1beta1/types.go index cb5c9bad29..2978747a48 100644 --- a/vendor/k8s.io/api/batch/v1beta1/types.go +++ b/vendor/k8s.io/api/batch/v1beta1/types.go @@ -28,12 +28,12 @@ import ( type JobTemplate struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` } @@ -41,12 +41,12 @@ type JobTemplate struct { // JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -58,17 +58,17 @@ type JobTemplateSpec struct { type CronJob struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -80,7 +80,7 @@ type CronJobList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go index abbdfec010..ecc9144460 100644 --- a/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go @@ -29,9 +29,9 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CronJob = map[string]string{ "": "CronJob represents the configuration of a single cron job.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (CronJob) SwaggerDoc() map[string]string { @@ -40,7 +40,7 @@ func (CronJob) SwaggerDoc() map[string]string { var map_CronJobList = map[string]string{ "": "CronJobList is a collection of cron jobs.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of CronJobs.", } @@ -75,8 +75,8 @@ func (CronJobStatus) SwaggerDoc() map[string]string { var map_JobTemplate = map[string]string{ "": "JobTemplate describes a template for creating copies of a predefined pod.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (JobTemplate) SwaggerDoc() map[string]string { @@ -85,8 +85,8 @@ func (JobTemplate) SwaggerDoc() map[string]string { var map_JobTemplateSpec = map[string]string{ "": "JobTemplateSpec describes the data a Job should have when created from a template", - "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (JobTemplateSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/batch/v2alpha1/generated.proto b/vendor/k8s.io/api/batch/v2alpha1/generated.proto index 4321c3361e..0bba13b86a 100644 --- a/vendor/k8s.io/api/batch/v2alpha1/generated.proto +++ b/vendor/k8s.io/api/batch/v2alpha1/generated.proto @@ -33,17 +33,17 @@ option go_package = "v2alpha1"; // CronJob represents the configuration of a single cron job. message CronJob { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional CronJobSpec spec = 2; // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional CronJobStatus status = 3; } @@ -51,7 +51,7 @@ message CronJob { // CronJobList is a collection of cron jobs. message CronJobList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -110,12 +110,12 @@ message CronJobStatus { // JobTemplate describes a template for creating copies of a predefined pod. message JobTemplate { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional JobTemplateSpec template = 2; } @@ -123,12 +123,12 @@ message JobTemplate { // JobTemplateSpec describes the data a Job should have when created from a template message JobTemplateSpec { // Standard object's metadata of the jobs created from this template. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional k8s.io.api.batch.v1.JobSpec spec = 2; } diff --git a/vendor/k8s.io/api/batch/v2alpha1/types.go b/vendor/k8s.io/api/batch/v2alpha1/types.go index cccff94ff2..465e614aec 100644 --- a/vendor/k8s.io/api/batch/v2alpha1/types.go +++ b/vendor/k8s.io/api/batch/v2alpha1/types.go @@ -28,12 +28,12 @@ import ( type JobTemplate struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Defines jobs that will be created from this template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` } @@ -41,12 +41,12 @@ type JobTemplate struct { // JobTemplateSpec describes the data a Job should have when created from a template type JobTemplateSpec struct { // Standard object's metadata of the jobs created from this template. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec batchv1.JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -58,17 +58,17 @@ type JobTemplateSpec struct { type CronJob struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of a cron job, including the schedule. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Current status of a cron job. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status CronJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -80,7 +80,7 @@ type CronJobList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go index f448a92cfe..bc80eca48f 100644 --- a/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go @@ -29,9 +29,9 @@ package v2alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CronJob = map[string]string{ "": "CronJob represents the configuration of a single cron job.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (CronJob) SwaggerDoc() map[string]string { @@ -40,7 +40,7 @@ func (CronJob) SwaggerDoc() map[string]string { var map_CronJobList = map[string]string{ "": "CronJobList is a collection of cron jobs.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of CronJobs.", } @@ -75,8 +75,8 @@ func (CronJobStatus) SwaggerDoc() map[string]string { var map_JobTemplate = map[string]string{ "": "JobTemplate describes a template for creating copies of a predefined pod.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "template": "Defines jobs that will be created from this template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (JobTemplate) SwaggerDoc() map[string]string { @@ -85,8 +85,8 @@ func (JobTemplate) SwaggerDoc() map[string]string { var map_JobTemplateSpec = map[string]string{ "": "JobTemplateSpec describes the data a Job should have when created from a template", - "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (JobTemplateSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/coordination/v1/generated.proto b/vendor/k8s.io/api/coordination/v1/generated.proto index 99692e958d..4206746d83 100644 --- a/vendor/k8s.io/api/coordination/v1/generated.proto +++ b/vendor/k8s.io/api/coordination/v1/generated.proto @@ -30,12 +30,12 @@ option go_package = "v1"; // Lease defines a lease concept. message Lease { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional LeaseSpec spec = 2; } @@ -43,7 +43,7 @@ message Lease { // LeaseList is a list of Lease objects. message LeaseList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/coordination/v1/types.go b/vendor/k8s.io/api/coordination/v1/types.go index 8f9f24d04e..7a5605ace1 100644 --- a/vendor/k8s.io/api/coordination/v1/types.go +++ b/vendor/k8s.io/api/coordination/v1/types.go @@ -26,12 +26,12 @@ import ( // Lease defines a lease concept. type Lease struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec LeaseSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -65,7 +65,7 @@ type LeaseSpec struct { type LeaseList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go index bd02ad5daa..0f14404308 100644 --- a/vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go @@ -29,8 +29,8 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Lease = map[string]string{ "": "Lease defines a lease concept.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Lease) SwaggerDoc() map[string]string { @@ -39,7 +39,7 @@ func (Lease) SwaggerDoc() map[string]string { var map_LeaseList = map[string]string{ "": "LeaseList is a list of Lease objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/coordination/v1beta1/generated.proto b/vendor/k8s.io/api/coordination/v1beta1/generated.proto index 918e0de1c7..cfc2711c67 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/generated.proto +++ b/vendor/k8s.io/api/coordination/v1beta1/generated.proto @@ -30,12 +30,12 @@ option go_package = "v1beta1"; // Lease defines a lease concept. message Lease { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional LeaseSpec spec = 2; } @@ -43,7 +43,7 @@ message Lease { // LeaseList is a list of Lease objects. message LeaseList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/coordination/v1beta1/types.go b/vendor/k8s.io/api/coordination/v1beta1/types.go index 846f728028..da88f675c0 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/types.go +++ b/vendor/k8s.io/api/coordination/v1beta1/types.go @@ -26,12 +26,12 @@ import ( // Lease defines a lease concept. type Lease struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the Lease. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec LeaseSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -65,7 +65,7 @@ type LeaseSpec struct { type LeaseList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go index 4532d322ab..f557d265d4 100644 --- a/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go @@ -29,8 +29,8 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Lease = map[string]string{ "": "Lease defines a lease concept.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Lease) SwaggerDoc() map[string]string { @@ -39,7 +39,7 @@ func (Lease) SwaggerDoc() map[string]string { var map_LeaseList = map[string]string{ "": "LeaseList is a list of Lease objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 7e745891df..8f788035e6 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -2373,10 +2373,38 @@ func (m *Namespace) XXX_DiscardUnknown() { var xxx_messageInfo_Namespace proto.InternalMessageInfo +func (m *NamespaceCondition) Reset() { *m = NamespaceCondition{} } +func (*NamespaceCondition) ProtoMessage() {} +func (*NamespaceCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_83c10c24ec417dc9, []int{83} +} +func (m *NamespaceCondition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NamespaceCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NamespaceCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NamespaceCondition.Merge(m, src) +} +func (m *NamespaceCondition) XXX_Size() int { + return m.Size() +} +func (m *NamespaceCondition) XXX_DiscardUnknown() { + xxx_messageInfo_NamespaceCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_NamespaceCondition proto.InternalMessageInfo + func (m *NamespaceList) Reset() { *m = NamespaceList{} } func (*NamespaceList) ProtoMessage() {} func (*NamespaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{83} + return fileDescriptor_83c10c24ec417dc9, []int{84} } func (m *NamespaceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2404,7 +2432,7 @@ var xxx_messageInfo_NamespaceList proto.InternalMessageInfo func (m *NamespaceSpec) Reset() { *m = NamespaceSpec{} } func (*NamespaceSpec) ProtoMessage() {} func (*NamespaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{84} + return fileDescriptor_83c10c24ec417dc9, []int{85} } func (m *NamespaceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2432,7 +2460,7 @@ var xxx_messageInfo_NamespaceSpec proto.InternalMessageInfo func (m *NamespaceStatus) Reset() { *m = NamespaceStatus{} } func (*NamespaceStatus) ProtoMessage() {} func (*NamespaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{85} + return fileDescriptor_83c10c24ec417dc9, []int{86} } func (m *NamespaceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2460,7 +2488,7 @@ var xxx_messageInfo_NamespaceStatus proto.InternalMessageInfo func (m *Node) Reset() { *m = Node{} } func (*Node) ProtoMessage() {} func (*Node) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{86} + return fileDescriptor_83c10c24ec417dc9, []int{87} } func (m *Node) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2488,7 +2516,7 @@ var xxx_messageInfo_Node proto.InternalMessageInfo func (m *NodeAddress) Reset() { *m = NodeAddress{} } func (*NodeAddress) ProtoMessage() {} func (*NodeAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{87} + return fileDescriptor_83c10c24ec417dc9, []int{88} } func (m *NodeAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2516,7 +2544,7 @@ var xxx_messageInfo_NodeAddress proto.InternalMessageInfo func (m *NodeAffinity) Reset() { *m = NodeAffinity{} } func (*NodeAffinity) ProtoMessage() {} func (*NodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{88} + return fileDescriptor_83c10c24ec417dc9, []int{89} } func (m *NodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2544,7 +2572,7 @@ var xxx_messageInfo_NodeAffinity proto.InternalMessageInfo func (m *NodeCondition) Reset() { *m = NodeCondition{} } func (*NodeCondition) ProtoMessage() {} func (*NodeCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{89} + return fileDescriptor_83c10c24ec417dc9, []int{90} } func (m *NodeCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2572,7 +2600,7 @@ var xxx_messageInfo_NodeCondition proto.InternalMessageInfo func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} } func (*NodeConfigSource) ProtoMessage() {} func (*NodeConfigSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{90} + return fileDescriptor_83c10c24ec417dc9, []int{91} } func (m *NodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2600,7 +2628,7 @@ var xxx_messageInfo_NodeConfigSource proto.InternalMessageInfo func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } func (*NodeConfigStatus) ProtoMessage() {} func (*NodeConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{91} + return fileDescriptor_83c10c24ec417dc9, []int{92} } func (m *NodeConfigStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2628,7 +2656,7 @@ var xxx_messageInfo_NodeConfigStatus proto.InternalMessageInfo func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{92} + return fileDescriptor_83c10c24ec417dc9, []int{93} } func (m *NodeDaemonEndpoints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2656,7 +2684,7 @@ var xxx_messageInfo_NodeDaemonEndpoints proto.InternalMessageInfo func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} func (*NodeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{93} + return fileDescriptor_83c10c24ec417dc9, []int{94} } func (m *NodeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2684,7 +2712,7 @@ var xxx_messageInfo_NodeList proto.InternalMessageInfo func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} func (*NodeProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{94} + return fileDescriptor_83c10c24ec417dc9, []int{95} } func (m *NodeProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2712,7 +2740,7 @@ var xxx_messageInfo_NodeProxyOptions proto.InternalMessageInfo func (m *NodeResources) Reset() { *m = NodeResources{} } func (*NodeResources) ProtoMessage() {} func (*NodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{95} + return fileDescriptor_83c10c24ec417dc9, []int{96} } func (m *NodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2740,7 +2768,7 @@ var xxx_messageInfo_NodeResources proto.InternalMessageInfo func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} func (*NodeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{96} + return fileDescriptor_83c10c24ec417dc9, []int{97} } func (m *NodeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2768,7 +2796,7 @@ var xxx_messageInfo_NodeSelector proto.InternalMessageInfo func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{97} + return fileDescriptor_83c10c24ec417dc9, []int{98} } func (m *NodeSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2796,7 +2824,7 @@ var xxx_messageInfo_NodeSelectorRequirement proto.InternalMessageInfo func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{98} + return fileDescriptor_83c10c24ec417dc9, []int{99} } func (m *NodeSelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2824,7 +2852,7 @@ var xxx_messageInfo_NodeSelectorTerm proto.InternalMessageInfo func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} func (*NodeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{99} + return fileDescriptor_83c10c24ec417dc9, []int{100} } func (m *NodeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2852,7 +2880,7 @@ var xxx_messageInfo_NodeSpec proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{100} + return fileDescriptor_83c10c24ec417dc9, []int{101} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2880,7 +2908,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{101} + return fileDescriptor_83c10c24ec417dc9, []int{102} } func (m *NodeSystemInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2908,7 +2936,7 @@ var xxx_messageInfo_NodeSystemInfo proto.InternalMessageInfo func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{102} + return fileDescriptor_83c10c24ec417dc9, []int{103} } func (m *ObjectFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2936,7 +2964,7 @@ var xxx_messageInfo_ObjectFieldSelector proto.InternalMessageInfo func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} func (*ObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{103} + return fileDescriptor_83c10c24ec417dc9, []int{104} } func (m *ObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2964,7 +2992,7 @@ var xxx_messageInfo_ObjectReference proto.InternalMessageInfo func (m *PersistentVolume) Reset() { *m = PersistentVolume{} } func (*PersistentVolume) ProtoMessage() {} func (*PersistentVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{104} + return fileDescriptor_83c10c24ec417dc9, []int{105} } func (m *PersistentVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2992,7 +3020,7 @@ var xxx_messageInfo_PersistentVolume proto.InternalMessageInfo func (m *PersistentVolumeClaim) Reset() { *m = PersistentVolumeClaim{} } func (*PersistentVolumeClaim) ProtoMessage() {} func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{105} + return fileDescriptor_83c10c24ec417dc9, []int{106} } func (m *PersistentVolumeClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3020,7 +3048,7 @@ var xxx_messageInfo_PersistentVolumeClaim proto.InternalMessageInfo func (m *PersistentVolumeClaimCondition) Reset() { *m = PersistentVolumeClaimCondition{} } func (*PersistentVolumeClaimCondition) ProtoMessage() {} func (*PersistentVolumeClaimCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{106} + return fileDescriptor_83c10c24ec417dc9, []int{107} } func (m *PersistentVolumeClaimCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3048,7 +3076,7 @@ var xxx_messageInfo_PersistentVolumeClaimCondition proto.InternalMessageInfo func (m *PersistentVolumeClaimList) Reset() { *m = PersistentVolumeClaimList{} } func (*PersistentVolumeClaimList) ProtoMessage() {} func (*PersistentVolumeClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{107} + return fileDescriptor_83c10c24ec417dc9, []int{108} } func (m *PersistentVolumeClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3076,7 +3104,7 @@ var xxx_messageInfo_PersistentVolumeClaimList proto.InternalMessageInfo func (m *PersistentVolumeClaimSpec) Reset() { *m = PersistentVolumeClaimSpec{} } func (*PersistentVolumeClaimSpec) ProtoMessage() {} func (*PersistentVolumeClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{108} + return fileDescriptor_83c10c24ec417dc9, []int{109} } func (m *PersistentVolumeClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3104,7 +3132,7 @@ var xxx_messageInfo_PersistentVolumeClaimSpec proto.InternalMessageInfo func (m *PersistentVolumeClaimStatus) Reset() { *m = PersistentVolumeClaimStatus{} } func (*PersistentVolumeClaimStatus) ProtoMessage() {} func (*PersistentVolumeClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{109} + return fileDescriptor_83c10c24ec417dc9, []int{110} } func (m *PersistentVolumeClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3132,7 +3160,7 @@ var xxx_messageInfo_PersistentVolumeClaimStatus proto.InternalMessageInfo func (m *PersistentVolumeClaimVolumeSource) Reset() { *m = PersistentVolumeClaimVolumeSource{} } func (*PersistentVolumeClaimVolumeSource) ProtoMessage() {} func (*PersistentVolumeClaimVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{110} + return fileDescriptor_83c10c24ec417dc9, []int{111} } func (m *PersistentVolumeClaimVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3160,7 +3188,7 @@ var xxx_messageInfo_PersistentVolumeClaimVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeList) Reset() { *m = PersistentVolumeList{} } func (*PersistentVolumeList) ProtoMessage() {} func (*PersistentVolumeList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{111} + return fileDescriptor_83c10c24ec417dc9, []int{112} } func (m *PersistentVolumeList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3188,7 +3216,7 @@ var xxx_messageInfo_PersistentVolumeList proto.InternalMessageInfo func (m *PersistentVolumeSource) Reset() { *m = PersistentVolumeSource{} } func (*PersistentVolumeSource) ProtoMessage() {} func (*PersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{112} + return fileDescriptor_83c10c24ec417dc9, []int{113} } func (m *PersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3216,7 +3244,7 @@ var xxx_messageInfo_PersistentVolumeSource proto.InternalMessageInfo func (m *PersistentVolumeSpec) Reset() { *m = PersistentVolumeSpec{} } func (*PersistentVolumeSpec) ProtoMessage() {} func (*PersistentVolumeSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{113} + return fileDescriptor_83c10c24ec417dc9, []int{114} } func (m *PersistentVolumeSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3244,7 +3272,7 @@ var xxx_messageInfo_PersistentVolumeSpec proto.InternalMessageInfo func (m *PersistentVolumeStatus) Reset() { *m = PersistentVolumeStatus{} } func (*PersistentVolumeStatus) ProtoMessage() {} func (*PersistentVolumeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{114} + return fileDescriptor_83c10c24ec417dc9, []int{115} } func (m *PersistentVolumeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3272,7 +3300,7 @@ var xxx_messageInfo_PersistentVolumeStatus proto.InternalMessageInfo func (m *PhotonPersistentDiskVolumeSource) Reset() { *m = PhotonPersistentDiskVolumeSource{} } func (*PhotonPersistentDiskVolumeSource) ProtoMessage() {} func (*PhotonPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{115} + return fileDescriptor_83c10c24ec417dc9, []int{116} } func (m *PhotonPersistentDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3300,7 +3328,7 @@ var xxx_messageInfo_PhotonPersistentDiskVolumeSource proto.InternalMessageInfo func (m *Pod) Reset() { *m = Pod{} } func (*Pod) ProtoMessage() {} func (*Pod) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{116} + return fileDescriptor_83c10c24ec417dc9, []int{117} } func (m *Pod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3328,7 +3356,7 @@ var xxx_messageInfo_Pod proto.InternalMessageInfo func (m *PodAffinity) Reset() { *m = PodAffinity{} } func (*PodAffinity) ProtoMessage() {} func (*PodAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{117} + return fileDescriptor_83c10c24ec417dc9, []int{118} } func (m *PodAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3356,7 +3384,7 @@ var xxx_messageInfo_PodAffinity proto.InternalMessageInfo func (m *PodAffinityTerm) Reset() { *m = PodAffinityTerm{} } func (*PodAffinityTerm) ProtoMessage() {} func (*PodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{118} + return fileDescriptor_83c10c24ec417dc9, []int{119} } func (m *PodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3384,7 +3412,7 @@ var xxx_messageInfo_PodAffinityTerm proto.InternalMessageInfo func (m *PodAntiAffinity) Reset() { *m = PodAntiAffinity{} } func (*PodAntiAffinity) ProtoMessage() {} func (*PodAntiAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{119} + return fileDescriptor_83c10c24ec417dc9, []int{120} } func (m *PodAntiAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3412,7 +3440,7 @@ var xxx_messageInfo_PodAntiAffinity proto.InternalMessageInfo func (m *PodAttachOptions) Reset() { *m = PodAttachOptions{} } func (*PodAttachOptions) ProtoMessage() {} func (*PodAttachOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{120} + return fileDescriptor_83c10c24ec417dc9, []int{121} } func (m *PodAttachOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3440,7 +3468,7 @@ var xxx_messageInfo_PodAttachOptions proto.InternalMessageInfo func (m *PodCondition) Reset() { *m = PodCondition{} } func (*PodCondition) ProtoMessage() {} func (*PodCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{121} + return fileDescriptor_83c10c24ec417dc9, []int{122} } func (m *PodCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3468,7 +3496,7 @@ var xxx_messageInfo_PodCondition proto.InternalMessageInfo func (m *PodDNSConfig) Reset() { *m = PodDNSConfig{} } func (*PodDNSConfig) ProtoMessage() {} func (*PodDNSConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{122} + return fileDescriptor_83c10c24ec417dc9, []int{123} } func (m *PodDNSConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3496,7 +3524,7 @@ var xxx_messageInfo_PodDNSConfig proto.InternalMessageInfo func (m *PodDNSConfigOption) Reset() { *m = PodDNSConfigOption{} } func (*PodDNSConfigOption) ProtoMessage() {} func (*PodDNSConfigOption) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{123} + return fileDescriptor_83c10c24ec417dc9, []int{124} } func (m *PodDNSConfigOption) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3524,7 +3552,7 @@ var xxx_messageInfo_PodDNSConfigOption proto.InternalMessageInfo func (m *PodExecOptions) Reset() { *m = PodExecOptions{} } func (*PodExecOptions) ProtoMessage() {} func (*PodExecOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{124} + return fileDescriptor_83c10c24ec417dc9, []int{125} } func (m *PodExecOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3552,7 +3580,7 @@ var xxx_messageInfo_PodExecOptions proto.InternalMessageInfo func (m *PodIP) Reset() { *m = PodIP{} } func (*PodIP) ProtoMessage() {} func (*PodIP) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{125} + return fileDescriptor_83c10c24ec417dc9, []int{126} } func (m *PodIP) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3580,7 +3608,7 @@ var xxx_messageInfo_PodIP proto.InternalMessageInfo func (m *PodList) Reset() { *m = PodList{} } func (*PodList) ProtoMessage() {} func (*PodList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{126} + return fileDescriptor_83c10c24ec417dc9, []int{127} } func (m *PodList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3608,7 +3636,7 @@ var xxx_messageInfo_PodList proto.InternalMessageInfo func (m *PodLogOptions) Reset() { *m = PodLogOptions{} } func (*PodLogOptions) ProtoMessage() {} func (*PodLogOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{127} + return fileDescriptor_83c10c24ec417dc9, []int{128} } func (m *PodLogOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3636,7 +3664,7 @@ var xxx_messageInfo_PodLogOptions proto.InternalMessageInfo func (m *PodPortForwardOptions) Reset() { *m = PodPortForwardOptions{} } func (*PodPortForwardOptions) ProtoMessage() {} func (*PodPortForwardOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{128} + return fileDescriptor_83c10c24ec417dc9, []int{129} } func (m *PodPortForwardOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3664,7 +3692,7 @@ var xxx_messageInfo_PodPortForwardOptions proto.InternalMessageInfo func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{129} + return fileDescriptor_83c10c24ec417dc9, []int{130} } func (m *PodProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3692,7 +3720,7 @@ var xxx_messageInfo_PodProxyOptions proto.InternalMessageInfo func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } func (*PodReadinessGate) ProtoMessage() {} func (*PodReadinessGate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{130} + return fileDescriptor_83c10c24ec417dc9, []int{131} } func (m *PodReadinessGate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3720,7 +3748,7 @@ var xxx_messageInfo_PodReadinessGate proto.InternalMessageInfo func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} func (*PodSecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{131} + return fileDescriptor_83c10c24ec417dc9, []int{132} } func (m *PodSecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3748,7 +3776,7 @@ var xxx_messageInfo_PodSecurityContext proto.InternalMessageInfo func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} func (*PodSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{132} + return fileDescriptor_83c10c24ec417dc9, []int{133} } func (m *PodSignature) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3776,7 +3804,7 @@ var xxx_messageInfo_PodSignature proto.InternalMessageInfo func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} func (*PodSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{133} + return fileDescriptor_83c10c24ec417dc9, []int{134} } func (m *PodSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3804,7 +3832,7 @@ var xxx_messageInfo_PodSpec proto.InternalMessageInfo func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} func (*PodStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{134} + return fileDescriptor_83c10c24ec417dc9, []int{135} } func (m *PodStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3832,7 +3860,7 @@ var xxx_messageInfo_PodStatus proto.InternalMessageInfo func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} func (*PodStatusResult) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{135} + return fileDescriptor_83c10c24ec417dc9, []int{136} } func (m *PodStatusResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3860,7 +3888,7 @@ var xxx_messageInfo_PodStatusResult proto.InternalMessageInfo func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} func (*PodTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{136} + return fileDescriptor_83c10c24ec417dc9, []int{137} } func (m *PodTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3888,7 +3916,7 @@ var xxx_messageInfo_PodTemplate proto.InternalMessageInfo func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} func (*PodTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{137} + return fileDescriptor_83c10c24ec417dc9, []int{138} } func (m *PodTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3916,7 +3944,7 @@ var xxx_messageInfo_PodTemplateList proto.InternalMessageInfo func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} func (*PodTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{138} + return fileDescriptor_83c10c24ec417dc9, []int{139} } func (m *PodTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3944,7 +3972,7 @@ var xxx_messageInfo_PodTemplateSpec proto.InternalMessageInfo func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{139} + return fileDescriptor_83c10c24ec417dc9, []int{140} } func (m *PortworxVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3972,7 +4000,7 @@ var xxx_messageInfo_PortworxVolumeSource proto.InternalMessageInfo func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} func (*Preconditions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{140} + return fileDescriptor_83c10c24ec417dc9, []int{141} } func (m *Preconditions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4000,7 +4028,7 @@ var xxx_messageInfo_Preconditions proto.InternalMessageInfo func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{141} + return fileDescriptor_83c10c24ec417dc9, []int{142} } func (m *PreferAvoidPodsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4028,7 +4056,7 @@ var xxx_messageInfo_PreferAvoidPodsEntry proto.InternalMessageInfo func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{142} + return fileDescriptor_83c10c24ec417dc9, []int{143} } func (m *PreferredSchedulingTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4056,7 +4084,7 @@ var xxx_messageInfo_PreferredSchedulingTerm proto.InternalMessageInfo func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} func (*Probe) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{143} + return fileDescriptor_83c10c24ec417dc9, []int{144} } func (m *Probe) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4084,7 +4112,7 @@ var xxx_messageInfo_Probe proto.InternalMessageInfo func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{144} + return fileDescriptor_83c10c24ec417dc9, []int{145} } func (m *ProjectedVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4112,7 +4140,7 @@ var xxx_messageInfo_ProjectedVolumeSource proto.InternalMessageInfo func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{145} + return fileDescriptor_83c10c24ec417dc9, []int{146} } func (m *QuobyteVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4140,7 +4168,7 @@ var xxx_messageInfo_QuobyteVolumeSource proto.InternalMessageInfo func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{146} + return fileDescriptor_83c10c24ec417dc9, []int{147} } func (m *RBDPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4168,7 +4196,7 @@ var xxx_messageInfo_RBDPersistentVolumeSource proto.InternalMessageInfo func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} func (*RBDVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{147} + return fileDescriptor_83c10c24ec417dc9, []int{148} } func (m *RBDVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4196,7 +4224,7 @@ var xxx_messageInfo_RBDVolumeSource proto.InternalMessageInfo func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} func (*RangeAllocation) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{148} + return fileDescriptor_83c10c24ec417dc9, []int{149} } func (m *RangeAllocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4224,7 +4252,7 @@ var xxx_messageInfo_RangeAllocation proto.InternalMessageInfo func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} func (*ReplicationController) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{149} + return fileDescriptor_83c10c24ec417dc9, []int{150} } func (m *ReplicationController) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4252,7 +4280,7 @@ var xxx_messageInfo_ReplicationController proto.InternalMessageInfo func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{150} + return fileDescriptor_83c10c24ec417dc9, []int{151} } func (m *ReplicationControllerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4280,7 +4308,7 @@ var xxx_messageInfo_ReplicationControllerCondition proto.InternalMessageInfo func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{151} + return fileDescriptor_83c10c24ec417dc9, []int{152} } func (m *ReplicationControllerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4308,7 +4336,7 @@ var xxx_messageInfo_ReplicationControllerList proto.InternalMessageInfo func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{152} + return fileDescriptor_83c10c24ec417dc9, []int{153} } func (m *ReplicationControllerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4336,7 +4364,7 @@ var xxx_messageInfo_ReplicationControllerSpec proto.InternalMessageInfo func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{153} + return fileDescriptor_83c10c24ec417dc9, []int{154} } func (m *ReplicationControllerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4364,7 +4392,7 @@ var xxx_messageInfo_ReplicationControllerStatus proto.InternalMessageInfo func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{154} + return fileDescriptor_83c10c24ec417dc9, []int{155} } func (m *ResourceFieldSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4392,7 +4420,7 @@ var xxx_messageInfo_ResourceFieldSelector proto.InternalMessageInfo func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} func (*ResourceQuota) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{155} + return fileDescriptor_83c10c24ec417dc9, []int{156} } func (m *ResourceQuota) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4420,7 +4448,7 @@ var xxx_messageInfo_ResourceQuota proto.InternalMessageInfo func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} func (*ResourceQuotaList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{156} + return fileDescriptor_83c10c24ec417dc9, []int{157} } func (m *ResourceQuotaList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4448,7 +4476,7 @@ var xxx_messageInfo_ResourceQuotaList proto.InternalMessageInfo func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{157} + return fileDescriptor_83c10c24ec417dc9, []int{158} } func (m *ResourceQuotaSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4476,7 +4504,7 @@ var xxx_messageInfo_ResourceQuotaSpec proto.InternalMessageInfo func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{158} + return fileDescriptor_83c10c24ec417dc9, []int{159} } func (m *ResourceQuotaStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4504,7 +4532,7 @@ var xxx_messageInfo_ResourceQuotaStatus proto.InternalMessageInfo func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} func (*ResourceRequirements) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{159} + return fileDescriptor_83c10c24ec417dc9, []int{160} } func (m *ResourceRequirements) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4532,7 +4560,7 @@ var xxx_messageInfo_ResourceRequirements proto.InternalMessageInfo func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} func (*SELinuxOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{160} + return fileDescriptor_83c10c24ec417dc9, []int{161} } func (m *SELinuxOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4560,7 +4588,7 @@ var xxx_messageInfo_SELinuxOptions proto.InternalMessageInfo func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{161} + return fileDescriptor_83c10c24ec417dc9, []int{162} } func (m *ScaleIOPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4588,7 +4616,7 @@ var xxx_messageInfo_ScaleIOPersistentVolumeSource proto.InternalMessageInfo func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{162} + return fileDescriptor_83c10c24ec417dc9, []int{163} } func (m *ScaleIOVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4616,7 +4644,7 @@ var xxx_messageInfo_ScaleIOVolumeSource proto.InternalMessageInfo func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } func (*ScopeSelector) ProtoMessage() {} func (*ScopeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{163} + return fileDescriptor_83c10c24ec417dc9, []int{164} } func (m *ScopeSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4644,7 +4672,7 @@ var xxx_messageInfo_ScopeSelector proto.InternalMessageInfo func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } func (*ScopedResourceSelectorRequirement) ProtoMessage() {} func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{164} + return fileDescriptor_83c10c24ec417dc9, []int{165} } func (m *ScopedResourceSelectorRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4672,7 +4700,7 @@ var xxx_messageInfo_ScopedResourceSelectorRequirement proto.InternalMessageInfo func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{165} + return fileDescriptor_83c10c24ec417dc9, []int{166} } func (m *Secret) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4700,7 +4728,7 @@ var xxx_messageInfo_Secret proto.InternalMessageInfo func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} func (*SecretEnvSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{166} + return fileDescriptor_83c10c24ec417dc9, []int{167} } func (m *SecretEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4728,7 +4756,7 @@ var xxx_messageInfo_SecretEnvSource proto.InternalMessageInfo func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} func (*SecretKeySelector) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{167} + return fileDescriptor_83c10c24ec417dc9, []int{168} } func (m *SecretKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4756,7 +4784,7 @@ var xxx_messageInfo_SecretKeySelector proto.InternalMessageInfo func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} func (*SecretList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{168} + return fileDescriptor_83c10c24ec417dc9, []int{169} } func (m *SecretList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4784,7 +4812,7 @@ var xxx_messageInfo_SecretList proto.InternalMessageInfo func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} func (*SecretProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{169} + return fileDescriptor_83c10c24ec417dc9, []int{170} } func (m *SecretProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4812,7 +4840,7 @@ var xxx_messageInfo_SecretProjection proto.InternalMessageInfo func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} func (*SecretReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{170} + return fileDescriptor_83c10c24ec417dc9, []int{171} } func (m *SecretReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4840,7 +4868,7 @@ var xxx_messageInfo_SecretReference proto.InternalMessageInfo func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} func (*SecretVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{171} + return fileDescriptor_83c10c24ec417dc9, []int{172} } func (m *SecretVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4868,7 +4896,7 @@ var xxx_messageInfo_SecretVolumeSource proto.InternalMessageInfo func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} func (*SecurityContext) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{172} + return fileDescriptor_83c10c24ec417dc9, []int{173} } func (m *SecurityContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4896,7 +4924,7 @@ var xxx_messageInfo_SecurityContext proto.InternalMessageInfo func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} func (*SerializedReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{173} + return fileDescriptor_83c10c24ec417dc9, []int{174} } func (m *SerializedReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4924,7 +4952,7 @@ var xxx_messageInfo_SerializedReference proto.InternalMessageInfo func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} func (*Service) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{174} + return fileDescriptor_83c10c24ec417dc9, []int{175} } func (m *Service) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4952,7 +4980,7 @@ var xxx_messageInfo_Service proto.InternalMessageInfo func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} func (*ServiceAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{175} + return fileDescriptor_83c10c24ec417dc9, []int{176} } func (m *ServiceAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4980,7 +5008,7 @@ var xxx_messageInfo_ServiceAccount proto.InternalMessageInfo func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} func (*ServiceAccountList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{176} + return fileDescriptor_83c10c24ec417dc9, []int{177} } func (m *ServiceAccountList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5008,7 +5036,7 @@ var xxx_messageInfo_ServiceAccountList proto.InternalMessageInfo func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } func (*ServiceAccountTokenProjection) ProtoMessage() {} func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{177} + return fileDescriptor_83c10c24ec417dc9, []int{178} } func (m *ServiceAccountTokenProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5036,7 +5064,7 @@ var xxx_messageInfo_ServiceAccountTokenProjection proto.InternalMessageInfo func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} func (*ServiceList) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{178} + return fileDescriptor_83c10c24ec417dc9, []int{179} } func (m *ServiceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5064,7 +5092,7 @@ var xxx_messageInfo_ServiceList proto.InternalMessageInfo func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} func (*ServicePort) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{179} + return fileDescriptor_83c10c24ec417dc9, []int{180} } func (m *ServicePort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5092,7 +5120,7 @@ var xxx_messageInfo_ServicePort proto.InternalMessageInfo func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{180} + return fileDescriptor_83c10c24ec417dc9, []int{181} } func (m *ServiceProxyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5120,7 +5148,7 @@ var xxx_messageInfo_ServiceProxyOptions proto.InternalMessageInfo func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} func (*ServiceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{181} + return fileDescriptor_83c10c24ec417dc9, []int{182} } func (m *ServiceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5148,7 +5176,7 @@ var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} func (*ServiceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{182} + return fileDescriptor_83c10c24ec417dc9, []int{183} } func (m *ServiceStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5176,7 +5204,7 @@ var xxx_messageInfo_ServiceStatus proto.InternalMessageInfo func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{183} + return fileDescriptor_83c10c24ec417dc9, []int{184} } func (m *SessionAffinityConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5204,7 +5232,7 @@ var xxx_messageInfo_SessionAffinityConfig proto.InternalMessageInfo func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{184} + return fileDescriptor_83c10c24ec417dc9, []int{185} } func (m *StorageOSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5232,7 +5260,7 @@ var xxx_messageInfo_StorageOSPersistentVolumeSource proto.InternalMessageInfo func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{185} + return fileDescriptor_83c10c24ec417dc9, []int{186} } func (m *StorageOSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5260,7 +5288,7 @@ var xxx_messageInfo_StorageOSVolumeSource proto.InternalMessageInfo func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} func (*Sysctl) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{186} + return fileDescriptor_83c10c24ec417dc9, []int{187} } func (m *Sysctl) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5288,7 +5316,7 @@ var xxx_messageInfo_Sysctl proto.InternalMessageInfo func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} func (*TCPSocketAction) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{187} + return fileDescriptor_83c10c24ec417dc9, []int{188} } func (m *TCPSocketAction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5316,7 +5344,7 @@ var xxx_messageInfo_TCPSocketAction proto.InternalMessageInfo func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} func (*Taint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{188} + return fileDescriptor_83c10c24ec417dc9, []int{189} } func (m *Taint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5344,7 +5372,7 @@ var xxx_messageInfo_Taint proto.InternalMessageInfo func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} func (*Toleration) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{189} + return fileDescriptor_83c10c24ec417dc9, []int{190} } func (m *Toleration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5372,7 +5400,7 @@ var xxx_messageInfo_Toleration proto.InternalMessageInfo func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } func (*TopologySelectorLabelRequirement) ProtoMessage() {} func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{190} + return fileDescriptor_83c10c24ec417dc9, []int{191} } func (m *TopologySelectorLabelRequirement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5400,7 +5428,7 @@ var xxx_messageInfo_TopologySelectorLabelRequirement proto.InternalMessageInfo func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } func (*TopologySelectorTerm) ProtoMessage() {} func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{191} + return fileDescriptor_83c10c24ec417dc9, []int{192} } func (m *TopologySelectorTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5428,7 +5456,7 @@ var xxx_messageInfo_TopologySelectorTerm proto.InternalMessageInfo func (m *TopologySpreadConstraint) Reset() { *m = TopologySpreadConstraint{} } func (*TopologySpreadConstraint) ProtoMessage() {} func (*TopologySpreadConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{192} + return fileDescriptor_83c10c24ec417dc9, []int{193} } func (m *TopologySpreadConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5456,7 +5484,7 @@ var xxx_messageInfo_TopologySpreadConstraint proto.InternalMessageInfo func (m *TypedLocalObjectReference) Reset() { *m = TypedLocalObjectReference{} } func (*TypedLocalObjectReference) ProtoMessage() {} func (*TypedLocalObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{193} + return fileDescriptor_83c10c24ec417dc9, []int{194} } func (m *TypedLocalObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5484,7 +5512,7 @@ var xxx_messageInfo_TypedLocalObjectReference proto.InternalMessageInfo func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{194} + return fileDescriptor_83c10c24ec417dc9, []int{195} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5512,7 +5540,7 @@ var xxx_messageInfo_Volume proto.InternalMessageInfo func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} func (*VolumeDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{195} + return fileDescriptor_83c10c24ec417dc9, []int{196} } func (m *VolumeDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5540,7 +5568,7 @@ var xxx_messageInfo_VolumeDevice proto.InternalMessageInfo func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{196} + return fileDescriptor_83c10c24ec417dc9, []int{197} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5568,7 +5596,7 @@ var xxx_messageInfo_VolumeMount proto.InternalMessageInfo func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } func (*VolumeNodeAffinity) ProtoMessage() {} func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{197} + return fileDescriptor_83c10c24ec417dc9, []int{198} } func (m *VolumeNodeAffinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5596,7 +5624,7 @@ var xxx_messageInfo_VolumeNodeAffinity proto.InternalMessageInfo func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} func (*VolumeProjection) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{198} + return fileDescriptor_83c10c24ec417dc9, []int{199} } func (m *VolumeProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5624,7 +5652,7 @@ var xxx_messageInfo_VolumeProjection proto.InternalMessageInfo func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} func (*VolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{199} + return fileDescriptor_83c10c24ec417dc9, []int{200} } func (m *VolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5652,7 +5680,7 @@ var xxx_messageInfo_VolumeSource proto.InternalMessageInfo func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{200} + return fileDescriptor_83c10c24ec417dc9, []int{201} } func (m *VsphereVirtualDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5680,7 +5708,7 @@ var xxx_messageInfo_VsphereVirtualDiskVolumeSource proto.InternalMessageInfo func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{201} + return fileDescriptor_83c10c24ec417dc9, []int{202} } func (m *WeightedPodAffinityTerm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5708,7 +5736,7 @@ var xxx_messageInfo_WeightedPodAffinityTerm proto.InternalMessageInfo func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} } func (*WindowsSecurityContextOptions) ProtoMessage() {} func (*WindowsSecurityContextOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_83c10c24ec417dc9, []int{202} + return fileDescriptor_83c10c24ec417dc9, []int{203} } func (m *WindowsSecurityContextOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -5828,6 +5856,7 @@ func init() { proto.RegisterType((*LocalVolumeSource)(nil), "k8s.io.api.core.v1.LocalVolumeSource") proto.RegisterType((*NFSVolumeSource)(nil), "k8s.io.api.core.v1.NFSVolumeSource") proto.RegisterType((*Namespace)(nil), "k8s.io.api.core.v1.Namespace") + proto.RegisterType((*NamespaceCondition)(nil), "k8s.io.api.core.v1.NamespaceCondition") proto.RegisterType((*NamespaceList)(nil), "k8s.io.api.core.v1.NamespaceList") proto.RegisterType((*NamespaceSpec)(nil), "k8s.io.api.core.v1.NamespaceSpec") proto.RegisterType((*NamespaceStatus)(nil), "k8s.io.api.core.v1.NamespaceStatus") @@ -5971,849 +6000,855 @@ func init() { } var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 13467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6b, 0x70, 0x64, 0x57, - 0x5a, 0xd8, 0xde, 0x6e, 0x3d, 0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 0xae, 0x5f, 0xf7, 0x73, 0x16, 0x8c, 0xa9, 0xaf, 0x3b, 0x81, 0xad, 0xbe, 0x60, - 0x6e, 0xf5, 0xf3, 0x5d, 0x17, 0x78, 0xce, 0x26, 0xff, 0x4a, 0x01, 0xce, 0x29, 0x1c, 0xca, 0xee, - 0xf3, 0x3f, 0x62, 0x55, 0x5d, 0x85, 0xb2, 0xaf, 0x04, 0x51, 0x96, 0x29, 0x01, 0x4a, 0xc4, 0x50, - 0x09, 0x0e, 0xe5, 0xda, 0xfc, 0x44, 0x5a, 0x34, 0xaa, 0x4b, 0x68, 0x85, 0x34, 0x76, 0x01, 0x8a, - 0x6d, 0xcf, 0x15, 0x77, 0xc6, 0xc7, 0xe4, 0x68, 0xdf, 0x59, 0xa9, 0x1c, 0x1e, 0xcc, 0x3e, 0x99, - 0xa7, 0x1d, 0xa0, 0x97, 0x55, 0x34, 0x77, 0x67, 0xa5, 0x82, 0x69, 0x65, 0x34, 0x0f, 0x13, 0x52, - 0x01, 0x72, 0x97, 0x72, 0x50, 0x81, 0x2f, 0xae, 0x16, 0x25, 0x66, 0xc5, 0x26, 0x18, 0xa7, 0xf1, - 0x51, 0x05, 0x26, 0x77, 0xda, 0x1b, 0xa4, 0x41, 0x62, 0xfe, 0xc1, 0x37, 0x09, 0x17, 0x42, 0x96, - 0x93, 0xc7, 0xd6, 0xcd, 0x14, 0x1c, 0x77, 0xd4, 0xb0, 0xff, 0x9c, 0x1d, 0xf1, 0x62, 0xf4, 0xaa, - 0x61, 0x40, 0x17, 0x16, 0xa5, 0xfe, 0xf5, 0x5c, 0xce, 0xfd, 0xac, 0x8a, 0x9b, 0x64, 0x7f, 0x3d, - 0xa0, 0xcc, 0x76, 0xf6, 0xaa, 0x30, 0xd6, 0xfc, 0x40, 0xd7, 0x35, 0xff, 0xf3, 0x05, 0x38, 0xa3, - 0x46, 0xc0, 0xe0, 0xeb, 0xfe, 0xa2, 0x8f, 0xc1, 0xf3, 0x30, 0xe2, 0x92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xf4, 0x19, 0x28, 0xcb, 0x03, 0x23, 0x12, 0xf2, 0xb7, 0xcc, 0x05, 0x2b, 0x8f, - 0x19, 0x4c, 0xde, 0x69, 0x7b, 0x21, 0x69, 0x12, 0x3f, 0x8e, 0x92, 0x13, 0x52, 0x42, 0x23, 0x9c, - 0x50, 0x43, 0x9f, 0x91, 0x42, 0xdf, 0xd5, 0xa0, 0xed, 0xc7, 0xd1, 0x74, 0x99, 0x75, 0x2f, 0x53, - 0x1d, 0x77, 0x37, 0xc1, 0x4b, 0x4b, 0x85, 0x79, 0x65, 0x6c, 0x90, 0x42, 0x9f, 0x85, 0x31, 0xfe, - 0x9f, 0x2b, 0xb5, 0xa2, 0xe9, 0x33, 0x8c, 0xf6, 0xc5, 0x7c, 0xda, 0x1c, 0x71, 0xe1, 0x8c, 0x20, - 0x3e, 0xa6, 0x97, 0x46, 0xd8, 0xa4, 0x86, 0x30, 0x8c, 0x35, 0xbc, 0x5d, 0xe2, 0x93, 0x28, 0xaa, - 0x86, 0xc1, 0x06, 0x99, 0x06, 0x36, 0x30, 0xe7, 0xb2, 0x95, 0x60, 0xc1, 0x06, 0x59, 0x98, 0xa2, - 0x34, 0x6f, 0xe9, 0x75, 0xb0, 0x49, 0x02, 0xdd, 0x81, 0x71, 0xfa, 0x08, 0xf3, 0x12, 0xa2, 0x23, - 0xbd, 0x88, 0xb2, 0xa7, 0x12, 0x36, 0x2a, 0xe1, 0x14, 0x11, 0xf4, 0x3a, 0x94, 0x1b, 0xde, 0x26, - 0xa9, 0xef, 0xd7, 0x1b, 0x64, 0x7a, 0x94, 0x51, 0xcc, 0x3c, 0x03, 0x6e, 0x49, 0x24, 0xfe, 0x88, - 0x53, 0x7f, 0x71, 0x52, 0x1d, 0xdd, 0x85, 0xb3, 0x31, 0x09, 0x9b, 0x9e, 0xef, 0xd0, 0xbd, 0x2b, - 0x1e, 0x37, 0x4c, 0x95, 0x38, 0xc6, 0x36, 0xc7, 0x05, 0x31, 0x78, 0x67, 0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0x98, 0x41, - 0x69, 0xd9, 0x64, 0x78, 0x34, 0xb3, 0xd1, 0xcf, 0x43, 0x99, 0xd0, 0x21, 0xa4, 0x84, 0xc5, 0x45, - 0x73, 0xb5, 0xbf, 0xbe, 0xae, 0x7a, 0xf5, 0x30, 0x30, 0xa5, 0xec, 0x4b, 0x92, 0x12, 0x4e, 0x88, - 0xa2, 0x45, 0x18, 0x8a, 0x48, 0xe8, 0x91, 0x48, 0x5c, 0x39, 0x5d, 0xa6, 0x91, 0xa1, 0x71, 0x5f, - 0x0c, 0xfe, 0x1b, 0x8b, 0xaa, 0x74, 0x79, 0x39, 0x4c, 0x4e, 0xc9, 0x6e, 0x19, 0x6d, 0x79, 0xcd, - 0xb3, 0x52, 0x2c, 0xa0, 0xe8, 0x75, 0x18, 0x0e, 0x49, 0x83, 0xa9, 0x71, 0xc6, 0xfa, 0x5f, 0xe4, - 0x5c, 0x2b, 0xc4, 0xeb, 0x61, 0x49, 0x00, 0xdd, 0x04, 0x14, 0x12, 0xca, 0x30, 0x79, 0xfe, 0x96, - 0x32, 0xb3, 0x14, 0x27, 0xb8, 0xda, 0xf1, 0x38, 0xc1, 0x90, 0x6e, 0x31, 0x38, 0xa3, 0x1a, 0xba, - 0x0e, 0x53, 0xaa, 0x74, 0xc5, 0x8f, 0x62, 0x87, 0x9e, 0x9c, 0x13, 0x8c, 0x96, 0x92, 0x57, 0xe0, - 0x34, 0x02, 0xee, 0xac, 0x63, 0xff, 0xb4, 0x05, 0x7c, 0x9c, 0x4f, 0xe0, 0x95, 0xfe, 0x9a, 0xf9, - 0x4a, 0x3f, 0x97, 0x3b, 0x73, 0x39, 0x2f, 0xf4, 0x07, 0x16, 0x8c, 0x68, 0x33, 0x9b, 0xac, 0x59, - 0xab, 0xcb, 0x9a, 0x6d, 0xc3, 0x24, 0x5d, 0xe9, 0xb7, 0x37, 0x22, 0x12, 0xee, 0x12, 0x97, 0x2d, - 0xcc, 0xc2, 0xc3, 0x2d, 0x4c, 0x65,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f, 0xb5, 0x73, 0xf6, 0xbf, 0x2e, - 0xc2, 0x98, 0x88, 0xad, 0x23, 0x82, 0xb6, 0xbd, 0x64, 0x2c, 0x89, 0x27, 0x53, 0x4b, 0x62, 0xca, - 0x40, 0x3e, 0x9e, 0x78, 0x6d, 0x11, 0x4c, 0x35, 0x9c, 0x28, 0xbe, 0x41, 0x9c, 0x30, 0xde, 0x20, - 0x0e, 0xb7, 0xdd, 0x29, 0x1e, 0xd9, 0xce, 0x48, 0x89, 0x68, 0x6e, 0xa5, 0x89, 0xe1, 0x4e, 0xfa, - 0x68, 0x17, 0x10, 0x33, 0x40, 0x0a, 0x1d, 0x3f, 0xe2, 0xdf, 0xe2, 0x09, 0x9d, 0xc1, 0xd1, 0x5a, - 0x9d, 0x11, 0xad, 0xa2, 0x5b, 0x1d, 0xd4, 0x70, 0x46, 0x0b, 0x9a, 0x61, 0xd9, 0x60, 0xbf, 0x86, - 0x65, 0x43, 0x3d, 0x9c, 0x5e, 0x7d, 0x98, 0xec, 0x08, 0x8f, 0xf4, 0x26, 0x94, 0x95, 0x69, 0xbe, - 0x38, 0x74, 0xba, 0x47, 0x19, 0x4b, 0x53, 0xe0, 0x62, 0x94, 0xc4, 0x2d, 0x24, 0x21, 0x67, 0xff, - 0x93, 0x82, 0xd1, 0x20, 0x9f, 0xc4, 0x35, 0x28, 0x39, 0x51, 0xe4, 0x6d, 0xf9, 0xc4, 0x15, 0x3b, - 0xf6, 0xc3, 0x79, 0x3b, 0xd6, 0x68, 0x86, 0xb9, 0x47, 0xcc, 0x8b, 0x9a, 0x58, 0xd1, 0x40, 0x37, - 0xb8, 0x85, 0xd4, 0xae, 0xe4, 0xf9, 0xfb, 0xa3, 0x06, 0xd2, 0x86, 0x6a, 0x97, 0x60, 0x51, 0x1f, - 0x7d, 0x96, 0x9b, 0xb0, 0xdd, 0xf4, 0x83, 0x3d, 0xff, 0x7a, 0x10, 0x48, 0x87, 0xf8, 0xfe, 0x08, - 0x4e, 0x49, 0x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 0x55, 0x61, 0x90, 0xb9, 0x42, 0x88, 0xfb, 0x20, 0x93, 0xf3, 0xed, 0xe2, 0x52, 0xc4, 0x9d, - 0xcb, 0x19, 0x02, 0xe6, 0x84, 0xd0, 0x3a, 0x0c, 0xd5, 0x59, 0x4e, 0x3b, 0x11, 0x89, 0xea, 0x63, - 0x99, 0xb2, 0xba, 0x2e, 0xc9, 0xfe, 0x84, 0xe8, 0x8a, 0x61, 0x60, 0x41, 0x8b, 0x51, 0x25, 0xad, - 0xed, 0xcd, 0x48, 0xe4, 0x60, 0xcd, 0xa6, 0xda, 0x25, 0x87, 0xa5, 0xa0, 0xca, 0x30, 0xb0, 0xa0, - 0x85, 0x3e, 0x01, 0x85, 0xcd, 0xba, 0x70, 0x73, 0xc8, 0x14, 0xda, 0x99, 0xae, 0xff, 0x0b, 0x43, - 0x0f, 0x0e, 0x66, 0x0b, 0xcb, 0x8b, 0xb8, 0xb0, 0x59, 0x47, 0x6b, 0x30, 0xbc, 0xc9, 0x9d, 0x85, - 0x85, 0x5c, 0xee, 0xa9, 0x6c, 0x3f, 0xe6, 0x0e, 0x7f, 0x62, 0x6e, 0xe1, 0x2f, 0x00, 0x58, 0x12, - 0x61, 0x61, 0xb4, 0x95, 0xd3, 0xb3, 0x88, 0x02, 0x35, 0x77, 0x34, 0x47, 0x75, 0x7e, 0x3f, 0x27, - 0xae, 0xd3, 0x58, 0xa3, 0x48, 0x57, 0xb5, 0x23, 0x13, 0x61, 0x8b, 0xa8, 0x1e, 0x99, 0xab, 0xba, - 0x47, 0x8e, 0x70, 0xbe, 0xaa, 0x15, 0x12, 0x4e, 0x88, 0xa2, 0x1d, 0x18, 0xdb, 0x8d, 0x5a, 0xdb, - 0x44, 0x6e, 0x69, 0x16, 0xe4, 0x23, 0xe7, 0x0a, 0xbb, 0x2b, 0x10, 0xbd, 0x30, 0x6e, 0x3b, 0x8d, - 0x8e, 0x53, 0x88, 0xe9, 0xbf, 0xef, 0xea, 0xc4, 0xb0, 0x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 0x11, 0x79, 0xd9, - 0xaa, 0xf0, 0xb3, 0x56, 0x97, 0xf0, 0xb3, 0x97, 0xe9, 0xd9, 0xe5, 0x06, 0xed, 0x58, 0x48, 0xd0, - 0xb4, 0xc3, 0x89, 0x96, 0x62, 0x01, 0x15, 0x78, 0x24, 0x0c, 0x85, 0xb7, 0x94, 0x8e, 0x47, 0xc2, - 0x10, 0x0b, 0xa8, 0x8c, 0x4e, 0x3b, 0x90, 0x1d, 0x9d, 0x96, 0x87, 0xf4, 0x13, 0x86, 0x05, 0x82, - 0xed, 0xd1, 0x42, 0xfa, 0x49, 0x8b, 0x83, 0x04, 0xc7, 0xfe, 0x72, 0x11, 0x46, 0xab, 0x81, 0x9b, - 0xe8, 0xca, 0x5e, 0x34, 0x74, 0x65, 0x17, 0x53, 0xba, 0xb2, 0x49, 0x1d, 0xf7, 0x03, 0xcd, 0xd8, - 0xd7, 0x4b, 0x33, 0xf6, 0x2f, 0x2d, 0x36, 0x6b, 0x95, 0xb5, 0x9a, 0xc8, 0xf0, 0xff, 0x3c, 0x8c, - 0xb0, 0x03, 0x89, 0xb9, 0xe7, 0x49, 0x05, 0x12, 0x4b, 0x9e, 0xb3, 0x96, 0x14, 0x63, 0x1d, 0x07, - 0x5d, 0x81, 0x52, 0x44, 0x9c, 0xb0, 0xbe, 0xad, 0xce, 0x38, 0xa1, 0xed, 0xe1, 0x65, 0x58, 0x41, - 0xd1, 0x1b, 0x49, 0x34, 0xb9, 0x62, 0x7e, 0xb0, 0x61, 0xbd, 0x3f, 0x7c, 0x8b, 0xe4, 0x87, 0x90, - 0xb3, 0xef, 0x01, 0xea, 0xc4, 0xef, 0x23, 0x8c, 0xd2, 0xac, 0x19, 0x46, 0xa9, 0xdc, 0x11, 0x42, - 0xe9, 0xcf, 0x2c, 0x18, 0xaf, 0x06, 0x2e, 0xdd, 0xba, 0xdf, 0x48, 0xfb, 0x54, 0x0f, 0xa5, 0x39, - 0xd4, 0x25, 0x94, 0xe6, 0x25, 0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0xac, 0x6a, 0xa7, 0x4c, 0xcf, 0x8d, 0x9a, 0x0e, 0xc4, 0x26, 0x2e, 0xba, - 0x03, 0x23, 0x71, 0xd0, 0x60, 0xee, 0x07, 0x94, 0x43, 0x3a, 0x9b, 0x1f, 0x8e, 0x69, 0x5d, 0xa1, - 0xe9, 0x02, 0x3a, 0x55, 0x15, 0xeb, 0x74, 0xd0, 0x3a, 0x5f, 0xef, 0x2c, 0x50, 0x2d, 0x89, 0xa6, - 0x1f, 0xcb, 0xbf, 0x93, 0x54, 0x3c, 0x5b, 0x73, 0x3b, 0x88, 0x9a, 0x58, 0x27, 0x83, 0xae, 0xc3, - 0x54, 0x2b, 0xf4, 0x02, 0xb6, 0x26, 0x94, 0x82, 0x68, 0xda, 0x4c, 0xaf, 0x51, 0x4d, 0x23, 0xe0, - 0xce, 0x3a, 0xcc, 0xa9, 0x53, 0x14, 0x4e, 0x9f, 0xe3, 0x59, 0x54, 0xf9, 0x7b, 0x85, 0x97, 0x61, - 0x05, 0x45, 0xab, 0xec, 0x24, 0xe6, 0x4f, 0xed, 0xe9, 0x99, 0xfc, 0x98, 0x1b, 0xfa, 0x93, 0x9c, - 0xf3, 0x7d, 0xea, 0x2f, 0x4e, 0x28, 0x20, 0x57, 0xcb, 0xd0, 0x45, 0x99, 0xed, 0x68, 0xfa, 0x89, - 0x2e, 0xb6, 0x57, 0x29, 0xce, 0x3c, 0x61, 0x08, 0x8c, 0xe2, 0x08, 0xa7, 0x68, 0xa2, 0x6f, 0x81, - 0x49, 0x11, 0x2d, 0x2a, 0x19, 0xa6, 0xf3, 0x89, 0x51, 0x27, 0x4e, 0xc1, 0x70, 0x07, 0x36, 0x0f, - 0xe0, 0xed, 0x6c, 0x34, 0x88, 0x38, 0xfa, 0x6e, 0x79, 0xfe, 0x4e, 0x34, 0x7d, 0x81, 0x9d, 0x0f, - 0x22, 0x80, 0x77, 0x1a, 0x8a, 0x33, 0x6a, 0xa0, 0x75, 0x98, 0x6c, 0x85, 0x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0xa1, 0xf6, 0x0a, 0xec, 0x65, 0xc4, 0x24, 0xd2, 0xc2, 0xcb, 0xc8, 0xfa, 0x58, 0xa3, 0x65, - 0xff, 0x64, 0x11, 0x06, 0x79, 0x0e, 0xdf, 0x65, 0x18, 0xde, 0xe6, 0x11, 0xdc, 0xfb, 0x09, 0x16, - 0x9f, 0xc8, 0x0e, 0x78, 0x01, 0x96, 0x95, 0xd1, 0x2a, 0x9c, 0xe2, 0x11, 0xf0, 0x1b, 0x15, 0xd2, - 0x70, 0xf6, 0xa5, 0xa0, 0x8b, 0x67, 0x8f, 0x53, 0x02, 0xbf, 0x95, 0x4e, 0x14, 0x9c, 0x55, 0x0f, - 0xbd, 0x06, 0xe3, 0xf4, 0xe1, 0x11, 0xb4, 0x63, 0x49, 0x89, 0xc7, 0xbe, 0x57, 0x2f, 0x9d, 0x75, - 0x03, 0x8a, 0x53, 0xd8, 0xf4, 0xed, 0xdb, 0xea, 0x10, 0xe9, 0x0d, 0x26, 0x6f, 0x5f, 0x53, 0x8c, - 0x67, 0xe2, 0x32, 0x73, 0xc3, 0x36, 0x33, 0xae, 0x5c, 0xdf, 0x0e, 0x49, 0xb4, 0x1d, 0x34, 0x5c, - 0xc6, 0x68, 0x0d, 0x6a, 0xe6, 0x86, 0x29, 0x38, 0xee, 0xa8, 0x41, 0xa9, 0x6c, 0x3a, 0x5e, 0xa3, - 0x1d, 0x92, 0x84, 0xca, 0x90, 0x49, 0x65, 0x39, 0x05, 0xc7, 0x1d, 0x35, 0xe8, 0x3a, 0x3a, 0x53, - 0x0d, 0x03, 0x7a, 0x78, 0xc9, 0x18, 0x1c, 0xca, 0x86, 0x74, 0x58, 0xba, 0x0b, 0x76, 0x09, 0x57, - 0x25, 0xac, 0xec, 0x38, 0x05, 0x43, 0x81, 0x5c, 0x13, 0x8e, 0x82, 0x92, 0x0a, 0x7a, 0x1e, 0x46, - 0x44, 0x5c, 0x73, 0x66, 0xea, 0xc8, 0xa7, 0x8e, 0x29, 0xb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, 0x1e, 0x55, 0x35, 0x25, - 0x44, 0x14, 0xc1, 0x54, 0x05, 0xd4, 0x14, 0x4a, 0x15, 0x8f, 0x43, 0x28, 0x75, 0x0d, 0x20, 0x8a, - 0x1a, 0xdc, 0xf0, 0xc5, 0x15, 0xee, 0x29, 0x49, 0xf4, 0xdd, 0xda, 0x2d, 0x01, 0xc1, 0x1a, 0x16, - 0xaa, 0xc0, 0x64, 0x2b, 0x0c, 0x62, 0x2e, 0x93, 0xad, 0x70, 0xdb, 0xb0, 0x41, 0xd3, 0xa3, 0xbd, - 0x9a, 0x82, 0xe3, 0x8e, 0x1a, 0xe8, 0x25, 0x18, 0x11, 0x5e, 0xee, 0xd5, 0x20, 0x68, 0x08, 0x31, - 0x90, 0x32, 0x97, 0xaa, 0x25, 0x20, 0xac, 0xe3, 0x69, 0xd5, 0x98, 0xa0, 0x77, 0x38, 0xb3, 0x1a, - 0x17, 0xf6, 0x6a, 0x78, 0xa9, 0x30, 0x72, 0xa5, 0xbe, 0xc2, 0xc8, 0x25, 0x82, 0xb1, 0x72, 0xdf, - 0xba, 0x2d, 0xe8, 0x29, 0x4a, 0xfa, 0xb9, 0x01, 0x38, 0x25, 0x16, 0xce, 0xa3, 0x5e, 0x2e, 0x77, - 0x3a, 0x97, 0xcb, 0x71, 0x88, 0xce, 0x3e, 0x58, 0x33, 0x27, 0xbd, 0x66, 0x7e, 0xc0, 0x02, 0x93, - 0xbd, 0x42, 0x7f, 0x29, 0x37, 0xa1, 0xc5, 0x4b, 0xb9, 0xec, 0x9a, 0x2b, 0x2f, 0x90, 0xf7, 0x98, - 0xda, 0xc2, 0xfe, 0xaf, 0x16, 0x3c, 0xd9, 0x93, 0x22, 0x5a, 0x82, 0x32, 0xe3, 0x01, 0xb5, 0xd7, - 0xd9, 0x53, 0xca, 0x76, 0x54, 0x02, 0x72, 0x58, 0xd2, 0xa4, 0x26, 0x5a, 0xea, 0xc8, 0x1c, 0xf2, - 0x74, 0x46, 0xe6, 0x90, 0x33, 0xc6, 0xf0, 0x3c, 0x64, 0xea, 0x90, 0x5f, 0x2e, 0xc2, 0x10, 0x5f, - 0xf1, 0x27, 0xf0, 0x0c, 0x5b, 0x16, 0x72, 0xdb, 0x2e, 0x71, 0xea, 0x78, 0x5f, 0xe6, 0x2a, 0x4e, - 0xec, 0x70, 0x36, 0x41, 0xdd, 0x56, 0x89, 0x84, 0x17, 0x7d, 0x0e, 0x20, 0x8a, 0x43, 0xcf, 0xdf, - 0xa2, 0x65, 0x22, 0x82, 0xe1, 0x47, 0xbb, 0x50, 0xab, 0x29, 0x64, 0x4e, 0x33, 0xd9, 0xb9, 0x0a, - 0x80, 0x35, 0x8a, 0x68, 0xce, 0xb8, 0x2f, 0x67, 0x52, 0x82, 0x4f, 0xe0, 0x54, 0x93, 0xdb, 0x73, - 0xe6, 0x65, 0x28, 0x2b, 0xe2, 0xbd, 0xa4, 0x38, 0xa3, 0x3a, 0x73, 0xf1, 0x29, 0x98, 0x48, 0xf5, - 0xed, 0x48, 0x42, 0xa0, 0x5f, 0xb4, 0x60, 0x82, 0x77, 0x66, 0xc9, 0xdf, 0x15, 0x67, 0xea, 0xbb, - 0x70, 0xba, 0x91, 0x71, 0xb6, 0x89, 0x19, 0xed, 0xff, 0x2c, 0x54, 0x42, 0x9f, 0x2c, 0x28, 0xce, - 0x6c, 0x03, 0x5d, 0xa1, 0xeb, 0x96, 0x9e, 0x5d, 0x4e, 0x43, 0x38, 0x1b, 0x8e, 0xf2, 0x35, 0xcb, - 0xcb, 0xb0, 0x82, 0xda, 0xbf, 0x65, 0xc1, 0x14, 0xef, 0xf9, 0x4d, 0xb2, 0xaf, 0x76, 0xf8, 0xd7, - 0xb3, 0xef, 0x22, 0x99, 0x4f, 0x21, 0x27, 0x99, 0x8f, 0xfe, 0x69, 0xc5, 0xae, 0x9f, 0xf6, 0x33, - 0x16, 0x88, 0x15, 0x72, 0x02, 0x4f, 0xf9, 0x6f, 0x36, 0x9f, 0xf2, 0x33, 0xf9, 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4, 0xf1, 0xfb, 0x36, 0x47, - 0xd6, 0x25, 0xe8, 0x03, 0x3d, 0x0d, 0xea, 0x0d, 0xcd, 0xd9, 0x60, 0xff, 0x0f, 0x91, 0x5c, 0x2d, - 0x88, 0xfd, 0x95, 0x02, 0x9c, 0x51, 0x43, 0xf8, 0x8d, 0x3b, 0x70, 0x77, 0x3a, 0x07, 0xee, 0x18, - 0x74, 0x48, 0xf6, 0x6d, 0x18, 0xe2, 0x31, 0x92, 0xfa, 0x60, 0x80, 0x2e, 0x99, 0x41, 0xfe, 0xd4, - 0x35, 0x6d, 0x04, 0xfa, 0xfb, 0x5e, 0x0b, 0x26, 0xd6, 0x17, 0xab, 0xb5, 0xa0, 0xbe, 0x43, 0xe2, - 0x79, 0xce, 0xb0, 0x62, 0xc1, 0xff, 0x58, 0x0f, 0xc9, 0xd7, 0x64, 0x71, 0x4c, 0x17, 0x61, 0x60, - 0x3b, 0x88, 0xe2, 0xb4, 0x82, 0xf9, 0x46, 0x10, 0xc5, 0x98, 0x41, 0xec, 0xdf, 0xb6, 0x60, 0x90, - 0x65, 0xa4, 0xee, 0x95, 0x13, 0xbd, 0x9f, 0xef, 0x42, 0x2f, 0xc1, 0x10, 0xd9, 0xdc, 0x24, 0xf5, - 0x58, 0xcc, 0xaa, 0xf4, 0x08, 0x1e, 0x5a, 0x62, 0xa5, 0xf4, 0xd2, 0x67, 0x8d, 0xf1, 0xbf, 0x58, - 0x20, 0xa3, 0x7b, 0x50, 0x8e, 0xbd, 0x26, 0x99, 0x77, 0x5d, 0xa1, 0xa2, 0x7b, 0x08, 0xaf, 0xe6, - 0x75, 0x49, 0x00, 0x27, 0xb4, 0xec, 0x2f, 0x15, 0x00, 0x92, 0x08, 0x19, 0xbd, 0x3e, 0x71, 0xa1, - 0x43, 0x79, 0x73, 0x39, 0x43, 0x79, 0x83, 0x12, 0x82, 0x19, 0x9a, 0x1b, 0x35, 0x4c, 0xc5, 0xbe, - 0x86, 0x69, 0xe0, 0x28, 0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0x21, 0x71, 0x89, 0x1f, 0x7b, 0x4e, 0xa3, 0xd6, 0x22, 0x75, 0x4d, 0x6e, - 0xcd, 0x6c, 0x94, 0xae, 0xaf, 0xd6, 0xe6, 0x3b, 0x31, 0x70, 0x4e, 0x4d, 0xb4, 0x0c, 0xa8, 0x13, - 0x22, 0x66, 0x98, 0xc5, 0x59, 0xed, 0xa4, 0x87, 0x33, 0x6a, 0xa0, 0x97, 0x61, 0x4c, 0x99, 0x6c, - 0x69, 0x33, 0xce, 0x0e, 0x60, 0xac, 0x03, 0xb0, 0x89, 0xb7, 0x70, 0xe5, 0x37, 0x7e, 0xf7, 0xc2, - 0x87, 0x7e, 0xf3, 0x77, 0x2f, 0x7c, 0xe8, 0xb7, 0x7e, 0xf7, 0xc2, 0x87, 0xbe, 0xf3, 0xc1, 0x05, - 0xeb, 0x37, 0x1e, 0x5c, 0xb0, 0x7e, 0xf3, 0xc1, 0x05, 0xeb, 0xb7, 0x1e, 0x5c, 0xb0, 0x7e, 0xe7, - 0xc1, 0x05, 0xeb, 0x4b, 0xbf, 0x77, 0xe1, 0x43, 0x6f, 0x16, 0x76, 0x9f, 0xff, 0xff, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xee, 0x7c, 0xe3, 0x20, 0x5f, 0xf9, 0x00, 0x00, + // 13567 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x7b, 0x70, 0x24, 0x49, + 0x5a, 0x18, 0x7e, 0xd5, 0xad, 0x47, 0xf7, 0xa7, 0x77, 0xce, 0x63, 0x35, 0xda, 0x9d, 0xd1, 0x6c, + 0xed, 0xdd, 0xec, 0xec, 0xed, 0xae, 0xe6, 0xf6, 0x75, 0xbb, 0xdc, 0xde, 0x2d, 0x48, 0x6a, 0x69, + 0xa6, 0x77, 0x46, 0x9a, 0xde, 0x6c, 0xcd, 0xcc, 0xdd, 0xb2, 0x77, 0x5c,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x9e, 0x80, 0x61, + 0xaf, 0x45, 0x79, 0xad, 0x82, 0xc9, 0x42, 0x55, 0x69, 0x21, 0xe6, 0x30, 0xf4, 0x11, 0x18, 0x6d, + 0x04, 0xad, 0x96, 0xe3, 0xbb, 0xec, 0xca, 0x2b, 0x2f, 0x8d, 0x51, 0x76, 0x6c, 0x99, 0x17, 0x61, + 0x09, 0x43, 0x8f, 0xc1, 0x90, 0x13, 0x6e, 0x73, 0xb1, 0x44, 0x79, 0xa9, 0x44, 0x5b, 0x5a, 0x0c, + 0xb7, 0x23, 0xcc, 0x4a, 0xe9, 0xab, 0xea, 0x6e, 0x10, 0xee, 0x7a, 0xfe, 0x76, 0xc5, 0x0b, 0xc5, + 0x96, 0x50, 0x77, 0xe1, 0x1d, 0x05, 0xc1, 0x1a, 0x16, 0x5a, 0x85, 0xe1, 0x76, 0x10, 0xc6, 0xd1, + 0xec, 0x08, 0x1b, 0xee, 0xc7, 0x73, 0x0e, 0x22, 0xfe, 0xb5, 0xb5, 0x20, 0x8c, 0x93, 0x0f, 0xa0, + 0xff, 0x22, 0xcc, 0xab, 0xa3, 0x1b, 0x30, 0x4a, 0xfc, 0xbd, 0xd5, 0x30, 0x68, 0xcd, 0x9e, 0xca, + 0xa7, 0xb4, 0xc2, 0x51, 0xf8, 0x32, 0x4b, 0xd8, 0x4e, 0x51, 0x8c, 0x25, 0x09, 0xf4, 0x0d, 0x50, + 0x24, 0xfe, 0xde, 0xec, 0x28, 0xa3, 0x34, 0x97, 0x43, 0xe9, 0xb6, 0x13, 0x26, 0x67, 0xfe, 0x8a, + 0xbf, 0x87, 0x69, 0x1d, 0xf4, 0x19, 0x28, 0xcb, 0x03, 0x23, 0x12, 0xf2, 0xb7, 0xcc, 0x05, 0x2b, + 0x8f, 0x19, 0x4c, 0xde, 0xe9, 0x78, 0x21, 0x69, 0x11, 0x3f, 0x8e, 0x92, 0x13, 0x52, 0x42, 0x23, + 0x9c, 0x50, 0x43, 0x9f, 0x91, 0x42, 0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 0x98, 0x74, 0x27, 0xf6, 0xef, 0x5b, 0x30, 0xca, 0x83, 0x46, 0x84, 0xe8, 0x93, 0x30, 0x44, + 0xee, 0x91, 0x86, 0x60, 0x95, 0x33, 0x3b, 0x9c, 0x70, 0x5a, 0x5c, 0x06, 0x4c, 0xff, 0x63, 0x56, + 0x0b, 0x5d, 0x83, 0x51, 0xda, 0xdb, 0xab, 0x2a, 0x82, 0xc6, 0xe3, 0x79, 0x5f, 0xac, 0xa6, 0x9d, + 0x33, 0x67, 0xa2, 0x08, 0xcb, 0xea, 0x4c, 0xfb, 0xdc, 0x68, 0xd7, 0xe9, 0x89, 0x1d, 0xf7, 0x62, + 0x2c, 0x36, 0x96, 0x6b, 0x1c, 0x49, 0x50, 0xe3, 0xda, 0x67, 0x59, 0x88, 0x13, 0x22, 0xf6, 0x06, + 0x94, 0xe9, 0xa4, 0x2e, 0x36, 0x3d, 0xa7, 0xb7, 0x42, 0xfd, 0x69, 0x28, 0x4b, 0x75, 0x79, 0x24, + 0x9c, 0xc5, 0x19, 0x55, 0xa9, 0x4d, 0x8f, 0x70, 0x02, 0xb7, 0xb7, 0xe0, 0x34, 0x33, 0x7e, 0x74, + 0xe2, 0x1d, 0x63, 0x8f, 0xf5, 0x5f, 0xcc, 0xcf, 0x88, 0x97, 0x27, 0x9f, 0x99, 0x59, 0xcd, 0x1f, + 0x73, 0x5c, 0x52, 0x4c, 0x5e, 0xa1, 0xf6, 0x57, 0x87, 0xe0, 0xd1, 0x6a, 0x3d, 0x3f, 0x9e, 0xc8, + 0x2b, 0x30, 0xce, 0xf9, 0x52, 0xba, 0xb4, 0x9d, 0xa6, 0x68, 0x57, 0x09, 0x7f, 0x37, 0x34, 0x18, + 0x36, 0x30, 0xd1, 0x79, 0x28, 0x7a, 0xef, 0xf8, 0x69, 0xd7, 0xa6, 0xea, 0x1b, 0xeb, 0x98, 0x96, + 0x53, 0x30, 0x65, 0x71, 0xf9, 0xdd, 0xa1, 0xc0, 0x8a, 0xcd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d2, 0x64, 0xa6, 0x6c, 0xd6, 0xb8, 0xb7, 0xff, 0xfa, 0x6a, 0x1d, 0xd3, 0x8a, 0xe8, 0x1a, 0x14, + 0xc3, 0x4d, 0x57, 0x48, 0xf0, 0x32, 0xcf, 0x70, 0xbc, 0x54, 0xc9, 0xe9, 0x15, 0xa3, 0x84, 0x97, + 0x2a, 0x98, 0x92, 0x40, 0x35, 0x18, 0x66, 0x0e, 0x2c, 0xe2, 0x3e, 0xc8, 0xe4, 0x7c, 0x7b, 0x38, + 0x82, 0xf1, 0x90, 0x00, 0x0c, 0x01, 0x73, 0x42, 0x68, 0x03, 0x46, 0x1a, 0x2c, 0xa5, 0xa2, 0x08, + 0x48, 0xf6, 0xb1, 0x4c, 0x59, 0x5d, 0x8f, 0x5c, 0x93, 0x42, 0x74, 0xc5, 0x30, 0xb0, 0xa0, 0xc5, + 0xa8, 0x92, 0xf6, 0xce, 0x56, 0x24, 0x52, 0x00, 0x67, 0x53, 0xed, 0x91, 0x42, 0x55, 0x50, 0x65, + 0x18, 0x58, 0xd0, 0x42, 0x9f, 0x80, 0xc2, 0x56, 0x43, 0x38, 0xa7, 0x64, 0x0a, 0xed, 0xcc, 0x80, + 0x0d, 0x4b, 0x23, 0xf7, 0x0f, 0xe6, 0x0b, 0xab, 0xcb, 0xb8, 0xb0, 0xd5, 0x40, 0xeb, 0x30, 0xba, + 0xc5, 0x5d, 0xbc, 0x85, 0x5c, 0xee, 0xc9, 0x6c, 0xef, 0xf3, 0x2e, 0x2f, 0x70, 0xee, 0x97, 0x21, + 0x00, 0x58, 0x12, 0x61, 0x41, 0xd7, 0x95, 0xab, 0xba, 0x88, 0xdd, 0xb5, 0x70, 0xb4, 0xf0, 0x02, + 0xfc, 0x7e, 0x4e, 0x1c, 0xde, 0xb1, 0x46, 0x91, 0xae, 0x6a, 0x47, 0xe6, 0x61, 0x17, 0xb1, 0x58, + 0x32, 0x57, 0x75, 0x9f, 0x14, 0xf5, 0x7c, 0x55, 0x2b, 0x24, 0x9c, 0x10, 0x45, 0xbb, 0x30, 0xb1, + 0x17, 0xb5, 0x77, 0x88, 0xdc, 0xd2, 0x2c, 0x34, 0x4b, 0xce, 0x15, 0x76, 0x5b, 0x20, 0x7a, 0x61, + 0xdc, 0x71, 0x9a, 0x5d, 0xa7, 0x10, 0xd3, 0x7f, 0xdf, 0xd6, 0x89, 0x61, 0x93, 0x36, 0x1d, 0xfe, + 0x77, 0x3a, 0xc1, 0xe6, 0x7e, 0x4c, 0x44, 0xc8, 0xad, 0xcc, 0xe1, 0x7f, 0x83, 0xa3, 0x74, 0x0f, + 0xbf, 0x00, 0x60, 0x49, 0x04, 0xdd, 0x16, 0xc3, 0xc3, 0x4e, 0xcf, 0xe9, 0xfc, 0xb8, 0x98, 0x8b, + 0x12, 0x29, 0x67, 0x50, 0xd8, 0x69, 0x99, 0x90, 0x62, 0xa7, 0x64, 0x7b, 0x27, 0x88, 0x03, 0x3f, + 0x75, 0x42, 0xcf, 0xe4, 0x9f, 0x92, 0xb5, 0x0c, 0xfc, 0xee, 0x53, 0x32, 0x0b, 0x0b, 0x67, 0xb6, + 0x85, 0x5c, 0x98, 0x6c, 0x07, 0x61, 0x7c, 0x37, 0x08, 0xe5, 0xfa, 0x42, 0x3d, 0xe4, 0x0a, 0x06, + 0xa6, 0x68, 0x91, 0x45, 0xb3, 0x33, 0x21, 0x38, 0x45, 0x13, 0x7d, 0x1a, 0x46, 0xa3, 0x86, 0xd3, + 0x24, 0xd5, 0x9b, 0xb3, 0xa7, 0xf2, 0xaf, 0x9f, 0x3a, 0x47, 0xc9, 0x59, 0x5d, 0x3c, 0x42, 0x3b, + 0x47, 0xc1, 0x92, 0x1c, 0x5a, 0x85, 0x61, 0x96, 0x54, 0x8b, 0xc5, 0x87, 0xcb, 0x09, 0xef, 0xd9, + 0x65, 0x41, 0xcc, 0xcf, 0x26, 0x56, 0x8c, 0x79, 0x75, 0xba, 0x07, 0x04, 0x7b, 0x1d, 0x44, 0xb3, + 0x67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75, 0x74, 0xa6, 0x16, 0x06, 0xf4, 0xf0, 0x92, 0x31, 0x38, 0x94, 0x0d, 0xe9, 0xa8, 0x74, 0x17, + 0xec, 0x11, 0xae, 0x4a, 0x58, 0xd9, 0x71, 0x0a, 0x86, 0x02, 0xb9, 0x2e, 0x1c, 0x05, 0x25, 0x15, + 0xf4, 0x1c, 0x8c, 0x89, 0x68, 0xf4, 0xcc, 0xd4, 0x91, 0x4f, 0x1d, 0x53, 0x78, 0x57, 0x92, 0x62, + 0xac, 0xe3, 0xd8, 0xdf, 0x5b, 0x80, 0x53, 0x19, 0xb6, 0xea, 0xfc, 0xa8, 0xda, 0xf6, 0xa2, 0x58, + 0xe5, 0x35, 0xd3, 0x8e, 0x2a, 0x5e, 0x8e, 0x15, 0x06, 0xdd, 0x0f, 0xfc, 0x30, 0x4c, 0x1f, 0x80, + 0xc2, 0x16, 0x54, 0x40, 0x8f, 0x98, 0x21, 0xec, 0x22, 0x0c, 0x75, 0x22, 0x22, 0x03, 0xcd, 0xa9, + 0xf3, 0x9b, 0x69, 0x5c, 0x18, 0x84, 0xb2, 0xc7, 0xdb, 0x4a, 0x79, 0xa1, 0xb1, 0xc7, 0x5c, 0x7d, + 0xc1, 0x61, 0xb4, 0x73, 0x31, 0xf1, 0x1d, 0x3f, 0x16, 0x4c, 0x74, 0x12, 0x31, 0x89, 0x95, 0x62, + 0x01, 0xb5, 0xbf, 0x54, 0x84, 0x73, 0xb9, 0xde, 0x2b, 0xb4, 0xeb, 0xad, 0xc0, 0xf7, 0xe2, 0x40, + 0x59, 0x12, 0xf0, 0x28, 0x49, 0xa4, 0xbd, 0xb3, 0x26, 0xca, 0xb1, 0xc2, 0x40, 0x97, 0x60, 0x98, + 0x09, 0x9d, 0xba, 0x32, 0xbc, 0x2d, 0x55, 0x78, 0xd4, 0x0c, 0x0e, 0x1e, 0x38, 0x7b, 0xe6, 0x13, + 0x30, 0xd4, 0x0e, 0x82, 0x66, 0xfa, 0xd0, 0xa2, 0xd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0xd8, + 0x31, 0xae, 0x3f, 0xe4, 0xc4, 0x13, 0xed, 0x09, 0x18, 0x6e, 0x92, 0x3d, 0xd2, 0x4c, 0xa7, 0x79, + 0xb8, 0x41, 0x0b, 0x31, 0x87, 0xd9, 0xbf, 0x30, 0x04, 0xe7, 0x7b, 0x86, 0x55, 0xa0, 0xcf, 0xa1, + 0x6d, 0x27, 0x26, 0x77, 0x9d, 0xfd, 0x74, 0x3c, 0xf6, 0xab, 0xbc, 0x18, 0x4b, 0x38, 0xf3, 0x22, + 0xe1, 0x51, 0x55, 0x53, 0x42, 0x44, 0x11, 0x4c, 0x55, 0x40, 0x4d, 0xa1, 0x54, 0xf1, 0x38, 0x84, + 0x52, 0xcf, 0x03, 0x44, 0x51, 0x93, 0x1b, 0xbe, 0xb8, 0xc2, 0x3d, 0x25, 0x89, 0xbe, 0x5b, 0xbf, + 0x21, 0x20, 0x58, 0xc3, 0x42, 0x15, 0x98, 0x6e, 0x87, 0x41, 0xcc, 0x65, 0xb2, 0x15, 0x6e, 0x1b, + 0x36, 0x6c, 0x7a, 0xb4, 0xd7, 0x52, 0x70, 0xdc, 0x55, 0x03, 0xbd, 0x04, 0x63, 0xc2, 0xcb, 0xbd, + 0x16, 0x04, 0x4d, 0x21, 0x06, 0x52, 0xe6, 0x52, 0xf5, 0x04, 0x84, 0x75, 0x3c, 0xad, 0x1a, 0x13, + 0xf4, 0x8e, 0x66, 0x56, 0xe3, 0xc2, 0x5e, 0x0d, 0x2f, 0x15, 0x46, 0xae, 0x34, 0x50, 0x18, 0xb9, + 0x44, 0x30, 0x56, 0x1e, 0x58, 0xb7, 0x05, 0x7d, 0x45, 0x49, 0x3f, 0x3b, 0x04, 0xa7, 0xc4, 0xc2, + 0x79, 0xd8, 0xcb, 0xe5, 0x56, 0xf7, 0x72, 0x39, 0x0e, 0xd1, 0xd9, 0x07, 0x6b, 0xe6, 0xa4, 0xd7, + 0xcc, 0xf7, 0x5b, 0x60, 0xb2, 0x57, 0xe8, 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, 0x86, 0x91, 0xe1, 0xa9, 0x5a, 0x7c, 0xc8, 0x9e, 0xaa, 0x70, 0x62, 0x9e, + 0xaa, 0x43, 0x47, 0xf2, 0x54, 0x2d, 0x1d, 0xd9, 0x53, 0x75, 0x78, 0x20, 0x4f, 0x55, 0x0c, 0x67, + 0x25, 0x07, 0x47, 0xff, 0xaf, 0x7a, 0x4d, 0x22, 0xd8, 0x76, 0xee, 0x93, 0x3d, 0x77, 0xff, 0x60, + 0xfe, 0x2c, 0xce, 0xc4, 0xc0, 0x39, 0x35, 0xd1, 0xa7, 0x61, 0xd6, 0x69, 0x36, 0x83, 0xbb, 0x6a, + 0x52, 0x57, 0xa2, 0x86, 0xd3, 0xe4, 0xa2, 0xfc, 0x51, 0x46, 0xf5, 0xb1, 0xfb, 0x07, 0xf3, 0xb3, + 0x8b, 0x39, 0x38, 0x38, 0xb7, 0x36, 0xfa, 0x24, 0x94, 0xdb, 0x61, 0xd0, 0x58, 0xd3, 0xdc, 0xd4, + 0x2e, 0xd0, 0x01, 0xac, 0xc9, 0xc2, 0xc3, 0x83, 0xf9, 0x09, 0xf5, 0x87, 0x5d, 0xf8, 0x49, 0x05, + 0x7b, 0x17, 0x4e, 0xd5, 0x49, 0xe8, 0xb1, 0xac, 0xc0, 0x6e, 0x72, 0x7e, 0x6c, 0x40, 0x39, 0x4c, + 0x9d, 0x98, 0x03, 0xc5, 0x76, 0xd3, 0x62, 0x82, 0xcb, 0x13, 0x32, 0x21, 0x64, 0xff, 0x6f, 0x0b, + 0x46, 0x85, 0x47, 0xc6, 0x09, 0x30, 0x6a, 0x8b, 0x86, 0xbc, 0x7c, 0x3e, 0xfb, 0x56, 0x61, 0x9d, + 0xc9, 0x95, 0x94, 0x57, 0x53, 0x92, 0xf2, 0xc7, 0x7b, 0x11, 0xe9, 0x2d, 0x23, 0xff, 0x9b, 0x45, + 0x98, 0x34, 0x5d, 0xf7, 0x4e, 0x60, 0x08, 0xd6, 0x61, 0x34, 0x12, 0xbe,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0x8f, 0x4e, 0xec, 0x35, 0x17, 0x3c, 0x3f, 0x8e, 0xe2, 0x70, 0xa1, 0xea, 0xc7, 0x37, + 0x43, 0xfe, 0x5e, 0xd3, 0x82, 0x8b, 0x28, 0x5a, 0x58, 0xa3, 0x2b, 0xdd, 0x8a, 0x59, 0x1b, 0xc3, + 0xa6, 0xfe, 0x7d, 0x5d, 0x94, 0x63, 0x85, 0x61, 0xbf, 0xcc, 0xae, 0x12, 0x36, 0x40, 0x47, 0x8b, + 0xfb, 0xf1, 0x9d, 0x65, 0x35, 0xb4, 0x4c, 0xf9, 0x56, 0xd1, 0xa3, 0x8b, 0xf4, 0x3e, 0xb9, 0x69, + 0xc3, 0xba, 0x8b, 0x51, 0x12, 0x82, 0x04, 0x7d, 0x73, 0x97, 0x4d, 0xc5, 0xb3, 0x7d, 0xae, 0x80, + 0x23, 0x58, 0x51, 0xb0, 0x18, 0xfc, 0x2c, 0x42, 0x79, 0xb5, 0x26, 0x16, 0xb9, 0x16, 0x83, 0x5f, + 0x00, 0x70, 0x82, 0x83, 0xae, 0x88, 0xd7, 0xf8, 0x90, 0x91, 0x79, 0x52, 0xbe, 0xc6, 0xe5, 0xe7, + 0x6b, 0xc2, 0xec, 0xe7, 0x60, 0x4c, 0x65, 0xa0, 0xac, 0xf1, 0xc4, 0x86, 0x22, 0x12, 0xd4, 0x4a, + 0x52, 0x8c, 0x75, 0x1c, 0xb4, 0x01, 0x53, 0x11, 0x17, 0xf5, 0xa8, 0x80, 0x9f, 0x5c, 0x64, 0xf6, + 0x51, 0x69, 0x88, 0x52, 0x37, 0xc1, 0x87, 0xac, 0x88, 0x1f, 0x1d, 0xd2, 0x95, 0x37, 0x4d, 0x02, + 0xbd, 0x06, 0x93, 0xcd, 0xc0, 0x71, 0x97, 0x9c, 0xa6, 0xe3, 0x37, 0xd8, 0xf7, 0x96, 0xcc, 0x44, + 0x66, 0x37, 0x0c, 0x28, 0x4e, 0x61, 0x53, 0xce, 0x47, 0x2f, 0x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0x2f, 0x17, 0x06, 0x8b, + 0xbc, 0x8c, 0x76, 0x60, 0xe6, 0xee, 0x0e, 0xf1, 0x6f, 0xf9, 0x91, 0x13, 0x7b, 0xd1, 0x96, 0xc7, + 0x32, 0xa2, 0xf3, 0x75, 0xf3, 0x09, 0x69, 0x62, 0x7b, 0x27, 0x8d, 0x70, 0x78, 0x30, 0x7f, 0xde, + 0x28, 0x48, 0xba, 0xcc, 0x0f, 0x12, 0xdc, 0x4d, 0xb4, 0x3b, 0x70, 0xf5, 0xd0, 0x43, 0x0c, 0x5c, + 0x6d, 0x7f, 0xd1, 0x82, 0x73, 0xb9, 0x89, 0xe5, 0xd0, 0x65, 0x28, 0x39, 0x6d, 0x8f, 0x8b, 0x40, + 0xc5, 0x31, 0xca, 0x9e, 0xf2, 0xb5, 0x2a, 0x17, 0x80, 0x2a, 0xa8, 0x4a, 0x78, 0x5b, 0xc8, 0x4d, + 0x78, 0xdb, 0x37, 0x7f, 0xad, 0xfd, 0xdd, 0x16, 0x08, 0x97, 0xb8, 0x01, 0xce, 0xee, 0x37, 0x65, + 0xbe, 0x70, 0x23, 0xb9, 0xc5, 0xc5, 0x7c, 0x1f, 0x41, 0x91, 0xd2, 0x42, 0xf1, 0x4a, 0x46, 0x22, + 0x0b, 0x83, 0x96, 0xed, 0x82, 0x80, 0x56, 0x08, 0x13, 0x20, 0xf6, 0xef, 0xcd, 0xf3, 0x00, 0x2e, + 0xc3, 0xd5, 0xb2, 0x06, 0xab, 0x9b, 0xb9, 0xa2, 0x20, 0x58, 0xc3, 0xb2, 0xff, 0x6d, 0x01, 0xc6, + 0x64, 0x32, 0x85, 0x8e, 0x3f, 0xc8, 0x33, 0xff, 0x48, 0xd9, 0xd5, 0x58, 0x9a, 0x6d, 0x4a, 0xb8, + 0x96, 0x48, 0x47, 0x92, 0x34, 0xdb, 0x12, 0x80, 0x13, 0x1c, 0xba, 0x8b, 0xa2, 0xce, 0x26, 0x43, + 0x4f, 0x39, 0x70, 0xd5, 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xe1, 0x43, 0x6f, 0x16, 0xf6, 0x9e, + 0xfb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x11, 0xe2, 0x4d, 0x14, 0xfc, 0x00, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -8238,6 +8273,20 @@ func (m *Container) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.StartupProbe != nil { + { + size, err := m.StartupProbe.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } if len(m.VolumeDevices) > 0 { for iNdEx := len(m.VolumeDevices) - 1; iNdEx >= 0; iNdEx-- { { @@ -8741,6 +8790,16 @@ func (m *ContainerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Started != nil { + i-- + if *m.Started { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } i -= len(m.ContainerID) copy(dAtA[i:], m.ContainerID) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID))) @@ -9470,6 +9529,20 @@ func (m *EphemeralContainerCommon) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.StartupProbe != nil { + { + size, err := m.StartupProbe.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } if len(m.VolumeDevices) > 0 { for iNdEx := len(m.VolumeDevices) - 1; iNdEx >= 0; iNdEx-- { { @@ -11523,6 +11596,59 @@ func (m *Namespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *NamespaceCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NamespaceCondition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NamespaceCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x32 + i -= len(m.Reason) + copy(dAtA[i:], m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i-- + dAtA[i] = 0x2a + { + size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + i -= len(m.Status) + copy(dAtA[i:], m.Status) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i-- + dAtA[i] = 0x12 + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *NamespaceList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -11622,6 +11748,20 @@ func (m *NamespaceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } i -= len(m.Phase) copy(dAtA[i:], m.Phase) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) @@ -17500,6 +17640,13 @@ func (m *ServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IPFamily != nil { + i -= len(*m.IPFamily) + copy(dAtA[i:], *m.IPFamily) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.IPFamily))) + i-- + dAtA[i] = 0x7a + } if m.SessionAffinityConfig != nil { { size, err := m.SessionAffinityConfig.MarshalToSizedBuffer(dAtA[:i]) @@ -19481,6 +19628,10 @@ func (m *Container) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + if m.StartupProbe != nil { + l = m.StartupProbe.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -19603,6 +19754,9 @@ func (m *ContainerStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.ContainerID) n += 1 + l + sovGenerated(uint64(l)) + if m.Started != nil { + n += 2 + } return n } @@ -19937,6 +20091,10 @@ func (m *EphemeralContainerCommon) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + if m.StartupProbe != nil { + l = m.StartupProbe.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -20605,6 +20763,25 @@ func (m *Namespace) Size() (n int) { return n } +func (m *NamespaceCondition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastTransitionTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *NamespaceList) Size() (n int) { if m == nil { return 0 @@ -20645,6 +20822,12 @@ func (m *NamespaceStatus) Size() (n int) { _ = l l = len(m.Phase) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -22818,6 +23001,10 @@ func (m *ServiceSpec) Size() (n int) { l = m.SessionAffinityConfig.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.IPFamily != nil { + l = len(*m.IPFamily) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -23727,6 +23914,7 @@ func (this *Container) String() string { `EnvFrom:` + repeatedStringForEnvFrom + `,`, `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`, `VolumeDevices:` + repeatedStringForVolumeDevices + `,`, + `StartupProbe:` + strings.Replace(this.StartupProbe.String(), "Probe", "Probe", 1) + `,`, `}`, }, "") return s @@ -23818,6 +24006,7 @@ func (this *ContainerStatus) String() string { `Image:` + fmt.Sprintf("%v", this.Image) + `,`, `ImageID:` + fmt.Sprintf("%v", this.ImageID) + `,`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, + `Started:` + valueToStringGenerated(this.Started) + `,`, `}`, }, "") return s @@ -24070,6 +24259,7 @@ func (this *EphemeralContainerCommon) String() string { `EnvFrom:` + repeatedStringForEnvFrom + `,`, `TerminationMessagePolicy:` + fmt.Sprintf("%v", this.TerminationMessagePolicy) + `,`, `VolumeDevices:` + repeatedStringForVolumeDevices + `,`, + `StartupProbe:` + strings.Replace(this.StartupProbe.String(), "Probe", "Probe", 1) + `,`, `}`, }, "") return s @@ -24607,6 +24797,20 @@ func (this *Namespace) String() string { }, "") return s } +func (this *NamespaceCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamespaceCondition{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `}`, + }, "") + return s +} func (this *NamespaceList) String() string { if this == nil { return "nil" @@ -24637,8 +24841,14 @@ func (this *NamespaceStatus) String() string { if this == nil { return "nil" } + repeatedStringForConditions := "[]NamespaceCondition{" + for _, f := range this.Conditions { + repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "NamespaceCondition", "NamespaceCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForConditions += "}" s := strings.Join([]string{`&NamespaceStatus{`, `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, `}`, }, "") return s @@ -26314,6 +26524,7 @@ func (this *ServiceSpec) String() string { `HealthCheckNodePort:` + fmt.Sprintf("%v", this.HealthCheckNodePort) + `,`, `PublishNotReadyAddresses:` + fmt.Sprintf("%v", this.PublishNotReadyAddresses) + `,`, `SessionAffinityConfig:` + strings.Replace(this.SessionAffinityConfig.String(), "SessionAffinityConfig", "SessionAffinityConfig", 1) + `,`, + `IPFamily:` + valueToStringGenerated(this.IPFamily) + `,`, `}`, }, "") return s @@ -31878,6 +32089,42 @@ func (m *Container) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartupProbe", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StartupProbe == nil { + m.StartupProbe = &Probe{} + } + if err := m.StartupProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -33072,6 +33319,27 @@ func (m *ContainerStatus) Unmarshal(dAtA []byte) error { } m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Started", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Started = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -35496,11 +35764,173 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ImagePullPolicy = PullPolicy(dAtA[iNdEx:postIndex]) + m.ImagePullPolicy = PullPolicy(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecurityContext == nil { + m.SecurityContext = &SecurityContext{} + } + if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StdinOnce = bool(v != 0) + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TTY = bool(v != 0) + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EnvFrom = append(m.EnvFrom, EnvFromSource{}) + if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: + case 21: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecurityContext", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VolumeDevices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -35527,76 +35957,14 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SecurityContext == nil { - m.SecurityContext = &SecurityContext{} - } - if err := m.SecurityContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.VolumeDevices = append(m.VolumeDevices, VolumeDevice{}) + if err := m.VolumeDevices[len(m.VolumeDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Stdin = bool(v != 0) - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StdinOnce", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StdinOnce = bool(v != 0) - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TTY = bool(v != 0) - case 19: + case 22: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnvFrom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartupProbe", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -35623,74 +35991,10 @@ func (m *EphemeralContainerCommon) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EnvFrom = append(m.EnvFrom, EnvFromSource{}) - if err := m.EnvFrom[len(m.EnvFrom)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TerminationMessagePolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TerminationMessagePolicy = TerminationMessagePolicy(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeDevices", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated + if m.StartupProbe == nil { + m.StartupProbe = &Probe{} } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VolumeDevices = append(m.VolumeDevices, VolumeDevice{}) - if err := m.VolumeDevices[len(m.VolumeDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.StartupProbe.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -41527,7 +41831,125 @@ func (m *LocalObjectReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { +func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LocalVolumeSource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LocalVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FSType = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -41550,15 +41972,15 @@ func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: LocalVolumeSource: wiretype end group for non-group") + return fmt.Errorf("proto: NFSVolumeSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: LocalVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -41586,11 +42008,11 @@ func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Path = string(dAtA[iNdEx:postIndex]) + m.Server = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -41618,9 +42040,28 @@ func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.FSType = &s + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -41645,7 +42086,7 @@ func (m *LocalVolumeSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { +func (m *Namespace) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -41668,17 +42109,17 @@ func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NFSVolumeSource: wiretype end group for non-group") + return fmt.Errorf("proto: Namespace: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NFSVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -41688,29 +42129,30 @@ func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Server = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -41720,29 +42162,30 @@ func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Path = string(dAtA[iNdEx:postIndex]) + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -41752,12 +42195,25 @@ func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.ReadOnly = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -41782,7 +42238,7 @@ func (m *NFSVolumeSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *Namespace) Unmarshal(dAtA []byte) error { +func (m *NamespaceCondition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -41805,17 +42261,17 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Namespace: wiretype end group for non-group") + return fmt.Errorf("proto: NamespaceCondition: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Namespace: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NamespaceCondition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -41825,28 +42281,59 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Type = NamespaceConditionType(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -41873,15 +42360,15 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -41891,24 +42378,55 @@ func (m *Namespace) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -42200,6 +42718,40 @@ func (m *NamespaceStatus) Unmarshal(dAtA []byte) error { } m.Phase = NamespacePhase(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, NamespaceCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -61629,6 +62181,39 @@ func (m *ServiceSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPFamily", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := IPFamily(dAtA[iNdEx:postIndex]) + m.IPFamily = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index 5dcc244f1b..b99d104427 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -161,7 +161,7 @@ message AzureFileVolumeSource { // Deprecated in 1.7, please use the bindings subresource of pods instead. message Binding { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -426,7 +426,7 @@ message ComponentCondition { // ComponentStatus (and ComponentStatusList) holds the cluster validation info. message ComponentStatus { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -440,7 +440,7 @@ message ComponentStatus { // Status of all the conditions for the component as a list of ComponentStatus objects. message ComponentStatusList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -451,7 +451,7 @@ message ComponentStatusList { // ConfigMap holds configuration data for pods to consume. message ConfigMap { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -503,7 +503,7 @@ message ConfigMapKeySelector { // ConfigMapList is a resource containing a list of ConfigMap objects. message ConfigMapList { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -701,6 +701,17 @@ message Container { // +optional optional Probe readinessProbe = 11; + // StartupProbe indicates that the Pod has successfully initialized. + // If specified, no other probes are executed until this completes successfully. + // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + // when it might take a long time to load data or warm a cache, than during steady-state operation. + // This cannot be updated. + // This is an alpha feature enabled by the StartupProbe feature flag. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + optional Probe startupProbe = 22; + // Actions that the management system should take in response to container lifecycle events. // Cannot be updated. // +optional @@ -901,6 +912,13 @@ message ContainerStatus { // Container's ID in the format 'docker://'. // +optional optional string containerID = 8; + + // Specifies whether the container has passed its startup probe. + // Initialized as false, becomes true after startupProbe is considered successful. + // Resets to false when the container is restarted, or if kubelet loses state temporarily. + // Is always true when no startupProbe is defined. + // +optional + optional bool started = 9; } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -1059,7 +1077,7 @@ message EndpointSubset { // ] message Endpoints { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -1077,7 +1095,7 @@ message Endpoints { // EndpointsList is a list of endpoints. message EndpointsList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -1142,16 +1160,20 @@ message EnvVarSource { optional SecretKeySelector secretKeyRef = 4; } -// An EphemeralContainer is a special type of container which doesn't come with any resource -// or scheduling guarantees but can be added to a pod that has already been created. They are -// intended for user-initiated activities such as troubleshooting a running pod. -// Ephemeral containers will not be restarted when they exit, and they will be killed if the -// pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource +// An EphemeralContainer is a container that may be added temporarily to an existing pod for +// user-initiated activities such as debugging. Ephemeral containers have no resource or +// scheduling guarantees, and they will not be restarted when they exit or when a pod is +// removed or restarted. If an ephemeral container causes a pod to exceed its resource // allocation, the pod may be evicted. -// Ephemeral containers are added via a pod's ephemeralcontainers subresource and will appear -// in the pod spec once added. No fields in EphemeralContainer may be changed once added. +// Ephemeral containers may not be added by directly updating the pod spec. They must be added +// via the pod's ephemeralcontainers subresource, and they will appear in the pod spec +// once added. // This is an alpha feature enabled by the EphemeralContainers feature flag. message EphemeralContainer { + // Ephemeral containers have all of the fields of Container, plus additional fields + // specific to ephemeral containers. Fields in common with Container are in the + // following inlined struct so than an EphemeralContainer may easily be converted + // to a Container. optional EphemeralContainerCommon ephemeralContainerCommon = 1; // If set, the name of the container from PodSpec that this ephemeral container targets. @@ -1162,6 +1184,10 @@ message EphemeralContainer { optional string targetContainerName = 2; } +// EphemeralContainerCommon is a copy of all fields in Container to be inlined in +// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer +// to Container and allows separate documentation for the fields of EphemeralContainer. +// When a new field is added to Container it must be added here as well. message EphemeralContainerCommon { // Name of the ephemeral container specified as a DNS_LABEL. // This name must be unique among all containers, init containers and ephemeral containers. @@ -1246,6 +1272,10 @@ message EphemeralContainerCommon { // +optional optional Probe readinessProbe = 11; + // Probes are not allowed for ephemeral containers. + // +optional + optional Probe startupProbe = 22; + // Lifecycle is not allowed for ephemeral containers. // +optional optional Lifecycle lifecycle = 12; @@ -1304,12 +1334,14 @@ message EphemeralContainerCommon { optional bool tty = 18; } -// A list of ephemeral containers used in API operations +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. message EphemeralContainers { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // The new set of ephemeral containers to use for a pod. + // A list of ephemeral containers associated with this pod. New ephemeral containers + // may be appended to this list, but existing ephemeral containers may not be removed + // or modified. // +patchMergeKey=name // +patchStrategy=merge repeated EphemeralContainer ephemeralContainers = 2; @@ -1318,7 +1350,7 @@ message EphemeralContainers { // Event is a report of an event somewhere in the cluster. message Event { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // The object that this event is about. @@ -1383,7 +1415,7 @@ message Event { // EventList is a list of events. message EventList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -1852,7 +1884,7 @@ message Lifecycle { optional Handler postStart = 1; // PreStop is called immediately before a container is terminated due to an - // API request or management event such as liveness probe failure, + // API request or management event such as liveness/startup probe failure, // preemption, resource contention, etc. The handler is not called if the // container crashes or exits. The reason for termination is passed to the // handler. The Pod's termination grace period countdown begins before the @@ -1868,12 +1900,12 @@ message Lifecycle { // LimitRange sets resource usage limits for each kind of resource in a Namespace. message LimitRange { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the limits enforced. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional LimitRangeSpec spec = 2; } @@ -1908,7 +1940,7 @@ message LimitRangeItem { // LimitRangeList is a list of LimitRange items. message LimitRangeList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -1926,7 +1958,7 @@ message LimitRangeSpec { // List holds a list of objects, which may not be known by the server. message List { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -2003,25 +2035,43 @@ message NFSVolumeSource { // Use of multiple namespaces is optional. message Namespace { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of the Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional NamespaceSpec spec = 2; // Status describes the current status of a Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional NamespaceStatus status = 3; } +// NamespaceCondition contains details about state of namespace. +message NamespaceCondition { + // Type of namespace controller condition. + optional string type = 1; + + // Status of the condition, one of True, False, Unknown. + optional string status = 2; + + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; + + // +optional + optional string reason = 5; + + // +optional + optional string message = 6; +} + // NamespaceList is a list of Namespaces. message NamespaceList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -2044,25 +2094,31 @@ message NamespaceStatus { // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional optional string phase = 1; + + // Represents the latest available observations of a namespace's current state. + // +optional + // +patchMergeKey=type + // +patchStrategy=merge + repeated NamespaceCondition conditions = 2; } // Node is a worker node in Kubernetes. // Each node will have a unique identifier in the cache (i.e. in etcd). message Node { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a node. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional NodeSpec spec = 2; // Most recently observed status of the node. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional NodeStatus status = 3; } @@ -2190,7 +2246,7 @@ message NodeDaemonEndpoints { // NodeList is the whole list of all Nodes which have been registered with master. message NodeList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -2402,7 +2458,7 @@ message ObjectFieldSelector { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message ObjectReference { // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional string kind = 1; @@ -2426,7 +2482,7 @@ message ObjectReference { optional string apiVersion = 5; // Specific resourceVersion to which this reference is made, if any. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional optional string resourceVersion = 6; @@ -2447,7 +2503,7 @@ message ObjectReference { // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes message PersistentVolume { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -2468,7 +2524,7 @@ message PersistentVolume { // PersistentVolumeClaim is a user's request for and claim to a persistent volume message PersistentVolumeClaim { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -2512,7 +2568,7 @@ message PersistentVolumeClaimCondition { // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. message PersistentVolumeClaimList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -2606,7 +2662,7 @@ message PersistentVolumeClaimVolumeSource { // PersistentVolumeList is a list of PersistentVolume items. message PersistentVolumeList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -2807,12 +2863,12 @@ message PhotonPersistentDiskVolumeSource { // by clients and scheduled onto hosts. message Pod { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PodSpec spec = 2; @@ -2820,7 +2876,7 @@ message Pod { // This data may not be up to date. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PodStatus status = 3; } @@ -3037,12 +3093,12 @@ message PodIP { // PodList is a list of Pods. message PodList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md repeated Pod items = 2; } @@ -3206,7 +3262,7 @@ message PodSpec { // init container fails, the pod is considered to have failed and is handled according // to its restartPolicy. The name for an init container or normal container must be // unique among all containers. - // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. + // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. // The resourceRequirements of an init container are taken into account during scheduling // by finding the highest request/limit for each resource type, and then using the max of // of that value or the sum of the normal containers. Limits are applied to init containers @@ -3226,12 +3282,10 @@ message PodSpec { // +patchStrategy=merge repeated Container containers = 2; - // EphemeralContainers is the list of ephemeral containers that run in this pod. Ephemeral containers - // are added to an existing pod as a result of a user-initiated action such as troubleshooting. - // This list is read-only in the pod spec. It may not be specified in a create or modified in an - // update of a pod or pod template. - // To add an ephemeral container use the pod's ephemeralcontainers subresource, which allows update - // using the EphemeralContainers kind. + // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + // pod to perform user-initiated actions such as debugging. This list cannot be specified when + // creating a pod, and it cannot be modified by updating the pod spec. In order to add an + // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. // +optional // +patchMergeKey=name @@ -3538,8 +3592,8 @@ message PodStatus { // +optional optional string qosClass = 9; - // Status for any ephemeral containers that running in this pod. - // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. + // Status for any ephemeral containers that have run in this pod. + // This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature. // +optional repeated ContainerStatus ephemeralContainerStatuses = 13; } @@ -3547,7 +3601,7 @@ message PodStatus { // PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded message PodStatusResult { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -3555,7 +3609,7 @@ message PodStatusResult { // This data may not be up to date. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PodStatus status = 2; } @@ -3563,12 +3617,12 @@ message PodStatusResult { // PodTemplate describes a template for creating copies of a predefined pod. message PodTemplate { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Template defines the pods that will be created from this pod template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PodTemplateSpec template = 2; } @@ -3576,7 +3630,7 @@ message PodTemplate { // PodTemplateList is a list of PodTemplates. message PodTemplateList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -3587,12 +3641,12 @@ message PodTemplateList { // PodTemplateSpec describes the data a pod should have when created from a template message PodTemplateSpec { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional PodSpec spec = 2; } @@ -3672,7 +3726,7 @@ message Probe { optional int32 periodSeconds = 4; // Minimum consecutive successes for the probe to be considered successful after having failed. - // Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. // +optional optional int32 successThreshold = 5; @@ -3833,7 +3887,7 @@ message RBDVolumeSource { // RangeAllocation is not a public type. message RangeAllocation { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -3848,12 +3902,12 @@ message RangeAllocation { message ReplicationController { // If the Labels of a ReplicationController are empty, they are defaulted to // be the same as the Pod(s) that the replication controller manages. - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the specification of the desired behavior of the replication controller. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ReplicationControllerSpec spec = 2; @@ -3861,7 +3915,7 @@ message ReplicationController { // This data may be out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ReplicationControllerStatus status = 3; } @@ -3890,7 +3944,7 @@ message ReplicationControllerCondition { // ReplicationControllerList is a collection of replication controllers. message ReplicationControllerList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -3976,17 +4030,17 @@ message ResourceFieldSelector { // ResourceQuota sets aggregate quota restrictions enforced per namespace message ResourceQuota { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the desired quota. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ResourceQuotaSpec spec = 2; // Status defines the actual enforced quota and its current usage. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ResourceQuotaStatus status = 3; } @@ -3994,7 +4048,7 @@ message ResourceQuota { // ResourceQuotaList is a list of ResourceQuota items. message ResourceQuotaList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -4190,7 +4244,7 @@ message ScopedResourceSelectorRequirement { // the Data field must be less than MaxSecretSize bytes. message Secret { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -4244,7 +4298,7 @@ message SecretKeySelector { // SecretList is a list of Secret. message SecretList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -4408,19 +4462,19 @@ message SerializedReference { // will answer requests sent through the proxy. message Service { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec defines the behavior of a service. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ServiceSpec spec = 2; // Most recently observed status of the service. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional ServiceStatus status = 3; } @@ -4431,7 +4485,7 @@ message Service { // * a set of secrets message ServiceAccount { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -4458,7 +4512,7 @@ message ServiceAccount { // ServiceAccountList is a list of ServiceAccount objects message ServiceAccountList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -4496,7 +4550,7 @@ message ServiceAccountTokenProjection { // ServiceList holds a list of services. message ServiceList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -4669,6 +4723,16 @@ message ServiceSpec { // sessionAffinityConfig contains the configurations of session affinity. // +optional optional SessionAffinityConfig sessionAffinityConfig = 14; + + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. + // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is + // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. + // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which + // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of + // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the + // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // +optional + optional string ipFamily = 15; } // ServiceStatus represents the current status of a service. diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index b2e721e889..fcd4554029 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -275,7 +275,7 @@ const ( type PersistentVolume struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -390,7 +390,7 @@ type PersistentVolumeStatus struct { type PersistentVolumeList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of persistent volumes. @@ -405,7 +405,7 @@ type PersistentVolumeList struct { type PersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -427,7 +427,7 @@ type PersistentVolumeClaim struct { type PersistentVolumeClaimList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // A list of persistent volume claims. @@ -2025,7 +2025,7 @@ type Probe struct { // +optional PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"` // Minimum consecutive successes for the probe to be considered successful after having failed. - // Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. // +optional SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"` // Minimum consecutive failures for the probe to be considered failed after having succeeded. @@ -2196,6 +2196,16 @@ type Container struct { // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes // +optional ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` + // StartupProbe indicates that the Pod has successfully initialized. + // If specified, no other probes are executed until this completes successfully. + // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + // when it might take a long time to load data or warm a cache, than during steady-state operation. + // This cannot be updated. + // This is an alpha feature enabled by the StartupProbe feature flag. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + StartupProbe *Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"` // Actions that the management system should take in response to container lifecycle events. // Cannot be updated. // +optional @@ -2282,7 +2292,7 @@ type Lifecycle struct { // +optional PostStart *Handler `json:"postStart,omitempty" protobuf:"bytes,1,opt,name=postStart"` // PreStop is called immediately before a container is terminated due to an - // API request or management event such as liveness probe failure, + // API request or management event such as liveness/startup probe failure, // preemption, resource contention, etc. The handler is not called if the // container crashes or exits. The reason for termination is passed to the // handler. The Pod's termination grace period countdown begins before the @@ -2390,6 +2400,12 @@ type ContainerStatus struct { // Container's ID in the format 'docker://'. // +optional ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"` + // Specifies whether the container has passed its startup probe. + // Initialized as false, becomes true after startupProbe is considered successful. + // Resets to false when the container is restarted, or if kubelet loses state temporarily. + // Is always true when no startupProbe is defined. + // +optional + Started *bool `json:"started,omitempty" protobuf:"varint,9,opt,name=started"` } // PodPhase is a label for the condition of a pod at the current time. @@ -2825,7 +2841,7 @@ type PodSpec struct { // init container fails, the pod is considered to have failed and is handled according // to its restartPolicy. The name for an init container or normal container must be // unique among all containers. - // Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. + // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. // The resourceRequirements of an init container are taken into account during scheduling // by finding the highest request/limit for each resource type, and then using the max of // of that value or the sum of the normal containers. Limits are applied to init containers @@ -2843,12 +2859,10 @@ type PodSpec struct { // +patchMergeKey=name // +patchStrategy=merge Containers []Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` - // EphemeralContainers is the list of ephemeral containers that run in this pod. Ephemeral containers - // are added to an existing pod as a result of a user-initiated action such as troubleshooting. - // This list is read-only in the pod spec. It may not be specified in a create or modified in an - // update of a pod or pod template. - // To add an ephemeral container use the pod's ephemeralcontainers subresource, which allows update - // using the EphemeralContainers kind. + // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + // pod to perform user-initiated actions such as debugging. This list cannot be specified when + // creating a pod, and it cannot be modified by updating the pod spec. In order to add an + // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. // +optional // +patchMergeKey=name @@ -3220,6 +3234,10 @@ type PodIP struct { IP string `json:"ip,omitempty" protobuf:"bytes,1,opt,name=ip"` } +// EphemeralContainerCommon is a copy of all fields in Container to be inlined in +// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer +// to Container and allows separate documentation for the fields of EphemeralContainer. +// When a new field is added to Container it must be added here as well. type EphemeralContainerCommon struct { // Name of the ephemeral container specified as a DNS_LABEL. // This name must be unique among all containers, init containers and ephemeral containers. @@ -3291,6 +3309,9 @@ type EphemeralContainerCommon struct { // Probes are not allowed for ephemeral containers. // +optional ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"` + // Probes are not allowed for ephemeral containers. + // +optional + StartupProbe *Probe `json:"startupProbe,omitempty" protobuf:"bytes,22,opt,name=startupProbe"` // Lifecycle is not allowed for ephemeral containers. // +optional Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,12,opt,name=lifecycle"` @@ -3350,16 +3371,20 @@ type EphemeralContainerCommon struct { // these two types. var _ = Container(EphemeralContainerCommon{}) -// An EphemeralContainer is a special type of container which doesn't come with any resource -// or scheduling guarantees but can be added to a pod that has already been created. They are -// intended for user-initiated activities such as troubleshooting a running pod. -// Ephemeral containers will not be restarted when they exit, and they will be killed if the -// pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource +// An EphemeralContainer is a container that may be added temporarily to an existing pod for +// user-initiated activities such as debugging. Ephemeral containers have no resource or +// scheduling guarantees, and they will not be restarted when they exit or when a pod is +// removed or restarted. If an ephemeral container causes a pod to exceed its resource // allocation, the pod may be evicted. -// Ephemeral containers are added via a pod's ephemeralcontainers subresource and will appear -// in the pod spec once added. No fields in EphemeralContainer may be changed once added. +// Ephemeral containers may not be added by directly updating the pod spec. They must be added +// via the pod's ephemeralcontainers subresource, and they will appear in the pod spec +// once added. // This is an alpha feature enabled by the EphemeralContainers feature flag. type EphemeralContainer struct { + // Ephemeral containers have all of the fields of Container, plus additional fields + // specific to ephemeral containers. Fields in common with Container are in the + // following inlined struct so than an EphemeralContainer may easily be converted + // to a Container. EphemeralContainerCommon `json:",inline" protobuf:"bytes,1,req"` // If set, the name of the container from PodSpec that this ephemeral container targets. @@ -3454,8 +3479,8 @@ type PodStatus struct { // More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md // +optional QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` - // Status for any ephemeral containers that running in this pod. - // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. + // Status for any ephemeral containers that have run in this pod. + // This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature. // +optional EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty" protobuf:"bytes,13,rep,name=ephemeralContainerStatuses"` } @@ -3466,14 +3491,14 @@ type PodStatus struct { type PodStatusResult struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Most recently observed status of the pod. // This data may not be up to date. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status PodStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` } @@ -3488,12 +3513,12 @@ type PodStatusResult struct { type Pod struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -3501,7 +3526,7 @@ type Pod struct { // This data may not be up to date. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -3512,24 +3537,24 @@ type Pod struct { type PodList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of pods. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md Items []Pod `json:"items" protobuf:"bytes,2,rep,name=items"` } // PodTemplateSpec describes the data a pod should have when created from a template type PodTemplateSpec struct { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the pod. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec PodSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -3541,12 +3566,12 @@ type PodTemplateSpec struct { type PodTemplate struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Template defines the pods that will be created from this pod template. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Template PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"` } @@ -3557,7 +3582,7 @@ type PodTemplate struct { type PodTemplateList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -3669,12 +3694,12 @@ type ReplicationController struct { // If the Labels of a ReplicationController are empty, they are defaulted to // be the same as the Pod(s) that the replication controller manages. - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the specification of the desired behavior of the replication controller. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec ReplicationControllerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` @@ -3682,7 +3707,7 @@ type ReplicationController struct { // This data may be out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status ReplicationControllerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -3693,7 +3718,7 @@ type ReplicationController struct { type ReplicationControllerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -3794,6 +3819,17 @@ type LoadBalancerIngress struct { Hostname string `json:"hostname,omitempty" protobuf:"bytes,2,opt,name=hostname"` } +// IPFamily represents the IP Family (IPv4 or IPv6). This type is used +// to express the family of an IP expressed by a type (i.e. service.Spec.IPFamily) +type IPFamily string + +const ( + // IPv4Protocol indicates that this IP is IPv4 protocol + IPv4Protocol IPFamily = "IPv4" + // IPv6Protocol indicates that this IP is IPv6 protocol + IPv6Protocol IPFamily = "IPv6" +) + // ServiceSpec describes the attributes that a user creates on a service. type ServiceSpec struct { // The list of ports that are exposed by this service. @@ -3909,6 +3945,16 @@ type ServiceSpec struct { // sessionAffinityConfig contains the configurations of session affinity. // +optional SessionAffinityConfig *SessionAffinityConfig `json:"sessionAffinityConfig,omitempty" protobuf:"bytes,14,opt,name=sessionAffinityConfig"` + + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. + // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is + // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. + // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which + // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of + // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the + // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // +optional + IPFamily *IPFamily `json:"ipFamily,omitempty" protobuf:"bytes,15,opt,name=ipFamily,Configcasttype=IPFamily"` } // ServicePort contains information on service's port. @@ -3959,19 +4005,19 @@ type ServicePort struct { type Service struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a service. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec ServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the service. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status ServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -3988,7 +4034,7 @@ const ( type ServiceList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4006,7 +4052,7 @@ type ServiceList struct { type ServiceAccount struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4036,7 +4082,7 @@ type ServiceAccount struct { type ServiceAccountList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4063,7 +4109,7 @@ type ServiceAccountList struct { type Endpoints struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4148,7 +4194,7 @@ type EndpointPort struct { type EndpointsList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4542,19 +4588,19 @@ type ResourceList map[ResourceName]resource.Quantity type Node struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of a node. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec NodeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the node. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status NodeStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -4565,7 +4611,7 @@ type Node struct { type NodeList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4596,6 +4642,12 @@ type NamespaceStatus struct { // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ // +optional Phase NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=NamespacePhase"` + + // Represents the latest available observations of a namespace's current state. + // +optional + // +patchMergeKey=type + // +patchStrategy=merge + Conditions []NamespaceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` } type NamespacePhase string @@ -4608,6 +4660,32 @@ const ( NamespaceTerminating NamespacePhase = "Terminating" ) +type NamespaceConditionType string + +// These are valid conditions of a namespace. +const ( + // NamespaceDeletionDiscoveryFailure contains information about namespace deleter errors during resource discovery. + NamespaceDeletionDiscoveryFailure NamespaceConditionType = "NamespaceDeletionDiscoveryFailure" + // NamespaceDeletionContentFailure contains information about namespace deleter errors during deletion of resources. + NamespaceDeletionContentFailure NamespaceConditionType = "NamespaceDeletionContentFailure" + // NamespaceDeletionGVParsingFailure contains information about namespace deleter errors parsing GV for legacy types. + NamespaceDeletionGVParsingFailure NamespaceConditionType = "NamespaceDeletionGroupVersionParsingFailure" +) + +// NamespaceCondition contains details about state of namespace. +type NamespaceCondition struct { + // Type of namespace controller condition. + Type NamespaceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NamespaceConditionType"` + // Status of the condition, one of True, False, Unknown. + Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` + // +optional + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // +optional + Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` +} + // +genclient // +genclient:nonNamespaced // +genclient:skipVerbs=deleteCollection @@ -4618,17 +4696,17 @@ const ( type Namespace struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the behavior of the Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec NamespaceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status describes the current status of a Namespace. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status NamespaceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -4639,7 +4717,7 @@ type Namespace struct { type NamespaceList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4655,7 +4733,7 @@ type NamespaceList struct { type Binding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -4665,13 +4743,15 @@ type Binding struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// A list of ephemeral containers used in API operations +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. type EphemeralContainers struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // The new set of ephemeral containers to use for a pod. + // A list of ephemeral containers associated with this pod. New ephemeral containers + // may be appended to this list, but existing ephemeral containers may not be removed + // or modified. // +patchMergeKey=name // +patchStrategy=merge EphemeralContainers []EphemeralContainer `json:"ephemeralContainers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=ephemeralContainers"` @@ -4860,7 +4940,7 @@ type ServiceProxyOptions struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ObjectReference struct { // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // Namespace of the referent. @@ -4879,7 +4959,7 @@ type ObjectReference struct { // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` // Specific resourceVersion to which this reference is made, if any. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` @@ -4954,7 +5034,7 @@ const ( type Event struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` // The object that this event is about. @@ -5042,7 +5122,7 @@ const ( type EventList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5102,12 +5182,12 @@ type LimitRangeSpec struct { type LimitRange struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the limits enforced. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec LimitRangeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } @@ -5118,7 +5198,7 @@ type LimitRange struct { type LimitRangeList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5258,17 +5338,17 @@ type ResourceQuotaStatus struct { type ResourceQuota struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired quota. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec ResourceQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status defines the actual enforced quota and its current usage. - // https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -5279,7 +5359,7 @@ type ResourceQuota struct { type ResourceQuotaList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5296,7 +5376,7 @@ type ResourceQuotaList struct { type Secret struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5413,7 +5493,7 @@ const ( type SecretList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5429,7 +5509,7 @@ type SecretList struct { type ConfigMap struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5458,7 +5538,7 @@ type ConfigMap struct { type ConfigMapList struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5500,7 +5580,7 @@ type ComponentCondition struct { type ComponentStatus struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5517,7 +5597,7 @@ type ComponentStatus struct { type ComponentStatusList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -5695,7 +5775,7 @@ type WindowsSecurityContextOptions struct { type RangeAllocation struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 6058117637..35b8389a75 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -108,7 +108,7 @@ func (AzureFileVolumeSource) SwaggerDoc() map[string]string { var map_Binding = map[string]string{ "": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "target": "The target object that you want to bind to the standard object.", } @@ -231,7 +231,7 @@ func (ComponentCondition) SwaggerDoc() map[string]string { var map_ComponentStatus = map[string]string{ "": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "conditions": "List of component conditions observed", } @@ -241,7 +241,7 @@ func (ComponentStatus) SwaggerDoc() map[string]string { var map_ComponentStatusList = map[string]string{ "": "Status of all the conditions for the component as a list of ComponentStatus objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ComponentStatus objects.", } @@ -251,7 +251,7 @@ func (ComponentStatusList) SwaggerDoc() map[string]string { var map_ConfigMap = map[string]string{ "": "ConfigMap holds configuration data for pods to consume.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.", "binaryData": "BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.", } @@ -281,7 +281,7 @@ func (ConfigMapKeySelector) SwaggerDoc() map[string]string { var map_ConfigMapList = map[string]string{ "": "ConfigMapList is a resource containing a list of ConfigMap objects.", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of ConfigMaps.", } @@ -338,6 +338,7 @@ var map_Container = map[string]string{ "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is a beta feature.", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "readinessProbe": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "startupProbe": "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "lifecycle": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", @@ -430,6 +431,7 @@ var map_ContainerStatus = map[string]string{ "image": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", "imageID": "ImageID of the container's image.", "containerID": "Container's ID in the format 'docker://'.", + "started": "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", } func (ContainerStatus) SwaggerDoc() map[string]string { @@ -522,7 +524,7 @@ func (EndpointSubset) SwaggerDoc() map[string]string { var map_Endpoints = map[string]string{ "": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "subsets": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", } @@ -532,7 +534,7 @@ func (Endpoints) SwaggerDoc() map[string]string { var map_EndpointsList = map[string]string{ "": "EndpointsList is a list of endpoints.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of endpoints.", } @@ -575,7 +577,7 @@ func (EnvVarSource) SwaggerDoc() map[string]string { } var map_EphemeralContainer = map[string]string{ - "": "An EphemeralContainer is a special type of container which doesn't come with any resource or scheduling guarantees but can be added to a pod that has already been created. They are intended for user-initiated activities such as troubleshooting a running pod. Ephemeral containers will not be restarted when they exit, and they will be killed if the pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers are added via a pod's ephemeralcontainers subresource and will appear in the pod spec once added. No fields in EphemeralContainer may be changed once added. This is an alpha feature enabled by the EphemeralContainers feature flag.", + "": "An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag.", "targetContainerName": "If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature.", } @@ -584,6 +586,7 @@ func (EphemeralContainer) SwaggerDoc() map[string]string { } var map_EphemeralContainerCommon = map[string]string{ + "": "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", "name": "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", "image": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", @@ -597,6 +600,7 @@ var map_EphemeralContainerCommon = map[string]string{ "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is a beta feature.", "livenessProbe": "Probes are not allowed for ephemeral containers.", "readinessProbe": "Probes are not allowed for ephemeral containers.", + "startupProbe": "Probes are not allowed for ephemeral containers.", "lifecycle": "Lifecycle is not allowed for ephemeral containers.", "terminationMessagePath": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", "terminationMessagePolicy": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", @@ -612,8 +616,8 @@ func (EphemeralContainerCommon) SwaggerDoc() map[string]string { } var map_EphemeralContainers = map[string]string{ - "": "A list of ephemeral containers used in API operations", - "ephemeralContainers": "The new set of ephemeral containers to use for a pod.", + "": "A list of ephemeral containers used with the Pod ephemeralcontainers subresource.", + "ephemeralContainers": "A list of ephemeral containers associated with this pod. New ephemeral containers may be appended to this list, but existing ephemeral containers may not be removed or modified.", } func (EphemeralContainers) SwaggerDoc() map[string]string { @@ -622,7 +626,7 @@ func (EphemeralContainers) SwaggerDoc() map[string]string { var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "involvedObject": "The object that this event is about.", "reason": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", "message": "A human-readable description of the status of this operation.", @@ -645,7 +649,7 @@ func (Event) SwaggerDoc() map[string]string { var map_EventList = map[string]string{ "": "EventList is a list of events.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of events", } @@ -884,7 +888,7 @@ func (KeyToPath) SwaggerDoc() map[string]string { var map_Lifecycle = map[string]string{ "": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", "postStart": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - "preStop": "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "preStop": "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", } func (Lifecycle) SwaggerDoc() map[string]string { @@ -893,8 +897,8 @@ func (Lifecycle) SwaggerDoc() map[string]string { var map_LimitRange = map[string]string{ "": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (LimitRange) SwaggerDoc() map[string]string { @@ -917,7 +921,7 @@ func (LimitRangeItem) SwaggerDoc() map[string]string { var map_LimitRangeList = map[string]string{ "": "LimitRangeList is a list of LimitRange items.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", } @@ -985,18 +989,28 @@ func (NFSVolumeSource) SwaggerDoc() map[string]string { var map_Namespace = map[string]string{ "": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Namespace) SwaggerDoc() map[string]string { return map_Namespace } +var map_NamespaceCondition = map[string]string{ + "": "NamespaceCondition contains details about state of namespace.", + "type": "Type of namespace controller condition.", + "status": "Status of the condition, one of True, False, Unknown.", +} + +func (NamespaceCondition) SwaggerDoc() map[string]string { + return map_NamespaceCondition +} + var map_NamespaceList = map[string]string{ "": "NamespaceList is a list of Namespaces.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", } @@ -1014,8 +1028,9 @@ func (NamespaceSpec) SwaggerDoc() map[string]string { } var map_NamespaceStatus = map[string]string{ - "": "NamespaceStatus is information about the current status of a Namespace.", - "phase": "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + "": "NamespaceStatus is information about the current status of a Namespace.", + "phase": "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/", + "conditions": "Represents the latest available observations of a namespace's current state.", } func (NamespaceStatus) SwaggerDoc() map[string]string { @@ -1024,9 +1039,9 @@ func (NamespaceStatus) SwaggerDoc() map[string]string { var map_Node = map[string]string{ "": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Node) SwaggerDoc() map[string]string { @@ -1099,7 +1114,7 @@ func (NodeDaemonEndpoints) SwaggerDoc() map[string]string { var map_NodeList = map[string]string{ "": "NodeList is the whole list of all Nodes which have been registered with master.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of nodes", } @@ -1219,12 +1234,12 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { var map_ObjectReference = map[string]string{ "": "ObjectReference contains enough information to let you inspect or modify the referred object.", - "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "namespace": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", "uid": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", "apiVersion": "API version of the referent.", - "resourceVersion": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "resourceVersion": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", "fieldPath": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", } @@ -1234,7 +1249,7 @@ func (ObjectReference) SwaggerDoc() map[string]string { var map_PersistentVolume = map[string]string{ "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", } @@ -1245,7 +1260,7 @@ func (PersistentVolume) SwaggerDoc() map[string]string { var map_PersistentVolumeClaim = map[string]string{ "": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", } @@ -1268,7 +1283,7 @@ func (PersistentVolumeClaimCondition) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimList = map[string]string{ "": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", } @@ -1315,7 +1330,7 @@ func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string { var map_PersistentVolumeList = map[string]string{ "": "PersistentVolumeList is a list of PersistentVolume items.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", } @@ -1392,9 +1407,9 @@ func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string { var map_Pod = map[string]string{ "": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Pod) SwaggerDoc() map[string]string { @@ -1504,8 +1519,8 @@ func (PodIP) SwaggerDoc() map[string]string { var map_PodList = map[string]string{ "": "PodList is a list of Pods.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "items": "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", } func (PodList) SwaggerDoc() map[string]string { @@ -1583,9 +1598,9 @@ func (PodSignature) SwaggerDoc() map[string]string { var map_PodSpec = map[string]string{ "": "PodSpec is a description of a pod.", "volumes": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + "initContainers": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", "containers": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", - "ephemeralContainers": "EphemeralContainers is the list of ephemeral containers that run in this pod. Ephemeral containers are added to an existing pod as a result of a user-initiated action such as troubleshooting. This list is read-only in the pod spec. It may not be specified in a create or modified in an update of a pod or pod template. To add an ephemeral container use the pod's ephemeralcontainers subresource, which allows update using the EphemeralContainers kind. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", + "ephemeralContainers": "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", "terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", "activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", @@ -1636,7 +1651,7 @@ var map_PodStatus = map[string]string{ "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", - "ephemeralContainerStatuses": "Status for any ephemeral containers that running in this pod. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.", + "ephemeralContainerStatuses": "Status for any ephemeral containers that have run in this pod. This field is alpha-level and is only populated by servers that enable the EphemeralContainers feature.", } func (PodStatus) SwaggerDoc() map[string]string { @@ -1645,8 +1660,8 @@ func (PodStatus) SwaggerDoc() map[string]string { var map_PodStatusResult = map[string]string{ "": "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "status": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (PodStatusResult) SwaggerDoc() map[string]string { @@ -1655,8 +1670,8 @@ func (PodStatusResult) SwaggerDoc() map[string]string { var map_PodTemplate = map[string]string{ "": "PodTemplate describes a template for creating copies of a predefined pod.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "template": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "template": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (PodTemplate) SwaggerDoc() map[string]string { @@ -1665,7 +1680,7 @@ func (PodTemplate) SwaggerDoc() map[string]string { var map_PodTemplateList = map[string]string{ "": "PodTemplateList is a list of PodTemplates.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of pod templates", } @@ -1675,8 +1690,8 @@ func (PodTemplateList) SwaggerDoc() map[string]string { var map_PodTemplateSpec = map[string]string{ "": "PodTemplateSpec describes the data a pod should have when created from a template", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (PodTemplateSpec) SwaggerDoc() map[string]string { @@ -1730,7 +1745,7 @@ var map_Probe = map[string]string{ "initialDelaySeconds": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "timeoutSeconds": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", "periodSeconds": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", - "successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + "successThreshold": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.", "failureThreshold": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", } @@ -1796,7 +1811,7 @@ func (RBDVolumeSource) SwaggerDoc() map[string]string { var map_RangeAllocation = map[string]string{ "": "RangeAllocation is not a public type.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "range": "Range is string that identifies the range represented by 'data'.", "data": "Data is a bit array containing all allocated addresses in the previous segment.", } @@ -1807,9 +1822,9 @@ func (RangeAllocation) SwaggerDoc() map[string]string { var map_ReplicationController = map[string]string{ "": "ReplicationController represents the configuration of a replication controller.", - "metadata": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (ReplicationController) SwaggerDoc() map[string]string { @@ -1831,7 +1846,7 @@ func (ReplicationControllerCondition) SwaggerDoc() map[string]string { var map_ReplicationControllerList = map[string]string{ "": "ReplicationControllerList is a collection of replication controllers.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", } @@ -1878,9 +1893,9 @@ func (ResourceFieldSelector) SwaggerDoc() map[string]string { var map_ResourceQuota = map[string]string{ "": "ResourceQuota sets aggregate quota restrictions enforced per namespace", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (ResourceQuota) SwaggerDoc() map[string]string { @@ -1889,7 +1904,7 @@ func (ResourceQuota) SwaggerDoc() map[string]string { var map_ResourceQuotaList = map[string]string{ "": "ResourceQuotaList is a list of ResourceQuota items.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", } @@ -1998,7 +2013,7 @@ func (ScopedResourceSelectorRequirement) SwaggerDoc() map[string]string { var map_Secret = map[string]string{ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "type": "Used to facilitate programmatic handling of secret data.", @@ -2029,7 +2044,7 @@ func (SecretKeySelector) SwaggerDoc() map[string]string { var map_SecretList = map[string]string{ "": "SecretList is a list of Secret.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", } @@ -2098,9 +2113,9 @@ func (SerializedReference) SwaggerDoc() map[string]string { var map_Service = map[string]string{ "": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Service) SwaggerDoc() map[string]string { @@ -2109,7 +2124,7 @@ func (Service) SwaggerDoc() map[string]string { var map_ServiceAccount = map[string]string{ "": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "secrets": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", "imagePullSecrets": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", @@ -2121,7 +2136,7 @@ func (ServiceAccount) SwaggerDoc() map[string]string { var map_ServiceAccountList = map[string]string{ "": "ServiceAccountList is a list of ServiceAccount objects", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", } @@ -2142,7 +2157,7 @@ func (ServiceAccountTokenProjection) SwaggerDoc() map[string]string { var map_ServiceList = map[string]string{ "": "ServiceList holds a list of services.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of services", } @@ -2187,6 +2202,7 @@ var map_ServiceSpec = map[string]string{ "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", "publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", "sessionAffinityConfig": "sessionAffinityConfig contains the configurations of session affinity.", + "ipFamily": "ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which allocate external load-balancers should use the same IP family. Endpoints for this Service will be of this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment.", } func (ServiceSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/core/v1/well_known_labels.go b/vendor/k8s.io/api/core/v1/well_known_labels.go index 4497760d3f..3287fb51fc 100644 --- a/vendor/k8s.io/api/core/v1/well_known_labels.go +++ b/vendor/k8s.io/api/core/v1/well_known_labels.go @@ -33,4 +33,10 @@ const ( // LabelNamespaceNodeRestriction is a forbidden label namespace that kubelets may not self-set when the NodeRestriction admission plugin is enabled LabelNamespaceNodeRestriction = "node-restriction.kubernetes.io" + + // IsHeadlessService is added by Controller to an Endpoint denoting if its parent + // Service is Headless. The existence of this label can be used further by other + // controllers and kube-proxy to check if the Endpoint objects should be replicated when + // using Headless Services + IsHeadlessService = "service.kubernetes.io/headless" ) diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 02d36058b1..fd47019c03 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -773,6 +773,11 @@ func (in *Container) DeepCopyInto(out *Container) { *out = new(Probe) (*in).DeepCopyInto(*out) } + if in.StartupProbe != nil { + in, out := &in.StartupProbe, &out.StartupProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle *out = new(Lifecycle) @@ -920,6 +925,11 @@ func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { *out = *in in.State.DeepCopyInto(&out.State) in.LastTerminationState.DeepCopyInto(&out.LastTerminationState) + if in.Started != nil { + in, out := &in.Started, &out.Started + *out = new(bool) + **out = **in + } return } @@ -1350,6 +1360,11 @@ func (in *EphemeralContainerCommon) DeepCopyInto(out *EphemeralContainerCommon) *out = new(Probe) (*in).DeepCopyInto(*out) } + if in.StartupProbe != nil { + in, out := &in.StartupProbe, &out.StartupProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle *out = new(Lifecycle) @@ -2189,7 +2204,7 @@ func (in *Namespace) DeepCopyInto(out *Namespace) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -2211,6 +2226,23 @@ func (in *Namespace) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceCondition) DeepCopyInto(out *NamespaceCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceCondition. +func (in *NamespaceCondition) DeepCopy() *NamespaceCondition { + if in == nil { + return nil + } + out := new(NamespaceCondition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamespaceList) DeepCopyInto(out *NamespaceList) { *out = *in @@ -2268,6 +2300,13 @@ func (in *NamespaceSpec) DeepCopy() *NamespaceSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamespaceStatus) DeepCopyInto(out *NamespaceStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]NamespaceCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -5142,6 +5181,11 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { *out = new(SessionAffinityConfig) (*in).DeepCopyInto(*out) } + if in.IPFamily != nil { + in, out := &in.IPFamily, &out.IPFamily + *out = new(IPFamily) + **out = **in + } return } diff --git a/vendor/k8s.io/api/discovery/v1alpha1/BUILD.bazel b/vendor/k8s.io/api/discovery/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..25c1e6ebdf --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/BUILD.bazel @@ -0,0 +1,25 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "generated.pb.go", + "register.go", + "types.go", + "types_swagger_doc_generated.go", + "well_known_labels.go", + "zz_generated.deepcopy.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/api/discovery/v1alpha1", + importpath = "k8s.io/api/discovery/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/gogo/protobuf/proto:go_default_library", + "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + ], +) diff --git a/vendor/k8s.io/api/discovery/v1alpha1/doc.go b/vendor/k8s.io/api/discovery/v1alpha1/doc.go new file mode 100644 index 0000000000..ffd6b0b54d --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/doc.go @@ -0,0 +1,22 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:openapi-gen=true +// +groupName=discovery.k8s.io + +package v1alpha1 // import "k8s.io/api/discovery/v1alpha1" diff --git a/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go b/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go new file mode 100644 index 0000000000..34f6b28d71 --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/generated.pb.go @@ -0,0 +1,1689 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + k8s_io_api_core_v1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_772f83c5b34e07a5, []int{0} +} +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return m.Size() +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *EndpointConditions) Reset() { *m = EndpointConditions{} } +func (*EndpointConditions) ProtoMessage() {} +func (*EndpointConditions) Descriptor() ([]byte, []int) { + return fileDescriptor_772f83c5b34e07a5, []int{1} +} +func (m *EndpointConditions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EndpointConditions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EndpointConditions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndpointConditions.Merge(m, src) +} +func (m *EndpointConditions) XXX_Size() int { + return m.Size() +} +func (m *EndpointConditions) XXX_DiscardUnknown() { + xxx_messageInfo_EndpointConditions.DiscardUnknown(m) +} + +var xxx_messageInfo_EndpointConditions proto.InternalMessageInfo + +func (m *EndpointPort) Reset() { *m = EndpointPort{} } +func (*EndpointPort) ProtoMessage() {} +func (*EndpointPort) Descriptor() ([]byte, []int) { + return fileDescriptor_772f83c5b34e07a5, []int{2} +} +func (m *EndpointPort) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EndpointPort) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndpointPort.Merge(m, src) +} +func (m *EndpointPort) XXX_Size() int { + return m.Size() +} +func (m *EndpointPort) XXX_DiscardUnknown() { + xxx_messageInfo_EndpointPort.DiscardUnknown(m) +} + +var xxx_messageInfo_EndpointPort proto.InternalMessageInfo + +func (m *EndpointSlice) Reset() { *m = EndpointSlice{} } +func (*EndpointSlice) ProtoMessage() {} +func (*EndpointSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_772f83c5b34e07a5, []int{3} +} +func (m *EndpointSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EndpointSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EndpointSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndpointSlice.Merge(m, src) +} +func (m *EndpointSlice) XXX_Size() int { + return m.Size() +} +func (m *EndpointSlice) XXX_DiscardUnknown() { + xxx_messageInfo_EndpointSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_EndpointSlice proto.InternalMessageInfo + +func (m *EndpointSliceList) Reset() { *m = EndpointSliceList{} } +func (*EndpointSliceList) ProtoMessage() {} +func (*EndpointSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_772f83c5b34e07a5, []int{4} +} +func (m *EndpointSliceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EndpointSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EndpointSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_EndpointSliceList.Merge(m, src) +} +func (m *EndpointSliceList) XXX_Size() int { + return m.Size() +} +func (m *EndpointSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_EndpointSliceList.DiscardUnknown(m) +} + +var xxx_messageInfo_EndpointSliceList proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Endpoint)(nil), "k8s.io.api.discovery.v1alpha1.Endpoint") + proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.discovery.v1alpha1.Endpoint.TopologyEntry") + proto.RegisterType((*EndpointConditions)(nil), "k8s.io.api.discovery.v1alpha1.EndpointConditions") + proto.RegisterType((*EndpointPort)(nil), "k8s.io.api.discovery.v1alpha1.EndpointPort") + proto.RegisterType((*EndpointSlice)(nil), "k8s.io.api.discovery.v1alpha1.EndpointSlice") + proto.RegisterType((*EndpointSliceList)(nil), "k8s.io.api.discovery.v1alpha1.EndpointSliceList") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/discovery/v1alpha1/generated.proto", fileDescriptor_772f83c5b34e07a5) +} + +var fileDescriptor_772f83c5b34e07a5 = []byte{ + // 728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4b, 0x6f, 0xd3, 0x4a, + 0x14, 0x8e, 0x9b, 0x5a, 0xb2, 0x27, 0x8d, 0xd4, 0x8e, 0xee, 0x22, 0xca, 0xbd, 0xd7, 0x8e, 0xc2, + 0x82, 0x48, 0x85, 0x31, 0xa9, 0x28, 0xaa, 0x60, 0x43, 0x8d, 0xca, 0x43, 0xe2, 0x11, 0x86, 0x2e, + 0x10, 0x62, 0xc1, 0xc4, 0x9e, 0x3a, 0x26, 0x89, 0xc7, 0xb2, 0x27, 0x91, 0xb2, 0xe3, 0x27, 0x20, + 0xf1, 0x77, 0x58, 0xb2, 0xe8, 0xb2, 0xcb, 0xae, 0x0c, 0x35, 0xff, 0xa2, 0x2b, 0x34, 0xe3, 0x57, + 0x4a, 0x78, 0x64, 0x37, 0xe7, 0x9b, 0xf3, 0x7d, 0xe7, 0x9c, 0x6f, 0xce, 0x80, 0x87, 0xe3, 0x83, + 0x18, 0xf9, 0xcc, 0x1a, 0xcf, 0x86, 0x34, 0x0a, 0x28, 0xa7, 0xb1, 0x35, 0xa7, 0x81, 0xcb, 0x22, + 0x2b, 0xbf, 0x20, 0xa1, 0x6f, 0xb9, 0x7e, 0xec, 0xb0, 0x39, 0x8d, 0x16, 0xd6, 0xbc, 0x4f, 0x26, + 0xe1, 0x88, 0xf4, 0x2d, 0x8f, 0x06, 0x34, 0x22, 0x9c, 0xba, 0x28, 0x8c, 0x18, 0x67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8, 0x7c, 0x48, 0x35, 0x2b, 0x23, 0xca, + 0x63, 0x89, 0x76, 0xbf, 0x6e, 0x80, 0x66, 0xd1, 0xd5, 0xab, 0x89, 0xef, 0x50, 0xf8, 0x0e, 0x68, + 0xe2, 0x87, 0xb8, 0x84, 0x13, 0xd9, 0x5a, 0x63, 0xef, 0xd6, 0xd2, 0x03, 0x94, 0x8b, 0x8e, 0xc2, + 0xb1, 0x27, 0x80, 0x18, 0x89, 0xec, 0xea, 0x8d, 0x9f, 0x51, 0x4e, 0xaa, 0x05, 0xab, 0x30, 0x5c, + 0xaa, 0xc2, 0xfb, 0xa0, 0x91, 0xaf, 0xf4, 0xf1, 0x22, 0xa4, 0x72, 0x6d, 0x74, 0xdb, 0x48, 0x13, + 0xb3, 0x71, 0x58, 0xc1, 0x97, 0x57, 0x43, 0xbc, 0x4c, 0x81, 0xaf, 0x81, 0x4e, 0xf3, 0xa6, 0xc5, + 0x37, 0x10, 0x5b, 0x72, 0x7d, 0xcd, 0x2d, 0xb1, 0x77, 0xf2, 0xde, 0xf4, 0x02, 0x89, 0x71, 0x25, + 0x06, 0x07, 0x40, 0x15, 0xbe, 0xc4, 0xad, 0xba, 0x54, 0xdd, 0x5d, 0x53, 0x55, 0x38, 0x6a, 0x37, + 0x73, 0x65, 0x55, 0x44, 0x31, 0xce, 0x84, 0xba, 0x5f, 0x14, 0xb0, 0x73, 0xc5, 0xe1, 0xa7, 0x7e, + 0xcc, 0xe1, 0xdb, 0x15, 0x97, 0xd1, 0x7a, 0x2e, 0x0b, 0xb6, 0xf4, 0xb8, 0xdc, 0xef, 0x02, 0x59, + 0x72, 0xf8, 0x25, 0x50, 0x7d, 0x4e, 0xa7, 0x85, 0x37, 0x37, 0xd6, 0x9c, 0x42, 0xb6, 0x57, 0x8d, + 0xf1, 0x44, 0x48, 0xe0, 0x4c, 0xc9, 0x46, 0xa7, 0x17, 0x46, 0xed, 0xec, 0xc2, 0xa8, 0x9d, 0x5f, + 0x18, 0xb5, 0x0f, 0xa9, 0xa1, 0x9c, 0xa6, 0x86, 0x72, 0x96, 0x1a, 0xca, 0x79, 0x6a, 0x28, 0xdf, + 0x52, 0x43, 0xf9, 0xf8, 0xdd, 0xa8, 0xbd, 0xd1, 0x0a, 0xcd, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x04, 0x9d, 0x1a, 0x33, 0x3e, 0x06, 0x00, 0x00, +} + +func (m *Endpoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Topology) > 0 { + keysForTopology := make([]string, 0, len(m.Topology)) + for k := range m.Topology { + keysForTopology = append(keysForTopology, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) + for iNdEx := len(keysForTopology) - 1; iNdEx >= 0; iNdEx-- { + v := m.Topology[string(keysForTopology[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForTopology[iNdEx]) + copy(dAtA[i:], keysForTopology[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForTopology[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if m.TargetRef != nil { + { + size, err := m.TargetRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Hostname != nil { + i -= len(*m.Hostname) + copy(dAtA[i:], *m.Hostname) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Hostname))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Conditions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *EndpointConditions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EndpointConditions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndpointConditions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Ready != nil { + i-- + if *m.Ready { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *EndpointPort) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EndpointPort) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndpointPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Port != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) + i-- + dAtA[i] = 0x18 + } + if m.Protocol != nil { + i -= len(*m.Protocol) + copy(dAtA[i:], *m.Protocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Protocol))) + i-- + dAtA[i] = 0x12 + } + if m.Name != nil { + i -= len(*m.Name) + copy(dAtA[i:], *m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EndpointSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EndpointSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndpointSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AddressType != nil { + i -= len(*m.AddressType) + copy(dAtA[i:], *m.AddressType) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.AddressType))) + i-- + dAtA[i] = 0x22 + } + if len(m.Ports) > 0 { + for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Endpoints) > 0 { + for iNdEx := len(m.Endpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Endpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EndpointSliceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EndpointSliceList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EndpointSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.Conditions.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TargetRef != nil { + l = m.TargetRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Topology) > 0 { + for k, v := range m.Topology { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + return n +} + +func (m *EndpointConditions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Ready != nil { + n += 2 + } + return n +} + +func (m *EndpointPort) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Port != nil { + n += 1 + sovGenerated(uint64(*m.Port)) + } + return n +} + +func (m *EndpointSlice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Endpoints) > 0 { + for _, e := range m.Endpoints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Ports) > 0 { + for _, e := range m.Ports { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.AddressType != nil { + l = len(*m.AddressType) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *EndpointSliceList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Endpoint) String() string { + if this == nil { + return "nil" + } + keysForTopology := make([]string, 0, len(this.Topology)) + for k := range this.Topology { + keysForTopology = append(keysForTopology, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForTopology) + mapStringForTopology := "map[string]string{" + for _, k := range keysForTopology { + mapStringForTopology += fmt.Sprintf("%v: %v,", k, this.Topology[k]) + } + mapStringForTopology += "}" + s := strings.Join([]string{`&Endpoint{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `Conditions:` + strings.Replace(strings.Replace(this.Conditions.String(), "EndpointConditions", "EndpointConditions", 1), `&`, ``, 1) + `,`, + `Hostname:` + valueToStringGenerated(this.Hostname) + `,`, + `TargetRef:` + strings.Replace(fmt.Sprintf("%v", this.TargetRef), "ObjectReference", "v1.ObjectReference", 1) + `,`, + `Topology:` + mapStringForTopology + `,`, + `}`, + }, "") + return s +} +func (this *EndpointConditions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EndpointConditions{`, + `Ready:` + valueToStringGenerated(this.Ready) + `,`, + `}`, + }, "") + return s +} +func (this *EndpointPort) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EndpointPort{`, + `Name:` + valueToStringGenerated(this.Name) + `,`, + `Protocol:` + valueToStringGenerated(this.Protocol) + `,`, + `Port:` + valueToStringGenerated(this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *EndpointSlice) String() string { + if this == nil { + return "nil" + } + repeatedStringForEndpoints := "[]Endpoint{" + for _, f := range this.Endpoints { + repeatedStringForEndpoints += strings.Replace(strings.Replace(f.String(), "Endpoint", "Endpoint", 1), `&`, ``, 1) + "," + } + repeatedStringForEndpoints += "}" + repeatedStringForPorts := "[]EndpointPort{" + for _, f := range this.Ports { + repeatedStringForPorts += strings.Replace(strings.Replace(f.String(), "EndpointPort", "EndpointPort", 1), `&`, ``, 1) + "," + } + repeatedStringForPorts += "}" + s := strings.Join([]string{`&EndpointSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Endpoints:` + repeatedStringForEndpoints + `,`, + `Ports:` + repeatedStringForPorts + `,`, + `AddressType:` + valueToStringGenerated(this.AddressType) + `,`, + `}`, + }, "") + return s +} +func (this *EndpointSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]EndpointSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "EndpointSlice", "EndpointSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&EndpointSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Endpoint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Conditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TargetRef == nil { + m.TargetRef = &v1.ObjectReference{} + } + if err := m.TargetRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Topology", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Topology == nil { + m.Topology = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Topology[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EndpointConditions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EndpointConditions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EndpointConditions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Ready", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Ready = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EndpointPort) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EndpointPort: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EndpointPort: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_api_core_v1.Protocol(dAtA[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EndpointSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EndpointSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EndpointSlice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Endpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Endpoints = append(m.Endpoints, Endpoint{}) + if err := m.Endpoints[len(m.Endpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ports = append(m.Ports, EndpointPort{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddressType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := AddressType(dAtA[iNdEx:postIndex]) + m.AddressType = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EndpointSliceList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EndpointSliceList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EndpointSliceList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, EndpointSlice{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/k8s.io/api/discovery/v1alpha1/generated.proto b/vendor/k8s.io/api/discovery/v1alpha1/generated.proto new file mode 100644 index 0000000000..f14f37fd04 --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/generated.proto @@ -0,0 +1,148 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.api.discovery.v1alpha1; + +import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// Endpoint represents a single logical "backend" implementing a service. +message Endpoint { + // addresses of this endpoint. The contents of this field are interpreted + // according to the corresponding EndpointSlice addressType field. This + // allows for cases like dual-stack (IPv4 and IPv6) networking. Consumers + // (e.g. kube-proxy) must handle different types of addresses in the context + // of their own capabilities. This must contain at least one address but no + // more than 100. + // +listType=set + repeated string addresses = 1; + + // conditions contains information about the current status of the endpoint. + optional EndpointConditions conditions = 2; + + // hostname of this endpoint. This field may be used by consumers of + // endpoints to distinguish endpoints from each other (e.g. in DNS names). + // Multiple endpoints which use the same hostname should be considered + // fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) + // validation. + // +optional + optional string hostname = 3; + + // targetRef is a reference to a Kubernetes object that represents this + // endpoint. + // +optional + optional k8s.io.api.core.v1.ObjectReference targetRef = 4; + + // topology contains arbitrary topology information associated with the + // endpoint. These key/value pairs must conform with the label format. + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // Topology may include a maximum of 16 key/value pairs. This includes, but + // is not limited to the following well known keys: + // * kubernetes.io/hostname: the value indicates the hostname of the node + // where the endpoint is located. This should match the corresponding + // node label. + // * topology.kubernetes.io/zone: the value indicates the zone where the + // endpoint is located. This should match the corresponding node label. + // * topology.kubernetes.io/region: the value indicates the region where the + // endpoint is located. This should match the corresponding node label. + // +optional + map topology = 5; +} + +// EndpointConditions represents the current condition of an endpoint. +message EndpointConditions { + // ready indicates that this endpoint is prepared to receive traffic, + // according to whatever system is managing the endpoint. A nil value + // indicates an unknown state. In most cases consumers should interpret this + // unknown state as ready. + // +optional + optional bool ready = 1; +} + +// EndpointPort represents a Port used by an EndpointSlice +message EndpointPort { + // The name of this port. All ports in an EndpointSlice must have a unique + // name. If the EndpointSlice is dervied from a Kubernetes service, this + // corresponds to the Service.ports[].name. + // Name must either be an empty string or pass IANA_SVC_NAME validation: + // * must be no more than 15 characters long + // * may contain only [-a-z0-9] + // * must contain at least one letter [a-z] + // * it must not start or end with a hyphen, nor contain adjacent hyphens + // Default is empty string. + optional string name = 1; + + // The IP protocol for this port. + // Must be UDP, TCP, or SCTP. + // Default is TCP. + optional string protocol = 2; + + // The port number of the endpoint. + // If this is not specified, ports are not restricted and must be + // interpreted in the context of the specific consumer. + optional int32 port = 3; +} + +// EndpointSlice represents a subset of the endpoints that implement a service. +// For a given service there may be multiple EndpointSlice objects, selected by +// labels, which must be joined to produce the full set of endpoints. +message EndpointSlice { + // Standard object's metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // addressType specifies the type of address carried by this EndpointSlice. + // All addresses in this slice must be the same type. + // Default is IP + // +optional + optional string addressType = 4; + + // endpoints is a list of unique endpoints in this slice. Each slice may + // include a maximum of 1000 endpoints. + // +listType=atomic + repeated Endpoint endpoints = 2; + + // ports specifies the list of network ports exposed by each endpoint in + // this slice. Each port must have a unique name. When ports is empty, it + // indicates that there are no defined ports. When a port is defined with a + // nil port value, it indicates "all ports". Each slice may include a + // maximum of 100 ports. + // +optional + // +listType=atomic + repeated EndpointPort ports = 3; +} + +// EndpointSliceList represents a list of endpoint slices +message EndpointSliceList { + // Standard list metadata. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of endpoint slices + // +listType=set + repeated EndpointSlice items = 2; +} + diff --git a/vendor/k8s.io/api/discovery/v1alpha1/register.go b/vendor/k8s.io/api/discovery/v1alpha1/register.go new file mode 100644 index 0000000000..55b73f992f --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/register.go @@ -0,0 +1,56 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name used in this package +const GroupName = "discovery.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // SchemeBuilder is the scheme builder with scheme init functions to run for this API package + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &EndpointSlice{}, + &EndpointSliceList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/api/discovery/v1alpha1/types.go b/vendor/k8s.io/api/discovery/v1alpha1/types.go new file mode 100644 index 0000000000..0de6082aee --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/types.go @@ -0,0 +1,144 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// EndpointSlice represents a subset of the endpoints that implement a service. +// For a given service there may be multiple EndpointSlice objects, selected by +// labels, which must be joined to produce the full set of endpoints. +type EndpointSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // addressType specifies the type of address carried by this EndpointSlice. + // All addresses in this slice must be the same type. + // Default is IP + // +optional + AddressType *AddressType `json:"addressType" protobuf:"bytes,4,rep,name=addressType"` + // endpoints is a list of unique endpoints in this slice. Each slice may + // include a maximum of 1000 endpoints. + // +listType=atomic + Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"` + // ports specifies the list of network ports exposed by each endpoint in + // this slice. Each port must have a unique name. When ports is empty, it + // indicates that there are no defined ports. When a port is defined with a + // nil port value, it indicates "all ports". Each slice may include a + // maximum of 100 ports. + // +optional + // +listType=atomic + Ports []EndpointPort `json:"ports" protobuf:"bytes,3,rep,name=ports"` +} + +// AddressType represents the type of address referred to by an endpoint. +type AddressType string + +const ( + // AddressTypeIP represents an IP Address. + AddressTypeIP = AddressType("IP") +) + +// Endpoint represents a single logical "backend" implementing a service. +type Endpoint struct { + // addresses of this endpoint. The contents of this field are interpreted + // according to the corresponding EndpointSlice addressType field. This + // allows for cases like dual-stack (IPv4 and IPv6) networking. Consumers + // (e.g. kube-proxy) must handle different types of addresses in the context + // of their own capabilities. This must contain at least one address but no + // more than 100. + // +listType=set + Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` + // conditions contains information about the current status of the endpoint. + Conditions EndpointConditions `json:"conditions,omitempty" protobuf:"bytes,2,opt,name=conditions"` + // hostname of this endpoint. This field may be used by consumers of + // endpoints to distinguish endpoints from each other (e.g. in DNS names). + // Multiple endpoints which use the same hostname should be considered + // fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) + // validation. + // +optional + Hostname *string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"` + // targetRef is a reference to a Kubernetes object that represents this + // endpoint. + // +optional + TargetRef *v1.ObjectReference `json:"targetRef,omitempty" protobuf:"bytes,4,opt,name=targetRef"` + // topology contains arbitrary topology information associated with the + // endpoint. These key/value pairs must conform with the label format. + // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + // Topology may include a maximum of 16 key/value pairs. This includes, but + // is not limited to the following well known keys: + // * kubernetes.io/hostname: the value indicates the hostname of the node + // where the endpoint is located. This should match the corresponding + // node label. + // * topology.kubernetes.io/zone: the value indicates the zone where the + // endpoint is located. This should match the corresponding node label. + // * topology.kubernetes.io/region: the value indicates the region where the + // endpoint is located. This should match the corresponding node label. + // +optional + Topology map[string]string `json:"topology,omitempty" protobuf:"bytes,5,opt,name=topology"` +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditions struct { + // ready indicates that this endpoint is prepared to receive traffic, + // according to whatever system is managing the endpoint. A nil value + // indicates an unknown state. In most cases consumers should interpret this + // unknown state as ready. + // +optional + Ready *bool `json:"ready,omitempty" protobuf:"bytes,1,name=ready"` +} + +// EndpointPort represents a Port used by an EndpointSlice +type EndpointPort struct { + // The name of this port. All ports in an EndpointSlice must have a unique + // name. If the EndpointSlice is dervied from a Kubernetes service, this + // corresponds to the Service.ports[].name. + // Name must either be an empty string or pass IANA_SVC_NAME validation: + // * must be no more than 15 characters long + // * may contain only [-a-z0-9] + // * must contain at least one letter [a-z] + // * it must not start or end with a hyphen, nor contain adjacent hyphens + // Default is empty string. + Name *string `json:"name,omitempty" protobuf:"bytes,1,name=name"` + // The IP protocol for this port. + // Must be UDP, TCP, or SCTP. + // Default is TCP. + Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,name=protocol"` + // The port number of the endpoint. + // If this is not specified, ports are not restricted and must be + // interpreted in the context of the specific consumer. + Port *int32 `json:"port,omitempty" protobuf:"bytes,3,opt,name=port"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// EndpointSliceList represents a list of endpoint slices +type EndpointSliceList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of endpoint slices + // +listType=set + Items []EndpointSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/k8s.io/api/discovery/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/discovery/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 0000000000..a524bcd68e --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,85 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_Endpoint = map[string]string{ + "": "Endpoint represents a single logical \"backend\" implementing a service.", + "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. This allows for cases like dual-stack (IPv4 and IPv6) networking. Consumers (e.g. kube-proxy) must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", + "conditions": "conditions contains information about the current status of the endpoint.", + "hostname": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.", + "targetRef": "targetRef is a reference to a Kubernetes object that represents this endpoint.", + "topology": "topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node\n where the endpoint is located. This should match the corresponding\n node label.\n* topology.kubernetes.io/zone: the value indicates the zone where the\n endpoint is located. This should match the corresponding node label.\n* topology.kubernetes.io/region: the value indicates the region where the\n endpoint is located. This should match the corresponding node label.", +} + +func (Endpoint) SwaggerDoc() map[string]string { + return map_Endpoint +} + +var map_EndpointConditions = map[string]string{ + "": "EndpointConditions represents the current condition of an endpoint.", + "ready": "ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready.", +} + +func (EndpointConditions) SwaggerDoc() map[string]string { + return map_EndpointConditions +} + +var map_EndpointPort = map[string]string{ + "": "EndpointPort represents a Port used by an EndpointSlice", + "name": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass IANA_SVC_NAME validation: * must be no more than 15 characters long * may contain only [-a-z0-9] * must contain at least one letter [a-z] * it must not start or end with a hyphen, nor contain adjacent hyphens Default is empty string.", + "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", + "port": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", +} + +func (EndpointPort) SwaggerDoc() map[string]string { + return map_EndpointPort +} + +var map_EndpointSlice = map[string]string{ + "": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", + "metadata": "Standard object's metadata.", + "addressType": "addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. Default is IP", + "endpoints": "endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.", + "ports": "ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates \"all ports\". Each slice may include a maximum of 100 ports.", +} + +func (EndpointSlice) SwaggerDoc() map[string]string { + return map_EndpointSlice +} + +var map_EndpointSliceList = map[string]string{ + "": "EndpointSliceList represents a list of endpoint slices", + "metadata": "Standard list metadata.", + "items": "List of endpoint slices", +} + +func (EndpointSliceList) SwaggerDoc() map[string]string { + return map_EndpointSliceList +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/discovery/v1alpha1/well_known_labels.go b/vendor/k8s.io/api/discovery/v1alpha1/well_known_labels.go new file mode 100644 index 0000000000..850cd20592 --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/well_known_labels.go @@ -0,0 +1,22 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +const ( + // LabelServiceName is used to indicate the name of a Kubernetes service. + LabelServiceName = "kubernetes.io/service-name" +) diff --git a/vendor/k8s.io/api/discovery/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/discovery/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..e424fccf3b --- /dev/null +++ b/vendor/k8s.io/api/discovery/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,195 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + *out = *in + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.Conditions.DeepCopyInto(&out.Conditions) + if in.Hostname != nil { + in, out := &in.Hostname, &out.Hostname + *out = new(string) + **out = **in + } + if in.TargetRef != nil { + in, out := &in.TargetRef, &out.TargetRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.Topology != nil { + in, out := &in.Topology, &out.Topology + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointConditions) DeepCopyInto(out *EndpointConditions) { + *out = *in + if in.Ready != nil { + in, out := &in.Ready, &out.Ready + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointConditions. +func (in *EndpointConditions) DeepCopy() *EndpointConditions { + if in == nil { + return nil + } + out := new(EndpointConditions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointPort) DeepCopyInto(out *EndpointPort) { + *out = *in + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Protocol != nil { + in, out := &in.Protocol, &out.Protocol + *out = new(v1.Protocol) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPort. +func (in *EndpointPort) DeepCopy() *EndpointPort { + if in == nil { + return nil + } + out := new(EndpointPort) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSlice) DeepCopyInto(out *EndpointSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.AddressType != nil { + in, out := &in.AddressType, &out.AddressType + *out = new(AddressType) + **out = **in + } + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]Endpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]EndpointPort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSlice. +func (in *EndpointSlice) DeepCopy() *EndpointSlice { + if in == nil { + return nil + } + out := new(EndpointSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EndpointSlice) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSliceList) DeepCopyInto(out *EndpointSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]EndpointSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceList. +func (in *EndpointSliceList) DeepCopy() *EndpointSliceList { + if in == nil { + return nil + } + out := new(EndpointSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EndpointSliceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/k8s.io/api/events/v1beta1/generated.proto b/vendor/k8s.io/api/events/v1beta1/generated.proto index 04eacbb280..58f5aa422f 100644 --- a/vendor/k8s.io/api/events/v1beta1/generated.proto +++ b/vendor/k8s.io/api/events/v1beta1/generated.proto @@ -98,7 +98,7 @@ message Event { // EventList is a list of Event objects. message EventList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/events/v1beta1/types.go b/vendor/k8s.io/api/events/v1beta1/types.go index eef4564532..0571fbb2e8 100644 --- a/vendor/k8s.io/api/events/v1beta1/types.go +++ b/vendor/k8s.io/api/events/v1beta1/types.go @@ -43,11 +43,11 @@ type Event struct { // ID of the controller instance, e.g. `kubelet-xyzf`. // +optional - ReportingInstance string `json:"reportingInstance,omitemtpy" protobuf:"bytes,5,opt,name=reportingInstance"` + ReportingInstance string `json:"reportingInstance,omitempty" protobuf:"bytes,5,opt,name=reportingInstance"` // What action was taken/failed regarding to the regarding object. // +optional - Action string `json:"action,omitemtpy" protobuf:"bytes,6,name=action"` + Action string `json:"action,omitempty" protobuf:"bytes,6,name=action"` // Why the action was taken. Reason string `json:"reason,omitempty" protobuf:"bytes,7,name=reason"` @@ -114,7 +114,7 @@ const ( type EventList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go index bbc91ed9b3..639daca6da 100644 --- a/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go @@ -51,7 +51,7 @@ func (Event) SwaggerDoc() map[string]string { var map_EventList = map[string]string{ "": "EventList is a list of Event objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/vendor/k8s.io/api/extensions/v1beta1/generated.proto index 18d4813671..6c90cb3c45 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -873,7 +873,6 @@ message PodSecurityPolicySpec { // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. - // This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate. // +optional repeated AllowedCSIDriver allowedCSIDrivers = 23; diff --git a/vendor/k8s.io/api/extensions/v1beta1/types.go b/vendor/k8s.io/api/extensions/v1beta1/types.go index 6e9b58d76b..8f581ef1d5 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -930,7 +930,6 @@ type PodSecurityPolicySpec struct { AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"` // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. - // This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate. // +optional AllowedCSIDrivers []AllowedCSIDriver `json:"allowedCSIDrivers,omitempty" protobuf:"bytes,23,rep,name=allowedCSIDrivers"` // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. diff --git a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index 719c1548bc..a7eb2ec907 100644 --- a/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -470,7 +470,7 @@ var map_PodSecurityPolicySpec = map[string]string{ "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", "allowedHostPaths": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", - "allowedCSIDrivers": "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is an alpha field, and is only honored if the API server enables the CSIInlineVolume feature gate.", + "allowedCSIDrivers": "AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.", "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", "allowedProcMountTypes": "AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.", diff --git a/vendor/k8s.io/api/networking/v1beta1/generated.proto b/vendor/k8s.io/api/networking/v1beta1/generated.proto index 7df19138e2..a72545c813 100644 --- a/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -64,17 +64,17 @@ message HTTPIngressRuleValue { // based virtual hosting etc. message Ingress { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Spec is the desired state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional IngressSpec spec = 2; // Status is the current state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional IngressStatus status = 3; } @@ -91,7 +91,7 @@ message IngressBackend { // IngressList is a collection of Ingress. message IngressList { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/networking/v1beta1/types.go b/vendor/k8s.io/api/networking/v1beta1/types.go index 63bf2d52a3..37277bf816 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types.go +++ b/vendor/k8s.io/api/networking/v1beta1/types.go @@ -32,17 +32,17 @@ import ( type Ingress struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec is the desired state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status is the current state of the Ingress. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -53,7 +53,7 @@ type Ingress struct { type IngressList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go index 9e05b7f1bb..4ae5e32d01 100644 --- a/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/networking/v1beta1/types_swagger_doc_generated.go @@ -48,9 +48,9 @@ func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { var map_Ingress = map[string]string{ "": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "status": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Ingress) SwaggerDoc() map[string]string { @@ -69,7 +69,7 @@ func (IngressBackend) SwaggerDoc() map[string]string { var map_IngressList = map[string]string{ "": "IngressList is a collection of Ingress.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of Ingress.", } diff --git a/vendor/k8s.io/api/node/v1alpha1/generated.proto b/vendor/k8s.io/api/node/v1alpha1/generated.proto index 25d3515643..ac05f839eb 100644 --- a/vendor/k8s.io/api/node/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/node/v1alpha1/generated.proto @@ -45,19 +45,19 @@ message Overhead { // pod. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md message RuntimeClass { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the RuntimeClass - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status optional RuntimeClassSpec spec = 2; } // RuntimeClassList is a list of RuntimeClass objects. message RuntimeClassList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/node/v1alpha1/types.go b/vendor/k8s.io/api/node/v1alpha1/types.go index 035aac4aa0..b59767107c 100644 --- a/vendor/k8s.io/api/node/v1alpha1/types.go +++ b/vendor/k8s.io/api/node/v1alpha1/types.go @@ -34,12 +34,12 @@ import ( // https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md type RuntimeClass struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the RuntimeClass - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Spec RuntimeClassSpec `json:"spec" protobuf:"bytes,2,name=spec"` } @@ -107,7 +107,7 @@ type Scheduling struct { type RuntimeClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go index 6868fec220..3900001723 100644 --- a/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go @@ -38,8 +38,8 @@ func (Overhead) SwaggerDoc() map[string]string { var map_RuntimeClass = map[string]string{ "": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "spec": "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (RuntimeClass) SwaggerDoc() map[string]string { @@ -48,7 +48,7 @@ func (RuntimeClass) SwaggerDoc() map[string]string { var map_RuntimeClassList = map[string]string{ "": "RuntimeClassList is a list of RuntimeClass objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/node/v1beta1/generated.proto b/vendor/k8s.io/api/node/v1beta1/generated.proto index 07ff350e63..49166798da 100644 --- a/vendor/k8s.io/api/node/v1beta1/generated.proto +++ b/vendor/k8s.io/api/node/v1beta1/generated.proto @@ -45,7 +45,7 @@ message Overhead { // pod. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md message RuntimeClass { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -79,7 +79,7 @@ message RuntimeClass { // RuntimeClassList is a list of RuntimeClass objects. message RuntimeClassList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/node/v1beta1/types.go b/vendor/k8s.io/api/node/v1beta1/types.go index fbf9461b1c..793a48f62b 100644 --- a/vendor/k8s.io/api/node/v1beta1/types.go +++ b/vendor/k8s.io/api/node/v1beta1/types.go @@ -34,7 +34,7 @@ import ( // https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md type RuntimeClass struct { metav1.TypeMeta `json:",inline"` - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -97,7 +97,7 @@ type Scheduling struct { type RuntimeClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go index 9c16c9e7be..681f73f23c 100644 --- a/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go @@ -38,7 +38,7 @@ func (Overhead) SwaggerDoc() map[string]string { var map_RuntimeClass = map[string]string{ "": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md", - "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "handler": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.", "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.", "scheduling": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", @@ -50,7 +50,7 @@ func (RuntimeClass) SwaggerDoc() map[string]string { var map_RuntimeClassList = map[string]string{ "": "RuntimeClassList is a list of RuntimeClass objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/policy/v1beta1/generated.proto b/vendor/k8s.io/api/policy/v1beta1/generated.proto index a1173a61c6..7be0a7f7a4 100644 --- a/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -186,7 +186,7 @@ message PodDisruptionBudgetStatus { // that will be applied to a pod and container. message PodSecurityPolicy { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -198,7 +198,7 @@ message PodSecurityPolicy { // PodSecurityPolicyList is a list of PodSecurityPolicy objects. message PodSecurityPolicyList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/policy/v1beta1/types.go b/vendor/k8s.io/api/policy/v1beta1/types.go index a59df9840d..b3001bb5c0 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/vendor/k8s.io/api/policy/v1beta1/types.go @@ -134,7 +134,7 @@ type Eviction struct { type PodSecurityPolicy struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -480,7 +480,7 @@ const AllowAllRuntimeClassNames = "*" type PodSecurityPolicyList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go index eb2eec9333..0bbc48f9f8 100644 --- a/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go @@ -140,7 +140,7 @@ func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string { var map_PodSecurityPolicy = map[string]string{ "": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "spec defines the policy enforced.", } @@ -150,7 +150,7 @@ func (PodSecurityPolicy) SwaggerDoc() map[string]string { var map_PodSecurityPolicyList = map[string]string{ "": "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is a list of schema objects.", } diff --git a/vendor/k8s.io/api/scheduling/v1/generated.proto b/vendor/k8s.io/api/scheduling/v1/generated.proto index ada9eaf85b..82f6e0a21a 100644 --- a/vendor/k8s.io/api/scheduling/v1/generated.proto +++ b/vendor/k8s.io/api/scheduling/v1/generated.proto @@ -33,7 +33,7 @@ option go_package = "v1"; // integer value. The value can be any valid integer. message PriorityClass { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -65,7 +65,7 @@ message PriorityClass { // PriorityClassList is a collection of priority classes. message PriorityClassList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/scheduling/v1/types.go b/vendor/k8s.io/api/scheduling/v1/types.go index e91842ec4d..087ee10d83 100644 --- a/vendor/k8s.io/api/scheduling/v1/types.go +++ b/vendor/k8s.io/api/scheduling/v1/types.go @@ -30,7 +30,7 @@ import ( type PriorityClass struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -65,7 +65,7 @@ type PriorityClass struct { type PriorityClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go index 853f255d52..4cfb9d3e35 100644 --- a/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PriorityClass = map[string]string{ "": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", @@ -42,7 +42,7 @@ func (PriorityClass) SwaggerDoc() map[string]string { var map_PriorityClassList = map[string]string{ "": "PriorityClassList is a collection of priority classes.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of PriorityClasses", } diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto index 584a2918a2..682fb87363 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto @@ -34,7 +34,7 @@ option go_package = "v1alpha1"; // integer value. The value can be any valid integer. message PriorityClass { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -66,7 +66,7 @@ message PriorityClass { // PriorityClassList is a collection of priority classes. message PriorityClassList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types.go b/vendor/k8s.io/api/scheduling/v1alpha1/types.go index c1a09bce8e..86a2c5130e 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/types.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/types.go @@ -31,7 +31,7 @@ import ( type PriorityClass struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -66,7 +66,7 @@ type PriorityClass struct { type PriorityClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go index f9880922a1..63a9a353cb 100644 --- a/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PriorityClass = map[string]string{ "": "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", @@ -42,7 +42,7 @@ func (PriorityClass) SwaggerDoc() map[string]string { var map_PriorityClassList = map[string]string{ "": "PriorityClassList is a collection of priority classes.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of PriorityClasses", } diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index df7823593e..4087b7e5d3 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -36,7 +36,7 @@ option go_package = "v1"; // according to etcd is in ObjectMeta.Name. message StorageClass { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -80,7 +80,7 @@ message StorageClass { // StorageClassList is a collection of storage classes. message StorageClassList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -94,7 +94,7 @@ message StorageClassList { // VolumeAttachment objects are non-namespaced. message VolumeAttachment { // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -112,7 +112,7 @@ message VolumeAttachment { // VolumeAttachmentList is a collection of VolumeAttachment objects. message VolumeAttachmentList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index 21531c9e14..e42ee5e9c5 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -33,7 +33,7 @@ import ( type StorageClass struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -80,7 +80,7 @@ type StorageClass struct { type StorageClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -115,7 +115,7 @@ type VolumeAttachment struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -136,7 +136,7 @@ type VolumeAttachment struct { type VolumeAttachmentList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index e31dd7f712..78ff19c211 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_StorageClass = map[string]string{ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "provisioner": "Provisioner indicates the type of the provisioner.", "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", "reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", @@ -45,7 +45,7 @@ func (StorageClass) SwaggerDoc() map[string]string { var map_StorageClassList = map[string]string{ "": "StorageClassList is a collection of storage classes.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of StorageClasses", } @@ -55,7 +55,7 @@ func (StorageClassList) SwaggerDoc() map[string]string { var map_VolumeAttachment = map[string]string{ "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", - "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", } @@ -66,7 +66,7 @@ func (VolumeAttachment) SwaggerDoc() map[string]string { var map_VolumeAttachmentList = map[string]string{ "": "VolumeAttachmentList is a collection of VolumeAttachment objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of VolumeAttachments", } diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto index 57a8357384..7601963924 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -35,7 +35,7 @@ option go_package = "v1alpha1"; // VolumeAttachment objects are non-namespaced. message VolumeAttachment { // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -53,7 +53,7 @@ message VolumeAttachment { // VolumeAttachmentList is a collection of VolumeAttachment objects. message VolumeAttachmentList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/storage/v1alpha1/types.go b/vendor/k8s.io/api/storage/v1alpha1/types.go index 76ad6dc0dd..39408857c2 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -33,7 +33,7 @@ type VolumeAttachment struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -54,7 +54,7 @@ type VolumeAttachment struct { type VolumeAttachmentList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index 3701b08640..2e82161664 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_VolumeAttachment = map[string]string{ "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", - "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", } @@ -40,7 +40,7 @@ func (VolumeAttachment) SwaggerDoc() map[string]string { var map_VolumeAttachmentList = map[string]string{ "": "VolumeAttachmentList is a collection of VolumeAttachment objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of VolumeAttachments", } diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index 677d366f5e..cd35af34f8 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -520,89 +520,91 @@ func init() { } var fileDescriptor_7d2980599fd0de80 = []byte{ - // 1311 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xc6, 0xf9, 0x1c, 0x27, 0xad, 0x33, 0x8d, 0xc0, 0xf8, 0x60, 0x47, 0x46, 0xd0, 0xb4, - 0x6a, 0xd7, 0x6d, 0x55, 0xaa, 0xaa, 0x12, 0x87, 0x6c, 0x1a, 0x09, 0xb7, 0x75, 0x1a, 0x26, 0x51, - 0x85, 0x2a, 0x0e, 0x8c, 0x77, 0xdf, 0x3a, 0xdb, 0x78, 0x77, 0xb6, 0x33, 0x63, 0x43, 0x6e, 0x9c, - 0xe0, 0x8a, 0x38, 0xf0, 0x0b, 0xf8, 0x0b, 0x20, 0xc1, 0x85, 0x23, 0x3d, 0xa1, 0x8a, 0x53, 0x4f, - 0x16, 0x5d, 0x7e, 0x02, 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0x65, 0xb0, 0x4b, 0x5b, 0xe8, 0xdd, 0x09, 0x0d, - 0x3a, 0xd3, 0xbb, 0xf2, 0x8d, 0x85, 0xb2, 0x31, 0xf0, 0x23, 0x34, 0xa3, 0xfe, 0x6a, 0x9a, 0x0d, - 0x73, 0xf5, 0x74, 0x1b, 0x66, 0xcf, 0x0f, 0x20, 0x5d, 0x94, 0xea, 0x44, 0x34, 0x0a, 0xbe, 0x82, - 0xe6, 0x03, 0x10, 0x82, 0xb6, 0x4c, 0xe4, 0xf4, 0xab, 0xaf, 0x91, 0x88, 0xc9, 0xb1, 0xbe, 0x7a, - 0x07, 0x5d, 0x1a, 0xf3, 0x1d, 0x8d, 0x2b, 0x68, 0xd6, 0xd5, 0xff, 0x85, 0x54, 0x42, 0xb3, 0xce, - 0xa2, 0xda, 0x32, 0x9b, 0xfa, 0x2f, 0x50, 0x22, 0x77, 0xae, 0xbf, 0x7c, 0x53, 0x9e, 0x7a, 0xf5, - 0xa6, 0x3c, 0xf5, 0xfa, 0x4d, 0x79, 0xea, 0xeb, 0xb8, 0x6c, 0xbd, 0x8c, 0xcb, 0xd6, 0xab, 0xb8, - 0x6c, 0xbd, 0x8e, 0xcb, 0xd6, 0x5f, 0x71, 0xd9, 0xfa, 0xee, 0xef, 0xf2, 0xd4, 0xd3, 0x79, 0xd3, - 0xef, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xce, 0x65, 0xbb, 0xc7, 0x7f, 0x10, 0x00, 0x00, + // 1344 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xbd, 0x6f, 0xdb, 0x46, + 0x1b, 0x37, 0x2d, 0x7f, 0x9e, 0xec, 0x44, 0xbe, 0x18, 0xef, 0xab, 0x57, 0x83, 0x64, 0xe8, 0x45, + 0x1b, 0x27, 0x48, 0xc8, 0x24, 0x48, 0x83, 0x20, 0x40, 0x07, 0xd3, 0x31, 0x50, 0x25, 0x96, 0xe3, + 0x9e, 0x8d, 0xa0, 0x08, 0x3a, 0xf4, 0x44, 0x3e, 0x91, 0x19, 0x93, 0x3c, 0x86, 0x3c, 0xa9, 0xd5, + 0xd6, 0xa9, 0x73, 0xd1, 0xa1, 0x7f, 0x41, 0xff, 0x85, 0x16, 0x68, 0x97, 0x8e, 0xcd, 0x54, 0x04, + 0x9d, 0x32, 0x09, 0x0d, 0xbb, 0x76, 0xeb, 0x66, 0x74, 0x28, 0xee, 0x78, 0x12, 0x29, 0x89, 0x8a, + 0xed, 0x0e, 0xde, 0x78, 0xcf, 0xc7, 0xef, 0xf9, 0x7e, 0xee, 0x88, 0xb6, 0x8f, 0xef, 0x47, 0xba, + 0xc3, 0x8c, 0xe3, 0x4e, 0x0b, 0x42, 0x1f, 0x38, 0x44, 0x46, 0x17, 0x7c, 0x9b, 0x85, 0x86, 0x62, + 0xd0, 0xc0, 0x31, 0x22, 0xce, 0x42, 0xda, 0x06, 0xa3, 0x7b, 0xbb, 0x05, 0x9c, 0xde, 0x36, 0xda, + 0xe0, 0x43, 0x48, 0x39, 0xd8, 0x7a, 0x10, 0x32, 0xce, 0x70, 0x25, 0x91, 0xd5, 0x69, 0xe0, 0xe8, + 0x4a, 0x56, 0x57, 0xb2, 0x95, 0x9b, 0x6d, 0x87, 0x1f, 0x75, 0x5a, 0xba, 0xc5, 0x3c, 0xa3, 0xcd, + 0xda, 0xcc, 0x90, 0x2a, 0xad, 0xce, 0x73, 0x79, 0x92, 0x07, 0xf9, 0x95, 0x40, 0x55, 0xea, 0x19, + 0xb3, 0x16, 0x0b, 0x85, 0xcd, 0x71, 0x73, 0x95, 0xbb, 0xa9, 0x8c, 0x47, 0xad, 0x23, 0xc7, 0x87, + 0xb0, 0x67, 0x04, 0xc7, 0x6d, 0x41, 0x88, 0x0c, 0x0f, 0x38, 0xcd, 0xd3, 0x32, 0xa6, 0x69, 0x85, + 0x1d, 0x9f, 0x3b, 0x1e, 0x4c, 0x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 0x1f, 0xd5, 0x99, 0x67, 0x8b, + 0x2a, 0xdf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x72, 0xff, 0xde, 0x2e, 0xe4, 0x10, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { @@ -715,6 +717,15 @@ func (m *CSIDriverSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VolumeLifecycleModes) > 0 { + for iNdEx := len(m.VolumeLifecycleModes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.VolumeLifecycleModes[iNdEx]) + copy(dAtA[i:], m.VolumeLifecycleModes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeLifecycleModes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if m.PodInfoOnMount != nil { i-- if *m.PodInfoOnMount { @@ -1458,6 +1469,12 @@ func (m *CSIDriverSpec) Size() (n int) { if m.PodInfoOnMount != nil { n += 2 } + if len(m.VolumeLifecycleModes) > 0 { + for _, s := range m.VolumeLifecycleModes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1745,6 +1762,7 @@ func (this *CSIDriverSpec) String() string { s := strings.Join([]string{`&CSIDriverSpec{`, `AttachRequired:` + valueToStringGenerated(this.AttachRequired) + `,`, `PodInfoOnMount:` + valueToStringGenerated(this.PodInfoOnMount) + `,`, + `VolumeLifecycleModes:` + fmt.Sprintf("%v", this.VolumeLifecycleModes) + `,`, `}`, }, "") return s @@ -2265,6 +2283,38 @@ func (m *CSIDriverSpec) Unmarshal(dAtA []byte) error { } b := bool(v != 0) m.PodInfoOnMount = &b + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeLifecycleModes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeLifecycleModes = append(m.VolumeLifecycleModes, VolumeLifecycleMode(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto index 3bcc2139ca..bb2cf3450b 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -45,7 +45,7 @@ message CSIDriver { // The driver name must be 63 characters or less, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and // alphanumerics between. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Specification of the CSI Driver. @@ -55,7 +55,7 @@ message CSIDriver { // CSIDriverList is a collection of CSIDriver objects. message CSIDriverList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -93,8 +93,32 @@ message CSIDriverSpec { // "csi.storage.k8s.io/pod.name": pod.Name // "csi.storage.k8s.io/pod.namespace": pod.Namespace // "csi.storage.k8s.io/pod.uid": string(pod.UID) + // "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // defined by a CSIVolumeSource, otherwise "false" + // + // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only + // required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. + // Other drivers can leave pod info disabled and/or ignore this field. + // As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when + // deployed on such a cluster and the deployment determines which mode that is, for example + // via a command line parameter of the driver. // +optional optional bool podInfoOnMount = 2; + + // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. + // The default if the list is empty is "Persistent", which is the usage + // defined by the CSI specification and implemented in Kubernetes via the usual + // PV/PVC mechanism. + // The other mode is "Ephemeral". In this mode, volumes are defined inline + // inside the pod spec with CSIVolumeSource and their lifecycle is tied to + // the lifecycle of that pod. A driver has to be aware of this + // because it is only going to get a NodePublishVolume call for such a volume. + // For more information about implementing this mode, see + // https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html + // A driver can support one or more of these modes and + // more modes may be added in the future. + // +optional + repeated string volumeLifecycleModes = 3; } // CSINode holds information about all CSI drivers installed on a node. @@ -153,7 +177,7 @@ message CSINodeDriver { // CSINodeList is a collection of CSINode objects. message CSINodeList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -177,7 +201,7 @@ message CSINodeSpec { // according to etcd is in ObjectMeta.Name. message StorageClass { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -221,7 +245,7 @@ message StorageClass { // StorageClassList is a collection of storage classes. message StorageClassList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; @@ -235,7 +259,7 @@ message StorageClassList { // VolumeAttachment objects are non-namespaced. message VolumeAttachment { // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -253,7 +277,7 @@ message VolumeAttachment { // VolumeAttachmentList is a collection of VolumeAttachment objects. message VolumeAttachmentList { // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; diff --git a/vendor/k8s.io/api/storage/v1beta1/types.go b/vendor/k8s.io/api/storage/v1beta1/types.go index 762fcfcd00..fa1bae1d8d 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/vendor/k8s.io/api/storage/v1beta1/types.go @@ -33,7 +33,7 @@ import ( type StorageClass struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -80,7 +80,7 @@ type StorageClass struct { type StorageClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -115,7 +115,7 @@ type VolumeAttachment struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -136,7 +136,7 @@ type VolumeAttachment struct { type VolumeAttachmentList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -239,7 +239,7 @@ type CSIDriver struct { // The driver name must be 63 characters or less, beginning and ending with // an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and // alphanumerics between. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the CSI Driver. @@ -253,7 +253,7 @@ type CSIDriverList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -291,10 +291,59 @@ type CSIDriverSpec struct { // "csi.storage.k8s.io/pod.name": pod.Name // "csi.storage.k8s.io/pod.namespace": pod.Namespace // "csi.storage.k8s.io/pod.uid": string(pod.UID) + // "csi.storage.k8s.io/ephemeral": "true" iff the volume is an ephemeral inline volume + // defined by a CSIVolumeSource, otherwise "false" + // + // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only + // required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. + // Other drivers can leave pod info disabled and/or ignore this field. + // As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when + // deployed on such a cluster and the deployment determines which mode that is, for example + // via a command line parameter of the driver. // +optional PodInfoOnMount *bool `json:"podInfoOnMount,omitempty" protobuf:"bytes,2,opt,name=podInfoOnMount"` + + // VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. + // The default if the list is empty is "Persistent", which is the usage + // defined by the CSI specification and implemented in Kubernetes via the usual + // PV/PVC mechanism. + // The other mode is "Ephemeral". In this mode, volumes are defined inline + // inside the pod spec with CSIVolumeSource and their lifecycle is tied to + // the lifecycle of that pod. A driver has to be aware of this + // because it is only going to get a NodePublishVolume call for such a volume. + // For more information about implementing this mode, see + // https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html + // A driver can support one or more of these modes and + // more modes may be added in the future. + // +optional + VolumeLifecycleModes []VolumeLifecycleMode `json:"volumeLifecycleModes,omitempty" protobuf:"bytes,3,opt,name=volumeLifecycleModes"` } +// VolumeLifecycleMode is an enumeration of possible usage modes for a volume +// provided by a CSI driver. More modes may be added in the future. +type VolumeLifecycleMode string + +const ( + // VolumeLifecyclePersistent explicitly confirms that the driver implements + // the full CSI spec. It is the default when CSIDriverSpec.VolumeLifecycleModes is not + // set. Such volumes are managed in Kubernetes via the persistent volume + // claim mechanism and have a lifecycle that is independent of the pods which + // use them. + VolumeLifecyclePersistent VolumeLifecycleMode = "Persistent" + + // VolumeLifecycleEphemeral indicates that the driver can be used for + // ephemeral inline volumes. Such volumes are specified inside the pod + // spec with a CSIVolumeSource and, as far as Kubernetes is concerned, have + // a lifecycle that is tied to the lifecycle of the pod. For example, such + // a volume might contain data that gets created specifically for that pod, + // like secrets. + // But how the volume actually gets created and managed is entirely up to + // the driver. It might also use reference counting to share the same volume + // instance among different pods if the CSIVolumeSource of those pods is + // identical. + VolumeLifecycleEphemeral VolumeLifecycleMode = "Ephemeral" +) + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -380,7 +429,7 @@ type CSINodeList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index 0bc3456b97..fe80a8e507 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CSIDriver = map[string]string{ "": "CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.", - "metadata": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the CSI Driver.", } @@ -39,7 +39,7 @@ func (CSIDriver) SwaggerDoc() map[string]string { var map_CSIDriverList = map[string]string{ "": "CSIDriverList is a collection of CSIDriver objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of CSIDriver", } @@ -48,9 +48,10 @@ func (CSIDriverList) SwaggerDoc() map[string]string { } var map_CSIDriverSpec = map[string]string{ - "": "CSIDriverSpec is the specification of a CSIDriver.", - "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", - "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID)", + "": "CSIDriverSpec is the specification of a CSIDriver.", + "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.", + "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" iff the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.", + "volumeLifecycleModes": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.", } func (CSIDriverSpec) SwaggerDoc() map[string]string { @@ -81,7 +82,7 @@ func (CSINodeDriver) SwaggerDoc() map[string]string { var map_CSINodeList = map[string]string{ "": "CSINodeList is a collection of CSINode objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is the list of CSINode", } @@ -100,7 +101,7 @@ func (CSINodeSpec) SwaggerDoc() map[string]string { var map_StorageClass = map[string]string{ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "provisioner": "Provisioner indicates the type of the provisioner.", "parameters": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", "reclaimPolicy": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", @@ -116,7 +117,7 @@ func (StorageClass) SwaggerDoc() map[string]string { var map_StorageClassList = map[string]string{ "": "StorageClassList is a collection of storage classes.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of StorageClasses", } @@ -126,7 +127,7 @@ func (StorageClassList) SwaggerDoc() map[string]string { var map_VolumeAttachment = map[string]string{ "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", - "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.", "status": "Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.", } @@ -137,7 +138,7 @@ func (VolumeAttachment) SwaggerDoc() map[string]string { var map_VolumeAttachmentList = map[string]string{ "": "VolumeAttachmentList is a collection of VolumeAttachment objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of VolumeAttachments", } diff --git a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go index 6b4726559f..52433fcdf2 100644 --- a/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go @@ -98,6 +98,11 @@ func (in *CSIDriverSpec) DeepCopyInto(out *CSIDriverSpec) { *out = new(bool) **out = **in } + if in.VolumeLifecycleModes != nil { + in, out := &in.VolumeLifecycleModes, &out.VolumeLifecycleModes + *out = make([]VolumeLifecycleMode, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go index e72a3c18e0..178e91eedc 100644 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go +++ b/vendor/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go @@ -31,12 +31,15 @@ const ( // owner: @sttts, @nikhita // alpha: v1.8 // beta: v1.9 + // GA: v1.16 // // CustomResourceValidation is a list of validation methods for CustomResources CustomResourceValidation featuregate.Feature = "CustomResourceValidation" // owner: @roycaihw, @sttts // alpha: v1.14 + // beta: v1.15 + // GA: v1.16 // // CustomResourcePublishOpenAPI enables publishing of CRD OpenAPI specs. CustomResourcePublishOpenAPI featuregate.Feature = "CustomResourcePublishOpenAPI" @@ -44,12 +47,15 @@ const ( // owner: @sttts, @nikhita // alpha: v1.10 // beta: v1.11 + // GA: v1.16 // // CustomResourceSubresources defines the subresources for CustomResources CustomResourceSubresources featuregate.Feature = "CustomResourceSubresources" // owner: @mbohlool, @roycaihw // alpha: v1.13 + // beta: v1.15 + // GA: v1.16 // // CustomResourceWebhookConversion defines the webhook conversion for Custom Resources. CustomResourceWebhookConversion featuregate.Feature = "CustomResourceWebhookConversion" @@ -69,9 +75,9 @@ func init() { // To add a new feature, define a key for it above and add it here. The features will be // available throughout Kubernetes binaries. var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ - CustomResourceValidation: {Default: true, PreRelease: featuregate.Beta}, - CustomResourceSubresources: {Default: true, PreRelease: featuregate.Beta}, - CustomResourceWebhookConversion: {Default: true, PreRelease: featuregate.Beta}, - CustomResourcePublishOpenAPI: {Default: true, PreRelease: featuregate.Beta}, - CustomResourceDefaulting: {Default: false, PreRelease: featuregate.Alpha}, + CustomResourceValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + CustomResourceSubresources: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + CustomResourceWebhookConversion: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + CustomResourcePublishOpenAPI: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + CustomResourceDefaulting: {Default: true, PreRelease: featuregate.Beta}, } diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index f4201eb691..95d5c7a355 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -32,7 +32,9 @@ import ( const ( // StatusTooManyRequests means the server experienced too many requests within a // given window and that the client must wait to perform the action again. - StatusTooManyRequests = 429 + // DEPRECATED: please use http.StatusTooManyRequests, this will be removed in + // the future version. + StatusTooManyRequests = http.StatusTooManyRequests ) // StatusError is an error intended for consumption by a REST API server; it can also be @@ -349,7 +351,7 @@ func NewTimeoutError(message string, retryAfterSeconds int) *StatusError { func NewTooManyRequestsError(message string) *StatusError { return &StatusError{metav1.Status{ Status: metav1.StatusFailure, - Code: StatusTooManyRequests, + Code: http.StatusTooManyRequests, Reason: metav1.StatusReasonTooManyRequests, Message: fmt.Sprintf("Too many requests: %s", message), }} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto index acc9044452..18a6c7cd68 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -26,7 +26,7 @@ option go_package = "resource"; // Quantity is a fixed-point representation of a number. // It provides convenient marshaling/unmarshaling in JSON and YAML, -// in addition to String() and Int64() accessors. +// in addition to String() and AsInt64() accessors. // // The serialization format is: // diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go index b73b3b1414..516d041daf 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -29,7 +29,7 @@ import ( // Quantity is a fixed-point representation of a number. // It provides convenient marshaling/unmarshaling in JSON and YAML, -// in addition to String() and Int64() accessors. +// in addition to String() and AsInt64() accessors. // // The serialization format is: // @@ -726,21 +726,3 @@ func (q *Quantity) SetScaled(value int64, scale Scale) { q.d.Dec = nil q.i = int64Amount{value: value, scale: scale} } - -// Copy is a convenience function that makes a deep copy for you. Non-deep -// copies of quantities share pointers and you will regret that. -func (q *Quantity) Copy() *Quantity { - if q.d.Dec == nil { - return &Quantity{ - s: q.s, - i: q.i, - Format: q.Format, - } - } - tmp := &inf.Dec{} - return &Quantity{ - s: q.s, - d: infDecAmount{tmp.Set(q.d.Dec)}, - Format: q.Format, - } -} diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index cf668c7c81..90f566b14f 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -184,6 +184,7 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name allErrs = append(allErrs, ValidateAnnotations(meta.GetAnnotations(), fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidateOwnerReferences(meta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...) allErrs = append(allErrs, ValidateFinalizers(meta.GetFinalizers(), fldPath.Child("finalizers"))...) + allErrs = append(allErrs, v1validation.ValidateManagedFields(meta.GetManagedFields(), fldPath.Child("managedFields"))...) return allErrs } @@ -256,6 +257,7 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...) allErrs = append(allErrs, ValidateOwnerReferences(newMeta.GetOwnerReferences(), fldPath.Child("ownerReferences"))...) + allErrs = append(allErrs, v1validation.ValidateManagedFields(newMeta.GetManagedFields(), fldPath.Child("managedFields"))...) return allErrs } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD.bazel b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD.bazel index 71634c232d..54acb0fa38 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD.bazel +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD.bazel @@ -8,7 +8,6 @@ go_library( "deepcopy.go", "doc.go", "duration.go", - "fields_proto.go", "generated.pb.go", "group_version.go", "helpers.go", diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fields_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fields_proto.go deleted file mode 100644 index d403e76a41..0000000000 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/fields_proto.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "encoding/json" -) - -// Fields is declared in types.go - -// ProtoFields is a struct that is equivalent to Fields, but intended for -// protobuf marshalling/unmarshalling. It is generated into a serialization -// that matches Fields. Do not use in Go structs. -type ProtoFields struct { - // Map is the representation used in the alpha version of this API - Map map[string]Fields `json:"-" protobuf:"bytes,1,rep,name=map"` - - // Raw is the underlying serialization of this object. - Raw []byte `json:"-" protobuf:"bytes,2,opt,name=raw"` -} - -// ProtoFields returns the Fields as a new ProtoFields value. -func (m *Fields) ProtoFields() *ProtoFields { - if m == nil { - return &ProtoFields{} - } - return &ProtoFields{ - Raw: m.Raw, - } -} - -// Size implements the protobuf marshalling interface. -func (m *Fields) Size() (n int) { - return m.ProtoFields().Size() -} - -// Unmarshal implements the protobuf marshalling interface. -func (m *Fields) Unmarshal(data []byte) error { - if len(data) == 0 { - return nil - } - p := ProtoFields{} - if err := p.Unmarshal(data); err != nil { - return err - } - if len(p.Map) == 0 { - return json.Unmarshal(p.Raw, &m) - } - b, err := json.Marshal(&p.Map) - if err != nil { - return err - } - return json.Unmarshal(b, &m) -} - -// Marshal implements the protobuf marshaling interface. -func (m *Fields) Marshal() (data []byte, err error) { - return m.ProtoFields().Marshal() -} - -// MarshalTo implements the protobuf marshaling interface. -func (m *Fields) MarshalTo(data []byte) (int, error) { - return m.ProtoFields().MarshalTo(data) -} - -// MarshalToSizedBuffer implements the protobuf reverse marshaling interface. -func (m *Fields) MarshalToSizedBuffer(data []byte) (int, error) { - return m.ProtoFields().MarshalToSizedBuffer(data) -} - -// String implements the protobuf goproto_stringer interface. -func (m *Fields) String() string { - return m.ProtoFields().String() -} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index f03ded7a4e..31b1d955ec 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -301,28 +301,33 @@ func (m *ExportOptions) XXX_DiscardUnknown() { var xxx_messageInfo_ExportOptions proto.InternalMessageInfo -func (m *Fields) Reset() { *m = Fields{} } -func (*Fields) ProtoMessage() {} -func (*Fields) Descriptor() ([]byte, []int) { +func (m *FieldsV1) Reset() { *m = FieldsV1{} } +func (*FieldsV1) ProtoMessage() {} +func (*FieldsV1) Descriptor() ([]byte, []int) { return fileDescriptor_cf52fa777ced5367, []int{9} } -func (m *Fields) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Fields.Unmarshal(m, b) +func (m *FieldsV1) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (m *Fields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Fields.Marshal(b, m, deterministic) +func (m *FieldsV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } -func (m *Fields) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fields.Merge(m, src) +func (m *FieldsV1) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldsV1.Merge(m, src) } -func (m *Fields) XXX_Size() int { - return xxx_messageInfo_Fields.Size(m) +func (m *FieldsV1) XXX_Size() int { + return m.Size() } -func (m *Fields) XXX_DiscardUnknown() { - xxx_messageInfo_Fields.DiscardUnknown(m) +func (m *FieldsV1) XXX_DiscardUnknown() { + xxx_messageInfo_FieldsV1.DiscardUnknown(m) } -var xxx_messageInfo_Fields proto.InternalMessageInfo +var xxx_messageInfo_FieldsV1 proto.InternalMessageInfo func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} @@ -907,38 +912,10 @@ func (m *Preconditions) XXX_DiscardUnknown() { var xxx_messageInfo_Preconditions proto.InternalMessageInfo -func (m *ProtoFields) Reset() { *m = ProtoFields{} } -func (*ProtoFields) ProtoMessage() {} -func (*ProtoFields) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{31} -} -func (m *ProtoFields) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProtoFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ProtoFields) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProtoFields.Merge(m, src) -} -func (m *ProtoFields) XXX_Size() int { - return m.Size() -} -func (m *ProtoFields) XXX_DiscardUnknown() { - xxx_messageInfo_ProtoFields.DiscardUnknown(m) -} - -var xxx_messageInfo_ProtoFields proto.InternalMessageInfo - func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} func (*RootPaths) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{32} + return fileDescriptor_cf52fa777ced5367, []int{31} } func (m *RootPaths) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -966,7 +943,7 @@ var xxx_messageInfo_RootPaths proto.InternalMessageInfo func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{33} + return fileDescriptor_cf52fa777ced5367, []int{32} } func (m *ServerAddressByClientCIDR) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -994,7 +971,7 @@ var xxx_messageInfo_ServerAddressByClientCIDR proto.InternalMessageInfo func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{34} + return fileDescriptor_cf52fa777ced5367, []int{33} } func (m *Status) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1022,7 +999,7 @@ var xxx_messageInfo_Status proto.InternalMessageInfo func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} func (*StatusCause) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{35} + return fileDescriptor_cf52fa777ced5367, []int{34} } func (m *StatusCause) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1050,7 +1027,7 @@ var xxx_messageInfo_StatusCause proto.InternalMessageInfo func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} func (*StatusDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{36} + return fileDescriptor_cf52fa777ced5367, []int{35} } func (m *StatusDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1078,7 +1055,7 @@ var xxx_messageInfo_StatusDetails proto.InternalMessageInfo func (m *TableOptions) Reset() { *m = TableOptions{} } func (*TableOptions) ProtoMessage() {} func (*TableOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{37} + return fileDescriptor_cf52fa777ced5367, []int{36} } func (m *TableOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1106,7 +1083,7 @@ var xxx_messageInfo_TableOptions proto.InternalMessageInfo func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} func (*Time) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{38} + return fileDescriptor_cf52fa777ced5367, []int{37} } func (m *Time) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Time.Unmarshal(m, b) @@ -1129,7 +1106,7 @@ var xxx_messageInfo_Time proto.InternalMessageInfo func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{39} + return fileDescriptor_cf52fa777ced5367, []int{38} } func (m *Timestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1157,7 +1134,7 @@ var xxx_messageInfo_Timestamp proto.InternalMessageInfo func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} func (*TypeMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{40} + return fileDescriptor_cf52fa777ced5367, []int{39} } func (m *TypeMeta) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1185,7 +1162,7 @@ var xxx_messageInfo_TypeMeta proto.InternalMessageInfo func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } func (*UpdateOptions) ProtoMessage() {} func (*UpdateOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{41} + return fileDescriptor_cf52fa777ced5367, []int{40} } func (m *UpdateOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1213,7 +1190,7 @@ var xxx_messageInfo_UpdateOptions proto.InternalMessageInfo func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} func (*Verbs) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{42} + return fileDescriptor_cf52fa777ced5367, []int{41} } func (m *Verbs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1241,7 +1218,7 @@ var xxx_messageInfo_Verbs proto.InternalMessageInfo func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} func (*WatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_cf52fa777ced5367, []int{43} + return fileDescriptor_cf52fa777ced5367, []int{42} } func (m *WatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1276,8 +1253,7 @@ func init() { proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions") - proto.RegisterType((*Fields)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Fields") - proto.RegisterMapType((map[string]Fields)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Fields.MapEntry") + proto.RegisterType((*FieldsV1)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.FieldsV1") proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind") proto.RegisterType((*GroupResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupResource") @@ -1302,8 +1278,6 @@ func init() { proto.RegisterType((*Patch)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Patch") proto.RegisterType((*PatchOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.PatchOptions") proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") - proto.RegisterType((*ProtoFields)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ProtoFields") - proto.RegisterMapType((map[string]Fields)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ProtoFields.MapEntry") proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status") @@ -1323,181 +1297,177 @@ func init() { } var fileDescriptor_cf52fa777ced5367 = []byte{ - // 2779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0xcf, 0x6f, 0x1c, 0x57, - 0xd9, 0xb3, 0xeb, 0x5d, 0xef, 0x7e, 0xeb, 0x4d, 0xec, 0x97, 0x04, 0x36, 0x46, 0x78, 0xdd, 0x29, - 0xaa, 0x52, 0x48, 0xd7, 0x4d, 0xa0, 0x55, 0x48, 0x69, 0xc1, 0x6b, 0x3b, 0xa9, 0x69, 0x5c, 0x5b, - 0xcf, 0x49, 0x50,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x56, 0x26, 0x00, 0x00, + // 2713 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x19, 0xcd, 0x6f, 0x1b, 0x59, + 0x3d, 0x63, 0xc7, 0x8e, 0xfd, 0x73, 0x9c, 0x8f, 0x97, 0x16, 0xdc, 0x00, 0x71, 0x76, 0x16, 0xad, + 0x52, 0xe8, 0x3a, 0x9b, 0x02, 0xab, 0xd2, 0x65, 0x0b, 0x71, 0x9c, 0x74, 0xc3, 0x36, 0x4d, 0xf4, + 0xd2, 0x16, 0x28, 0x15, 0xea, 0x64, 0xe6, 0xc5, 0x19, 0x32, 0x9e, 0xf1, 0xbe, 0x19, 0x27, 0x35, + 0x1c, 0xd8, 0x03, 0x08, 0x90, 0x60, 0xd5, 0x23, 0xe2, 0x80, 0xb6, 0x82, 0xbf, 0x80, 0x13, 0x7f, + 0x00, 0x12, 0xbd, 0x20, 0xad, 0xc4, 0x65, 0x25, 0x90, 0xb5, 0x0d, 0x07, 0x8e, 0x88, 0x6b, 0x4e, + 0xe8, 0x7d, 0xcd, 0x87, 0x1d, 0x37, 0x63, 0xba, 0xac, 0xf6, 0xe6, 0xf9, 0x7d, 0xff, 0xde, 0xfb, + 0xbd, 0xdf, 0x97, 0x61, 0xeb, 0xf0, 0x9a, 0x5f, 0xb3, 0xbd, 0xe5, 0xc3, 0xce, 0x1e, 0xa1, 0x2e, + 0x09, 0x88, 0xbf, 0x7c, 0x44, 0x5c, 0xcb, 0xa3, 0xcb, 0x12, 0x61, 0xb4, 0xed, 0x96, 0x61, 0x1e, + 0xd8, 0x2e, 0xa1, 0xdd, 0xe5, 0xf6, 0x61, 0x93, 0x01, 0xfc, 0xe5, 0x16, 0x09, 0x8c, 0xe5, 0xa3, + 0x95, 0xe5, 0x26, 0x71, 0x09, 0x35, 0x02, 0x62, 0xd5, 0xda, 0xd4, 0x0b, 0x3c, 0xf4, 0x45, 0xc1, +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 0xda, 0xab, 0xce, 0x25, 0x00, 0xe2, 0x1f, 0x17, 0x9c, 0x14, 0xa1, 0x3b, 0x30, 0xfe, 0x09, 0x4e, + 0x8f, 0xdf, 0x87, 0x62, 0xd4, 0xdf, 0x7f, 0xcc, 0x2a, 0xf5, 0x87, 0x50, 0x60, 0x11, 0xaf, 0xe6, + 0xd2, 0x73, 0x5a, 0x9c, 0x64, 0xe3, 0x94, 0x49, 0xd3, 0x38, 0xe9, 0x2d, 0x28, 0xdf, 0x6d, 0x5b, + 0x2f, 0xf8, 0x17, 0x64, 0x26, 0x75, 0xd5, 0xba, 0x0a, 0xe2, 0xcf, 0x74, 0x56, 0x20, 0x44, 0xe5, + 0x8e, 0x15, 0x88, 0x78, 0xe1, 0x8d, 0xed, 0xca, 0x7f, 0xa6, 0x01, 0xf0, 0xa5, 0xd4, 0xfa, 0x11, + 0x71, 0x03, 0x76, 0x0e, 0x2c, 0xf0, 0xfb, 0xcf, 0x81, 0x67, 0x06, 0x8e, 0x41, 0x77, 0x21, 0xef, + 0x89, 0x68, 0x12, 0x7f, 0x43, 0x8e, 0xb8, 0xf9, 0x0c, 0x1f, 0x81, 0x88, 0x27, 0x2c, 0x85, 0xd5, + 0x97, 0x9e, 0x3e, 0x5b, 0x18, 0xfb, 0xe0, 0xd9, 0xc2, 0xd8, 0x87, 0xcf, 0x16, 0xc6, 0xde, 0x3d, + 0x59, 0xd0, 0x9e, 0x9e, 0x2c, 0x68, 0x1f, 0x9c, 0x2c, 0x68, 0x1f, 0x9e, 0x2c, 0x68, 0x1f, 0x9d, + 0x2c, 0x68, 0x8f, 0xff, 0xb9, 0x30, 0x76, 0x3f, 0x73, 0xb4, 0xf2, 0xdf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x61, 0xb7, 0xc5, 0x7c, 0xc2, 0x24, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { @@ -1950,6 +1920,36 @@ func (m *ExportOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FieldsV1) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FieldsV1) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FieldsV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Raw != nil { + i -= len(m.Raw) + copy(dAtA[i:], m.Raw) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2466,9 +2466,9 @@ func (m *ManagedFieldsEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Fields != nil { + if m.FieldsV1 != nil { { - size, err := m.Fields.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FieldsV1.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2476,8 +2476,13 @@ func (m *ManagedFieldsEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } + i -= len(m.FieldsType) + copy(dAtA[i:], m.FieldsType) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldsType))) + i-- + dAtA[i] = 0x32 if m.Time != nil { { size, err := m.Time.MarshalToSizedBuffer(dAtA[:i]) @@ -2933,65 +2938,6 @@ func (m *Preconditions) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ProtoFields) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProtoFields) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProtoFields) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Raw != nil { - i -= len(m.Raw) - copy(dAtA[i:], m.Raw) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) - i-- - dAtA[i] = 0x12 - } - if len(m.Map) > 0 { - keysForMap := make([]string, 0, len(m.Map)) - for k := range m.Map { - keysForMap = append(keysForMap, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMap) - for iNdEx := len(keysForMap) - 1; iNdEx >= 0; iNdEx-- { - v := m.Map[string(keysForMap[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForMap[iNdEx]) - copy(dAtA[i:], keysForMap[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForMap[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *RootPaths) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3609,6 +3555,19 @@ func (m *ExportOptions) Size() (n int) { return n } +func (m *FieldsV1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Raw != nil { + l = len(m.Raw) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *GetOptions) Size() (n int) { if m == nil { return 0 @@ -3818,8 +3777,10 @@ func (m *ManagedFieldsEntry) Size() (n int) { l = m.Time.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.Fields != nil { - l = m.Fields.Size() + l = len(m.FieldsType) + n += 1 + l + sovGenerated(uint64(l)) + if m.FieldsV1 != nil { + l = m.FieldsV1.Size() n += 1 + l + sovGenerated(uint64(l)) } return n @@ -3989,28 +3950,6 @@ func (m *Preconditions) Size() (n int) { return n } -func (m *ProtoFields) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Map) > 0 { - for k, v := range m.Map { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.Raw != nil { - l = len(m.Raw) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - func (m *RootPaths) Size() (n int) { if m == nil { return 0 @@ -4305,6 +4244,16 @@ func (this *ExportOptions) String() string { }, "") return s } +func (this *FieldsV1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FieldsV1{`, + `Raw:` + valueToStringGenerated(this.Raw) + `,`, + `}`, + }, "") + return s +} func (this *GetOptions) String() string { if this == nil { return "nil" @@ -4419,7 +4368,8 @@ func (this *ManagedFieldsEntry) String() string { `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, `Time:` + strings.Replace(fmt.Sprintf("%v", this.Time), "Time", "Time", 1) + `,`, - `Fields:` + strings.Replace(fmt.Sprintf("%v", this.Fields), "Fields", "Fields", 1) + `,`, + `FieldsType:` + fmt.Sprintf("%v", this.FieldsType) + `,`, + `FieldsV1:` + strings.Replace(this.FieldsV1.String(), "FieldsV1", "FieldsV1", 1) + `,`, `}`, }, "") return s @@ -4552,27 +4502,6 @@ func (this *Preconditions) String() string { }, "") return s } -func (this *ProtoFields) String() string { - if this == nil { - return "nil" - } - keysForMap := make([]string, 0, len(this.Map)) - for k := range this.Map { - keysForMap = append(keysForMap, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForMap) - mapStringForMap := "map[string]Fields{" - for _, k := range keysForMap { - mapStringForMap += fmt.Sprintf("%v: %v,", k, this.Map[k]) - } - mapStringForMap += "}" - s := strings.Join([]string{`&ProtoFields{`, - `Map:` + mapStringForMap + `,`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `}`, - }, "") - return s -} func (this *RootPaths) String() string { if this == nil { return "nil" @@ -6056,6 +5985,93 @@ func (m *ExportOptions) Unmarshal(dAtA []byte) error { } return nil } +func (m *FieldsV1) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FieldsV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FieldsV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GetOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7980,9 +7996,41 @@ func (m *ManagedFieldsEntry) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldsType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldsV1", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8009,10 +8057,10 @@ func (m *ManagedFieldsEntry) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Fields == nil { - m.Fields = &Fields{} + if m.FieldsV1 == nil { + m.FieldsV1 = &FieldsV1{} } - if err := m.Fields.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsV1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9518,222 +9566,6 @@ func (m *Preconditions) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProtoFields) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProtoFields: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProtoFields: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Map == nil { - m.Map = make(map[string]Fields) - } - var mapkey string - mapvalue := &Fields{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Fields{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Map[mapkey] = *mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *RootPaths) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index ba36c3cd25..2025e03981 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -212,7 +212,7 @@ message ExportOptions { optional bool exact = 2; } -// Fields stores a set of fields in a data structure like a Trie. +// FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. // // Each key is either a '.' representing the field itself, and will always map to an empty set, // or a string representing a sub-field or item. The string will follow one of these four formats: @@ -223,15 +223,9 @@ message ExportOptions { // If a key maps to an empty Fields value, the field that key represents is part of the set. // // The exact format is defined in sigs.k8s.io/structured-merge-diff -// +protobuf.options.marshal=false -// +protobuf.as=ProtoFields -// +protobuf.options.(gogoproto.goproto_stringer)=false -message Fields { - // Map is the representation used in the alpha version of this API - map map = 1; - +message FieldsV1 { // Raw is the underlying serialization of this object. - optional bytes raw = 2; + optional bytes Raw = 1; } // GetOptions is the standard query options to the standard REST get call. @@ -345,7 +339,7 @@ message LabelSelectorRequirement { // List holds a list of objects, which may not be known by the server. message List { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional ListMeta metadata = 1; @@ -371,7 +365,7 @@ message ListMeta { // Value must be treated as opaque by clients and passed unmodified back to the server. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional optional string resourceVersion = 2; @@ -393,9 +387,6 @@ message ListMeta { // Servers older than v1.15 do not set this field. // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients // should not rely on the remainingItemCount to be set or to be exact. - // - // This field is alpha and can be changed or removed without notice. - // // +optional optional int64 remainingItemCount = 4; } @@ -500,9 +491,13 @@ message ManagedFieldsEntry { // +optional optional Time time = 4; - // Fields identifies a set of fields. + // FieldsType is the discriminator for the different fields format and version. + // There is currently only one possible value: "FieldsV1" + optional string fieldsType = 6; + + // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. // +optional - optional Fields fields = 5; + optional FieldsV1 fieldsV1 = 7; } // MicroTime is version of Time with microsecond level precision. @@ -549,7 +544,7 @@ message ObjectMeta { // should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency // +optional optional string generateName = 2; @@ -593,7 +588,7 @@ message ObjectMeta { // Populated by the system. // Read-only. // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional optional string resourceVersion = 6; @@ -609,7 +604,7 @@ message ObjectMeta { // Populated by the system. // Read-only. // Null for lists. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional Time creationTimestamp = 8; @@ -630,7 +625,7 @@ message ObjectMeta { // // Populated by the system when a graceful deletion is requested. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional Time deletionTimestamp = 9; @@ -700,7 +695,7 @@ message OwnerReference { optional string apiVersion = 5; // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds optional string kind = 1; // Name of the referent. @@ -730,7 +725,7 @@ message OwnerReference { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message PartialObjectMetadata { // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional optional ObjectMeta metadata = 1; } @@ -739,7 +734,7 @@ message PartialObjectMetadata { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message PartialObjectMetadataList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional ListMeta metadata = 1; @@ -790,17 +785,6 @@ message Preconditions { optional string resourceVersion = 2; } -// ProtoFields is a struct that is equivalent to Fields, but intended for -// protobuf marshalling/unmarshalling. It is generated into a serialization -// that matches Fields. Do not use in Go structs. -message ProtoFields { - // Map is the representation used in the alpha version of this API - map map = 1; - - // Raw is the underlying serialization of this object. - optional bytes raw = 2; -} - // RootPaths lists the paths available at root. // For example: "/healthz", "/apis". message RootPaths { @@ -821,13 +805,13 @@ message ServerAddressByClientCIDR { // Status is a return value for calls that don't return other objects. message Status { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional ListMeta metadata = 1; // Status of the operation. // One of: "Success" or "Failure". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional optional string status = 2; @@ -898,7 +882,7 @@ message StatusDetails { // The kind attribute of the resource associated with the status StatusReason. // On some operations may differ from the requested resource Kind. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional string kind = 3; @@ -976,14 +960,14 @@ message TypeMeta { // Servers may infer this from the endpoint the client submits requests to. // Cannot be updated. // In CamelCase. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional string kind = 1; // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources // +optional optional string apiVersion = 2; } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go index 843cd3b15b..ec016fd3c8 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -258,7 +258,7 @@ func ResetObjectMetaForStatus(meta, existingMeta Object) { // MarshalJSON implements json.Marshaler // MarshalJSON may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (f Fields) MarshalJSON() ([]byte, error) { +func (f FieldsV1) MarshalJSON() ([]byte, error) { if f.Raw == nil { return []byte("null"), nil } @@ -266,7 +266,7 @@ func (f Fields) MarshalJSON() ([]byte, error) { } // UnmarshalJSON implements json.Unmarshaler -func (f *Fields) UnmarshalJSON(b []byte) error { +func (f *FieldsV1) UnmarshalJSON(b []byte) error { if f == nil { return errors.New("metav1.Fields: UnmarshalJSON on nil pointer") } @@ -276,5 +276,5 @@ func (f *Fields) UnmarshalJSON(b []byte) error { return nil } -var _ json.Marshaler = Fields{} -var _ json.Unmarshaler = &Fields{} +var _ json.Marshaler = FieldsV1{} +var _ json.Unmarshaler = &FieldsV1{} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index b1e92ed66a..a6ecf33123 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -43,14 +43,14 @@ type TypeMeta struct { // Servers may infer this from the endpoint the client submits requests to. // Cannot be updated. // In CamelCase. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` // APIVersion defines the versioned schema of this representation of an object. // Servers should convert recognized schemas to the latest internal value, and // may reject unrecognized values. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources // +optional APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` } @@ -73,7 +73,7 @@ type ListMeta struct { // Value must be treated as opaque by clients and passed unmodified back to the server. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` @@ -95,9 +95,6 @@ type ListMeta struct { // Servers older than v1.15 do not set this field. // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients // should not rely on the remainingItemCount to be set or to be exact. - // - // This field is alpha and can be changed or removed without notice. - // // +optional RemainingItemCount *int64 `json:"remainingItemCount,omitempty" protobuf:"bytes,4,opt,name=remainingItemCount"` } @@ -134,7 +131,7 @@ type ObjectMeta struct { // should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency // +optional GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` @@ -178,7 +175,7 @@ type ObjectMeta struct { // Populated by the system. // Read-only. // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency // +optional ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` @@ -194,7 +191,7 @@ type ObjectMeta struct { // Populated by the system. // Read-only. // Null for lists. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` @@ -215,7 +212,7 @@ type ObjectMeta struct { // // Populated by the system when a graceful deletion is requested. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` @@ -297,7 +294,7 @@ type OwnerReference struct { // API version of the referent. APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` // Name of the referent. // More info: http://kubernetes.io/docs/user-guide/identifiers#names @@ -590,13 +587,13 @@ type Preconditions struct { type Status struct { TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Status of the operation. // One of: "Success" or "Failure". - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` // A human-readable description of the status of this operation. @@ -635,7 +632,7 @@ type StatusDetails struct { Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` // The kind attribute of the resource associated with the status StatusReason. // On some operations may differ from the requested resource Kind. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"` // UID of the resource. @@ -767,11 +764,13 @@ const ( // doesn't make any sense, for example deleting a read-only object. This is different than // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the // data was invalid. API calls that return BadRequest can never succeed. + // Status code 400 StatusReasonBadRequest StatusReason = "BadRequest" // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the // resource was not supported by the code - for instance, attempting to delete a resource that // can only be created. API calls that return MethodNotAllowed can never succeed. + // Status code 405 StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed" // StatusReasonNotAcceptable means that the accept types indicated by the client were not acceptable @@ -870,7 +869,7 @@ const ( type List struct { TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -1103,9 +1102,16 @@ type ManagedFieldsEntry struct { // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' // +optional Time *Time `json:"time,omitempty" protobuf:"bytes,4,opt,name=time"` - // Fields identifies a set of fields. + + // Fields is tombstoned to show why 5 is a reserved protobuf tag. + //Fields *Fields `json:"fields,omitempty" protobuf:"bytes,5,opt,name=fields,casttype=Fields"` + + // FieldsType is the discriminator for the different fields format and version. + // There is currently only one possible value: "FieldsV1" + FieldsType string `json:"fieldsType,omitempty" protobuf:"bytes,6,opt,name=fieldsType"` + // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. // +optional - Fields *Fields `json:"fields,omitempty" protobuf:"bytes,5,opt,name=fields,casttype=Fields"` + FieldsV1 *FieldsV1 `json:"fieldsV1,omitempty" protobuf:"bytes,7,opt,name=fieldsV1"` } // ManagedFieldsOperationType is the type of operation which lead to a ManagedFieldsEntry being created. @@ -1116,7 +1122,7 @@ const ( ManagedFieldsOperationUpdate ManagedFieldsOperationType = "Update" ) -// Fields stores a set of fields in a data structure like a Trie. +// FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. // // Each key is either a '.' representing the field itself, and will always map to an empty set, // or a string representing a sub-field or item. The string will follow one of these four formats: @@ -1127,12 +1133,9 @@ const ( // If a key maps to an empty Fields value, the field that key represents is part of the set. // // The exact format is defined in sigs.k8s.io/structured-merge-diff -// +protobuf.options.marshal=false -// +protobuf.as=ProtoFields -// +protobuf.options.(gogoproto.goproto_stringer)=false -type Fields struct { +type FieldsV1 struct { // Raw is the underlying serialization of this object. - Raw []byte `json:"-" protobuf:"-"` + Raw []byte `json:"-" protobuf:"bytes,1,opt,name=Raw"` } // TODO: Table does not generate to protobuf because of the interface{} - fix protobuf @@ -1147,7 +1150,7 @@ type Fields struct { type Table struct { TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional ListMeta `json:"metadata,omitempty"` @@ -1278,7 +1281,7 @@ type TableOptions struct { type PartialObjectMetadata struct { TypeMeta `json:",inline"` // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` } @@ -1288,7 +1291,7 @@ type PartialObjectMetadata struct { type PartialObjectMetadataList struct { TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 5bbc110f97..33a10104c0 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -119,12 +119,12 @@ func (ExportOptions) SwaggerDoc() map[string]string { return map_ExportOptions } -var map_Fields = map[string]string{ - "": "Fields stores a set of fields in a data structure like a Trie.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", +var map_FieldsV1 = map[string]string{ + "": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", } -func (Fields) SwaggerDoc() map[string]string { - return map_Fields +func (FieldsV1) SwaggerDoc() map[string]string { + return map_FieldsV1 } var map_GetOptions = map[string]string{ @@ -169,7 +169,7 @@ func (LabelSelectorRequirement) SwaggerDoc() map[string]string { var map_List = map[string]string{ "": "List holds a list of objects, which may not be known by the server.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of objects", } @@ -180,9 +180,9 @@ func (List) SwaggerDoc() map[string]string { var map_ListMeta = map[string]string{ "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "selfLink": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", - "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", "continue": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", - "remainingItemCount": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.\n\nThis field is alpha and can be changed or removed without notice.", + "remainingItemCount": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", } func (ListMeta) SwaggerDoc() map[string]string { @@ -211,7 +211,8 @@ var map_ManagedFieldsEntry = map[string]string{ "operation": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", "apiVersion": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", "time": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", - "fields": "Fields identifies a set of fields.", + "fieldsType": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "fieldsV1": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", } func (ManagedFieldsEntry) SwaggerDoc() map[string]string { @@ -221,14 +222,14 @@ func (ManagedFieldsEntry) SwaggerDoc() map[string]string { var map_ObjectMeta = map[string]string{ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", @@ -245,7 +246,7 @@ func (ObjectMeta) SwaggerDoc() map[string]string { var map_OwnerReference = map[string]string{ "": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", "apiVersion": "API version of the referent.", - "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "controller": "If true, this reference points to the managing controller.", @@ -258,7 +259,7 @@ func (OwnerReference) SwaggerDoc() map[string]string { var map_PartialObjectMetadata = map[string]string{ "": "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", } func (PartialObjectMetadata) SwaggerDoc() map[string]string { @@ -267,7 +268,7 @@ func (PartialObjectMetadata) SwaggerDoc() map[string]string { var map_PartialObjectMetadataList = map[string]string{ "": "PartialObjectMetadataList contains a list of objects containing only their metadata", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "items contains each of the included items.", } @@ -325,8 +326,8 @@ func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string { var map_Status = map[string]string{ "": "Status is a return value for calls that don't return other objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", "message": "A human-readable description of the status of this operation.", "reason": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", "details": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", @@ -352,7 +353,7 @@ var map_StatusDetails = map[string]string{ "": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "name": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", "group": "The group attribute of the resource associated with the status StatusReason.", - "kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "uid": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "causes": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", "retryAfterSeconds": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", @@ -364,7 +365,7 @@ func (StatusDetails) SwaggerDoc() map[string]string { var map_Table = map[string]string{ "": "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "columnDefinitions": "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", "rows": "rows is the list of items in the table.", } @@ -420,8 +421,8 @@ func (TableRowCondition) SwaggerDoc() map[string]string { var map_TypeMeta = map[string]string{ "": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - "kind": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "apiVersion": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "kind": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "apiVersion": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", } func (TypeMeta) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go index 3b07e86db8..7ea0986f35 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go @@ -32,6 +32,9 @@ import ( // NestedFieldCopy returns a deep copy of the value of a nested field. // Returns false if the value is missing. // No error is returned for a nil field. +// +// Note: fields passed to this function are treated as keys within the passed +// object; no array/slice syntax is supported. func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { @@ -43,6 +46,9 @@ func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, // NestedFieldNoCopy returns a reference to a nested field. // Returns false if value is not found and an error if unable // to traverse obj. +// +// Note: fields passed to this function are treated as keys within the passed +// object; no array/slice syntax is supported. func NestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { var val interface{} = obj diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index eeb73999f9..2743793dde 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -169,3 +169,18 @@ func ValidateTableOptions(opts *metav1.TableOptions) field.ErrorList { } return allErrs } + +func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + for _, fields := range fieldsList { + switch fields.Operation { + case metav1.ManagedFieldsOperationApply, metav1.ManagedFieldsOperationUpdate: + default: + allErrs = append(allErrs, field.Invalid(fldPath.Child("operation"), fields.Operation, "must be `Apply` or `Update`")) + } + if fields.FieldsType != "FieldsV1" { + allErrs = append(allErrs, field.Invalid(fldPath.Child("fieldsType"), fields.FieldsType, "must be `FieldsV1`")) + } + } + return allErrs +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go index eddbbe3389..b82fdf202f 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -313,7 +313,7 @@ func (in *ExportOptions) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Fields) DeepCopyInto(out *Fields) { +func (in *FieldsV1) DeepCopyInto(out *FieldsV1) { *out = *in if in.Raw != nil { in, out := &in.Raw, &out.Raw @@ -323,12 +323,12 @@ func (in *Fields) DeepCopyInto(out *Fields) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Fields. -func (in *Fields) DeepCopy() *Fields { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FieldsV1. +func (in *FieldsV1) DeepCopy() *FieldsV1 { if in == nil { return nil } - out := new(Fields) + out := new(FieldsV1) in.DeepCopyInto(out) return out } @@ -615,9 +615,9 @@ func (in *ManagedFieldsEntry) DeepCopyInto(out *ManagedFieldsEntry) { in, out := &in.Time, &out.Time *out = (*in).DeepCopy() } - if in.Fields != nil { - in, out := &in.Fields, &out.Fields - *out = new(Fields) + if in.FieldsV1 != nil { + in, out := &in.FieldsV1, &out.FieldsV1 + *out = new(FieldsV1) (*in).DeepCopyInto(*out) } return @@ -864,34 +864,6 @@ func (in *Preconditions) DeepCopy() *Preconditions { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProtoFields) DeepCopyInto(out *ProtoFields) { - *out = *in - if in.Map != nil { - in, out := &in.Map, &out.Map - *out = make(map[string]Fields, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtoFields. -func (in *ProtoFields) DeepCopy() *ProtoFields { - if in == nil { - return nil - } - out := new(ProtoFields) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RootPaths) DeepCopyInto(out *RootPaths) { *out = *in diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto index 6339e719ad..19606666f8 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto @@ -32,7 +32,7 @@ option go_package = "v1beta1"; // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message PartialObjectMetadataList { // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 2; diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go index 87895a5b5f..f16170a37b 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go @@ -63,7 +63,7 @@ type PartialObjectMetadata = v1.PartialObjectMetadata type PartialObjectMetadataList struct { v1.TypeMeta `json:",inline"` // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"` diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go index 26d13f5d91..ef7e7c1e90 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PartialObjectMetadataList = map[string]string{ "": "PartialObjectMetadataList contains a list of objects containing only their metadata.", - "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "items contains each of the included items.", } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go index 3d3ebe5f9d..2f0b6c9e55 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/types.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go @@ -95,7 +95,7 @@ type RawExtension struct { // Raw is the underlying serialization of this object. // // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. - Raw []byte `protobuf:"bytes,1,opt,name=raw"` + Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"` // Object can hold a representation of this extension - useful for working with versioned // structs. Object Object `json:"-"` diff --git a/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go index 0d739d961f..1689e62e82 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go +++ b/vendor/k8s.io/apimachinery/pkg/util/clock/clock.go @@ -21,11 +21,18 @@ import ( "time" ) +// PassiveClock allows for injecting fake or real clocks into code +// that needs to read the current time but does not support scheduling +// activity in the future. +type PassiveClock interface { + Now() time.Time + Since(time.Time) time.Duration +} + // Clock allows for injecting fake or real clocks into code that // needs to do arbitrary things based on time. type Clock interface { - Now() time.Time - Since(time.Time) time.Duration + PassiveClock After(time.Duration) <-chan time.Time NewTimer(time.Duration) Timer Sleep(time.Duration) @@ -66,10 +73,15 @@ func (RealClock) Sleep(d time.Duration) { time.Sleep(d) } -// FakeClock implements Clock, but returns an arbitrary time. -type FakeClock struct { +// FakePassiveClock implements PassiveClock, but returns an arbitrary time. +type FakePassiveClock struct { lock sync.RWMutex time time.Time +} + +// FakeClock implements Clock, but returns an arbitrary time. +type FakeClock struct { + FakePassiveClock // waiters are waiting for the fake time to pass their specified time waiters []fakeClockWaiter @@ -82,26 +94,39 @@ type fakeClockWaiter struct { destChan chan time.Time } +func NewFakePassiveClock(t time.Time) *FakePassiveClock { + return &FakePassiveClock{ + time: t, + } +} + func NewFakeClock(t time.Time) *FakeClock { return &FakeClock{ - time: t, + FakePassiveClock: *NewFakePassiveClock(t), } } // Now returns f's time. -func (f *FakeClock) Now() time.Time { +func (f *FakePassiveClock) Now() time.Time { f.lock.RLock() defer f.lock.RUnlock() return f.time } // Since returns time since the time in f. -func (f *FakeClock) Since(ts time.Time) time.Duration { +func (f *FakePassiveClock) Since(ts time.Time) time.Duration { f.lock.RLock() defer f.lock.RUnlock() return f.time.Sub(ts) } +// Sets the time. +func (f *FakePassiveClock) SetTime(t time.Time) { + f.lock.Lock() + defer f.lock.Unlock() + f.time = t +} + // Fake version of time.After(d). func (f *FakeClock) After(d time.Duration) <-chan time.Time { f.lock.Lock() diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 078f00d9b9..f9540c63bb 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -101,6 +101,9 @@ func SetOldTransportDefaults(t *http.Transport) *http.Transport { if t.TLSHandshakeTimeout == 0 { t.TLSHandshakeTimeout = defaultTransport.TLSHandshakeTimeout } + if t.IdleConnTimeout == 0 { + t.IdleConnTimeout = defaultTransport.IdleConnTimeout + } return t } @@ -111,7 +114,7 @@ func SetTransportDefaults(t *http.Transport) *http.Transport { // Allow clients to disable http2 if needed. if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { klog.Infof("HTTP2 has been explicitly disabled") - } else { + } else if allowsHTTP2(t) { if err := http2.ConfigureTransport(t); err != nil { klog.Warningf("Transport failed http2 configuration: %v", err) } @@ -119,6 +122,21 @@ func SetTransportDefaults(t *http.Transport) *http.Transport { return t } +func allowsHTTP2(t *http.Transport) bool { + if t.TLSClientConfig == nil || len(t.TLSClientConfig.NextProtos) == 0 { + // the transport expressed no NextProto preference, allow + return true + } + for _, p := range t.TLSClientConfig.NextProtos { + if p == http2.NextProtoTLS { + // the transport explicitly allowed http/2 + return true + } + } + // the transport explicitly set NextProtos and excluded http/2 + return false +} + type RoundTripperWrapper interface { http.RoundTripper WrappedRoundTripper() http.RoundTripper diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util.go b/vendor/k8s.io/apimachinery/pkg/util/net/util.go index 8344d10c83..2e7cb94994 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/net/util.go +++ b/vendor/k8s.io/apimachinery/pkg/util/net/util.go @@ -54,3 +54,20 @@ func IsConnectionReset(err error) bool { } return false } + +// Returns if the given err is "connection refused" error +func IsConnectionRefused(err error) bool { + if urlErr, ok := err.(*url.Error); ok { + err = urlErr.Err + } + if opErr, ok := err.(*net.OpError); ok { + err = opErr.Err + } + if osErr, ok := err.(*os.SyscallError); ok { + err = osErr.Err + } + if errno, ok := err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED { + return true + } + return false +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go index 4767fd1dda..1d372a5259 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -116,6 +116,10 @@ const ( // This is similar to ErrorTypeInvalid, but the error will not include the // too-long value. See TooLong(). ErrorTypeTooLong ErrorType = "FieldValueTooLong" + // ErrorTypeTooMany is used to report "too many". This is used to + // report that a given list has too many items. This is similar to FieldValueTooLong, + // but the error indicates quantity instead of length. + ErrorTypeTooMany ErrorType = "FieldValueTooMany" // ErrorTypeInternal is used to report other errors that are not related // to user input. See InternalError(). ErrorTypeInternal ErrorType = "InternalError" @@ -138,6 +142,8 @@ func (t ErrorType) String() string { return "Forbidden" case ErrorTypeTooLong: return "Too long" + case ErrorTypeTooMany: + return "Too many" case ErrorTypeInternal: return "Internal error" default: @@ -201,6 +207,13 @@ func TooLong(field *Path, value interface{}, maxLength int) *Error { return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d characters", maxLength)} } +// TooMany returns a *Error indicating "too many". This is used to +// report that a given list has too many items. This is similar to TooLong, +// but the returned error indicates quantity instead of length. +func TooMany(field *Path, actualQuantity, maxQuantity int) *Error { + return &Error{ErrorTypeTooMany, field.String(), actualQuantity, fmt.Sprintf("must have at most %d items", maxQuantity)} +} + // InternalError returns a *Error indicating "internal error". This is used // to signal that an error was found that was not directly related to user // input. The err argument must be non-nil. diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go index bc6b18d2b4..386c3e7ea0 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go +++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go @@ -207,23 +207,31 @@ type ConditionFunc func() (done bool, err error) type Backoff struct { // The initial duration. Duration time.Duration - // Duration is multiplied by factor each iteration. Must be greater - // than or equal to zero. + // Duration is multiplied by factor each iteration, if factor is not zero + // and the limits imposed by Steps and Cap have not been reached. + // Should not be negative. + // The jitter does not contribute to the updates to the duration parameter. Factor float64 - // The amount of jitter applied each iteration. Jitter is applied after - // cap. + // The sleep at each iteration is the duration plus an additional + // amount chosen uniformly at random from the interval between + // zero and `jitter*duration`. Jitter float64 - // The number of steps before duration stops changing. If zero, initial - // duration is always used. Used for exponential backoff in combination - // with Factor. + // The remaining number of iterations in which the duration + // parameter may change (but progress can be stopped earlier by + // hitting the cap). If not positive, the duration is not + // changed. Used for exponential backoff in combination with + // Factor and Cap. Steps int - // The returned duration will never be greater than cap *before* jitter - // is applied. The actual maximum cap is `cap * (1.0 + jitter)`. + // A limit on revised values of the duration parameter. If a + // multiplication by the factor parameter would make the duration + // exceed the cap then the duration is set to the cap and the + // steps parameter is set to zero. Cap time.Duration } -// Step returns the next interval in the exponential backoff. This method -// will mutate the provided backoff. +// Step (1) returns an amount of time to sleep determined by the +// original Duration and Jitter and (2) mutates the provided Backoff +// to update its Steps and Duration. func (b *Backoff) Step() time.Duration { if b.Steps < 1 { if b.Jitter > 0 { @@ -271,14 +279,14 @@ func contextForChannel(parentCh <-chan struct{}) (context.Context, context.Cance // ExponentialBackoff repeats a condition check with exponential backoff. // -// It checks the condition up to Steps times, increasing the wait by multiplying -// the previous duration by Factor. -// -// If Jitter is greater than zero, a random amount of each duration is added -// (between duration and duration*(1+jitter)). -// -// If the condition never returns true, ErrWaitTimeout is returned. All other -// errors terminate immediately. +// It repeatedly checks the condition and then sleeps, using `backoff.Step()` +// to determine the length of the sleep and adjust Duration and Steps. +// Stops and returns as soon as: +// 1. the condition check returns true or an error, +// 2. `backoff.Steps` checks of the condition have been done, or +// 3. a sleep truncated by the cap on duration has been completed. +// In case (1) the returned error is what the condition function returned. +// In all other cases, ErrWaitTimeout is returned. func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { for backoff.Steps > 0 { if ok, err := condition(); err != nil || ok { diff --git a/vendor/k8s.io/apiserver/pkg/admission/attributes.go b/vendor/k8s.io/apiserver/pkg/admission/attributes.go index beea941fc3..1d291f6b22 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/attributes.go +++ b/vendor/k8s.io/apiserver/pkg/admission/attributes.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation" + auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/authentication/user" ) @@ -42,12 +43,17 @@ type attributesRecord struct { // other elements are always accessed in single goroutine. // But ValidatingAdmissionWebhook add annotations concurrently. - annotations map[string]string + annotations map[string]annotation annotationsLock sync.RWMutex reinvocationContext ReinvocationContext } +type annotation struct { + level auditinternal.Level + value string +} + func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind schema.GroupVersionKind, namespace, name string, resource schema.GroupVersionResource, subresource string, operation Operation, operationOptions runtime.Object, dryRun bool, userInfo user.Info) Attributes { return &attributesRecord{ kind: kind, @@ -111,7 +117,7 @@ func (record *attributesRecord) GetUserInfo() user.Info { // getAnnotations implements privateAnnotationsGetter.It's a private method used // by WithAudit decorator. -func (record *attributesRecord) getAnnotations() map[string]string { +func (record *attributesRecord) getAnnotations(maxLevel auditinternal.Level) map[string]string { record.annotationsLock.RLock() defer record.annotationsLock.RUnlock() @@ -120,26 +126,36 @@ func (record *attributesRecord) getAnnotations() map[string]string { } cp := make(map[string]string, len(record.annotations)) for key, value := range record.annotations { - cp[key] = value + if value.level.Less(maxLevel) || value.level == maxLevel { + cp[key] = value.value + } } return cp } +// AddAnnotation adds an annotation to attributesRecord with Metadata audit level func (record *attributesRecord) AddAnnotation(key, value string) error { + return record.AddAnnotationWithLevel(key, value, auditinternal.LevelMetadata) +} + +func (record *attributesRecord) AddAnnotationWithLevel(key, value string, level auditinternal.Level) error { if err := checkKeyFormat(key); err != nil { return err } - + if level.Less(auditinternal.LevelMetadata) { + return fmt.Errorf("admission annotations are not allowed to be set at audit level lower than Metadata, key: %q, level: %s", key, level) + } record.annotationsLock.Lock() defer record.annotationsLock.Unlock() if record.annotations == nil { - record.annotations = make(map[string]string) + record.annotations = make(map[string]annotation) } - if v, ok := record.annotations[key]; ok && v != value { - return fmt.Errorf("admission annotations are not allowd to be overwritten, key:%q, old value: %q, new value:%q", key, record.annotations[key], value) + annotation := annotation{level: level, value: value} + if v, ok := record.annotations[key]; ok && v != annotation { + return fmt.Errorf("admission annotations are not allowd to be overwritten, key:%q, old value: %v, new value: %v", key, record.annotations[key], annotation) } - record.annotations[key] = value + record.annotations[key] = annotation return nil } diff --git a/vendor/k8s.io/apiserver/pkg/admission/audit.go b/vendor/k8s.io/apiserver/pkg/admission/audit.go index d81622b921..d1e103cfc6 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/audit.go +++ b/vendor/k8s.io/apiserver/pkg/admission/audit.go @@ -17,6 +17,7 @@ limitations under the License. package admission import ( + "context" "fmt" auditinternal "k8s.io/apiserver/pkg/apis/audit" @@ -44,7 +45,7 @@ func WithAudit(i Interface, ae *auditinternal.Event) Interface { return &auditHandler{i, ae} } -func (handler auditHandler) Admit(a Attributes, o ObjectInterfaces) error { +func (handler auditHandler) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error { if !handler.Interface.Handles(a.GetOperation()) { return nil } @@ -53,13 +54,13 @@ func (handler auditHandler) Admit(a Attributes, o ObjectInterfaces) error { } var err error if mutator, ok := handler.Interface.(MutationInterface); ok { - err = mutator.Admit(a, o) + err = mutator.Admit(ctx, a, o) handler.logAnnotations(a) } return err } -func (handler auditHandler) Validate(a Attributes, o ObjectInterfaces) error { +func (handler auditHandler) Validate(ctx context.Context, a Attributes, o ObjectInterfaces) error { if !handler.Interface.Handles(a.GetOperation()) { return nil } @@ -68,7 +69,7 @@ func (handler auditHandler) Validate(a Attributes, o ObjectInterfaces) error { } var err error if validator, ok := handler.Interface.(ValidationInterface); ok { - err = validator.Validate(a, o) + err = validator.Validate(ctx, a, o) handler.logAnnotations(a) } return err @@ -84,11 +85,18 @@ func ensureAnnotationGetter(a Attributes) error { } func (handler auditHandler) logAnnotations(a Attributes) { + if handler.ae == nil { + return + } switch a := a.(type) { case privateAnnotationsGetter: - audit.LogAnnotations(handler.ae, a.getAnnotations()) + for key, value := range a.getAnnotations(handler.ae.Level) { + audit.LogAnnotation(handler.ae, key, value) + } case AnnotationsGetter: - audit.LogAnnotations(handler.ae, a.GetAnnotations()) + for key, value := range a.GetAnnotations(handler.ae.Level) { + audit.LogAnnotation(handler.ae, key, value) + } default: // this will never happen, because we have already checked it in ensureAnnotationGetter } diff --git a/vendor/k8s.io/apiserver/pkg/admission/chain.go b/vendor/k8s.io/apiserver/pkg/admission/chain.go index 37405aeaf0..f2af01ef3c 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/chain.go +++ b/vendor/k8s.io/apiserver/pkg/admission/chain.go @@ -16,6 +16,8 @@ limitations under the License. package admission +import "context" + // chainAdmissionHandler is an instance of admission.NamedHandler that performs admission control using // a chain of admission handlers type chainAdmissionHandler []Interface @@ -26,13 +28,13 @@ func NewChainHandler(handlers ...Interface) chainAdmissionHandler { } // Admit performs an admission control check using a chain of handlers, and returns immediately on first error -func (admissionHandler chainAdmissionHandler) Admit(a Attributes, o ObjectInterfaces) error { +func (admissionHandler chainAdmissionHandler) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error { for _, handler := range admissionHandler { if !handler.Handles(a.GetOperation()) { continue } if mutator, ok := handler.(MutationInterface); ok { - err := mutator.Admit(a, o) + err := mutator.Admit(ctx, a, o) if err != nil { return err } @@ -42,13 +44,13 @@ func (admissionHandler chainAdmissionHandler) Admit(a Attributes, o ObjectInterf } // Validate performs an admission control check using a chain of handlers, and returns immediately on first error -func (admissionHandler chainAdmissionHandler) Validate(a Attributes, o ObjectInterfaces) error { +func (admissionHandler chainAdmissionHandler) Validate(ctx context.Context, a Attributes, o ObjectInterfaces) error { for _, handler := range admissionHandler { if !handler.Handles(a.GetOperation()) { continue } if validator, ok := handler.(ValidationInterface); ok { - err := validator.Validate(a, o) + err := validator.Validate(ctx, a, o) if err != nil { return err } diff --git a/vendor/k8s.io/apiserver/pkg/admission/interfaces.go b/vendor/k8s.io/apiserver/pkg/admission/interfaces.go index 5f6d703b21..8882680b2c 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/interfaces.go +++ b/vendor/k8s.io/apiserver/pkg/admission/interfaces.go @@ -17,10 +17,12 @@ limitations under the License. package admission import ( + "context" "io" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/authentication/user" ) @@ -61,8 +63,15 @@ type Attributes interface { // "podsecuritypolicy" is the name of the plugin, "admission.k8s.io" is the name of the organization, "admit-policy" is the key name. // An error is returned if the format of key is invalid. When trying to overwrite annotation with a new value, an error is returned. // Both ValidationInterface and MutationInterface are allowed to add Annotations. + // By default, an annotation gets logged into audit event if the request's audit level is greater or + // equal to Metadata. AddAnnotation(key, value string) error + // AddAnnotationWithLevel sets annotation according to key-value pair with additional intended audit level. + // An Annotation gets logged into audit event if the request's audit level is greater or equal to the + // intended audit level. + AddAnnotationWithLevel(key, value string, level auditinternal.Level) error + // GetReinvocationContext tracks the admission request information relevant to the re-invocation policy. GetReinvocationContext() ReinvocationContext } @@ -85,13 +94,13 @@ type ObjectInterfaces interface { // privateAnnotationsGetter is a private interface which allows users to get annotations from Attributes. type privateAnnotationsGetter interface { - getAnnotations() map[string]string + getAnnotations(maxLevel auditinternal.Level) map[string]string } // AnnotationsGetter allows users to get annotations from Attributes. An alternate Attribute should implement // this interface. type AnnotationsGetter interface { - GetAnnotations() map[string]string + GetAnnotations(maxLevel auditinternal.Level) map[string]string } // ReinvocationContext provides access to the admission related state required to implement the re-invocation policy. @@ -120,8 +129,9 @@ type Interface interface { type MutationInterface interface { Interface - // Admit makes an admission decision based on the request attributes - Admit(a Attributes, o ObjectInterfaces) (err error) + // Admit makes an admission decision based on the request attributes. + // Context is used only for timeout/deadline/cancellation and tracing information. + Admit(ctx context.Context, a Attributes, o ObjectInterfaces) (err error) } // ValidationInterface is an abstract, pluggable interface for Admission Control decisions. @@ -129,7 +139,8 @@ type ValidationInterface interface { Interface // Validate makes an admission decision based on the request attributes. It is NOT allowed to mutate - Validate(a Attributes, o ObjectInterfaces) (err error) + // Context is used only for timeout/deadline/cancellation and tracing information. + Validate(ctx context.Context, a Attributes, o ObjectInterfaces) (err error) } // Operation is the type of resource operation being checked for admission control diff --git a/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD.bazel index f6a5390f04..b51e2e9b4e 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/admission/metrics/BUILD.bazel @@ -7,7 +7,8 @@ go_library( importpath = "k8s.io/apiserver/pkg/admission/metrics", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go index 56cc07edd3..c9edb48b41 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go @@ -17,18 +17,31 @@ limitations under the License. package metrics import ( + "context" "fmt" "strconv" "time" - "github.com/prometheus/client_golang/prometheus" - "k8s.io/apiserver/pkg/admission" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) +// WebhookRejectionErrorType defines different error types that happen in a webhook rejection. +type WebhookRejectionErrorType string + const ( namespace = "apiserver" subsystem = "admission" + + // WebhookRejectionCallingWebhookError identifies a calling webhook error which causes + // a webhook admission to reject a request + WebhookRejectionCallingWebhookError WebhookRejectionErrorType = "calling_webhook_error" + // WebhookRejectionAPIServerInternalError identifies an apiserver internal error which + // causes a webhook admission to reject a request + WebhookRejectionAPIServerInternalError WebhookRejectionErrorType = "apiserver_internal_error" + // WebhookRejectionNoError identifies a webhook properly rejected a request + WebhookRejectionNoError WebhookRejectionErrorType = "no_error" ) var ( @@ -75,36 +88,37 @@ type pluginHandlerWithMetrics struct { } // Admit performs a mutating admission control check and emit metrics. -func (p pluginHandlerWithMetrics) Admit(a admission.Attributes, o admission.ObjectInterfaces) error { +func (p pluginHandlerWithMetrics) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error { mutatingHandler, ok := p.Interface.(admission.MutationInterface) if !ok { return nil } start := time.Now() - err := mutatingHandler.Admit(a, o) + err := mutatingHandler.Admit(ctx, a, o) p.observer(time.Since(start), err != nil, a, stepAdmit, p.extraLabels...) return err } // Validate performs a non-mutating admission control check and emits metrics. -func (p pluginHandlerWithMetrics) Validate(a admission.Attributes, o admission.ObjectInterfaces) error { +func (p pluginHandlerWithMetrics) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error { validatingHandler, ok := p.Interface.(admission.ValidationInterface) if !ok { return nil } start := time.Now() - err := validatingHandler.Validate(a, o) + err := validatingHandler.Validate(ctx, a, o) p.observer(time.Since(start), err != nil, a, stepValidate, p.extraLabels...) return err } // AdmissionMetrics instruments admission with prometheus metrics. type AdmissionMetrics struct { - step *metricSet - controller *metricSet - webhook *metricSet + step *metricSet + controller *metricSet + webhook *metricSet + webhookRejection *metrics.CounterVec } // newAdmissionMetrics create a new AdmissionMetrics, configured with default metric names. @@ -125,10 +139,21 @@ func newAdmissionMetrics() *AdmissionMetrics { []string{"name", "type", "operation", "rejected"}, "Admission webhook %s, identified by name and broken out for each operation and API resource and type (validate or admit).", false) + webhookRejection := metrics.NewCounterVec( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "webhook_rejection_count", + Help: "Admission webhook rejection count, identified by name and broken out for each admission type (validating or admit) and operation. Additional labels specify an error type (calling_webhook_error or apiserver_internal_error if an error occurred; no_error otherwise) and optionally a non-zero rejection code if the webhook rejects the request with an HTTP status code (honored by the apiserver when the code is greater or equal to 400). Codes greater than 600 are truncated to 600, to keep the metrics cardinality bounded.", + StabilityLevel: metrics.ALPHA, + }, + []string{"name", "type", "operation", "error_type", "rejection_code"}) + step.mustRegister() controller.mustRegister() webhook.mustRegister() - return &AdmissionMetrics{step: step, controller: controller, webhook: webhook} + legacyregistry.MustRegister(webhookRejection) + return &AdmissionMetrics{step: step, controller: controller, webhook: webhook, webhookRejection: webhookRejection} } func (m *AdmissionMetrics) reset() { @@ -152,34 +177,46 @@ func (m *AdmissionMetrics) ObserveWebhook(elapsed time.Duration, rejected bool, m.webhook.observe(elapsed, append(extraLabels, stepType, string(attr.GetOperation()), strconv.FormatBool(rejected))...) } +// ObserveWebhookRejection records admission related metrics for an admission webhook rejection. +func (m *AdmissionMetrics) ObserveWebhookRejection(name, stepType, operation string, errorType WebhookRejectionErrorType, rejectionCode int) { + // We truncate codes greater than 600 to keep the cardinality bounded. + // This should be rarely done by a malfunctioning webhook server. + if rejectionCode > 600 { + rejectionCode = 600 + } + m.webhookRejection.WithLabelValues(name, stepType, operation, string(errorType), strconv.Itoa(rejectionCode)).Inc() +} + type metricSet struct { - latencies *prometheus.HistogramVec - latenciesSummary *prometheus.SummaryVec + latencies *metrics.HistogramVec + latenciesSummary *metrics.SummaryVec } func newMetricSet(name string, labels []string, helpTemplate string, hasSummary bool) *metricSet { - var summary *prometheus.SummaryVec + var summary *metrics.SummaryVec if hasSummary { - summary = prometheus.NewSummaryVec( - prometheus.SummaryOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: fmt.Sprintf("%s_admission_duration_seconds_summary", name), - Help: fmt.Sprintf(helpTemplate, "latency summary in seconds"), - MaxAge: latencySummaryMaxAge, + summary = metrics.NewSummaryVec( + &metrics.SummaryOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: fmt.Sprintf("%s_admission_duration_seconds_summary", name), + Help: fmt.Sprintf(helpTemplate, "latency summary in seconds"), + MaxAge: latencySummaryMaxAge, + StabilityLevel: metrics.ALPHA, }, labels, ) } return &metricSet{ - latencies: prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: fmt.Sprintf("%s_admission_duration_seconds", name), - Help: fmt.Sprintf(helpTemplate, "latency histogram in seconds"), - Buckets: latencyBuckets, + latencies: metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: fmt.Sprintf("%s_admission_duration_seconds", name), + Help: fmt.Sprintf(helpTemplate, "latency histogram in seconds"), + Buckets: latencyBuckets, + StabilityLevel: metrics.ALPHA, }, labels, ), @@ -190,9 +227,9 @@ func newMetricSet(name string, labels []string, helpTemplate string, hasSummary // MustRegister registers all the prometheus metrics in the metricSet. func (m *metricSet) mustRegister() { - prometheus.MustRegister(m.latencies) + legacyregistry.MustRegister(m.latencies) if m.latenciesSummary != nil { - prometheus.MustRegister(m.latenciesSummary) + legacyregistry.MustRegister(m.latenciesSummary) } } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go index c6517bee31..1fbac45174 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go @@ -17,13 +17,14 @@ limitations under the License. package lifecycle import ( + "context" "fmt" "io" "time" "k8s.io/klog" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" @@ -73,7 +74,7 @@ var _ = initializer.WantsExternalKubeInformerFactory(&Lifecycle{}) var _ = initializer.WantsExternalKubeClientSet(&Lifecycle{}) // Admit makes an admission decision based on the request attributes -func (l *Lifecycle) Admit(a admission.Attributes, o admission.ObjectInterfaces) error { +func (l *Lifecycle) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error { // prevent deletion of immortal namespaces if a.GetOperation() == admission.Delete && a.GetKind().GroupKind() == v1.SchemeGroupVersion.WithKind("Namespace").GroupKind() && l.immortalNamespaces.Has(a.GetName()) { return errors.NewForbidden(a.GetResource().GroupResource(), a.GetName(), fmt.Errorf("this namespace may not be deleted")) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/BUILD.bazel index b66bb32e4e..9b6b6741a5 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/BUILD.bazel @@ -9,5 +9,8 @@ go_library( deps = [ "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go index 4442861234..4d5243ead6 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/accessors.go @@ -17,8 +17,13 @@ limitations under the License. package webhook import ( + "sync" + "k8s.io/api/admissionregistration/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + webhookutil "k8s.io/apiserver/pkg/util/webhook" + "k8s.io/client-go/rest" ) // WebhookAccessor provides a common interface to both mutating and validating webhook types. @@ -29,6 +34,13 @@ type WebhookAccessor interface { // GetConfigurationName gets the name of the webhook configuration that owns this webhook. GetConfigurationName() string + // GetRESTClient gets the webhook client + GetRESTClient(clientManager *webhookutil.ClientManager) (*rest.RESTClient, error) + // GetParsedNamespaceSelector gets the webhook NamespaceSelector field. + GetParsedNamespaceSelector() (labels.Selector, error) + // GetParsedObjectSelector gets the webhook ObjectSelector field. + GetParsedObjectSelector() (labels.Selector, error) + // GetName gets the webhook Name field. Note that the name is scoped to the webhook // configuration and does not provide a globally unique identity, if a unique identity is // needed, use GetUID. @@ -60,134 +72,226 @@ type WebhookAccessor interface { // NewMutatingWebhookAccessor creates an accessor for a MutatingWebhook. func NewMutatingWebhookAccessor(uid, configurationName string, h *v1beta1.MutatingWebhook) WebhookAccessor { - return mutatingWebhookAccessor{uid: uid, configurationName: configurationName, MutatingWebhook: h} + return &mutatingWebhookAccessor{uid: uid, configurationName: configurationName, MutatingWebhook: h} } type mutatingWebhookAccessor struct { *v1beta1.MutatingWebhook uid string configurationName string + + initObjectSelector sync.Once + objectSelector labels.Selector + objectSelectorErr error + + initNamespaceSelector sync.Once + namespaceSelector labels.Selector + namespaceSelectorErr error + + initClient sync.Once + client *rest.RESTClient + clientErr error } -func (m mutatingWebhookAccessor) GetUID() string { +func (m *mutatingWebhookAccessor) GetUID() string { return m.uid } -func (m mutatingWebhookAccessor) GetConfigurationName() string { +func (m *mutatingWebhookAccessor) GetConfigurationName() string { return m.configurationName } -func (m mutatingWebhookAccessor) GetName() string { +func (m *mutatingWebhookAccessor) GetRESTClient(clientManager *webhookutil.ClientManager) (*rest.RESTClient, error) { + m.initClient.Do(func() { + m.client, m.clientErr = clientManager.HookClient(hookClientConfigForWebhook(m)) + }) + return m.client, m.clientErr +} + +func (m *mutatingWebhookAccessor) GetParsedNamespaceSelector() (labels.Selector, error) { + m.initNamespaceSelector.Do(func() { + m.namespaceSelector, m.namespaceSelectorErr = metav1.LabelSelectorAsSelector(m.NamespaceSelector) + }) + return m.namespaceSelector, m.namespaceSelectorErr +} + +func (m *mutatingWebhookAccessor) GetParsedObjectSelector() (labels.Selector, error) { + m.initObjectSelector.Do(func() { + m.objectSelector, m.objectSelectorErr = metav1.LabelSelectorAsSelector(m.ObjectSelector) + }) + return m.objectSelector, m.objectSelectorErr +} + +func (m *mutatingWebhookAccessor) GetName() string { return m.Name } -func (m mutatingWebhookAccessor) GetClientConfig() v1beta1.WebhookClientConfig { +func (m *mutatingWebhookAccessor) GetClientConfig() v1beta1.WebhookClientConfig { return m.ClientConfig } -func (m mutatingWebhookAccessor) GetRules() []v1beta1.RuleWithOperations { +func (m *mutatingWebhookAccessor) GetRules() []v1beta1.RuleWithOperations { return m.Rules } -func (m mutatingWebhookAccessor) GetFailurePolicy() *v1beta1.FailurePolicyType { +func (m *mutatingWebhookAccessor) GetFailurePolicy() *v1beta1.FailurePolicyType { return m.FailurePolicy } -func (m mutatingWebhookAccessor) GetMatchPolicy() *v1beta1.MatchPolicyType { +func (m *mutatingWebhookAccessor) GetMatchPolicy() *v1beta1.MatchPolicyType { return m.MatchPolicy } -func (m mutatingWebhookAccessor) GetNamespaceSelector() *metav1.LabelSelector { +func (m *mutatingWebhookAccessor) GetNamespaceSelector() *metav1.LabelSelector { return m.NamespaceSelector } -func (m mutatingWebhookAccessor) GetObjectSelector() *metav1.LabelSelector { +func (m *mutatingWebhookAccessor) GetObjectSelector() *metav1.LabelSelector { return m.ObjectSelector } -func (m mutatingWebhookAccessor) GetSideEffects() *v1beta1.SideEffectClass { +func (m *mutatingWebhookAccessor) GetSideEffects() *v1beta1.SideEffectClass { return m.SideEffects } -func (m mutatingWebhookAccessor) GetTimeoutSeconds() *int32 { +func (m *mutatingWebhookAccessor) GetTimeoutSeconds() *int32 { return m.TimeoutSeconds } -func (m mutatingWebhookAccessor) GetAdmissionReviewVersions() []string { +func (m *mutatingWebhookAccessor) GetAdmissionReviewVersions() []string { return m.AdmissionReviewVersions } -func (m mutatingWebhookAccessor) GetMutatingWebhook() (*v1beta1.MutatingWebhook, bool) { +func (m *mutatingWebhookAccessor) GetMutatingWebhook() (*v1beta1.MutatingWebhook, bool) { return m.MutatingWebhook, true } -func (m mutatingWebhookAccessor) GetValidatingWebhook() (*v1beta1.ValidatingWebhook, bool) { +func (m *mutatingWebhookAccessor) GetValidatingWebhook() (*v1beta1.ValidatingWebhook, bool) { return nil, false } // NewValidatingWebhookAccessor creates an accessor for a ValidatingWebhook. func NewValidatingWebhookAccessor(uid, configurationName string, h *v1beta1.ValidatingWebhook) WebhookAccessor { - return validatingWebhookAccessor{uid: uid, configurationName: configurationName, ValidatingWebhook: h} + return &validatingWebhookAccessor{uid: uid, configurationName: configurationName, ValidatingWebhook: h} } type validatingWebhookAccessor struct { *v1beta1.ValidatingWebhook uid string configurationName string + + initObjectSelector sync.Once + objectSelector labels.Selector + objectSelectorErr error + + initNamespaceSelector sync.Once + namespaceSelector labels.Selector + namespaceSelectorErr error + + initClient sync.Once + client *rest.RESTClient + clientErr error } -func (v validatingWebhookAccessor) GetUID() string { +func (v *validatingWebhookAccessor) GetUID() string { return v.uid } -func (v validatingWebhookAccessor) GetConfigurationName() string { +func (v *validatingWebhookAccessor) GetConfigurationName() string { return v.configurationName } -func (v validatingWebhookAccessor) GetName() string { +func (v *validatingWebhookAccessor) GetRESTClient(clientManager *webhookutil.ClientManager) (*rest.RESTClient, error) { + v.initClient.Do(func() { + v.client, v.clientErr = clientManager.HookClient(hookClientConfigForWebhook(v)) + }) + return v.client, v.clientErr +} + +func (v *validatingWebhookAccessor) GetParsedNamespaceSelector() (labels.Selector, error) { + v.initNamespaceSelector.Do(func() { + v.namespaceSelector, v.namespaceSelectorErr = metav1.LabelSelectorAsSelector(v.NamespaceSelector) + }) + return v.namespaceSelector, v.namespaceSelectorErr +} + +func (v *validatingWebhookAccessor) GetParsedObjectSelector() (labels.Selector, error) { + v.initObjectSelector.Do(func() { + v.objectSelector, v.objectSelectorErr = metav1.LabelSelectorAsSelector(v.ObjectSelector) + }) + return v.objectSelector, v.objectSelectorErr +} + +func (v *validatingWebhookAccessor) GetName() string { return v.Name } -func (v validatingWebhookAccessor) GetClientConfig() v1beta1.WebhookClientConfig { +func (v *validatingWebhookAccessor) GetClientConfig() v1beta1.WebhookClientConfig { return v.ClientConfig } -func (v validatingWebhookAccessor) GetRules() []v1beta1.RuleWithOperations { +func (v *validatingWebhookAccessor) GetRules() []v1beta1.RuleWithOperations { return v.Rules } -func (v validatingWebhookAccessor) GetFailurePolicy() *v1beta1.FailurePolicyType { +func (v *validatingWebhookAccessor) GetFailurePolicy() *v1beta1.FailurePolicyType { return v.FailurePolicy } -func (v validatingWebhookAccessor) GetMatchPolicy() *v1beta1.MatchPolicyType { +func (v *validatingWebhookAccessor) GetMatchPolicy() *v1beta1.MatchPolicyType { return v.MatchPolicy } -func (v validatingWebhookAccessor) GetNamespaceSelector() *metav1.LabelSelector { +func (v *validatingWebhookAccessor) GetNamespaceSelector() *metav1.LabelSelector { return v.NamespaceSelector } -func (v validatingWebhookAccessor) GetObjectSelector() *metav1.LabelSelector { +func (v *validatingWebhookAccessor) GetObjectSelector() *metav1.LabelSelector { return v.ObjectSelector } -func (v validatingWebhookAccessor) GetSideEffects() *v1beta1.SideEffectClass { +func (v *validatingWebhookAccessor) GetSideEffects() *v1beta1.SideEffectClass { return v.SideEffects } -func (v validatingWebhookAccessor) GetTimeoutSeconds() *int32 { +func (v *validatingWebhookAccessor) GetTimeoutSeconds() *int32 { return v.TimeoutSeconds } -func (v validatingWebhookAccessor) GetAdmissionReviewVersions() []string { +func (v *validatingWebhookAccessor) GetAdmissionReviewVersions() []string { return v.AdmissionReviewVersions } -func (v validatingWebhookAccessor) GetMutatingWebhook() (*v1beta1.MutatingWebhook, bool) { +func (v *validatingWebhookAccessor) GetMutatingWebhook() (*v1beta1.MutatingWebhook, bool) { return nil, false } -func (v validatingWebhookAccessor) GetValidatingWebhook() (*v1beta1.ValidatingWebhook, bool) { +func (v *validatingWebhookAccessor) GetValidatingWebhook() (*v1beta1.ValidatingWebhook, bool) { return v.ValidatingWebhook, true } + +// hookClientConfigForWebhook construct a webhookutil.ClientConfig using a WebhookAccessor to access +// v1beta1.MutatingWebhook and v1beta1.ValidatingWebhook API objects. webhookutil.ClientConfig is used +// to create a HookClient and the purpose of the config struct is to share that with other packages +// that need to create a HookClient. +func hookClientConfigForWebhook(w WebhookAccessor) webhookutil.ClientConfig { + ret := webhookutil.ClientConfig{Name: w.GetName(), CABundle: w.GetClientConfig().CABundle} + if w.GetClientConfig().URL != nil { + ret.URL = *w.GetClientConfig().URL + } + if w.GetClientConfig().Service != nil { + ret.Service = &webhookutil.ClientConfigService{ + Name: w.GetClientConfig().Service.Name, + Namespace: w.GetClientConfig().Service.Namespace, + } + if w.GetClientConfig().Service.Port != nil { + ret.Service.Port = *w.GetClientConfig().Service.Port + } else { + ret.Service.Port = 443 + } + if w.GetClientConfig().Service.Path != nil { + ret.Service.Path = *w.GetClientConfig().Service.Path + } + } + return ret +} diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go index 51453a3589..a4a6aff51a 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go @@ -211,7 +211,7 @@ type attrWithResourceOverride struct { func (a *attrWithResourceOverride) GetResource() schema.GroupVersionResource { return a.resource } // Dispatch is called by the downstream Validate or Admit methods. -func (a *Webhook) Dispatch(attr admission.Attributes, o admission.ObjectInterfaces) error { +func (a *Webhook) Dispatch(ctx context.Context, attr admission.Attributes, o admission.ObjectInterfaces) error { if rules.IsWebhookConfigurationResource(attr) { return nil } @@ -219,8 +219,5 @@ func (a *Webhook) Dispatch(attr admission.Attributes, o admission.ObjectInterfac return admission.NewForbidden(attr, fmt.Errorf("not yet ready to handle request")) } hooks := a.hookSource.Webhooks() - // TODO: Figure out if adding one second timeout make sense here. - ctx := context.TODO() - return a.dispatcher.Dispatch(ctx, attr, o, hooks) } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD.bazel index 79c3c79e85..0715601752 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD.bazel @@ -29,7 +29,7 @@ go_library( "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util:go_default_library", + "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go index cf0e76a60c..7d32e65d99 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go @@ -40,11 +40,23 @@ import ( webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" webhookrequest "k8s.io/apiserver/pkg/admission/plugin/webhook/request" - "k8s.io/apiserver/pkg/admission/plugin/webhook/util" + auditinternal "k8s.io/apiserver/pkg/apis/audit" webhookutil "k8s.io/apiserver/pkg/util/webhook" utiltrace "k8s.io/utils/trace" ) +const ( + // PatchAuditAnnotationPrefix is a prefix for persisting webhook patch in audit annotation. + // Audit handler decides whether annotation with this prefix should be logged based on audit level. + // Since mutating webhook patches the request body, audit level must be greater or equal to Request + // for the annotation to be logged + PatchAuditAnnotationPrefix = "patch.webhook.admission.k8s.io/" + // MutationAuditAnnotationPrefix is a prefix for presisting webhook mutation existence in audit annotation. + MutationAuditAnnotationPrefix = "mutation.webhook.admission.k8s.io/" +) + +var encodingjson = json.CaseSensitiveJsonIterator() + type mutatingDispatcher struct { cm *webhookutil.ClientManager plugin *Plugin @@ -77,7 +89,7 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr admission.Attrib webhookReinvokeCtx.SetLastWebhookInvocationOutput(attr.GetObject()) }() var versionedAttr *generic.VersionedAttributes - for _, hook := range hooks { + for i, hook := range hooks { attrForCheck := attr if versionedAttr != nil { attrForCheck = versionedAttr @@ -116,9 +128,29 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr admission.Attrib } t := time.Now() - - changed, err := a.callAttrMutatingHook(ctx, hook, invocation, versionedAttr, o) - admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, versionedAttr.Attributes, "admit", hook.Name) + round := 0 + if reinvokeCtx.IsReinvoke() { + round = 1 + } + changed, err := a.callAttrMutatingHook(ctx, hook, invocation, versionedAttr, o, round, i) + ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore + rejected := false + if err != nil { + switch err := err.(type) { + case *webhookutil.ErrCallingWebhook: + if !ignoreClientCallFailures { + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "admit", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionCallingWebhookError, 0) + } + case *webhookutil.ErrWebhookRejection: + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "admit", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionNoError, int(err.Status.ErrStatus.Code)) + default: + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "admit", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionAPIServerInternalError, 0) + } + } + admissionmetrics.Metrics.ObserveWebhook(time.Since(t), rejected, versionedAttr.Attributes, "admit", hook.Name) if changed { // Patch had changed the object. Prepare to reinvoke all previous webhooks that are eligible for re-invocation. webhookReinvokeCtx.RequireReinvokingPreviouslyInvokedPlugins() @@ -131,16 +163,26 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr admission.Attrib continue } - ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore if callErr, ok := err.(*webhookutil.ErrCallingWebhook); ok { if ignoreClientCallFailures { klog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) utilruntime.HandleError(callErr) - continue + + select { + case <-ctx.Done(): + // parent context is canceled or timed out, no point in continuing + return apierrors.NewTimeoutError("request did not complete within requested timeout", 0) + default: + // individual webhook timed out, but parent context did not, continue + continue + } } klog.Warningf("Failed calling webhook, failing closed %v: %v", hook.Name, err) return apierrors.NewInternalError(err) } + if rejectionErr, ok := err.(*webhookutil.ErrWebhookRejection); ok { + return rejectionErr.Status + } return err } @@ -154,7 +196,11 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr admission.Attrib // note that callAttrMutatingHook updates attr -func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta1.MutatingWebhook, invocation *generic.WebhookInvocation, attr *generic.VersionedAttributes, o admission.ObjectInterfaces) (bool, error) { +func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta1.MutatingWebhook, invocation *generic.WebhookInvocation, attr *generic.VersionedAttributes, o admission.ObjectInterfaces, round, idx int) (bool, error) { + configurationName := invocation.Webhook.GetConfigurationName() + annotator := newWebhookAnnotator(attr, round, idx, h.Name, configurationName) + changed := false + defer func() { annotator.addMutationAnnotation(changed) }() if attr.Attributes.IsDryRun() { if h.SideEffects == nil { return false, &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook SideEffects is nil")} @@ -169,22 +215,41 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta return false, &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } // Make the webhook request - client, err := a.cm.HookClient(util.HookClientConfigForWebhook(invocation.Webhook)) + client, err := invocation.Webhook.GetRESTClient(a.cm) if err != nil { return false, &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } trace := utiltrace.New("Call mutating webhook", - utiltrace.Field{"configuration", invocation.Webhook.GetConfigurationName()}, + utiltrace.Field{"configuration", configurationName}, utiltrace.Field{"webhook", h.Name}, utiltrace.Field{"resource", attr.GetResource()}, utiltrace.Field{"subresource", attr.GetSubresource()}, utiltrace.Field{"operation", attr.GetOperation()}, utiltrace.Field{"UID", uid}) defer trace.LogIfLong(500 * time.Millisecond) - r := client.Post().Context(ctx).Body(request) + + // if the webhook has a specific timeout, wrap the context to apply it if h.TimeoutSeconds != nil { - r = r.Timeout(time.Duration(*h.TimeoutSeconds) * time.Second) + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, time.Duration(*h.TimeoutSeconds)*time.Second) + defer cancel() + } + + r := client.Post().Context(ctx).Body(request) + + // if the context has a deadline, set it as a parameter to inform the backend + if deadline, hasDeadline := ctx.Deadline(); hasDeadline { + // compute the timeout + if timeout := time.Until(deadline); timeout > 0 { + // if it's not an even number of seconds, round up to the nearest second + if truncated := timeout.Truncate(time.Second); truncated != timeout { + timeout = truncated + time.Second + } + // set the timeout + r.Timeout(timeout) + } } + if err := r.Do().Into(response); err != nil { return false, &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } @@ -203,7 +268,7 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta } if !result.Allowed { - return false, webhookerrors.ToStatusErr(h.Name, result.Result) + return false, &webhookutil.ErrWebhookRejection{Status: webhookerrors.ToStatusErr(h.Name, result.Result)} } if len(result.Patch) == 0 { @@ -213,6 +278,7 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta if err != nil { return false, apierrors.NewInternalError(err) } + if len(patchObj) == 0 { return false, nil } @@ -257,10 +323,103 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta return false, apierrors.NewInternalError(err) } - changed := !apiequality.Semantic.DeepEqual(attr.VersionedObject, newVersionedObject) + changed = !apiequality.Semantic.DeepEqual(attr.VersionedObject, newVersionedObject) trace.Step("Patch applied") + annotator.addPatchAnnotation(patchObj, result.PatchType) attr.Dirty = true attr.VersionedObject = newVersionedObject o.GetObjectDefaulter().Default(attr.VersionedObject) return changed, nil } + +type webhookAnnotator struct { + attr *generic.VersionedAttributes + patchAnnotationKey string + mutationAnnotationKey string + webhook string + configuration string +} + +func newWebhookAnnotator(attr *generic.VersionedAttributes, round, idx int, webhook, configuration string) *webhookAnnotator { + return &webhookAnnotator{ + attr: attr, + patchAnnotationKey: fmt.Sprintf("%sround_%d_index_%d", PatchAuditAnnotationPrefix, round, idx), + mutationAnnotationKey: fmt.Sprintf("%sround_%d_index_%d", MutationAuditAnnotationPrefix, round, idx), + webhook: webhook, + configuration: configuration, + } +} + +func (w *webhookAnnotator) addMutationAnnotation(mutated bool) { + if w.attr == nil || w.attr.Attributes == nil { + return + } + value, err := mutationAnnotationValue(w.configuration, w.webhook, mutated) + if err != nil { + klog.Warningf("unexpected error composing mutating webhook annotation: %v", err) + return + } + if err := w.attr.Attributes.AddAnnotation(w.mutationAnnotationKey, value); err != nil { + klog.Warningf("failed to set mutation annotation for mutating webhook key %s to %s: %v", w.mutationAnnotationKey, value, err) + } +} + +func (w *webhookAnnotator) addPatchAnnotation(patch interface{}, patchType admissionv1.PatchType) { + if w.attr == nil || w.attr.Attributes == nil { + return + } + var value string + var err error + switch patchType { + case admissionv1.PatchTypeJSONPatch: + value, err = jsonPatchAnnotationValue(w.configuration, w.webhook, patch) + if err != nil { + klog.Warningf("unexpected error composing mutating webhook JSON patch annotation: %v", err) + return + } + default: + klog.Warningf("unsupported patch type for mutating webhook annotation: %v", patchType) + return + } + if err := w.attr.Attributes.AddAnnotationWithLevel(w.patchAnnotationKey, value, auditinternal.LevelRequest); err != nil { + // NOTE: we don't log actual patch in kube-apiserver log to avoid potentially + // leaking information + klog.Warningf("failed to set patch annotation for mutating webhook key %s; confugiration name: %s, webhook name: %s", w.patchAnnotationKey, w.configuration, w.webhook) + } +} + +// MutationAuditAnnotation logs if a webhook invocation mutated the request object +type MutationAuditAnnotation struct { + Configuration string `json:"configuration"` + Webhook string `json:"webhook"` + Mutated bool `json:"mutated"` +} + +// PatchAuditAnnotation logs a patch from a mutating webhook +type PatchAuditAnnotation struct { + Configuration string `json:"configuration"` + Webhook string `json:"webhook"` + Patch interface{} `json:"patch,omitempty"` + PatchType string `json:"patchType,omitempty"` +} + +func mutationAnnotationValue(configuration, webhook string, mutated bool) (string, error) { + m := MutationAuditAnnotation{ + Configuration: configuration, + Webhook: webhook, + Mutated: mutated, + } + bytes, err := encodingjson.Marshal(m) + return string(bytes), err +} + +func jsonPatchAnnotationValue(configuration, webhook string, patch interface{}) (string, error) { + p := PatchAuditAnnotation{ + Configuration: configuration, + Webhook: webhook, + Patch: patch, + PatchType: string(admissionv1.PatchTypeJSONPatch), + } + bytes, err := encodingjson.Marshal(p) + return string(bytes), err +} diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go index 6202fbc63f..fb07a61c1b 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go @@ -17,6 +17,7 @@ limitations under the License. package mutating import ( + "context" "io" "k8s.io/apiserver/pkg/admission" @@ -70,6 +71,6 @@ func (a *Plugin) ValidateInitialization() error { } // Admit makes an admission decision based on the request attributes. -func (a *Plugin) Admit(attr admission.Attributes, o admission.ObjectInterfaces) error { - return a.Webhook.Dispatch(attr, o) +func (a *Plugin) Admit(ctx context.Context, attr admission.Attributes, o admission.ObjectInterfaces) error { + return a.Webhook.Dispatch(ctx, attr, o) } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/matcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/matcher.go index 4530de3e60..eb7d5ec4c8 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/matcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/matcher.go @@ -95,8 +95,7 @@ func (m *Matcher) MatchNamespaceSelector(h webhook.WebhookAccessor, attr admissi // Also update the comment in types.go return true, nil } - // TODO: adding an LRU cache to cache the translation - selector, err := metav1.LabelSelectorAsSelector(h.GetNamespaceSelector()) + selector, err := h.GetParsedNamespaceSelector() if err != nil { return false, apierrors.NewInternalError(err) } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD.bazel index 13eeafefb2..a123e87b6d 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/BUILD.bazel @@ -12,7 +12,6 @@ go_library( deps = [ "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go index be341dd95c..da1b1e0394 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/object/matcher.go @@ -19,7 +19,6 @@ package object import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/admission" @@ -47,8 +46,7 @@ func matchObject(obj runtime.Object, selector labels.Selector) bool { // MatchObjectSelector decideds whether the request matches the ObjectSelector // of the webhook. Only when they match, the webhook is called. func (m *Matcher) MatchObjectSelector(h webhook.WebhookAccessor, attr admission.Attributes) (bool, *apierrors.StatusError) { - // TODO: adding an LRU cache to cache the translation - selector, err := metav1.LabelSelectorAsSelector(h.GetObjectSelector()) + selector, err := h.GetParsedObjectSelector() if err != nil { return false, apierrors.NewInternalError(err) } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/BUILD.bazel deleted file mode 100644 index d3e4c52e9d..0000000000 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["client_config.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util", - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", - ], -) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/client_config.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/client_config.go deleted file mode 100644 index b9907286fc..0000000000 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util/client_config.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "k8s.io/apiserver/pkg/admission/plugin/webhook" - webhookutil "k8s.io/apiserver/pkg/util/webhook" -) - -// HookClientConfigForWebhook construct a webhookutil.ClientConfig using a WebhookAccessor to access -// v1beta1.MutatingWebhook and v1beta1.ValidatingWebhook API objects. webhookutil.ClientConfig is used -// to create a HookClient and the purpose of the config struct is to share that with other packages -// that need to create a HookClient. -func HookClientConfigForWebhook(w webhook.WebhookAccessor) webhookutil.ClientConfig { - ret := webhookutil.ClientConfig{Name: w.GetName(), CABundle: w.GetClientConfig().CABundle} - if w.GetClientConfig().URL != nil { - ret.URL = *w.GetClientConfig().URL - } - if w.GetClientConfig().Service != nil { - ret.Service = &webhookutil.ClientConfigService{ - Name: w.GetClientConfig().Service.Name, - Namespace: w.GetClientConfig().Service.Namespace, - } - if w.GetClientConfig().Service.Port != nil { - ret.Service.Port = *w.GetClientConfig().Service.Port - } else { - ret.Service.Port = 443 - } - if w.GetClientConfig().Service.Path != nil { - ret.Service.Path = *w.GetClientConfig().Service.Path - } - } - return ret -} - -// HasAdmissionReviewVersion check whether a version is accepted by a given webhook. -func HasAdmissionReviewVersion(a string, w webhook.WebhookAccessor) bool { - for _, b := range w.GetAdmissionReviewVersions() { - if b == a { - return true - } - } - return false -} diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD.bazel index 9f7e8f8e06..bb4d071c5d 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD.bazel @@ -22,7 +22,6 @@ go_library( "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/util:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go index 6525524f5b..20a115acd7 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go @@ -32,7 +32,6 @@ import ( webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" webhookrequest "k8s.io/apiserver/pkg/admission/plugin/webhook/request" - "k8s.io/apiserver/pkg/admission/plugin/webhook/util" webhookutil "k8s.io/apiserver/pkg/util/webhook" "k8s.io/klog" utiltrace "k8s.io/utils/trace" @@ -80,6 +79,14 @@ func (d *validatingDispatcher) Dispatch(ctx context.Context, attr admission.Attr return nil } + // Check if the request has already timed out before spawning remote calls + select { + case <-ctx.Done(): + // parent context is canceled or timed out, no point in continuing + return apierrors.NewTimeoutError("request did not complete within requested timeout", 0) + default: + } + wg := sync.WaitGroup{} errCh := make(chan error, len(relevantHooks)) wg.Add(len(relevantHooks)) @@ -94,12 +101,28 @@ func (d *validatingDispatcher) Dispatch(ctx context.Context, attr admission.Attr versionedAttr := versionedAttrs[invocation.Kind] t := time.Now() err := d.callHook(ctx, hook, invocation, versionedAttr) - admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, versionedAttr.Attributes, "validating", hook.Name) + ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore + rejected := false + if err != nil { + switch err := err.(type) { + case *webhookutil.ErrCallingWebhook: + if !ignoreClientCallFailures { + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "validating", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionCallingWebhookError, 0) + } + case *webhookutil.ErrWebhookRejection: + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "validating", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionNoError, int(err.Status.ErrStatus.Code)) + default: + rejected = true + admissionmetrics.Metrics.ObserveWebhookRejection(hook.Name, "validating", string(versionedAttr.Attributes.GetOperation()), admissionmetrics.WebhookRejectionAPIServerInternalError, 0) + } + } + admissionmetrics.Metrics.ObserveWebhook(time.Since(t), rejected, versionedAttr.Attributes, "validating", hook.Name) if err == nil { return } - ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore if callErr, ok := err.(*webhookutil.ErrCallingWebhook); ok { if ignoreClientCallFailures { klog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) @@ -112,6 +135,9 @@ func (d *validatingDispatcher) Dispatch(ctx context.Context, attr admission.Attr return } + if rejectionErr, ok := err.(*webhookutil.ErrWebhookRejection); ok { + err = rejectionErr.Status + } klog.Warningf("rejected by webhook %q: %#v", hook.Name, err) errCh <- err }(relevantHooks[i]) @@ -150,7 +176,7 @@ func (d *validatingDispatcher) callHook(ctx context.Context, h *v1beta1.Validati return &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } // Make the webhook request - client, err := d.cm.HookClient(util.HookClientConfigForWebhook(invocation.Webhook)) + client, err := invocation.Webhook.GetRESTClient(d.cm) if err != nil { return &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } @@ -162,10 +188,29 @@ func (d *validatingDispatcher) callHook(ctx context.Context, h *v1beta1.Validati utiltrace.Field{"operation", attr.GetOperation()}, utiltrace.Field{"UID", uid}) defer trace.LogIfLong(500 * time.Millisecond) - r := client.Post().Context(ctx).Body(request) + + // if the webhook has a specific timeout, wrap the context to apply it if h.TimeoutSeconds != nil { - r = r.Timeout(time.Duration(*h.TimeoutSeconds) * time.Second) + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, time.Duration(*h.TimeoutSeconds)*time.Second) + defer cancel() + } + + r := client.Post().Context(ctx).Body(request) + + // if the context has a deadline, set it as a parameter to inform the backend + if deadline, hasDeadline := ctx.Deadline(); hasDeadline { + // compute the timeout + if timeout := time.Until(deadline); timeout > 0 { + // if it's not an even number of seconds, round up to the nearest second + if truncated := timeout.Truncate(time.Second); truncated != timeout { + timeout = truncated + time.Second + } + // set the timeout + r.Timeout(timeout) + } } + if err := r.Do().Into(response); err != nil { return &webhookutil.ErrCallingWebhook{WebhookName: h.Name, Reason: err} } @@ -185,5 +230,5 @@ func (d *validatingDispatcher) callHook(ctx context.Context, h *v1beta1.Validati if result.Allowed { return nil } - return webhookerrors.ToStatusErr(h.Name, result.Result) + return &webhookutil.ErrWebhookRejection{Status: webhookerrors.ToStatusErr(h.Name, result.Result)} } diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go index 30e5c9d331..6972877b18 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go +++ b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go @@ -17,6 +17,7 @@ limitations under the License. package validating import ( + "context" "io" "k8s.io/apiserver/pkg/admission" @@ -61,6 +62,6 @@ func NewValidatingAdmissionWebhook(configFile io.Reader) (*Plugin, error) { } // Validate makes an admission decision based on the request attributes. -func (a *Plugin) Validate(attr admission.Attributes, o admission.ObjectInterfaces) error { - return a.Webhook.Dispatch(attr, o) +func (a *Plugin) Validate(ctx context.Context, attr admission.Attributes, o admission.ObjectInterfaces) error { + return a.Webhook.Dispatch(ctx, attr, o) } diff --git a/vendor/k8s.io/apiserver/pkg/admission/reinvocation.go b/vendor/k8s.io/apiserver/pkg/admission/reinvocation.go index b99e604e05..f93c703a11 100644 --- a/vendor/k8s.io/apiserver/pkg/admission/reinvocation.go +++ b/vendor/k8s.io/apiserver/pkg/admission/reinvocation.go @@ -16,6 +16,8 @@ limitations under the License. package admission +import "context" + // newReinvocationHandler creates a handler that wraps the provided admission chain and reinvokes it // if needed according to re-invocation policy of the webhooks. func newReinvocationHandler(admissionChain Interface) Interface { @@ -30,9 +32,9 @@ type reinvoker struct { // admission chain if needed according to the reinvocation policy. Plugins are expected to check // the admission attributes' reinvocation context against their reinvocation policy to decide if // they should re-run, and to update the reinvocation context if they perform any mutations. -func (r *reinvoker) Admit(a Attributes, o ObjectInterfaces) error { +func (r *reinvoker) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error { if mutator, ok := r.admissionChain.(MutationInterface); ok { - err := mutator.Admit(a, o) + err := mutator.Admit(ctx, a, o) if err != nil { return err } @@ -42,16 +44,16 @@ func (r *reinvoker) Admit(a Attributes, o ObjectInterfaces) error { // Calling admit a second time will reinvoke all in-tree plugins // as well as any webhook plugins that need to be reinvoked based on the // reinvocation policy. - return mutator.Admit(a, o) + return mutator.Admit(ctx, a, o) } } return nil } // Validate performs an admission control check using the wrapped admission chain, and returns immediately on first error. -func (r *reinvoker) Validate(a Attributes, o ObjectInterfaces) error { +func (r *reinvoker) Validate(ctx context.Context, a Attributes, o ObjectInterfaces) error { if validator, ok := r.admissionChain.(ValidationInterface); ok { - return validator.Validate(a, o) + return validator.Validate(ctx, a, o) } return nil } diff --git a/vendor/k8s.io/apiserver/pkg/audit/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/audit/BUILD.bazel index 1883dd303f..e786d37f1f 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/audit/BUILD.bazel @@ -15,7 +15,6 @@ go_library( visibility = ["//visibility:public"], deps = [ "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", @@ -31,6 +30,8 @@ go_library( "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/audit/metrics.go b/vendor/k8s.io/apiserver/pkg/audit/metrics.go index 9b81b30cc2..88d4154e8a 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/audit/metrics.go @@ -19,8 +19,9 @@ package audit import ( "fmt" - "github.com/prometheus/client_golang/prometheus" auditinternal "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" "k8s.io/klog" ) @@ -28,46 +29,58 @@ const ( subsystem = "apiserver_audit" ) +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ var ( - eventCounter = prometheus.NewCounter( - prometheus.CounterOpts{ - Subsystem: subsystem, - Name: "event_total", - Help: "Counter of audit events generated and sent to the audit backend.", + eventCounter = metrics.NewCounter( + &metrics.CounterOpts{ + Subsystem: subsystem, + Name: "event_total", + Help: "Counter of audit events generated and sent to the audit backend.", + StabilityLevel: metrics.ALPHA, }) - errorCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ + errorCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ Subsystem: subsystem, Name: "error_total", Help: "Counter of audit events that failed to be audited properly. " + "Plugin identifies the plugin affected by the error.", + StabilityLevel: metrics.ALPHA, }, []string{"plugin"}, ) - levelCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Subsystem: subsystem, - Name: "level_total", - Help: "Counter of policy levels for audit events (1 per request).", + levelCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: subsystem, + Name: "level_total", + Help: "Counter of policy levels for audit events (1 per request).", + StabilityLevel: metrics.ALPHA, }, []string{"level"}, ) - ApiserverAuditDroppedCounter = prometheus.NewCounter( - prometheus.CounterOpts{ + ApiserverAuditDroppedCounter = metrics.NewCounter( + &metrics.CounterOpts{ Subsystem: subsystem, Name: "requests_rejected_total", Help: "Counter of apiserver requests rejected due to an error " + "in audit logging backend.", + StabilityLevel: metrics.ALPHA, }, ) ) func init() { - prometheus.MustRegister(eventCounter) - prometheus.MustRegister(errorCounter) - prometheus.MustRegister(levelCounter) - prometheus.MustRegister(ApiserverAuditDroppedCounter) + legacyregistry.MustRegister(eventCounter) + legacyregistry.MustRegister(errorCounter) + legacyregistry.MustRegister(levelCounter) + legacyregistry.MustRegister(ApiserverAuditDroppedCounter) } // ObserveEvent updates the relevant prometheus metrics for the generated audit event. diff --git a/vendor/k8s.io/apiserver/pkg/audit/request.go b/vendor/k8s.io/apiserver/pkg/audit/request.go index 9cbbb90dad..7099e9622c 100644 --- a/vendor/k8s.io/apiserver/pkg/audit/request.go +++ b/vendor/k8s.io/apiserver/pkg/audit/request.go @@ -230,16 +230,6 @@ func LogAnnotation(ae *auditinternal.Event, key, value string) { ae.Annotations[key] = value } -// LogAnnotations fills in the Annotations according to the annotations map. -func LogAnnotations(ae *auditinternal.Event, annotations map[string]string) { - if ae == nil || ae.Level.Less(auditinternal.LevelMetadata) { - return - } - for key, value := range annotations { - LogAnnotation(ae, key, value) - } -} - // truncate User-Agent if too long, otherwise return it directly. func maybeTruncateUserAgent(req *http.Request) string { ua := req.UserAgent() diff --git a/vendor/k8s.io/apiserver/pkg/authentication/request/x509/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/authentication/request/x509/BUILD.bazel index 650454f99e..a0752f2d27 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/request/x509/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/authentication/request/x509/BUILD.bazel @@ -10,10 +10,11 @@ go_library( importpath = "k8s.io/apiserver/pkg/authentication/request/x509", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/authentication/request/x509/x509.go b/vendor/k8s.io/apiserver/pkg/authentication/request/x509/x509.go index 5e91034aa2..d45c863402 100644 --- a/vendor/k8s.io/apiserver/pkg/authentication/request/x509/x509.go +++ b/vendor/k8s.io/apiserver/pkg/authentication/request/x509/x509.go @@ -23,16 +23,24 @@ import ( "net/http" "time" - "github.com/prometheus/client_golang/prometheus" - utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) -var clientCertificateExpirationHistogram = prometheus.NewHistogram( - prometheus.HistogramOpts{ +/* + * By default, the following metric is defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ +var clientCertificateExpirationHistogram = metrics.NewHistogram( + &metrics.HistogramOpts{ Namespace: "apiserver", Subsystem: "client", Name: "certificate_expiration_seconds", @@ -53,11 +61,12 @@ var clientCertificateExpirationHistogram = prometheus.NewHistogram( (6 * 30 * 24 * time.Hour).Seconds(), (12 * 30 * 24 * time.Hour).Seconds(), }, + StabilityLevel: metrics.ALPHA, }, ) func init() { - prometheus.MustRegister(clientCertificateExpirationHistogram) + legacyregistry.MustRegister(clientCertificateExpirationHistogram) } // UserConversion defines an interface for extracting user info from a client certificate chain diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD.bazel index ebe992e1a9..f4a9fc9b5a 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/BUILD.bazel @@ -7,6 +7,7 @@ go_library( "authentication.go", "authn_audit.go", "authorization.go", + "cachecontrol.go", "doc.go", "impersonation.go", "requestinfo.go", @@ -15,7 +16,6 @@ go_library( importpath = "k8s.io/apiserver/pkg/endpoints/filters", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/api/authentication/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", @@ -33,6 +33,8 @@ go_library( "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/k8s.io/apiserver/pkg/server/httplog:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go index d9f70efac2..7e8f2baa50 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/authentication.go @@ -21,29 +21,53 @@ import ( "net/http" "strings" - "github.com/prometheus/client_golang/prometheus" - "k8s.io/klog" - apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/klog" +) + +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ +const ( + successLabel = "success" + failureLabel = "failure" + errorLabel = "error" ) var ( - authenticatedUserCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "authenticated_user_requests", - Help: "Counter of authenticated requests broken out by username.", + authenticatedUserCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "authenticated_user_requests", + Help: "Counter of authenticated requests broken out by username.", + StabilityLevel: metrics.ALPHA, }, []string{"username"}, ) + + authenticatedAttemptsCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "authentication_attempts", + Help: "Counter of authenticated attempts.", + }, + []string{"result"}, + ) ) func init() { - prometheus.MustRegister(authenticatedUserCounter) + legacyregistry.MustRegister(authenticatedUserCounter) + legacyregistry.MustRegister(authenticatedAttemptsCounter) } // WithAuthentication creates an http handler that tries to authenticate the given request as a user, and then @@ -63,7 +87,11 @@ func WithAuthentication(handler http.Handler, auth authenticator.Request, failed if err != nil || !ok { if err != nil { klog.Errorf("Unable to authenticate the request due to an error: %v", err) + authenticatedAttemptsCounter.WithLabelValues(errorLabel).Inc() + } else if !ok { + authenticatedAttemptsCounter.WithLabelValues(failureLabel).Inc() } + failed.ServeHTTP(w, req) return } @@ -77,6 +105,7 @@ func WithAuthentication(handler http.Handler, auth authenticator.Request, failed req = req.WithContext(genericapirequest.WithUser(req.Context(), resp.User)) authenticatedUserCounter.WithLabelValues(compressUsername(resp.User.GetName())).Inc() + authenticatedAttemptsCounter.WithLabelValues(successLabel).Inc() handler.ServeHTTP(w, req) }) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/filters/cachecontrol.go b/vendor/k8s.io/apiserver/pkg/endpoints/filters/cachecontrol.go new file mode 100644 index 0000000000..e19f9d055f --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/endpoints/filters/cachecontrol.go @@ -0,0 +1,33 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package filters + +import ( + "net/http" +) + +// WithCacheControl sets the Cache-Control header to "no-cache, private" because all servers are protected by authn/authz. +// see https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#defining_optimal_cache-control_policy +func WithCacheControl(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + // Set the cache-control header if it is not already set + if _, ok := w.Header()["Cache-Control"]; !ok { + w.Header().Set("Cache-Control", "no-cache, private") + } + handler.ServeHTTP(w, req) + }) +} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go index ae3fbcae0f..6dc143a7b0 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go @@ -57,21 +57,24 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.URL.Query().Get("timeout")) - var ( - namespace, name string - err error - ) - if includeName { - namespace, name, err = scope.Namer.Name(req) - } else { - namespace, err = scope.Namer.Namespace(req) - } + namespace, name, err := scope.Namer.Name(req) if err != nil { - scope.err(err, w, req) - return + if includeName { + // name was required, return + scope.err(err, w, req) + return + } + + // otherwise attempt to look up the namespace + namespace, err = scope.Namer.Namespace(req) + if err != nil { + scope.err(err, w, req) + return + } } - ctx := req.Context() + ctx, cancel := context.WithTimeout(req.Context(), timeout) + defer cancel() ctx = request.WithNamespace(ctx, namespace) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) if err != nil { @@ -129,9 +132,14 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) userInfo, _ := request.UserFrom(ctx) + + // On create, get name from new object if unset + if len(name) == 0 { + _, name, _ = scope.Namer.ObjectName(obj) + } admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, options, dryrun.IsDryRun(options.DryRun), userInfo) if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) { - err = mutatingAdmission.Admit(admissionAttributes, scope) + err = mutatingAdmission.Admit(ctx, admissionAttributes, scope) if err != nil { scope.err(err, w, req) return diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go index 08ba77650f..f84e62332a 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go @@ -17,6 +17,7 @@ limitations under the License. package handlers import ( + "context" "fmt" "net/http" "time" @@ -59,7 +60,8 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope *RequestSc scope.err(err, w, req) return } - ctx := req.Context() + ctx, cancel := context.WithTimeout(req.Context(), timeout) + defer cancel() ctx = request.WithNamespace(ctx, namespace) ae := request.AuditEventFrom(ctx) admit = admission.WithAudit(admit, ae) @@ -177,7 +179,8 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc return } - ctx := req.Context() + ctx, cancel := context.WithTimeout(req.Context(), timeout) + defer cancel() ctx = request.WithNamespace(ctx, namespace) ae := request.AuditEventFrom(ctx) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go index d6d21d450d..54a4eae00f 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/fieldmanager.go @@ -48,7 +48,7 @@ type FieldManager struct { // NewFieldManager creates a new FieldManager that merges apply requests // and update managed fields for other types of requests. func NewFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) (*FieldManager, error) { - typeConverter, err := internal.NewTypeConverter(models) + typeConverter, err := internal.NewTypeConverter(models, false) if err != nil { return nil, err } @@ -66,19 +66,26 @@ func NewFieldManager(models openapiproto.Models, objectConverter runtime.ObjectC } // NewCRDFieldManager creates a new FieldManager specifically for -// CRDs. This doesn't use openapi models (and it doesn't support the -// validation field right now). -func NewCRDFieldManager(objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion) *FieldManager { +// CRDs. This allows for the possibility of fields which are not defined +// in models, as well as having no models defined at all. +func NewCRDFieldManager(models openapiproto.Models, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, preserveUnknownFields bool) (_ *FieldManager, err error) { + var typeConverter internal.TypeConverter = internal.DeducedTypeConverter{} + if models != nil { + typeConverter, err = internal.NewTypeConverter(models, preserveUnknownFields) + if err != nil { + return nil, err + } + } return &FieldManager{ - typeConverter: internal.DeducedTypeConverter{}, + typeConverter: typeConverter, objectConverter: objectConverter, objectDefaulter: objectDefaulter, groupVersion: gv, hubVersion: hub, updater: merge.Updater{ - Converter: internal.NewCRDVersionConverter(internal.DeducedTypeConverter{}, objectConverter, hub), + Converter: internal.NewCRDVersionConverter(typeConverter, objectConverter, hub), }, - } + }, nil } // Update is used when the object has already been merged (non-apply @@ -98,12 +105,16 @@ func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (r // If the managed field is empty or we failed to decode it, // let's try the live object. This is to prevent clients who // don't understand managedFields from deleting it accidentally. - if err != nil || len(managed) == 0 { + if err != nil || len(managed.Fields) == 0 { managed, err = internal.DecodeObjectManagedFields(liveObj) if err != nil { return nil, fmt.Errorf("failed to decode managed fields: %v", err) } } + // if managed field is still empty, skip updating managed fields altogether + if len(managed.Fields) == 0 { + return newObj, nil + } newObjVersioned, err := f.toVersioned(newObj) if err != nil { return nil, fmt.Errorf("failed to convert new object to proper version: %v", err) @@ -127,17 +138,32 @@ func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (r return newObj, nil } apiVersion := fieldpath.APIVersion(f.groupVersion.String()) - manager, err = f.buildManagerInfo(manager, metav1.ManagedFieldsOperationUpdate) - if err != nil { - return nil, fmt.Errorf("failed to build manager identifier: %v", err) - } // TODO(apelisse) use the first return value when unions are implemented - _, managed, err = f.updater.Update(liveObjTyped, newObjTyped, apiVersion, managed, manager) + _, managed.Fields, err = f.updater.Update(liveObjTyped, newObjTyped, apiVersion, managed.Fields, manager) if err != nil { return nil, fmt.Errorf("failed to update ManagedFields: %v", err) } - managed = f.stripFields(managed, manager) + managed.Fields = f.stripFields(managed.Fields, manager) + + // If the current operation took any fields from anything, it means the object changed, + // so update the timestamp of the managedFieldsEntry and merge with any previous updates from the same manager + if vs, ok := managed.Fields[manager]; ok { + delete(managed.Fields, manager) + + // Build a manager identifier which will only match previous updates from the same manager + manager, err = f.buildManagerInfo(manager, metav1.ManagedFieldsOperationUpdate) + if err != nil { + return nil, fmt.Errorf("failed to build manager identifier: %v", err) + } + + managed.Times[manager] = &metav1.Time{Time: time.Now().UTC()} + if previous, ok := managed.Fields[manager]; ok { + managed.Fields[manager] = fieldpath.NewVersionedSet(vs.Set().Union(previous.Set()), vs.APIVersion(), vs.Applied()) + } else { + managed.Fields[manager] = vs + } + } if err := internal.EncodeObjectManagedFields(newObj, managed); err != nil { return nil, fmt.Errorf("failed to encode managed fields: %v", err) @@ -150,9 +176,11 @@ func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (r // object and update the managed fields. func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, fieldManager string, force bool) (runtime.Object, error) { // If the object doesn't have metadata, apply isn't allowed. - if _, err := meta.Accessor(liveObj); err != nil { + accessor, err := meta.Accessor(liveObj) + if err != nil { return nil, fmt.Errorf("couldn't get accessor: %v", err) } + missingManagedFields := (len(accessor.GetManagedFields()) == 0) managed, err := internal.DecodeObjectManagedFields(liveObj) if err != nil { @@ -192,14 +220,34 @@ func (f *FieldManager) Apply(liveObj runtime.Object, patch []byte, fieldManager } apiVersion := fieldpath.APIVersion(f.groupVersion.String()) - newObjTyped, managed, err := f.updater.Apply(liveObjTyped, patchObjTyped, apiVersion, managed, manager, force) + // if managed field is missing, create a single entry for all the fields + if missingManagedFields { + unknownManager, err := internal.BuildManagerIdentifier(&metav1.ManagedFieldsEntry{ + Manager: "before-first-apply", + Operation: metav1.ManagedFieldsOperationUpdate, + APIVersion: f.groupVersion.String(), + }) + if err != nil { + return nil, fmt.Errorf("failed to create manager for existing fields: %v", err) + } + unknownFieldSet, err := liveObjTyped.ToFieldSet() + if err != nil { + return nil, fmt.Errorf("failed to create fieldset for existing fields: %v", err) + } + managed.Fields[unknownManager] = fieldpath.NewVersionedSet(unknownFieldSet, apiVersion, false) + f.stripFields(managed.Fields, unknownManager) + } + newObjTyped, managedFields, err := f.updater.Apply(liveObjTyped, patchObjTyped, apiVersion, managed.Fields, manager, force) if err != nil { if conflicts, ok := err.(merge.Conflicts); ok { return nil, internal.NewConflictError(conflicts) } return nil, err } - managed = f.stripFields(managed, manager) + managed.Fields = f.stripFields(managedFields, manager) + + // Update the time in the managedFieldsEntry for this operation + managed.Times[manager] = &metav1.Time{Time: time.Now().UTC()} newObj, err := f.typeConverter.TypedToObject(newObjTyped) if err != nil { @@ -236,7 +284,6 @@ func (f *FieldManager) buildManagerInfo(prefix string, operation metav1.ManagedF Manager: prefix, Operation: operation, APIVersion: f.groupVersion.String(), - Time: &metav1.Time{Time: time.Now().UTC()}, } if managerInfo.Manager == "" { managerInfo.Manager = "unknown" diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go index e59820c619..5af15ea90d 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go @@ -26,7 +26,7 @@ import ( // EmptyFields represents a set with no paths // It looks like metav1.Fields{Raw: []byte("{}")} -var EmptyFields metav1.Fields = func() metav1.Fields { +var EmptyFields metav1.FieldsV1 = func() metav1.FieldsV1 { f, err := SetToFields(*fieldpath.NewSet()) if err != nil { panic("should never happen") @@ -35,13 +35,13 @@ var EmptyFields metav1.Fields = func() metav1.Fields { }() // FieldsToSet creates a set paths from an input trie of fields -func FieldsToSet(f metav1.Fields) (s fieldpath.Set, err error) { +func FieldsToSet(f metav1.FieldsV1) (s fieldpath.Set, err error) { err = s.FromJSON(bytes.NewReader(f.Raw)) return s, err } // SetToFields creates a trie of fields from an input set of paths -func SetToFields(s fieldpath.Set) (f metav1.Fields, err error) { +func SetToFields(s fieldpath.Set) (f metav1.FieldsV1, err error) { f.Raw, err = s.ToJSON() return f, err } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go index ff4022c886..4d6ed52d80 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/gvkparser.go @@ -44,8 +44,8 @@ func (p *gvkParser) Type(gvk schema.GroupVersionKind) *typed.ParseableType { return &t } -func newGVKParser(models proto.Models) (*gvkParser, error) { - typeSchema, err := schemaconv.ToSchema(models) +func newGVKParser(models proto.Models, preserveUnknownFields bool) (*gvkParser, error) { + typeSchema, err := schemaconv.ToSchemaWithPreserveUnknownFields(models, preserveUnknownFields) if err != nil { return nil, fmt.Errorf("failed to convert models to schema: %v", err) } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go index 00a4481f06..1f0eb6d3a4 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go @@ -28,6 +28,12 @@ import ( "sigs.k8s.io/structured-merge-diff/fieldpath" ) +// Managed groups a fieldpath.ManagedFields together with the timestamps associated with each operation. +type Managed struct { + Fields fieldpath.ManagedFields + Times map[string]*metav1.Time +} + // RemoveObjectManagedFields removes the ManagedFields from the object // before we merge so that it doesn't appear in the ManagedFields // recursively. @@ -40,9 +46,9 @@ func RemoveObjectManagedFields(obj runtime.Object) { } // DecodeObjectManagedFields extracts and converts the objects ManagedFields into a fieldpath.ManagedFields. -func DecodeObjectManagedFields(from runtime.Object) (fieldpath.ManagedFields, error) { +func DecodeObjectManagedFields(from runtime.Object) (Managed, error) { if from == nil { - return fieldpath.ManagedFields{}, nil + return Managed{}, nil } accessor, err := meta.Accessor(from) if err != nil { @@ -51,56 +57,63 @@ func DecodeObjectManagedFields(from runtime.Object) (fieldpath.ManagedFields, er managed, err := decodeManagedFields(accessor.GetManagedFields()) if err != nil { - return nil, fmt.Errorf("failed to convert managed fields from API: %v", err) + return Managed{}, fmt.Errorf("failed to convert managed fields from API: %v", err) } return managed, err } // EncodeObjectManagedFields converts and stores the fieldpathManagedFields into the objects ManagedFields -func EncodeObjectManagedFields(obj runtime.Object, fields fieldpath.ManagedFields) error { +func EncodeObjectManagedFields(obj runtime.Object, managed Managed) error { accessor, err := meta.Accessor(obj) if err != nil { panic(fmt.Sprintf("couldn't get accessor: %v", err)) } - managed, err := encodeManagedFields(fields) + encodedManagedFields, err := encodeManagedFields(managed) if err != nil { return fmt.Errorf("failed to convert back managed fields to API: %v", err) } - accessor.SetManagedFields(managed) + accessor.SetManagedFields(encodedManagedFields) return nil } // decodeManagedFields converts ManagedFields from the wire format (api format) // to the format used by sigs.k8s.io/structured-merge-diff -func decodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (managedFields fieldpath.ManagedFields, err error) { - managedFields = make(fieldpath.ManagedFields, len(encodedManagedFields)) +func decodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (managed Managed, err error) { + managed.Fields = make(fieldpath.ManagedFields, len(encodedManagedFields)) + managed.Times = make(map[string]*metav1.Time, len(encodedManagedFields)) for _, encodedVersionedSet := range encodedManagedFields { manager, err := BuildManagerIdentifier(&encodedVersionedSet) if err != nil { - return nil, fmt.Errorf("error decoding manager from %v: %v", encodedVersionedSet, err) + return Managed{}, fmt.Errorf("error decoding manager from %v: %v", encodedVersionedSet, err) } - managedFields[manager], err = decodeVersionedSet(&encodedVersionedSet) + managed.Fields[manager], err = decodeVersionedSet(&encodedVersionedSet) if err != nil { - return nil, fmt.Errorf("error decoding versioned set from %v: %v", encodedVersionedSet, err) + return Managed{}, fmt.Errorf("error decoding versioned set from %v: %v", encodedVersionedSet, err) } + managed.Times[manager] = encodedVersionedSet.Time } - return managedFields, nil + return managed, nil } // BuildManagerIdentifier creates a manager identifier string from a ManagedFieldsEntry func BuildManagerIdentifier(encodedManager *metav1.ManagedFieldsEntry) (manager string, err error) { encodedManagerCopy := *encodedManager + // Never include fields type in the manager identifier + encodedManagerCopy.FieldsType = "" + // Never include the fields in the manager identifier - encodedManagerCopy.Fields = nil + encodedManagerCopy.FieldsV1 = nil + + // Never include the time in the manager identifier + encodedManagerCopy.Time = nil - // For appliers, don't include the APIVersion or Time in the manager identifier, + // For appliers, don't include the APIVersion in the manager identifier, // so it will always have the same manager identifier each time it applied. if encodedManager.Operation == metav1.ManagedFieldsOperationApply { encodedManagerCopy.APIVersion = "" - encodedManagerCopy.Time = nil } // Use the remaining fields to build the manager identifier @@ -114,8 +127,8 @@ func BuildManagerIdentifier(encodedManager *metav1.ManagedFieldsEntry) (manager func decodeVersionedSet(encodedVersionedSet *metav1.ManagedFieldsEntry) (versionedSet fieldpath.VersionedSet, err error) { fields := EmptyFields - if encodedVersionedSet.Fields != nil { - fields = *encodedVersionedSet.Fields + if encodedVersionedSet.FieldsV1 != nil { + fields = *encodedVersionedSet.FieldsV1 } set, err := FieldsToSet(fields) if err != nil { @@ -126,21 +139,17 @@ func decodeVersionedSet(encodedVersionedSet *metav1.ManagedFieldsEntry) (version // encodeManagedFields converts ManagedFields from the format used by // sigs.k8s.io/structured-merge-diff to the wire format (api format) -func encodeManagedFields(managedFields fieldpath.ManagedFields) (encodedManagedFields []metav1.ManagedFieldsEntry, err error) { - // Sort the keys so a predictable order will be used. - managers := []string{} - for manager := range managedFields { - managers = append(managers, manager) - } - sort.Strings(managers) - +func encodeManagedFields(managed Managed) (encodedManagedFields []metav1.ManagedFieldsEntry, err error) { encodedManagedFields = []metav1.ManagedFieldsEntry{} - for _, manager := range managers { - versionedSet := managedFields[manager] + for manager := range managed.Fields { + versionedSet := managed.Fields[manager] v, err := encodeManagerVersionedSet(manager, versionedSet) if err != nil { return nil, fmt.Errorf("error encoding versioned set for %v: %v", manager, err) } + if t, ok := managed.Times[manager]; ok { + v.Time = t + } encodedManagedFields = append(encodedManagedFields, *v) } return sortEncodedManagedFields(encodedManagedFields) @@ -185,11 +194,12 @@ func encodeManagerVersionedSet(manager string, versionedSet fieldpath.VersionedS if versionedSet.Applied() { encodedVersionedSet.Operation = metav1.ManagedFieldsOperationApply } + encodedVersionedSet.FieldsType = "FieldsV1" fields, err := SetToFields(*versionedSet.Set()) if err != nil { return nil, fmt.Errorf("error encoding set: %v", err) } - encodedVersionedSet.Fields = &fields + encodedVersionedSet.FieldsV1 = &fields return encodedVersionedSet, nil } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go index c9e329d65c..44ad55916f 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/typeconverter.go @@ -78,8 +78,8 @@ var _ TypeConverter = &typeConverter{} // NewTypeConverter builds a TypeConverter from a proto.Models. This // will automatically find the proper version of the object, and the // corresponding schema information. -func NewTypeConverter(models proto.Models) (TypeConverter, error) { - parser, err := newGVKParser(models) +func NewTypeConverter(models proto.Models, preserveUnknownFields bool) (TypeConverter, error) { + parser, err := newGVKParser(models, preserveUnknownFields) if err != nil { return nil, err } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index b7360dfe84..10d5f032dc 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -93,7 +93,8 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac return } - ctx := req.Context() + ctx, cancel := context.WithTimeout(req.Context(), timeout) + defer cancel() ctx = request.WithNamespace(ctx, namespace) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) @@ -238,7 +239,7 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac } } -type mutateObjectUpdateFunc func(obj, old runtime.Object) error +type mutateObjectUpdateFunc func(ctx context.Context, obj, old runtime.Object) error // patcher breaks the process of patch application and retries into smaller // pieces of functionality. @@ -420,7 +421,7 @@ func (p *applyPatcher) applyPatchToCurrentObject(obj runtime.Object) (runtime.Ob func (p *applyPatcher) createNewObject() (runtime.Object, error) { obj, err := p.creater.New(p.kind) if err != nil { - return nil, fmt.Errorf("failed to create new object: %v", obj) + return nil, fmt.Errorf("failed to create new object: %v", err) } return p.applyPatchToCurrentObject(obj) } @@ -514,7 +515,7 @@ func (p *patcher) applyAdmission(ctx context.Context, patchedObject runtime.Obje } if p.admissionCheck != nil && p.admissionCheck.Handles(operation) { attributes := p.admissionAttributes(ctx, patchedObject, currentObject, operation, options) - return patchedObject, p.admissionCheck.Admit(attributes, p.objectInterfaces) + return patchedObject, p.admissionCheck.Admit(ctx, attributes, p.objectInterfaces) } return patchedObject, nil } diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index 8aecd4c14a..75764597f4 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -163,14 +163,14 @@ func ConnectResource(connecter rest.Connecter, scope *RequestScope, admit admiss userInfo, _ := request.UserFrom(ctx) // TODO: remove the mutating admission here as soon as we have ported all plugin that handle CONNECT if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { - err = mutatingAdmission.Admit(admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, nil, false, userInfo), scope) + err = mutatingAdmission.Admit(ctx, admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, nil, false, userInfo), scope) if err != nil { scope.err(err, w, req) return } } if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { - err = validatingAdmission.Validate(admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, nil, false, userInfo), scope) + err = validatingAdmission.Validate(ctx, admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, nil, false, userInfo), scope) if err != nil { scope.err(err, w, req) return diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go index f57062e8e9..b7c2dbcd4f 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go @@ -61,7 +61,8 @@ func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interfa scope.err(err, w, req) return } - ctx := req.Context() + ctx, cancel := context.WithTimeout(req.Context(), timeout) + defer cancel() ctx = request.WithNamespace(ctx, namespace) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) @@ -139,11 +140,11 @@ func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interfa return nil, fmt.Errorf("unexpected error when extracting UID from oldObj: %v", err.Error()) } else if !isNotZeroObject { if mutatingAdmission.Handles(admission.Create) { - return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, updateToCreateOptions(options), dryrun.IsDryRun(options.DryRun), userInfo), scope) + return newObj, mutatingAdmission.Admit(ctx, admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, updateToCreateOptions(options), dryrun.IsDryRun(options.DryRun), userInfo), scope) } } else { if mutatingAdmission.Handles(admission.Update) { - return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, options, dryrun.IsDryRun(options.DryRun), userInfo), scope) + return newObj, mutatingAdmission.Admit(ctx, admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, options, dryrun.IsDryRun(options.DryRun), userInfo), scope) } } return newObj, nil @@ -204,7 +205,7 @@ func withAuthorization(validate rest.ValidateObjectFunc, a authorizer.Authorizer var authorizerDecision authorizer.Decision var authorizerReason string var authorizerErr error - return func(obj runtime.Object) error { + return func(ctx context.Context, obj runtime.Object) error { if a == nil { return errors.NewInternalError(fmt.Errorf("no authorizer provided, unable to authorize a create on update")) } @@ -214,7 +215,7 @@ func withAuthorization(validate rest.ValidateObjectFunc, a authorizer.Authorizer // an authorizer like RBAC could encounter evaluation errors and still allow the request, so authorizer decision is checked before error here. if authorizerDecision == authorizer.DecisionAllow { // Continue to validating admission - return validate(obj) + return validate(ctx, obj) } if authorizerErr != nil { return errors.NewInternalError(authorizerErr) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go index 5aa9272a3a..be670fdc28 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go @@ -238,6 +238,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { // type unknown.Raw = buf.Bytes() event.Object = &unknown + metrics.WatchEventsSizes.WithLabelValues(kind.Group, kind.Version, kind.Kind).Observe(float64(len(unknown.Raw))) *outEvent = metav1.WatchEvent{} diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD.bazel index 8422bf5001..667af2e5fa 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/BUILD.bazel @@ -16,5 +16,7 @@ go_library( "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/k8s.io/apiserver/pkg/features:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index 36b4df510c..30ce24a4bd 100644 --- a/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -27,6 +27,9 @@ import ( "sync" "time" + restful "github.com/emicklei/go-restful" + "github.com/prometheus/client_golang/prometheus" + "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/types" utilnet "k8s.io/apimachinery/pkg/util/net" @@ -34,15 +37,14 @@ import ( "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" - - restful "github.com/emicklei/go-restful" - "github.com/prometheus/client_golang/prometheus" + compbasemetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) // resettableCollector is the interface implemented by prometheus.MetricVec // that can be used by Prometheus to collect metrics and reset their values. type resettableCollector interface { - prometheus.Collector + compbasemetrics.Registerable Reset() } @@ -50,13 +52,22 @@ const ( APIServerComponent string = "apiserver" ) +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ var ( // TODO(a-robinson): Add unit tests for the handling of these metrics once // the upstream library supports it. - requestCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_request_total", - Help: "Counter of apiserver requests broken out for each verb, dry run value, group, version, resource, scope, component, client, and HTTP response contentType and code.", + requestCounter = compbasemetrics.NewCounterVec( + &compbasemetrics.CounterOpts{ + Name: "apiserver_request_total", + Help: "Counter of apiserver requests broken out for each verb, dry run value, group, version, resource, scope, component, client, and HTTP response contentType and code.", + StabilityLevel: compbasemetrics.ALPHA, }, // The label_name contentType doesn't follow the label_name convention defined here: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/instrumentation.md @@ -64,22 +75,24 @@ var ( // should be all lowercase and separated by underscores. []string{"verb", "dry_run", "group", "version", "resource", "subresource", "scope", "component", "client", "contentType", "code"}, ) - deprecatedRequestCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_request_count", - Help: "(Deprecated) Counter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.", + deprecatedRequestCounter = compbasemetrics.NewCounterVec( + &compbasemetrics.CounterOpts{ + Name: "apiserver_request_count", + Help: "(Deprecated) Counter of apiserver requests broken out for each verb, group, version, resource, scope, component, client, and HTTP response contentType and code.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component", "client", "contentType", "code"}, ) - longRunningRequestGauge = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Name: "apiserver_longrunning_gauge", - Help: "Gauge of all active long-running apiserver requests broken out by verb, group, version, resource, scope and component. Not all requests are tracked this way.", + longRunningRequestGauge = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "apiserver_longrunning_gauge", + Help: "Gauge of all active long-running apiserver requests broken out by verb, group, version, resource, scope and component. Not all requests are tracked this way.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) - requestLatencies = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + requestLatencies = compbasemetrics.NewHistogramVec( + &compbasemetrics.HistogramOpts{ Name: "apiserver_request_duration_seconds", Help: "Response latency distribution in seconds for each verb, dry run value, group, version, resource, subresource, scope and component.", // This metric is used for verifying api call latencies SLO, @@ -87,73 +100,91 @@ var ( // Thus we customize buckets significantly, to empower both usecases. Buckets: []float64{0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.25, 1.5, 1.75, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50, 60}, + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "dry_run", "group", "version", "resource", "subresource", "scope", "component"}, ) - deprecatedRequestLatencies = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + deprecatedRequestLatencies = compbasemetrics.NewHistogramVec( + &compbasemetrics.HistogramOpts{ Name: "apiserver_request_latencies", Help: "(Deprecated) Response latency distribution in microseconds for each verb, group, version, resource, subresource, scope and component.", // Use buckets ranging from 125 ms to 8 seconds. - Buckets: prometheus.ExponentialBuckets(125000, 2.0, 7), + Buckets: prometheus.ExponentialBuckets(125000, 2.0, 7), + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) - deprecatedRequestLatenciesSummary = prometheus.NewSummaryVec( - prometheus.SummaryOpts{ + deprecatedRequestLatenciesSummary = compbasemetrics.NewSummaryVec( + &compbasemetrics.SummaryOpts{ Name: "apiserver_request_latencies_summary", Help: "(Deprecated) Response latency summary in microseconds for each verb, group, version, resource, subresource, scope and component.", // Make the sliding window of 5h. // TODO: The value for this should be based on our SLI definition (medium term). - MaxAge: 5 * time.Hour, + MaxAge: 5 * time.Hour, + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) - responseSizes = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + responseSizes = compbasemetrics.NewHistogramVec( + &compbasemetrics.HistogramOpts{ Name: "apiserver_response_sizes", Help: "Response size distribution in bytes for each group, version, verb, resource, subresource, scope and component.", // Use buckets ranging from 1000 bytes (1KB) to 10^9 bytes (1GB). - Buckets: prometheus.ExponentialBuckets(1000, 10.0, 7), + Buckets: prometheus.ExponentialBuckets(1000, 10.0, 7), + StabilityLevel: compbasemetrics.ALPHA, }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) // DroppedRequests is a number of requests dropped with 'Try again later' response" - DroppedRequests = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_dropped_requests_total", - Help: "Number of requests dropped with 'Try again later' response", + DroppedRequests = compbasemetrics.NewCounterVec( + &compbasemetrics.CounterOpts{ + Name: "apiserver_dropped_requests_total", + Help: "Number of requests dropped with 'Try again later' response", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"requestKind"}, ) - DeprecatedDroppedRequests = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_dropped_requests", - Help: "(Deprecated) Number of requests dropped with 'Try again later' response", + DeprecatedDroppedRequests = compbasemetrics.NewCounterVec( + &compbasemetrics.CounterOpts{ + Name: "apiserver_dropped_requests", + Help: "(Deprecated) Number of requests dropped with 'Try again later' response", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"requestKind"}, ) // RegisteredWatchers is a number of currently registered watchers splitted by resource. - RegisteredWatchers = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Name: "apiserver_registered_watchers", - Help: "Number of currently registered watchers for a given resources", + RegisteredWatchers = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "apiserver_registered_watchers", + Help: "Number of currently registered watchers for a given resources", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"group", "version", "kind"}, ) - WatchEvents = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_watch_events_total", - Help: "Number of events sent in watch clients", + WatchEvents = compbasemetrics.NewCounterVec( + &compbasemetrics.CounterOpts{ + Name: "apiserver_watch_events_total", + Help: "Number of events sent in watch clients", + StabilityLevel: compbasemetrics.ALPHA, + }, + []string{"group", "version", "kind"}, + ) + WatchEventsSizes = compbasemetrics.NewHistogramVec( + &compbasemetrics.HistogramOpts{ + Name: "apiserver_watch_events_sizes", + Help: "Watch event size distribution in bytes", + Buckets: prometheus.ExponentialBuckets(1024, 2.0, 8), // 1K, 2K, 4K, 8K, ..., 128K. + StabilityLevel: compbasemetrics.ALPHA, }, []string{"group", "version", "kind"}, ) // Because of volatality of the base metric this is pre-aggregated one. Instead of reporing current usage all the time // it reports maximal usage during the last second. - currentInflightRequests = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Name: "apiserver_current_inflight_requests", - Help: "Maximal number of currently used inflight request limit of this apiserver per request kind in last second.", + currentInflightRequests = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "apiserver_current_inflight_requests", + Help: "Maximal number of currently used inflight request limit of this apiserver per request kind in last second.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"requestKind"}, ) @@ -171,6 +202,7 @@ var ( DeprecatedDroppedRequests, RegisteredWatchers, WatchEvents, + WatchEventsSizes, currentInflightRequests, } ) @@ -188,7 +220,7 @@ var registerMetrics sync.Once func Register() { registerMetrics.Do(func() { for _, metric := range metrics { - prometheus.MustRegister(metric) + legacyregistry.MustRegister(metric) } }) } @@ -213,10 +245,16 @@ func Record(req *http.Request, requestInfo *request.RequestInfo, component, cont requestInfo = &request.RequestInfo{Verb: req.Method, Path: req.URL.Path} } scope := CleanScope(requestInfo) + // We don't use verb from , as for the healthy path + // MonitorRequest is called from InstrumentRouteFunc which is registered + // in installer.go with predefined list of verbs (different than those + // translated to RequestInfo). + // However, we need to tweak it e.g. to differentiate GET from LIST. + verb := canonicalVerb(strings.ToUpper(req.Method), scope) if requestInfo.IsResourceRequest { - MonitorRequest(req, strings.ToUpper(requestInfo.Verb), requestInfo.APIGroup, requestInfo.APIVersion, requestInfo.Resource, requestInfo.Subresource, scope, component, contentType, code, responseSizeInBytes, elapsed) + MonitorRequest(req, verb, requestInfo.APIGroup, requestInfo.APIVersion, requestInfo.Resource, requestInfo.Subresource, scope, component, contentType, code, responseSizeInBytes, elapsed) } else { - MonitorRequest(req, strings.ToUpper(requestInfo.Verb), "", "", "", requestInfo.Path, scope, component, contentType, code, responseSizeInBytes, elapsed) + MonitorRequest(req, verb, "", "", "", requestInfo.Path, scope, component, contentType, code, responseSizeInBytes, elapsed) } } @@ -226,9 +264,14 @@ func RecordLongRunning(req *http.Request, requestInfo *request.RequestInfo, comp if requestInfo == nil { requestInfo = &request.RequestInfo{Verb: req.Method, Path: req.URL.Path} } - var g prometheus.Gauge + var g compbasemetrics.GaugeMetric scope := CleanScope(requestInfo) - reportedVerb := cleanVerb(strings.ToUpper(requestInfo.Verb), req) + // We don't use verb from , as for the healthy path + // MonitorRequest is called from InstrumentRouteFunc which is registered + // in installer.go with predefined list of verbs (different than those + // translated to RequestInfo). + // However, we need to tweak it e.g. to differentiate GET from LIST. + reportedVerb := cleanVerb(canonicalVerb(strings.ToUpper(req.Method), scope), req) if requestInfo.IsResourceRequest { g = longRunningRequestGauge.WithLabelValues(reportedVerb, requestInfo.APIGroup, requestInfo.APIVersion, requestInfo.Resource, requestInfo.Subresource, scope, component) } else { @@ -320,6 +363,18 @@ func CleanScope(requestInfo *request.RequestInfo) string { return "" } +func canonicalVerb(verb string, scope string) string { + switch verb { + case "GET", "HEAD": + if scope != "resource" { + return "LIST" + } + return "GET" + default: + return verb + } +} + func cleanVerb(verb string, request *http.Request) string { reportedVerb := verb if verb == "LIST" { diff --git a/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/vendor/k8s.io/apiserver/pkg/features/kube_features.go index bd5fb8a09f..bc23ed1a0e 100644 --- a/vendor/k8s.io/apiserver/pkg/features/kube_features.go +++ b/vendor/k8s.io/apiserver/pkg/features/kube_features.go @@ -95,6 +95,7 @@ const ( // owner: @apelisse, @lavalamp // alpha: v1.14 + // beta: v1.16 // // Server-side apply. Merging happens on the server. ServerSideApply featuregate.Feature = "ServerSideApply" @@ -155,8 +156,8 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, APIListChunking: {Default: true, PreRelease: featuregate.Beta}, DryRun: {Default: true, PreRelease: featuregate.Beta}, - RemainingItemCount: {Default: false, PreRelease: featuregate.Alpha}, - ServerSideApply: {Default: false, PreRelease: featuregate.Alpha}, + RemainingItemCount: {Default: true, PreRelease: featuregate.Beta}, + ServerSideApply: {Default: true, PreRelease: featuregate.Beta}, StorageVersionHash: {Default: true, PreRelease: featuregate.Beta}, WinOverlay: {Default: false, PreRelease: featuregate.Alpha}, WinDSR: {Default: false, PreRelease: featuregate.Alpha}, diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go index 24a1b1ec28..3ff8403800 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go @@ -52,7 +52,7 @@ func (s *DryRunnableStorage) Delete(ctx context.Context, key string, out runtime if err := preconditions.Check(key, out); err != nil { return err } - return deleteValidation(out) + return deleteValidation(ctx, out) } return s.Storage.Delete(ctx, key, out, preconditions, deleteValidation) } diff --git a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go index be03caa41b..95d0ad3f48 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -342,7 +342,7 @@ func (e *Store) Create(ctx context.Context, obj runtime.Object, createValidation // at this point we have a fully formed object. It is time to call the validators that the apiserver // handling chain wants to enforce. if createValidation != nil { - if err := createValidation(obj.DeepCopyObject()); err != nil { + if err := createValidation(ctx, obj.DeepCopyObject()); err != nil { return nil, err } } @@ -504,7 +504,7 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj // at this point we have a fully formed object. It is time to call the validators that the apiserver // handling chain wants to enforce. if createValidation != nil { - if err := createValidation(obj.DeepCopyObject()); err != nil { + if err := createValidation(ctx, obj.DeepCopyObject()); err != nil { return nil, nil, err } } @@ -546,7 +546,7 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj // at this point we have a fully formed object. It is time to call the validators that the apiserver // handling chain wants to enforce. if updateValidation != nil { - if err := updateValidation(obj.DeepCopyObject(), existing.DeepCopyObject()); err != nil { + if err := updateValidation(ctx, obj.DeepCopyObject(), existing.DeepCopyObject()); err != nil { return nil, nil, err } } @@ -812,7 +812,7 @@ func (e *Store) updateForGracefulDeletionAndFinalizers(ctx context.Context, name false, /* ignoreNotFound */ &preconditions, storage.SimpleUpdate(func(existing runtime.Object) (runtime.Object, error) { - if err := deleteValidation(existing); err != nil { + if err := deleteValidation(ctx, existing); err != nil { return nil, err } graceful, pendingGraceful, err := rest.BeforeDelete(e.DeleteStrategy, ctx, existing, options) diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/create.go b/vendor/k8s.io/apiserver/pkg/registry/rest/create.go index 2fc47d9db9..dd70a4eb78 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/create.go +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/create.go @@ -160,15 +160,23 @@ type NamespaceScopedStrategy interface { func AdmissionToValidateObjectFunc(admit admission.Interface, staticAttributes admission.Attributes, o admission.ObjectInterfaces) ValidateObjectFunc { validatingAdmission, ok := admit.(admission.ValidationInterface) if !ok { - return func(obj runtime.Object) error { return nil } + return func(ctx context.Context, obj runtime.Object) error { return nil } } - return func(obj runtime.Object) error { + return func(ctx context.Context, obj runtime.Object) error { + name := staticAttributes.GetName() + // in case the generated name is populated + if len(name) == 0 { + if metadata, err := meta.Accessor(obj); err == nil { + name = metadata.GetName() + } + } + finalAttributes := admission.NewAttributesRecord( obj, staticAttributes.GetOldObject(), staticAttributes.GetKind(), staticAttributes.GetNamespace(), - staticAttributes.GetName(), + name, staticAttributes.GetResource(), staticAttributes.GetSubresource(), staticAttributes.GetOperation(), @@ -179,6 +187,6 @@ func AdmissionToValidateObjectFunc(admit admission.Interface, staticAttributes a if !validatingAdmission.Handles(finalAttributes.GetOperation()) { return nil } - return validatingAdmission.Validate(finalAttributes, o) + return validatingAdmission.Validate(ctx, finalAttributes, o) } } diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/delete.go b/vendor/k8s.io/apiserver/pkg/registry/rest/delete.go index 2b5038b210..3e7ca85b76 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/delete.go +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/delete.go @@ -150,7 +150,7 @@ func AdmissionToValidateObjectDeleteFunc(admit admission.Interface, staticAttrib mutating := isMutatingAdmission && mutatingAdmission.Handles(staticAttributes.GetOperation()) validating := isValidatingAdmission && validatingAdmission.Handles(staticAttributes.GetOperation()) - return func(old runtime.Object) error { + return func(ctx context.Context, old runtime.Object) error { if !mutating && !validating { return nil } @@ -169,12 +169,12 @@ func AdmissionToValidateObjectDeleteFunc(admit admission.Interface, staticAttrib staticAttributes.GetUserInfo(), ) if mutating { - if err := mutatingAdmission.Admit(finalAttributes, objInterfaces); err != nil { + if err := mutatingAdmission.Admit(ctx, finalAttributes, objInterfaces); err != nil { return err } } if validating { - if err := validatingAdmission.Validate(finalAttributes, objInterfaces); err != nil { + if err := validatingAdmission.Validate(ctx, finalAttributes, objInterfaces); err != nil { return err } } diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/rest.go b/vendor/k8s.io/apiserver/pkg/registry/rest/rest.go index 08c7cafc6b..28f4bf07cf 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/rest.go +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/rest.go @@ -210,20 +210,20 @@ type UpdatedObjectInfo interface { // ValidateObjectFunc is a function to act on a given object. An error may be returned // if the hook cannot be completed. An ObjectFunc may NOT transform the provided // object. -type ValidateObjectFunc func(obj runtime.Object) error +type ValidateObjectFunc func(ctx context.Context, obj runtime.Object) error // ValidateAllObjectFunc is a "admit everything" instance of ValidateObjectFunc. -func ValidateAllObjectFunc(obj runtime.Object) error { +func ValidateAllObjectFunc(ctx context.Context, obj runtime.Object) error { return nil } // ValidateObjectUpdateFunc is a function to act on a given object and its predecessor. // An error may be returned if the hook cannot be completed. An UpdateObjectFunc // may NOT transform the provided object. -type ValidateObjectUpdateFunc func(obj, old runtime.Object) error +type ValidateObjectUpdateFunc func(ctx context.Context, obj, old runtime.Object) error // ValidateAllObjectUpdateFunc is a "admit everything" instance of ValidateObjectUpdateFunc. -func ValidateAllObjectUpdateFunc(obj, old runtime.Object) error { +func ValidateAllObjectUpdateFunc(ctx context.Context, obj, old runtime.Object) error { return nil } diff --git a/vendor/k8s.io/apiserver/pkg/registry/rest/update.go b/vendor/k8s.io/apiserver/pkg/registry/rest/update.go index a15d975ad2..0741b84ec2 100644 --- a/vendor/k8s.io/apiserver/pkg/registry/rest/update.go +++ b/vendor/k8s.io/apiserver/pkg/registry/rest/update.go @@ -255,9 +255,9 @@ func (i *wrappedUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj run func AdmissionToValidateObjectUpdateFunc(admit admission.Interface, staticAttributes admission.Attributes, o admission.ObjectInterfaces) ValidateObjectUpdateFunc { validatingAdmission, ok := admit.(admission.ValidationInterface) if !ok { - return func(obj, old runtime.Object) error { return nil } + return func(ctx context.Context, obj, old runtime.Object) error { return nil } } - return func(obj, old runtime.Object) error { + return func(ctx context.Context, obj, old runtime.Object) error { finalAttributes := admission.NewAttributesRecord( obj, old, @@ -274,6 +274,6 @@ func AdmissionToValidateObjectUpdateFunc(admit admission.Interface, staticAttrib if !validatingAdmission.Handles(finalAttributes.GetOperation()) { return nil } - return validatingAdmission.Validate(finalAttributes, o) + return validatingAdmission.Validate(ctx, finalAttributes, o) } } diff --git a/vendor/k8s.io/apiserver/pkg/server/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/server/BUILD.bazel index a4c156f43f..082ebff758 100644 --- a/vendor/k8s.io/apiserver/pkg/server/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/server/BUILD.bazel @@ -7,7 +7,6 @@ go_library( "config_selfclient.go", "deprecated_insecure_serving.go", "doc.go", - "egress_selector.go", "genericapiserver.go", "handler.go", "healthz.go", @@ -36,7 +35,6 @@ go_library( "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", @@ -46,7 +44,6 @@ go_library( "//vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", "//vendor/k8s.io/apiserver/pkg/apis/apiserver/install:go_default_library", "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", @@ -65,6 +62,7 @@ go_library( "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/egressselector:go_default_library", "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", "//vendor/k8s.io/apiserver/pkg/server/mux:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/config.go b/vendor/k8s.io/apiserver/pkg/server/config.go index 91fac23ddc..71d77a7b40 100644 --- a/vendor/k8s.io/apiserver/pkg/server/config.go +++ b/vendor/k8s.io/apiserver/pkg/server/config.go @@ -29,7 +29,7 @@ import ( "sync/atomic" "time" - "github.com/evanphx/json-patch" + jsonpatch "github.com/evanphx/json-patch" "github.com/go-openapi/spec" "github.com/pborman/uuid" @@ -55,6 +55,7 @@ import ( apiopenapi "k8s.io/apiserver/pkg/endpoints/openapi" apirequest "k8s.io/apiserver/pkg/endpoints/request" genericregistry "k8s.io/apiserver/pkg/registry/generic" + "k8s.io/apiserver/pkg/server/egressselector" genericfilters "k8s.io/apiserver/pkg/server/filters" "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/routes" @@ -97,7 +98,7 @@ type Config struct { // EgressSelector provides a lookup mechanism for dialing outbound connections. // It does so based on a EgressSelectorConfiguration which was read at startup. - EgressSelector *EgressSelector + EgressSelector *egressselector.EgressSelector // RuleResolver is required to get the list of rules that apply to a given user // in a given namespace @@ -137,10 +138,12 @@ type Config struct { // DiscoveryAddresses is used to build the IPs pass to discovery. If nil, the ExternalAddress is // always reported DiscoveryAddresses discovery.Addresses - // The default set of healthz checks. There might be more added via AddHealthzChecks dynamically. - HealthzChecks []healthz.HealthzChecker + // The default set of healthz checks. There might be more added via AddHealthChecks dynamically. + HealthzChecks []healthz.HealthChecker + // The default set of livez checks. There might be more added via AddHealthChecks dynamically. + LivezChecks []healthz.HealthChecker // The default set of readyz-only checks. There might be more added via AddReadyzChecks dynamically. - ReadyzChecks []healthz.HealthzChecker + ReadyzChecks []healthz.HealthChecker // LegacyAPIGroupPrefixes is used to set up URL parsing for authorization and for validating requests // to InstallLegacyAPIGroup. New API servers don't generally have legacy groups at all. LegacyAPIGroupPrefixes sets.String @@ -165,9 +168,9 @@ type Config struct { // This represents the maximum amount of time it should take for apiserver to complete its startup // sequence and become healthy. From apiserver's start time to when this amount of time has - // elapsed, /healthz will assume that unfinished post-start hooks will complete successfully and + // elapsed, /livez will assume that unfinished post-start hooks will complete successfully and // therefore return true. - MaxStartupSequenceDuration time.Duration + LivezGracePeriod time.Duration // ShutdownDelayDuration allows to block shutdown for some time, e.g. until endpoints pointing to this API server // have converged on all node. During this time, the API server keeps serving, /healthz will return 200, // but /readyz will return failure. @@ -247,6 +250,9 @@ type SecureServingInfo struct { // HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client. // A value of zero means to use the default provided by golang's HTTP/2 support. HTTP2MaxStreamsPerConnection int + + // DisableHTTP2 indicates that http2 should not be enabled. + DisableHTTP2 bool } type AuthenticationInfo struct { @@ -269,15 +275,16 @@ type AuthorizationInfo struct { // NewConfig returns a Config struct with the default values func NewConfig(codecs serializer.CodecFactory) *Config { - defaultHealthChecks := []healthz.HealthzChecker{healthz.PingHealthz, healthz.LogHealthz} + defaultHealthChecks := []healthz.HealthChecker{healthz.PingHealthz, healthz.LogHealthz} return &Config{ Serializer: codecs, BuildHandlerChainFunc: DefaultBuildHandlerChain, HandlerChainWaitGroup: new(utilwaitgroup.SafeWaitGroup), LegacyAPIGroupPrefixes: sets.NewString(DefaultLegacyAPIPrefix), DisabledPostStartHooks: sets.NewString(), - HealthzChecks: append([]healthz.HealthzChecker{}, defaultHealthChecks...), - ReadyzChecks: append([]healthz.HealthzChecker{}, defaultHealthChecks...), + HealthzChecks: append([]healthz.HealthChecker{}, defaultHealthChecks...), + ReadyzChecks: append([]healthz.HealthChecker{}, defaultHealthChecks...), + LivezChecks: append([]healthz.HealthChecker{}, defaultHealthChecks...), EnableIndex: true, EnableDiscovery: true, EnableProfiling: true, @@ -286,7 +293,7 @@ func NewConfig(codecs serializer.CodecFactory) *Config { MaxMutatingRequestsInFlight: 200, RequestTimeout: time.Duration(60) * time.Second, MinRequestTimeout: 1800, - MaxStartupSequenceDuration: time.Duration(0), + LivezGracePeriod: time.Duration(0), ShutdownDelayDuration: time.Duration(0), // 10MB is the recommended maximum client request size in bytes // the etcd server should accept. See @@ -509,15 +516,16 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G preShutdownHooks: map[string]preShutdownHookEntry{}, disabledPostStartHooks: c.DisabledPostStartHooks, - healthzChecks: c.HealthzChecks, - readyzChecks: c.ReadyzChecks, - readinessStopCh: make(chan struct{}), - maxStartupSequenceDuration: c.MaxStartupSequenceDuration, + healthzChecks: c.HealthzChecks, + livezChecks: c.LivezChecks, + readyzChecks: c.ReadyzChecks, + readinessStopCh: make(chan struct{}), + livezGracePeriod: c.LivezGracePeriod, DiscoveryGroupManager: discovery.NewRootAPIsHandler(c.DiscoveryAddresses, c.Serializer), maxRequestBodyBytes: c.MaxRequestBodyBytes, - healthzClock: clock.RealClock{}, + livezClock: clock.RealClock{}, } for { @@ -563,9 +571,7 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G if skip { continue } - - s.healthzChecks = append(s.healthzChecks, delegateCheck) - s.readyzChecks = append(s.readyzChecks, delegateCheck) + s.AddHealthChecks(delegateCheck) } s.listedPathProvider = routes.ListedPathProviders{s.listedPathProvider, delegationTarget} @@ -596,6 +602,7 @@ func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.LongRunningFunc, c.RequestTimeout) handler = genericfilters.WithWaitGroup(handler, c.LongRunningFunc, c.HandlerChainWaitGroup) handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver) + handler = genericapifilters.WithCacheControl(handler) handler = genericfilters.WithPanicRecovery(handler) return handler } diff --git a/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD.bazel index 1a3c8631be..710c2503b2 100644 --- a/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/server/egressselector/BUILD.bazel @@ -2,16 +2,21 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", - srcs = ["config.go"], + srcs = [ + "config.go", + "egress_selector.go", + ], importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/apiserver/pkg/server/egressselector", importpath = "k8s.io/apiserver/pkg/server/egressselector", visibility = ["//visibility:public"], deps = [ "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", "//vendor/k8s.io/apiserver/pkg/apis/apiserver/install:go_default_library", "//vendor/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library", + "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/path:go_default_library", "//vendor/sigs.k8s.io/yaml:go_default_library", ], diff --git a/vendor/k8s.io/apiserver/pkg/server/egress_selector.go b/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go similarity index 91% rename from vendor/k8s.io/apiserver/pkg/server/egress_selector.go rename to vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go index 58a9dd320a..d043e1392c 100644 --- a/vendor/k8s.io/apiserver/pkg/server/egress_selector.go +++ b/vendor/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package server +package egressselector import ( "bufio" @@ -34,6 +34,7 @@ import ( var directDialer utilnet.DialFunc = http.DefaultTransport.(*http.Transport).DialContext +// EgressSelector is the map of network context type to context dialer, for network egress. type EgressSelector struct { egressToDialer map[EgressType]utilnet.DialFunc } @@ -59,9 +60,10 @@ type NetworkContext struct { EgressSelectionName EgressType } -// EgressSelectorLookup is the interface to get the dialer function for the network context. -type EgressSelectorLookup func(networkContext NetworkContext) (utilnet.DialFunc, error) +// Lookup is the interface to get the dialer function for the network context. +type Lookup func(networkContext NetworkContext) (utilnet.DialFunc, error) +// String returns the canonical string representation of the egress type func (s EgressType) String() string { switch s { case Master: @@ -75,6 +77,11 @@ func (s EgressType) String() string { } } +// AsNetworkContext is a helper function to make it easy to get the basic NetworkContext objects. +func (s EgressType) AsNetworkContext() NetworkContext { + return NetworkContext{EgressSelectionName: s} +} + func lookupServiceName(name string) (EgressType, error) { switch strings.ToLower(name) { case "master": diff --git a/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go index 5ae78331cc..07bad3d8c0 100644 --- a/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -77,6 +77,10 @@ type APIGroupInfo struct { NegotiatedSerializer runtime.NegotiatedSerializer // ParameterCodec performs conversions for query parameters passed to API calls ParameterCodec runtime.ParameterCodec + + // StaticOpenAPISpec is the spec derived from the definitions of all resources installed together. + // It is set during InstallAPIGroups, InstallAPIGroup, and InstallLegacyAPIGroup. + StaticOpenAPISpec *spec.Swagger } // GenericAPIServer contains state for a Kubernetes cluster api server. @@ -146,14 +150,19 @@ type GenericAPIServer struct { preShutdownHooksCalled bool // healthz checks - healthzLock sync.Mutex - healthzChecks []healthz.HealthzChecker - healthzChecksInstalled bool - readyzLock sync.Mutex - readyzChecks []healthz.HealthzChecker - readyzChecksInstalled bool - maxStartupSequenceDuration time.Duration - healthzClock clock.Clock + healthzLock sync.Mutex + healthzChecks []healthz.HealthChecker + healthzChecksInstalled bool + // livez checks + livezLock sync.Mutex + livezChecks []healthz.HealthChecker + livezChecksInstalled bool + // readyz checks + readyzLock sync.Mutex + readyzChecks []healthz.HealthChecker + readyzChecksInstalled bool + livezGracePeriod time.Duration + livezClock clock.Clock // the readiness stop channel is used to signal that the apiserver has initiated a shutdown sequence, this // will cause readyz to return unhealthy. readinessStopCh chan struct{} @@ -203,7 +212,7 @@ type DelegationTarget interface { PreShutdownHooks() map[string]preShutdownHookEntry // HealthzChecks returns the healthz checks that need to be combined - HealthzChecks() []healthz.HealthzChecker + HealthzChecks() []healthz.HealthChecker // ListedPaths returns the paths for supporting an index ListedPaths() []string @@ -225,7 +234,7 @@ func (s *GenericAPIServer) PostStartHooks() map[string]postStartHookEntry { func (s *GenericAPIServer) PreShutdownHooks() map[string]preShutdownHookEntry { return s.preShutdownHooks } -func (s *GenericAPIServer) HealthzChecks() []healthz.HealthzChecker { +func (s *GenericAPIServer) HealthzChecks() []healthz.HealthChecker { return s.healthzChecks } func (s *GenericAPIServer) ListedPaths() []string { @@ -252,8 +261,8 @@ func (s emptyDelegate) PostStartHooks() map[string]postStartHookEntry { func (s emptyDelegate) PreShutdownHooks() map[string]preShutdownHookEntry { return map[string]preShutdownHookEntry{} } -func (s emptyDelegate) HealthzChecks() []healthz.HealthzChecker { - return []healthz.HealthzChecker{} +func (s emptyDelegate) HealthzChecks() []healthz.HealthChecker { + return []healthz.HealthChecker{} } func (s emptyDelegate) ListedPaths() []string { return []string{} @@ -281,7 +290,12 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer { } s.installHealthz() - s.installReadyz(s.readinessStopCh) + s.installLivez() + err := s.addReadyzShutdownCheck(s.readinessStopCh) + if err != nil { + klog.Errorf("Failed to install readyz shutdown check %s", err) + } + s.installReadyz() // Register audit backend preShutdownHook. if s.AuditBackend != nil { @@ -552,6 +566,9 @@ func (s *GenericAPIServer) getOpenAPIModels(apiPrefix string, apiGroupInfos ...* if err != nil { return nil, err } + for _, apiGroupInfo := range apiGroupInfos { + apiGroupInfo.StaticOpenAPISpec = openAPISpec + } return utilopenapi.ToProtoModels(openAPISpec) } diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz.go b/vendor/k8s.io/apiserver/pkg/server/healthz.go index cfe4efe8f0..645886949b 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz.go +++ b/vendor/k8s.io/apiserver/pkg/server/healthz.go @@ -25,51 +25,93 @@ import ( "k8s.io/apiserver/pkg/server/healthz" ) -// AddHealthzCheck adds HealthzCheck(s) to both healthz and readyz. All healthz checks -// are automatically added to readyz, since we want to avoid the situation where the -// apiserver is ready but not live. -func (s *GenericAPIServer) AddHealthzChecks(checks ...healthz.HealthzChecker) error { - return s.AddDelayedHealthzChecks(0, checks...) +// AddHealthChecks adds HealthCheck(s) to health endpoints (healthz, livez, readyz) but +// configures the liveness grace period to be zero, which means we expect this health check +// to immediately indicate that the apiserver is unhealthy. +func (s *GenericAPIServer) AddHealthChecks(checks ...healthz.HealthChecker) error { + // we opt for a delay of zero here, because this entrypoint adds generic health checks + // and not health checks which are specifically related to kube-apiserver boot-sequences. + return s.addHealthChecks(0, checks...) } -// AddReadyzChecks allows you to add a HealthzCheck to readyz. -func (s *GenericAPIServer) AddReadyzChecks(checks ...healthz.HealthzChecker) error { - s.readyzLock.Lock() - defer s.readyzLock.Unlock() - return s.addReadyzChecks(checks...) +// AddBootSequenceHealthChecks adds health checks to the old healthz endpoint (for backwards compatibility reasons) +// as well as livez and readyz. The livez grace period is defined by the value of the +// command-line flag --livez-grace-period; before the grace period elapses, the livez health checks +// will default to healthy. One may want to set a grace period in order to prevent the kubelet from restarting +// the kube-apiserver due to long-ish boot sequences. Readyz health checks, on the other hand, have no grace period, +// since readyz should fail until boot fully completes. +func (s *GenericAPIServer) AddBootSequenceHealthChecks(checks ...healthz.HealthChecker) error { + return s.addHealthChecks(s.livezGracePeriod, checks...) +} + +// addHealthChecks adds health checks to healthz, livez, and readyz. The delay passed in will set +// a corresponding grace period on livez. +func (s *GenericAPIServer) addHealthChecks(livezGracePeriod time.Duration, checks ...healthz.HealthChecker) error { + s.healthzLock.Lock() + defer s.healthzLock.Unlock() + if s.healthzChecksInstalled { + return fmt.Errorf("unable to add because the healthz endpoint has already been created") + } + s.healthzChecks = append(s.healthzChecks, checks...) + return s.addLivezChecks(livezGracePeriod, checks...) } -// addReadyzChecks allows you to add a HealthzCheck to readyz. -// premise: readyzLock has been obtained -func (s *GenericAPIServer) addReadyzChecks(checks ...healthz.HealthzChecker) error { +// addReadyzChecks allows you to add a HealthCheck to readyz. +func (s *GenericAPIServer) addReadyzChecks(checks ...healthz.HealthChecker) error { + s.readyzLock.Lock() + defer s.readyzLock.Unlock() if s.readyzChecksInstalled { return fmt.Errorf("unable to add because the readyz endpoint has already been created") } - s.readyzChecks = append(s.readyzChecks, checks...) return nil } +// addLivezChecks allows you to add a HealthCheck to livez. It will also automatically add a check to readyz, +// since we want to avoid being ready when we are not live. +func (s *GenericAPIServer) addLivezChecks(delay time.Duration, checks ...healthz.HealthChecker) error { + s.livezLock.Lock() + defer s.livezLock.Unlock() + if s.livezChecksInstalled { + return fmt.Errorf("unable to add because the livez endpoint has already been created") + } + for _, check := range checks { + s.livezChecks = append(s.livezChecks, delayedHealthCheck(check, s.livezClock, delay)) + } + return s.addReadyzChecks(checks...) +} + +// addReadyzShutdownCheck is a convenience function for adding a readyz shutdown check, so +// that we can register that the api-server is no longer ready while we attempt to gracefully +// shutdown. +func (s *GenericAPIServer) addReadyzShutdownCheck(stopCh <-chan struct{}) error { + return s.addReadyzChecks(shutdownCheck{stopCh}) +} + // installHealthz creates the healthz endpoint for this server func (s *GenericAPIServer) installHealthz() { s.healthzLock.Lock() defer s.healthzLock.Unlock() s.healthzChecksInstalled = true - healthz.InstallHandler(s.Handler.NonGoRestfulMux, s.healthzChecks...) } // installReadyz creates the readyz endpoint for this server. -func (s *GenericAPIServer) installReadyz(stopCh <-chan struct{}) { +func (s *GenericAPIServer) installReadyz() { s.readyzLock.Lock() defer s.readyzLock.Unlock() - s.addReadyzChecks(shutdownCheck{stopCh}) - s.readyzChecksInstalled = true - healthz.InstallReadyzHandler(s.Handler.NonGoRestfulMux, s.readyzChecks...) } +// installLivez creates the livez endpoint for this server. +func (s *GenericAPIServer) installLivez() { + s.livezLock.Lock() + defer s.livezLock.Unlock() + s.livezChecksInstalled = true + healthz.InstallLivezHandler(s.Handler.NonGoRestfulMux, s.livezChecks...) +} + // shutdownCheck fails if the embedded channel is closed. This is intended to allow for graceful shutdown sequences // for the apiserver. type shutdownCheck struct { @@ -89,46 +131,27 @@ func (c shutdownCheck) Check(req *http.Request) error { return nil } -// AddDelayedHealthzChecks adds a health check to both healthz and readyz. The delay parameter -// allows you to set the grace period for healthz checks, which will return healthy while -// grace period has not yet elapsed. One may want to set a grace period in order to prevent -// the kubelet from restarting the kube-apiserver due to long-ish boot sequences. Readyz health -// checks have no grace period, since we want readyz to fail while boot has not completed. -func (s *GenericAPIServer) AddDelayedHealthzChecks(delay time.Duration, checks ...healthz.HealthzChecker) error { - s.healthzLock.Lock() - defer s.healthzLock.Unlock() - if s.healthzChecksInstalled { - return fmt.Errorf("unable to add because the healthz endpoint has already been created") - } - for _, check := range checks { - s.healthzChecks = append(s.healthzChecks, delayedHealthCheck(check, s.healthzClock, s.maxStartupSequenceDuration)) - } - - s.readyzLock.Lock() - defer s.readyzLock.Unlock() - return s.addReadyzChecks(checks...) -} - -// delayedHealthCheck wraps a health check which will not fail until the explicitly defined delay has elapsed. -func delayedHealthCheck(check healthz.HealthzChecker, clock clock.Clock, delay time.Duration) healthz.HealthzChecker { - return delayedHealthzCheck{ +// delayedHealthCheck wraps a health check which will not fail until the explicitly defined delay has elapsed. This +// is intended for use primarily for livez health checks. +func delayedHealthCheck(check healthz.HealthChecker, clock clock.Clock, delay time.Duration) healthz.HealthChecker { + return delayedLivezCheck{ check, clock.Now().Add(delay), clock, } } -type delayedHealthzCheck struct { - check healthz.HealthzChecker +type delayedLivezCheck struct { + check healthz.HealthChecker startCheck time.Time clock clock.Clock } -func (c delayedHealthzCheck) Name() string { +func (c delayedLivezCheck) Name() string { return c.check.Name() } -func (c delayedHealthzCheck) Check(req *http.Request) error { +func (c delayedLivezCheck) Check(req *http.Request) error { if c.clock.Now().After(c.startCheck) { return c.check.Check(req) } diff --git a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go index c7f8686c46..a55e201e70 100644 --- a/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -31,14 +31,14 @@ import ( "k8s.io/klog" ) -// HealthzChecker is a named healthz checker. -type HealthzChecker interface { +// HealthChecker is a named healthz checker. +type HealthChecker interface { Name() string Check(req *http.Request) error } // PingHealthz returns true automatically when checked -var PingHealthz HealthzChecker = ping{} +var PingHealthz HealthChecker = ping{} // ping implements the simplest possible healthz checker. type ping struct{} @@ -53,7 +53,7 @@ func (ping) Check(_ *http.Request) error { } // LogHealthz returns true if logging is not blocked -var LogHealthz HealthzChecker = &log{} +var LogHealthz HealthChecker = &log{} type log struct { startOnce sync.Once @@ -81,7 +81,7 @@ func (l *log) Check(_ *http.Request) error { } // NamedCheck returns a healthz checker for the given name and function. -func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker { +func NamedCheck(name string, check func(r *http.Request) error) HealthChecker { return &healthzCheck{name, check} } @@ -89,7 +89,7 @@ func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker { // "/healthz" to mux. *All handlers* for mux must be specified in // exactly one call to InstallHandler. Calling InstallHandler more // than once for the same mux will result in a panic. -func InstallHandler(mux mux, checks ...HealthzChecker) { +func InstallHandler(mux mux, checks ...HealthChecker) { InstallPathHandler(mux, "/healthz", checks...) } @@ -97,22 +97,30 @@ func InstallHandler(mux mux, checks ...HealthzChecker) { // "/readyz" to mux. *All handlers* for mux must be specified in // exactly one call to InstallHandler. Calling InstallHandler more // than once for the same mux will result in a panic. -func InstallReadyzHandler(mux mux, checks ...HealthzChecker) { +func InstallReadyzHandler(mux mux, checks ...HealthChecker) { InstallPathHandler(mux, "/readyz", checks...) } +// InstallLivezHandler registers handlers for liveness checking on the path +// "/livez" to mux. *All handlers* for mux must be specified in +// exactly one call to InstallHandler. Calling InstallHandler more +// than once for the same mux will result in a panic. +func InstallLivezHandler(mux mux, checks ...HealthChecker) { + InstallPathHandler(mux, "/livez", checks...) +} + // InstallPathHandler registers handlers for health checking on // a specific path to mux. *All handlers* for the path must be // specified in exactly one call to InstallPathHandler. Calling // InstallPathHandler more than once for the same path and mux will // result in a panic. -func InstallPathHandler(mux mux, path string, checks ...HealthzChecker) { +func InstallPathHandler(mux mux, path string, checks ...HealthChecker) { if len(checks) == 0 { klog.V(5).Info("No default health checks specified. Installing the ping handler.") - checks = []HealthzChecker{PingHealthz} + checks = []HealthChecker{PingHealthz} } - klog.V(5).Info("Installing healthz checkers:", formatQuoted(checkerNames(checks...)...)) + klog.V(5).Infof("Installing health checkers for (%v): %v", path, formatQuoted(checkerNames(checks...)...)) mux.Handle(path, handleRootHealthz(checks...)) for _, check := range checks { @@ -125,13 +133,13 @@ type mux interface { Handle(pattern string, handler http.Handler) } -// healthzCheck implements HealthzChecker on an arbitrary name and check function. +// healthzCheck implements HealthChecker on an arbitrary name and check function. type healthzCheck struct { name string check func(r *http.Request) error } -var _ HealthzChecker = &healthzCheck{} +var _ HealthChecker = &healthzCheck{} func (c *healthzCheck) Name() string { return c.name @@ -151,7 +159,7 @@ func getExcludedChecks(r *http.Request) sets.String { } // handleRootHealthz returns an http.HandlerFunc that serves the provided checks. -func handleRootHealthz(checks ...HealthzChecker) http.HandlerFunc { +func handleRootHealthz(checks ...HealthChecker) http.HandlerFunc { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { failed := false excluded := getExcludedChecks(r) @@ -210,7 +218,7 @@ func adaptCheckToHandler(c func(r *http.Request) error) http.HandlerFunc { } // checkerNames returns the names of the checks in the same order as passed in. -func checkerNames(checks ...HealthzChecker) []string { +func checkerNames(checks ...HealthChecker) []string { // accumulate the names of checks for printing them out. checkerNames := make([]string, 0, len(checks)) for _, check := range checks { diff --git a/vendor/k8s.io/apiserver/pkg/server/hooks.go b/vendor/k8s.io/apiserver/pkg/server/hooks.go index 1fb0bc65e9..fba876d257 100644 --- a/vendor/k8s.io/apiserver/pkg/server/hooks.go +++ b/vendor/k8s.io/apiserver/pkg/server/hooks.go @@ -22,12 +22,11 @@ import ( "net/http" "runtime/debug" - "k8s.io/klog" - utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/server/healthz" restclient "k8s.io/client-go/rest" + "k8s.io/klog" ) // PostStartHookFunc is a function that is called after the server has started. @@ -97,7 +96,7 @@ func (s *GenericAPIServer) AddPostStartHook(name string, hook PostStartHookFunc) // done is closed when the poststarthook is finished. This is used by the health check to be able to indicate // that the poststarthook is finished done := make(chan struct{}) - if err := s.AddDelayedHealthzChecks(s.maxStartupSequenceDuration, postStartHookHealthz{name: "poststarthook/" + name, done: done}); err != nil { + if err := s.AddBootSequenceHealthChecks(postStartHookHealthz{name: "poststarthook/" + name, done: done}); err != nil { return err } s.postStartHooks[name] = postStartHookEntry{hook: hook, originatingStack: string(debug.Stack()), done: done} @@ -219,7 +218,7 @@ type postStartHookHealthz struct { done chan struct{} } -var _ healthz.HealthzChecker = postStartHookHealthz{} +var _ healthz.HealthChecker = postStartHookHealthz{} func (h postStartHookHealthz) Name() string { return h.name diff --git a/vendor/k8s.io/apiserver/pkg/server/options/egress_selector.go b/vendor/k8s.io/apiserver/pkg/server/options/egress_selector.go index 837e32fcfa..c5e579c3cf 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/egress_selector.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/egress_selector.go @@ -68,7 +68,7 @@ func (o *EgressSelectorOptions) ApplyTo(c *server.Config) error { return fmt.Errorf("failed to validate egress selector configuration: %v", errs.ToAggregate()) } - cs, err := server.NewEgressSelector(npConfig) + cs, err := egressselector.NewEgressSelector(npConfig) if err != nil { return fmt.Errorf("failed to setup egress selector with config %#v: %v", npConfig, err) } diff --git a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go index a0b5618e87..82b245a7a8 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go @@ -62,20 +62,20 @@ type kmsPluginProbe struct { l *sync.Mutex } -func (h *kmsPluginProbe) toHealthzCheck(idx int) healthz.HealthzChecker { +func (h *kmsPluginProbe) toHealthzCheck(idx int) healthz.HealthChecker { return healthz.NamedCheck(fmt.Sprintf("kms-provider-%d", idx), func(r *http.Request) error { return h.Check() }) } // GetKMSPluginHealthzCheckers extracts KMSPluginProbes from the EncryptionConfig. -func GetKMSPluginHealthzCheckers(filepath string) ([]healthz.HealthzChecker, error) { +func GetKMSPluginHealthzCheckers(filepath string) ([]healthz.HealthChecker, error) { f, err := os.Open(filepath) if err != nil { return nil, fmt.Errorf("error opening encryption provider configuration file %q: %v", filepath, err) } defer f.Close() - var result []healthz.HealthzChecker + var result []healthz.HealthChecker probes, err := getKMSPluginProbes(f) if err != nil { return nil, err diff --git a/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go b/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go index d6d9909da9..f68c11dbf2 100644 --- a/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go +++ b/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go @@ -41,7 +41,7 @@ type ServerRunOptions struct { MaxRequestsInFlight int MaxMutatingRequestsInFlight int RequestTimeout time.Duration - MaxStartupSequenceDuration time.Duration + LivezGracePeriod time.Duration MinRequestTimeout int ShutdownDelayDuration time.Duration // We intentionally did not add a flag for this option. Users of the @@ -62,7 +62,7 @@ func NewServerRunOptions() *ServerRunOptions { MaxRequestsInFlight: defaults.MaxRequestsInFlight, MaxMutatingRequestsInFlight: defaults.MaxMutatingRequestsInFlight, RequestTimeout: defaults.RequestTimeout, - MaxStartupSequenceDuration: defaults.MaxStartupSequenceDuration, + LivezGracePeriod: defaults.LivezGracePeriod, MinRequestTimeout: defaults.MinRequestTimeout, ShutdownDelayDuration: defaults.ShutdownDelayDuration, JSONPatchMaxCopyBytes: defaults.JSONPatchMaxCopyBytes, @@ -76,7 +76,7 @@ func (s *ServerRunOptions) ApplyTo(c *server.Config) error { c.ExternalAddress = s.ExternalHost c.MaxRequestsInFlight = s.MaxRequestsInFlight c.MaxMutatingRequestsInFlight = s.MaxMutatingRequestsInFlight - c.MaxStartupSequenceDuration = s.MaxStartupSequenceDuration + c.LivezGracePeriod = s.LivezGracePeriod c.RequestTimeout = s.RequestTimeout c.MinRequestTimeout = s.MinRequestTimeout c.ShutdownDelayDuration = s.ShutdownDelayDuration @@ -112,8 +112,8 @@ func (s *ServerRunOptions) Validate() []error { errors = append(errors, fmt.Errorf("--target-ram-mb can not be negative value")) } - if s.MaxStartupSequenceDuration < 0 { - errors = append(errors, fmt.Errorf("--maximum-startup-sequence-duration can not be a negative value")) + if s.LivezGracePeriod < 0 { + errors = append(errors, fmt.Errorf("--livez-grace-period can not be a negative value")) } if s.EnableInfightQuotaHandler { @@ -199,9 +199,9 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { "it out. This is the default request timeout for requests but may be overridden by flags such as "+ "--min-request-timeout for specific types of requests.") - fs.DurationVar(&s.MaxStartupSequenceDuration, "maximum-startup-sequence-duration", s.MaxStartupSequenceDuration, ""+ + fs.DurationVar(&s.LivezGracePeriod, "livez-grace-period", s.LivezGracePeriod, ""+ "This option represents the maximum amount of time it should take for apiserver to complete its startup sequence "+ - "and become healthy. From apiserver's start time to when this amount of time has elapsed, /healthz will assume "+ + "and become live. From apiserver's start time to when this amount of time has elapsed, /livez will assume "+ "that unfinished post-start hooks will complete successfully and therefore return true.") fs.IntVar(&s.MinRequestTimeout, "min-request-timeout", s.MinRequestTimeout, ""+ diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/server/routes/BUILD.bazel index 32ae5e04be..41d1cf3202 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/server/routes/BUILD.bazel @@ -17,7 +17,6 @@ go_library( deps = [ "//vendor/github.com/emicklei/go-restful:go_default_library", "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", @@ -25,6 +24,7 @@ go_library( "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", "//vendor/k8s.io/apiserver/pkg/server/mux:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/builder:go_default_library", "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", diff --git a/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go b/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go index f9ae46f64e..7b4591c873 100644 --- a/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/server/routes/metrics.go @@ -23,8 +23,7 @@ import ( apimetrics "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/server/mux" etcd3metrics "k8s.io/apiserver/pkg/storage/etcd3/metrics" - - "github.com/prometheus/client_golang/prometheus" + "k8s.io/component-base/metrics/legacyregistry" ) // DefaultMetrics installs the default prometheus metrics handler @@ -33,7 +32,7 @@ type DefaultMetrics struct{} // Install adds the DefaultMetrics handler func (m DefaultMetrics) Install(c *mux.PathRecorderMux) { register() - c.Handle("/metrics", prometheus.Handler()) + c.Handle("/metrics", legacyregistry.Handler()) } // MetricsWithReset install the prometheus metrics handler extended with support for the DELETE method @@ -43,7 +42,7 @@ type MetricsWithReset struct{} // Install adds the MetricsWithReset handler func (m MetricsWithReset) Install(c *mux.PathRecorderMux) { register() - defaultMetricsHandler := prometheus.Handler().ServeHTTP + defaultMetricsHandler := legacyregistry.Handler().ServeHTTP c.HandleFunc("/metrics", func(w http.ResponseWriter, req *http.Request) { if req.Method == "DELETE" { apimetrics.Reset() diff --git a/vendor/k8s.io/apiserver/pkg/server/secure_serving.go b/vendor/k8s.io/apiserver/pkg/server/secure_serving.go index a08df1af28..031f4b045a 100644 --- a/vendor/k8s.io/apiserver/pkg/server/secure_serving.go +++ b/vendor/k8s.io/apiserver/pkg/server/secure_serving.go @@ -60,6 +60,11 @@ func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Dur }, } + if s.DisableHTTP2 { + klog.Info("Forcing use of http/1.1 only") + secureServer.TLSConfig.NextProtos = []string{"http/1.1"} + } + if s.MinTLSVersion > 0 { secureServer.TLSConfig.MinVersion = s.MinTLSVersion } @@ -108,9 +113,11 @@ func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Dur // increase the connection buffer size from the 1MB default to handle the specified number of concurrent streams http2Options.MaxUploadBufferPerConnection = http2Options.MaxUploadBufferPerStream * int32(http2Options.MaxConcurrentStreams) - // apply settings to the server - if err := http2.ConfigureServer(secureServer, http2Options); err != nil { - return nil, fmt.Errorf("error configuring http2: %v", err) + if !s.DisableHTTP2 { + // apply settings to the server + if err := http2.ConfigureServer(secureServer, http2Options); err != nil { + return nil, fmt.Errorf("error configuring http2: %v", err) + } } klog.Infof("Serving securely on %s", secureServer.Addr) diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD.bazel index daf5c662f9..e400582670 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/BUILD.bazel @@ -12,7 +12,6 @@ go_library( importpath = "k8s.io/apiserver/pkg/storage/cacher", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", @@ -28,6 +27,8 @@ go_library( "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/utils/trace:go_default_library", ], diff --git a/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go index 65ef690f48..822615fb6c 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go +++ b/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -24,8 +24,6 @@ import ( "sync" "time" - "k8s.io/klog" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -41,16 +39,26 @@ import ( "k8s.io/apiserver/pkg/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/cache" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" + "k8s.io/klog" utiltrace "k8s.io/utils/trace" - - "github.com/prometheus/client_golang/prometheus" ) +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ var ( - initCounter = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "apiserver_init_events_total", - Help: "Counter of init events processed in watchcache broken by resource type", + initCounter = metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "apiserver_init_events_total", + Help: "Counter of init events processed in watchcache broken by resource type", + StabilityLevel: metrics.ALPHA, }, []string{"resource"}, ) @@ -64,7 +72,7 @@ const ( ) func init() { - prometheus.MustRegister(initCounter) + legacyregistry.MustRegister(initCounter) } // Config contains the configuration for a given Cache. diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/BUILD.bazel index 858fda4555..e93dd975e2 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/BUILD.bazel @@ -6,5 +6,8 @@ go_library( importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics", importpath = "k8s.io/apiserver/pkg/storage/etcd3/metrics", visibility = ["//visibility:public"], - deps = ["//vendor/github.com/prometheus/client_golang/prometheus:go_default_library"], + deps = [ + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go index 68f8b3158a..32210db164 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics.go @@ -20,29 +20,41 @@ import ( "sync" "time" - "github.com/prometheus/client_golang/prometheus" + compbasemetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ var ( - etcdRequestLatency = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Name: "etcd_request_duration_seconds", - Help: "Etcd request latency in seconds for each operation and object type.", + etcdRequestLatency = compbasemetrics.NewHistogramVec( + &compbasemetrics.HistogramOpts{ + Name: "etcd_request_duration_seconds", + Help: "Etcd request latency in seconds for each operation and object type.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"operation", "type"}, ) - objectCounts = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Name: "etcd_object_counts", - Help: "Number of stored objects at the time of last check split by kind.", + objectCounts = compbasemetrics.NewGaugeVec( + &compbasemetrics.GaugeOpts{ + Name: "etcd_object_counts", + Help: "Number of stored objects at the time of last check split by kind.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) - deprecatedEtcdRequestLatenciesSummary = prometheus.NewSummaryVec( - prometheus.SummaryOpts{ - Name: "etcd_request_latencies_summary", - Help: "(Deprecated) Etcd request latency summary in microseconds for each operation and object type.", + deprecatedEtcdRequestLatenciesSummary = compbasemetrics.NewSummaryVec( + &compbasemetrics.SummaryOpts{ + Name: "etcd_request_latencies_summary", + Help: "(Deprecated) Etcd request latency summary in microseconds for each operation and object type.", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"operation", "type"}, ) @@ -54,11 +66,11 @@ var registerMetrics sync.Once func Register() { // Register the metrics. registerMetrics.Do(func() { - prometheus.MustRegister(etcdRequestLatency) - prometheus.MustRegister(objectCounts) + legacyregistry.MustRegister(etcdRequestLatency) + legacyregistry.MustRegister(objectCounts) // TODO(danielqsj): Remove the following metrics, they are deprecated - prometheus.MustRegister(deprecatedEtcdRequestLatenciesSummary) + legacyregistry.MustRegister(deprecatedEtcdRequestLatenciesSummary) }) } diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go index ba1953f491..f065872b52 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -208,7 +208,7 @@ func (s *store) conditionalDelete(ctx context.Context, key string, out runtime.O return err } } - if err := validateDeletion(origState.obj); err != nil { + if err := validateDeletion(ctx, origState.obj); err != nil { return err } startTime := time.Now() @@ -274,7 +274,20 @@ func (s *store) GuaranteedUpdate( transformContext := authenticatedDataString(key) for { if err := preconditions.Check(key, origState.obj); err != nil { - return err + // If our data is already up to date, return the error + if !mustCheckData { + return err + } + + // It's possible we were working with stale data + // Actually fetch + origState, err = getCurrentState() + if err != nil { + return err + } + mustCheckData = false + // Retry + continue } ret, ttl, err := s.updateState(origState, tryUpdate) diff --git a/vendor/k8s.io/apiserver/pkg/storage/interfaces.go b/vendor/k8s.io/apiserver/pkg/storage/interfaces.go index f5d3b3ea78..f3ca36118f 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/vendor/k8s.io/apiserver/pkg/storage/interfaces.go @@ -95,10 +95,10 @@ type UpdateFunc func(input runtime.Object, res ResponseMeta) (output runtime.Obj // ValidateObjectFunc is a function to act on a given object. An error may be returned // if the hook cannot be completed. The function may NOT transform the provided // object. -type ValidateObjectFunc func(obj runtime.Object) error +type ValidateObjectFunc func(ctx context.Context, obj runtime.Object) error // ValidateAllObjectFunc is a "admit everything" instance of ValidateObjectFunc. -func ValidateAllObjectFunc(obj runtime.Object) error { +func ValidateAllObjectFunc(ctx context.Context, obj runtime.Object) error { return nil } diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/BUILD.bazel index b77d355ed9..36e0cdb92b 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/BUILD.bazel @@ -8,6 +8,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/egressselector:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go index f793e3aca5..37c65948e9 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/config.go @@ -20,6 +20,7 @@ import ( "time" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/storage/value" ) @@ -38,6 +39,8 @@ type TransportConfig struct { KeyFile string CertFile string CAFile string + // function to determine the egress dialer. (i.e. konnectivity server dialer) + EgressLookup egressselector.Lookup } // Config is configuration for creating a storage backend. diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD.bazel index 4a6fbc5a3a..d257511075 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD.bazel @@ -14,10 +14,13 @@ go_library( "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", "//vendor/github.com/grpc-ecosystem/go-grpc-prometheus:go_default_library", "//vendor/google.golang.org/grpc:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/apiserver/pkg/server/egressselector:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/etcd3:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index 801f8d6c92..1d01626291 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -19,6 +19,8 @@ package factory import ( "context" "fmt" + "net" + "net/url" "path" "sync" "sync/atomic" @@ -29,11 +31,14 @@ import ( grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus" "google.golang.org/grpc" + utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/server/egressselector" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/etcd3" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/apiserver/pkg/storage/value" + "k8s.io/component-base/metrics/legacyregistry" ) // The short keepalive timeout and interval have been chosen to aggressively @@ -46,6 +51,14 @@ const keepaliveTimeout = 10 * time.Second // on heavily loaded arm64 CPUs (issue #64649) const dialTimeout = 20 * time.Second +func init() { + // grpcprom auto-registers (via an init function) their client metrics, since we are opting out of + // using the global prometheus registry and using our own wrapped global registry, + // we need to explicitly register these metrics to our global registry here. + // For reference: https://github.com/kubernetes/kubernetes/pull/81387 + legacyregistry.RawMustRegister(grpcprom.DefaultClientMetrics) +} + func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) { // constructing the etcd v3 client blocks and times out if etcd is not available. // retry in a loop in the background until we successfully create the client, storing the client or error encountered @@ -97,16 +110,36 @@ func newETCD3Client(c storagebackend.TransportConfig) (*clientv3.Client, error) if len(c.CertFile) == 0 && len(c.KeyFile) == 0 && len(c.CAFile) == 0 { tlsConfig = nil } + networkContext := egressselector.Etcd.AsNetworkContext() + var egressDialer utilnet.DialFunc + if c.EgressLookup != nil { + egressDialer, err = c.EgressLookup(networkContext) + if err != nil { + return nil, err + } + } + dialOptions := []grpc.DialOption{ + grpc.WithBlock(), // block until the underlying connection is up + grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor), + grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor), + } + if egressDialer != nil { + dialer := func(ctx context.Context, addr string) (net.Conn, error) { + u, err := url.Parse(addr) + if err != nil { + return nil, err + } + return egressDialer(ctx, "tcp", u.Host) + } + dialOptions = append(dialOptions, grpc.WithContextDialer(dialer)) + } cfg := clientv3.Config{ DialTimeout: dialTimeout, DialKeepAliveTime: keepaliveTime, DialKeepAliveTimeout: keepaliveTimeout, - DialOptions: []grpc.DialOption{ - grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor), - grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor), - }, - Endpoints: c.ServerList, - TLS: tlsConfig, + DialOptions: dialOptions, + Endpoints: c.ServerList, + TLS: tlsConfig, } return clientv3.New(cfg) diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/value/BUILD.bazel index bf16dedb97..1b63b2fda7 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/BUILD.bazel +++ b/vendor/k8s.io/apiserver/pkg/storage/value/BUILD.bazel @@ -12,5 +12,7 @@ go_library( deps = [ "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/google.golang.org/grpc/status:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/metrics.go b/vendor/k8s.io/apiserver/pkg/storage/value/metrics.go index f827bffaf9..f35994688b 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/metrics.go +++ b/vendor/k8s.io/apiserver/pkg/storage/value/metrics.go @@ -20,9 +20,11 @@ import ( "sync" "time" + "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc/status" - "github.com/prometheus/client_golang/prometheus" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) const ( @@ -30,85 +32,101 @@ const ( subsystem = "storage" ) +/* + * By default, all the following metrics are defined as falling under + * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190404-kubernetes-control-plane-metrics-stability.md#stability-classes) + * + * Promoting the stability level of the metric is a responsibility of the component owner, since it + * involves explicitly acknowledging support for the metric across multiple releases, in accordance with + * the metric stability policy. + */ var ( - transformerLatencies = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + transformerLatencies = metrics.NewHistogramVec( + &metrics.HistogramOpts{ Namespace: namespace, Subsystem: subsystem, Name: "transformation_duration_seconds", Help: "Latencies in seconds of value transformation operations.", // In-process transformations (ex. AES CBC) complete on the order of 20 microseconds. However, when // external KMS is involved latencies may climb into milliseconds. - Buckets: prometheus.ExponentialBuckets(5e-6, 2, 14), + Buckets: prometheus.ExponentialBuckets(5e-6, 2, 14), + StabilityLevel: metrics.ALPHA, }, []string{"transformation_type"}, ) - deprecatedTransformerLatencies = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + deprecatedTransformerLatencies = metrics.NewHistogramVec( + &metrics.HistogramOpts{ Namespace: namespace, Subsystem: subsystem, Name: "transformation_latencies_microseconds", Help: "(Deprecated) Latencies in microseconds of value transformation operations.", // In-process transformations (ex. AES CBC) complete on the order of 20 microseconds. However, when // external KMS is involved latencies may climb into milliseconds. - Buckets: prometheus.ExponentialBuckets(5, 2, 14), + Buckets: prometheus.ExponentialBuckets(5, 2, 14), + StabilityLevel: metrics.ALPHA, }, []string{"transformation_type"}, ) - transformerOperationsTotal = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "transformation_operations_total", - Help: "Total number of transformations.", + transformerOperationsTotal = metrics.NewCounterVec( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "transformation_operations_total", + Help: "Total number of transformations.", + StabilityLevel: metrics.ALPHA, }, - []string{"transformation_type", "status"}, + []string{"transformation_type", "transformer_prefix", "status"}, ) - deprecatedTransformerFailuresTotal = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "transformation_failures_total", - Help: "(Deprecated) Total number of failed transformation operations.", + deprecatedTransformerFailuresTotal = metrics.NewCounterVec( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "transformation_failures_total", + Help: "(Deprecated) Total number of failed transformation operations.", + StabilityLevel: metrics.ALPHA, }, []string{"transformation_type"}, ) - envelopeTransformationCacheMissTotal = prometheus.NewCounter( - prometheus.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "envelope_transformation_cache_misses_total", - Help: "Total number of cache misses while accessing key decryption key(KEK).", + envelopeTransformationCacheMissTotal = metrics.NewCounter( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "envelope_transformation_cache_misses_total", + Help: "Total number of cache misses while accessing key decryption key(KEK).", + StabilityLevel: metrics.ALPHA, }, ) - dataKeyGenerationLatencies = prometheus.NewHistogram( - prometheus.HistogramOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "data_key_generation_duration_seconds", - Help: "Latencies in seconds of data encryption key(DEK) generation operations.", - Buckets: prometheus.ExponentialBuckets(5e-6, 2, 14), + dataKeyGenerationLatencies = metrics.NewHistogram( + &metrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "data_key_generation_duration_seconds", + Help: "Latencies in seconds of data encryption key(DEK) generation operations.", + Buckets: prometheus.ExponentialBuckets(5e-6, 2, 14), + StabilityLevel: metrics.ALPHA, }, ) - deprecatedDataKeyGenerationLatencies = prometheus.NewHistogram( - prometheus.HistogramOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "data_key_generation_latencies_microseconds", - Help: "(Deprecated) Latencies in microseconds of data encryption key(DEK) generation operations.", - Buckets: prometheus.ExponentialBuckets(5, 2, 14), + deprecatedDataKeyGenerationLatencies = metrics.NewHistogram( + &metrics.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "data_key_generation_latencies_microseconds", + Help: "(Deprecated) Latencies in microseconds of data encryption key(DEK) generation operations.", + Buckets: prometheus.ExponentialBuckets(5, 2, 14), + StabilityLevel: metrics.ALPHA, }, ) - dataKeyGenerationFailuresTotal = prometheus.NewCounter( - prometheus.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "data_key_generation_failures_total", - Help: "Total number of failed data encryption key(DEK) generation operations.", + dataKeyGenerationFailuresTotal = metrics.NewCounter( + &metrics.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "data_key_generation_failures_total", + Help: "Total number of failed data encryption key(DEK) generation operations.", + StabilityLevel: metrics.ALPHA, }, ) ) @@ -117,21 +135,21 @@ var registerMetrics sync.Once func RegisterMetrics() { registerMetrics.Do(func() { - prometheus.MustRegister(transformerLatencies) - prometheus.MustRegister(deprecatedTransformerLatencies) - prometheus.MustRegister(transformerOperationsTotal) - prometheus.MustRegister(deprecatedTransformerFailuresTotal) - prometheus.MustRegister(envelopeTransformationCacheMissTotal) - prometheus.MustRegister(dataKeyGenerationLatencies) - prometheus.MustRegister(deprecatedDataKeyGenerationLatencies) - prometheus.MustRegister(dataKeyGenerationFailuresTotal) + legacyregistry.MustRegister(transformerLatencies) + legacyregistry.MustRegister(deprecatedTransformerLatencies) + legacyregistry.MustRegister(transformerOperationsTotal) + legacyregistry.MustRegister(deprecatedTransformerFailuresTotal) + legacyregistry.MustRegister(envelopeTransformationCacheMissTotal) + legacyregistry.MustRegister(dataKeyGenerationLatencies) + legacyregistry.MustRegister(deprecatedDataKeyGenerationLatencies) + legacyregistry.MustRegister(dataKeyGenerationFailuresTotal) }) } // RecordTransformation records latencies and count of TransformFromStorage and TransformToStorage operations. // Note that transformation_failures_total metric is deprecated, use transformation_operations_total instead. -func RecordTransformation(transformationType string, start time.Time, err error) { - transformerOperationsTotal.WithLabelValues(transformationType, status.Code(err).String()).Inc() +func RecordTransformation(transformationType, transformerPrefix string, start time.Time, err error) { + transformerOperationsTotal.WithLabelValues(transformationType, transformerPrefix, status.Code(err).String()).Inc() switch { case err == nil: diff --git a/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go b/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go index bad6ed58e3..bb0f1157c3 100644 --- a/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go +++ b/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go @@ -85,18 +85,12 @@ func (t *MutableTransformer) Set(transformer Transformer) { } func (t *MutableTransformer) TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) { - defer func(start time.Time) { - RecordTransformation("from_storage", start, err) - }(time.Now()) t.lock.RLock() transformer := t.transformer t.lock.RUnlock() return transformer.TransformFromStorage(data, context) } func (t *MutableTransformer) TransformToStorage(data []byte, context Context) (out []byte, err error) { - defer func(start time.Time) { - RecordTransformation("to_storage", start, err) - }(time.Now()) t.lock.RLock() transformer := t.transformer t.lock.RUnlock() @@ -134,28 +128,37 @@ func NewPrefixTransformers(err error, transformers ...PrefixTransformer) Transfo // the result of transforming the value. It will always mark any transformation as stale that is not using // the first transformer. func (t *prefixTransformers) TransformFromStorage(data []byte, context Context) ([]byte, bool, error) { + start := time.Now() for i, transformer := range t.transformers { if bytes.HasPrefix(data, transformer.Prefix) { result, stale, err := transformer.Transformer.TransformFromStorage(data[len(transformer.Prefix):], context) // To migrate away from encryption, user can specify an identity transformer higher up // (in the config file) than the encryption transformer. In that scenario, the identity transformer needs to // identify (during reads from disk) whether the data being read is encrypted or not. If the data is encrypted, - // it shall throw an error, but that error should not prevent subsequent transformers from being tried. + // it shall throw an error, but that error should not prevent the next subsequent transformer from being tried. if len(transformer.Prefix) == 0 && err != nil { continue } + if len(transformer.Prefix) == 0 { + RecordTransformation("from_storage", "identity", start, err) + } else { + RecordTransformation("from_storage", string(transformer.Prefix), start, err) + } return result, stale || i != 0, err } } + RecordTransformation("from_storage", "unknown", start, t.err) return nil, false, t.err } // TransformToStorage uses the first transformer and adds its prefix to the data. func (t *prefixTransformers) TransformToStorage(data []byte, context Context) ([]byte, error) { + start := time.Now() transformer := t.transformers[0] prefixedData := make([]byte, len(transformer.Prefix), len(data)+len(transformer.Prefix)) copy(prefixedData, transformer.Prefix) result, err := transformer.Transformer.TransformToStorage(data, context) + RecordTransformation("to_storage", string(transformer.Prefix), start, err) if err != nil { return nil, err } diff --git a/vendor/k8s.io/apiserver/pkg/util/webhook/authentication.go b/vendor/k8s.io/apiserver/pkg/util/webhook/authentication.go index dda51b60d2..9d78e936a5 100644 --- a/vendor/k8s.io/apiserver/pkg/util/webhook/authentication.go +++ b/vendor/k8s.io/apiserver/pkg/util/webhook/authentication.go @@ -19,7 +19,9 @@ package webhook import ( "fmt" "io/ioutil" + "net" "net/http" + "strconv" "strings" "time" @@ -40,17 +42,17 @@ func NewDefaultAuthenticationInfoResolverWrapper( webhookAuthResolverWrapper := func(delegate AuthenticationInfoResolver) AuthenticationInfoResolver { return &AuthenticationInfoResolverDelegator{ - ClientConfigForFunc: func(server string) (*rest.Config, error) { - if server == "kubernetes.default.svc" { + ClientConfigForFunc: func(hostPort string) (*rest.Config, error) { + if hostPort == "kubernetes.default.svc:443" { return kubeapiserverClientConfig, nil } - return delegate.ClientConfigFor(server) + return delegate.ClientConfigFor(hostPort) }, - ClientConfigForServiceFunc: func(serviceName, serviceNamespace string) (*rest.Config, error) { - if serviceName == "kubernetes" && serviceNamespace == corev1.NamespaceDefault { + ClientConfigForServiceFunc: func(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) { + if serviceName == "kubernetes" && serviceNamespace == corev1.NamespaceDefault && servicePort == 443 { return kubeapiserverClientConfig, nil } - ret, err := delegate.ClientConfigForService(serviceName, serviceNamespace) + ret, err := delegate.ClientConfigForService(serviceName, serviceNamespace, servicePort) if err != nil { return nil, err } @@ -67,27 +69,27 @@ func NewDefaultAuthenticationInfoResolverWrapper( // AuthenticationInfoResolver builds rest.Config base on the server or service // name and service namespace. type AuthenticationInfoResolver interface { - // ClientConfigFor builds rest.Config based on the server. - ClientConfigFor(server string) (*rest.Config, error) + // ClientConfigFor builds rest.Config based on the hostPort. + ClientConfigFor(hostPort string) (*rest.Config, error) // ClientConfigForService builds rest.Config based on the serviceName and // serviceNamespace. - ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) + ClientConfigForService(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) } // AuthenticationInfoResolverDelegator implements AuthenticationInfoResolver. type AuthenticationInfoResolverDelegator struct { - ClientConfigForFunc func(server string) (*rest.Config, error) - ClientConfigForServiceFunc func(serviceName, serviceNamespace string) (*rest.Config, error) + ClientConfigForFunc func(hostPort string) (*rest.Config, error) + ClientConfigForServiceFunc func(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) } -// ClientConfigFor returns client config for given server. -func (a *AuthenticationInfoResolverDelegator) ClientConfigFor(server string) (*rest.Config, error) { - return a.ClientConfigForFunc(server) +// ClientConfigFor returns client config for given hostPort. +func (a *AuthenticationInfoResolverDelegator) ClientConfigFor(hostPort string) (*rest.Config, error) { + return a.ClientConfigForFunc(hostPort) } // ClientConfigForService returns client config for given service. -func (a *AuthenticationInfoResolverDelegator) ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) { - return a.ClientConfigForServiceFunc(serviceName, serviceNamespace) +func (a *AuthenticationInfoResolverDelegator) ClientConfigForService(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) { + return a.ClientConfigForServiceFunc(serviceName, serviceNamespace, servicePort) } type defaultAuthenticationInfoResolver struct { @@ -113,12 +115,12 @@ func NewDefaultAuthenticationInfoResolver(kubeconfigFile string) (Authentication return &defaultAuthenticationInfoResolver{kubeconfig: clientConfig}, nil } -func (c *defaultAuthenticationInfoResolver) ClientConfigFor(server string) (*rest.Config, error) { - return c.clientConfig(server) +func (c *defaultAuthenticationInfoResolver) ClientConfigFor(hostPort string) (*rest.Config, error) { + return c.clientConfig(hostPort) } -func (c *defaultAuthenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string) (*rest.Config, error) { - return c.clientConfig(serviceName + "." + serviceNamespace + ".svc") +func (c *defaultAuthenticationInfoResolver) ClientConfigForService(serviceName, serviceNamespace string, servicePort int) (*rest.Config, error) { + return c.clientConfig(net.JoinHostPort(serviceName+"."+serviceNamespace+".svc", strconv.Itoa(servicePort))) } func (c *defaultAuthenticationInfoResolver) clientConfig(target string) (*rest.Config, error) { @@ -136,8 +138,25 @@ func (c *defaultAuthenticationInfoResolver) clientConfig(target string) (*rest.C } } + // If target included the default https port (443), search again without the port + if target, port, err := net.SplitHostPort(target); err == nil && port == "443" { + // exact match without port + if authConfig, ok := c.kubeconfig.AuthInfos[target]; ok { + return restConfigFromKubeconfig(authConfig) + } + + // star prefixed match without port + serverSteps := strings.Split(target, ".") + for i := 1; i < len(serverSteps); i++ { + nickName := "*." + strings.Join(serverSteps[i:], ".") + if authConfig, ok := c.kubeconfig.AuthInfos[nickName]; ok { + return restConfigFromKubeconfig(authConfig) + } + } + } + // if we're trying to hit the kube-apiserver and there wasn't an explicit config, use the in-cluster config - if target == "kubernetes.default.svc" { + if target == "kubernetes.default.svc:443" { // if we can find an in-cluster-config use that. If we can't, fall through. inClusterConfig, err := rest.InClusterConfig() if err == nil { diff --git a/vendor/k8s.io/apiserver/pkg/util/webhook/client.go b/vendor/k8s.io/apiserver/pkg/util/webhook/client.go index fd6a83c1c0..02bf38ff98 100644 --- a/vendor/k8s.io/apiserver/pkg/util/webhook/client.go +++ b/vendor/k8s.io/apiserver/pkg/util/webhook/client.go @@ -23,6 +23,7 @@ import ( "fmt" "net" "net/url" + "strconv" "github.com/hashicorp/golang-lru" "k8s.io/apimachinery/pkg/runtime" @@ -136,6 +137,11 @@ func (cm *ClientManager) HookClient(cc ClientConfig) (*rest.RESTClient, error) { } cfg.TLSClientConfig.CAData = append(cfg.TLSClientConfig.CAData, cc.CABundle...) + // Use http/1.1 instead of http/2. + // This is a workaround for http/2-enabled clients not load-balancing concurrent requests to multiple backends. + // See http://issue.k8s.io/75791 for details. + cfg.NextProtos = []string{"http/1.1"} + cfg.ContentConfig.NegotiatedSerializer = cm.negotiatedSerializer cfg.ContentConfig.ContentType = runtime.ContentTypeJSON client, err := rest.UnversionedRESTClientFor(cfg) @@ -146,13 +152,20 @@ func (cm *ClientManager) HookClient(cc ClientConfig) (*rest.RESTClient, error) { } if cc.Service != nil { - restConfig, err := cm.authInfoResolver.ClientConfigForService(cc.Service.Name, cc.Service.Namespace) + port := cc.Service.Port + if port == 0 { + // Default to port 443 if no service port is specified + port = 443 + } + + restConfig, err := cm.authInfoResolver.ClientConfigForService(cc.Service.Name, cc.Service.Namespace, int(port)) if err != nil { return nil, err } cfg := rest.CopyConfig(restConfig) serverName := cc.Service.Name + "." + cc.Service.Namespace + ".svc" - host := serverName + ":443" + + host := net.JoinHostPort(serverName, strconv.Itoa(int(port))) cfg.Host = "https://" + host cfg.APIPath = cc.Service.Path // Set the server name if not already set @@ -167,10 +180,6 @@ func (cm *ClientManager) HookClient(cc ClientConfig) (*rest.RESTClient, error) { } cfg.Dial = func(ctx context.Context, network, addr string) (net.Conn, error) { if addr == host { - port := cc.Service.Port - if port == 0 { - port = 443 - } u, err := cm.serviceResolver.ResolveEndpoint(cc.Service.Namespace, cc.Service.Name, port) if err != nil { return nil, err @@ -192,7 +201,13 @@ func (cm *ClientManager) HookClient(cc ClientConfig) (*rest.RESTClient, error) { return nil, &ErrCallingWebhook{WebhookName: cc.Name, Reason: fmt.Errorf("Unparsable URL: %v", err)} } - restConfig, err := cm.authInfoResolver.ClientConfigFor(u.Host) + hostPort := u.Host + if len(u.Port()) == 0 { + // Default to port 443 if no port is specified + hostPort = net.JoinHostPort(hostPort, "443") + } + + restConfig, err := cm.authInfoResolver.ClientConfigFor(hostPort) if err != nil { return nil, err } diff --git a/vendor/k8s.io/apiserver/pkg/util/webhook/error.go b/vendor/k8s.io/apiserver/pkg/util/webhook/error.go index 4701530205..9c6f780e2f 100644 --- a/vendor/k8s.io/apiserver/pkg/util/webhook/error.go +++ b/vendor/k8s.io/apiserver/pkg/util/webhook/error.go @@ -16,7 +16,11 @@ limitations under the License. package webhook -import "fmt" +import ( + "fmt" + + apierrors "k8s.io/apimachinery/pkg/api/errors" +) // ErrCallingWebhook is returned for transport-layer errors calling webhooks. It // represents a failure to talk to the webhook, not the webhook rejecting a @@ -32,3 +36,12 @@ func (e *ErrCallingWebhook) Error() string { } return fmt.Sprintf("failed calling webhook %q; no further details available", e.WebhookName) } + +// ErrWebhookRejection represents a webhook properly rejecting a request. +type ErrWebhookRejection struct { + Status *apierrors.StatusError +} + +func (e *ErrWebhookRejection) Error() string { + return e.Status.Error() +} diff --git a/vendor/k8s.io/client-go/informers/BUILD.bazel b/vendor/k8s.io/client-go/informers/BUILD.bazel index 68fb202c38..2514270ee6 100644 --- a/vendor/k8s.io/client-go/informers/BUILD.bazel +++ b/vendor/k8s.io/client-go/informers/BUILD.bazel @@ -26,6 +26,7 @@ go_library( "//vendor/k8s.io/api/coordination/v1:go_default_library", "//vendor/k8s.io/api/coordination/v1beta1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/discovery/v1alpha1:go_default_library", "//vendor/k8s.io/api/events/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/networking/v1:go_default_library", @@ -54,6 +55,7 @@ go_library( "//vendor/k8s.io/client-go/informers/certificates:go_default_library", "//vendor/k8s.io/client-go/informers/coordination:go_default_library", "//vendor/k8s.io/client-go/informers/core:go_default_library", + "//vendor/k8s.io/client-go/informers/discovery:go_default_library", "//vendor/k8s.io/client-go/informers/events:go_default_library", "//vendor/k8s.io/client-go/informers/extensions:go_default_library", "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", diff --git a/vendor/k8s.io/client-go/informers/discovery/BUILD.bazel b/vendor/k8s.io/client-go/informers/discovery/BUILD.bazel new file mode 100644 index 0000000000..a5716290ca --- /dev/null +++ b/vendor/k8s.io/client-go/informers/discovery/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["interface.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/client-go/informers/discovery", + importpath = "k8s.io/client-go/informers/discovery", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/client-go/informers/discovery/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/informers/discovery/interface.go b/vendor/k8s.io/client-go/informers/discovery/interface.go new file mode 100644 index 0000000000..eb8062feec --- /dev/null +++ b/vendor/k8s.io/client-go/informers/discovery/interface.go @@ -0,0 +1,46 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package discovery + +import ( + v1alpha1 "k8s.io/client-go/informers/discovery/v1alpha1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/vendor/k8s.io/client-go/informers/discovery/v1alpha1/BUILD.bazel b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..4b3d125aa2 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "endpointslice.go", + "interface.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/client-go/informers/discovery/v1alpha1", + importpath = "k8s.io/client-go/informers/discovery/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/discovery/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", + "//vendor/k8s.io/client-go/kubernetes:go_default_library", + "//vendor/k8s.io/client-go/listers/discovery/v1alpha1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go new file mode 100644 index 0000000000..a545ce1551 --- /dev/null +++ b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/endpointslice.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + time "time" + + discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1alpha1 "k8s.io/client-go/listers/discovery/v1alpha1" + cache "k8s.io/client-go/tools/cache" +) + +// EndpointSliceInformer provides access to a shared informer and lister for +// EndpointSlices. +type EndpointSliceInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.EndpointSliceLister +} + +type endpointSliceInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewEndpointSliceInformer constructs a new informer for EndpointSlice type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewEndpointSliceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredEndpointSliceInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredEndpointSliceInformer constructs a new informer for EndpointSlice type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredEndpointSliceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.DiscoveryV1alpha1().EndpointSlices(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.DiscoveryV1alpha1().EndpointSlices(namespace).Watch(options) + }, + }, + &discoveryv1alpha1.EndpointSlice{}, + resyncPeriod, + indexers, + ) +} + +func (f *endpointSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredEndpointSliceInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *endpointSliceInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&discoveryv1alpha1.EndpointSlice{}, f.defaultInformer) +} + +func (f *endpointSliceInformer) Lister() v1alpha1.EndpointSliceLister { + return v1alpha1.NewEndpointSliceLister(f.Informer().GetIndexer()) +} diff --git a/vendor/k8s.io/client-go/informers/discovery/v1alpha1/interface.go b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/interface.go new file mode 100644 index 0000000000..711dcae52c --- /dev/null +++ b/vendor/k8s.io/client-go/informers/discovery/v1alpha1/interface.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // EndpointSlices returns a EndpointSliceInformer. + EndpointSlices() EndpointSliceInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// EndpointSlices returns a EndpointSliceInformer. +func (v *version) EndpointSlices() EndpointSliceInformer { + return &endpointSliceInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/vendor/k8s.io/client-go/informers/factory.go b/vendor/k8s.io/client-go/informers/factory.go index b3a043009a..c5230a491d 100644 --- a/vendor/k8s.io/client-go/informers/factory.go +++ b/vendor/k8s.io/client-go/informers/factory.go @@ -34,6 +34,7 @@ import ( certificates "k8s.io/client-go/informers/certificates" coordination "k8s.io/client-go/informers/coordination" core "k8s.io/client-go/informers/core" + discovery "k8s.io/client-go/informers/discovery" events "k8s.io/client-go/informers/events" extensions "k8s.io/client-go/informers/extensions" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -196,6 +197,7 @@ type SharedInformerFactory interface { Certificates() certificates.Interface Coordination() coordination.Interface Core() core.Interface + Discovery() discovery.Interface Events() events.Interface Extensions() extensions.Interface Networking() networking.Interface @@ -239,6 +241,10 @@ func (f *sharedInformerFactory) Core() core.Interface { return core.New(f, f.namespace, f.tweakListOptions) } +func (f *sharedInformerFactory) Discovery() discovery.Interface { + return discovery.New(f, f.namespace, f.tweakListOptions) +} + func (f *sharedInformerFactory) Events() events.Interface { return events.New(f, f.namespace, f.tweakListOptions) } diff --git a/vendor/k8s.io/client-go/informers/generic.go b/vendor/k8s.io/client-go/informers/generic.go index 3eadad40b5..58f39460c2 100644 --- a/vendor/k8s.io/client-go/informers/generic.go +++ b/vendor/k8s.io/client-go/informers/generic.go @@ -37,6 +37,7 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" + discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" networkingv1 "k8s.io/api/networking/v1" @@ -202,6 +203,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case corev1.SchemeGroupVersion.WithResource("serviceaccounts"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil + // Group=discovery.k8s.io, Version=v1alpha1 + case discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil + // Group=events.k8s.io, Version=v1beta1 case eventsv1beta1.SchemeGroupVersion.WithResource("events"): return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil diff --git a/vendor/k8s.io/client-go/kubernetes/BUILD.bazel b/vendor/k8s.io/client-go/kubernetes/BUILD.bazel index 1bf1754909..2e6e161f20 100644 --- a/vendor/k8s.io/client-go/kubernetes/BUILD.bazel +++ b/vendor/k8s.io/client-go/kubernetes/BUILD.bazel @@ -32,6 +32,7 @@ go_library( "//vendor/k8s.io/client-go/kubernetes/typed/coordination/v1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/coordination/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", diff --git a/vendor/k8s.io/client-go/kubernetes/clientset.go b/vendor/k8s.io/client-go/kubernetes/clientset.go index 39da09d730..f8a237f614 100644 --- a/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -42,6 +42,7 @@ import ( coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1" coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" @@ -85,6 +86,7 @@ type Interface interface { CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface CoordinationV1() coordinationv1.CoordinationV1Interface CoreV1() corev1.CoreV1Interface + DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface EventsV1beta1() eventsv1beta1.EventsV1beta1Interface ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface NetworkingV1() networkingv1.NetworkingV1Interface @@ -128,6 +130,7 @@ type Clientset struct { coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client coordinationV1 *coordinationv1.CoordinationV1Client coreV1 *corev1.CoreV1Client + discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client eventsV1beta1 *eventsv1beta1.EventsV1beta1Client extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client networkingV1 *networkingv1.NetworkingV1Client @@ -247,6 +250,11 @@ func (c *Clientset) CoreV1() corev1.CoreV1Interface { return c.coreV1 } +// DiscoveryV1alpha1 retrieves the DiscoveryV1alpha1Client +func (c *Clientset) DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface { + return c.discoveryV1alpha1 +} + // EventsV1beta1 retrieves the EventsV1beta1Client func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface { return c.eventsV1beta1 @@ -433,6 +441,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.discoveryV1alpha1, err = discoveryv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -533,6 +545,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c) cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c) cs.coreV1 = corev1.NewForConfigOrDie(c) + cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c) cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c) cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c) cs.networkingV1 = networkingv1.NewForConfigOrDie(c) @@ -578,6 +591,7 @@ func New(c rest.Interface) *Clientset { cs.coordinationV1beta1 = coordinationv1beta1.New(c) cs.coordinationV1 = coordinationv1.New(c) cs.coreV1 = corev1.New(c) + cs.discoveryV1alpha1 = discoveryv1alpha1.New(c) cs.eventsV1beta1 = eventsv1beta1.New(c) cs.extensionsV1beta1 = extensionsv1beta1.New(c) cs.networkingV1 = networkingv1.New(c) diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/BUILD.bazel b/vendor/k8s.io/client-go/kubernetes/scheme/BUILD.bazel index 5e546dc2b7..381a9a06e5 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/BUILD.bazel +++ b/vendor/k8s.io/client-go/kubernetes/scheme/BUILD.bazel @@ -30,6 +30,7 @@ go_library( "//vendor/k8s.io/api/coordination/v1:go_default_library", "//vendor/k8s.io/api/coordination/v1beta1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/api/discovery/v1alpha1:go_default_library", "//vendor/k8s.io/api/events/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/networking/v1:go_default_library", diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go index 0440e148d5..c1a2c5198a 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/register.go +++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -39,6 +39,7 @@ import ( coordinationv1 "k8s.io/api/coordination/v1" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" + discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" networkingv1 "k8s.io/api/networking/v1" @@ -87,6 +88,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, + discoveryv1alpha1.AddToScheme, eventsv1beta1.AddToScheme, extensionsv1beta1.AddToScheme, networkingv1.AddToScheme, diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/BUILD.bazel b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..a7d5240543 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "discovery_client.go", + "doc.go", + "endpointslice.go", + "generated_expansion.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1", + importpath = "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/discovery/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/discovery_client.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/discovery_client.go new file mode 100644 index 0000000000..e65a0988d8 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/discovery_client.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/discovery/v1alpha1" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type DiscoveryV1alpha1Interface interface { + RESTClient() rest.Interface + EndpointSlicesGetter +} + +// DiscoveryV1alpha1Client is used to interact with features provided by the discovery.k8s.io group. +type DiscoveryV1alpha1Client struct { + restClient rest.Interface +} + +func (c *DiscoveryV1alpha1Client) EndpointSlices(namespace string) EndpointSliceInterface { + return newEndpointSlices(c, namespace) +} + +// NewForConfig creates a new DiscoveryV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*DiscoveryV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &DiscoveryV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new DiscoveryV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *DiscoveryV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new DiscoveryV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *DiscoveryV1alpha1Client { + return &DiscoveryV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *DiscoveryV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/doc.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/doc.go new file mode 100644 index 0000000000..df51baa4d4 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go new file mode 100644 index 0000000000..417514761f --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/endpointslice.go @@ -0,0 +1,174 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1alpha1 "k8s.io/api/discovery/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// EndpointSlicesGetter has a method to return a EndpointSliceInterface. +// A group's client should implement this interface. +type EndpointSlicesGetter interface { + EndpointSlices(namespace string) EndpointSliceInterface +} + +// EndpointSliceInterface has methods to work with EndpointSlice resources. +type EndpointSliceInterface interface { + Create(*v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) + Update(*v1alpha1.EndpointSlice) (*v1alpha1.EndpointSlice, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.EndpointSlice, error) + List(opts v1.ListOptions) (*v1alpha1.EndpointSliceList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) + EndpointSliceExpansion +} + +// endpointSlices implements EndpointSliceInterface +type endpointSlices struct { + client rest.Interface + ns string +} + +// newEndpointSlices returns a EndpointSlices +func newEndpointSlices(c *DiscoveryV1alpha1Client, namespace string) *endpointSlices { + return &endpointSlices{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the endpointSlice, and returns the corresponding endpointSlice object, and an error if there is any. +func (c *endpointSlices) Get(name string, options v1.GetOptions) (result *v1alpha1.EndpointSlice, err error) { + result = &v1alpha1.EndpointSlice{} + err = c.client.Get(). + Namespace(c.ns). + Resource("endpointslices"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of EndpointSlices that match those selectors. +func (c *endpointSlices) List(opts v1.ListOptions) (result *v1alpha1.EndpointSliceList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.EndpointSliceList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested endpointSlices. +func (c *endpointSlices) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("endpointslices"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a endpointSlice and creates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *endpointSlices) Create(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { + result = &v1alpha1.EndpointSlice{} + err = c.client.Post(). + Namespace(c.ns). + Resource("endpointslices"). + Body(endpointSlice). + Do(). + Into(result) + return +} + +// Update takes the representation of a endpointSlice and updates it. Returns the server's representation of the endpointSlice, and an error, if there is any. +func (c *endpointSlices) Update(endpointSlice *v1alpha1.EndpointSlice) (result *v1alpha1.EndpointSlice, err error) { + result = &v1alpha1.EndpointSlice{} + err = c.client.Put(). + Namespace(c.ns). + Resource("endpointslices"). + Name(endpointSlice.Name). + Body(endpointSlice). + Do(). + Into(result) + return +} + +// Delete takes name of the endpointSlice and deletes it. Returns an error if one occurs. +func (c *endpointSlices) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("endpointslices"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *endpointSlices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("endpointslices"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched endpointSlice. +func (c *endpointSlices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.EndpointSlice, err error) { + result = &v1alpha1.EndpointSlice{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("endpointslices"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/generated_expansion.go b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/generated_expansion.go new file mode 100644 index 0000000000..e8ceb59a48 --- /dev/null +++ b/vendor/k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type EndpointSliceExpansion interface{} diff --git a/vendor/k8s.io/client-go/listers/discovery/v1alpha1/BUILD.bazel b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..872fb009a1 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/BUILD.bazel @@ -0,0 +1,18 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "endpointslice.go", + "expansion_generated.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/client-go/listers/discovery/v1alpha1", + importpath = "k8s.io/client-go/listers/discovery/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/api/discovery/v1alpha1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go new file mode 100644 index 0000000000..706beecfd1 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/endpointslice.go @@ -0,0 +1,94 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "k8s.io/api/discovery/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// EndpointSliceLister helps list EndpointSlices. +type EndpointSliceLister interface { + // List lists all EndpointSlices in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) + // EndpointSlices returns an object that can list and get EndpointSlices. + EndpointSlices(namespace string) EndpointSliceNamespaceLister + EndpointSliceListerExpansion +} + +// endpointSliceLister implements the EndpointSliceLister interface. +type endpointSliceLister struct { + indexer cache.Indexer +} + +// NewEndpointSliceLister returns a new EndpointSliceLister. +func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { + return &endpointSliceLister{indexer: indexer} +} + +// List lists all EndpointSlices in the indexer. +func (s *endpointSliceLister) List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.EndpointSlice)) + }) + return ret, err +} + +// EndpointSlices returns an object that can list and get EndpointSlices. +func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceNamespaceLister { + return endpointSliceNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// EndpointSliceNamespaceLister helps list and get EndpointSlices. +type EndpointSliceNamespaceLister interface { + // List lists all EndpointSlices in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) + // Get retrieves the EndpointSlice from the indexer for a given namespace and name. + Get(name string) (*v1alpha1.EndpointSlice, error) + EndpointSliceNamespaceListerExpansion +} + +// endpointSliceNamespaceLister implements the EndpointSliceNamespaceLister +// interface. +type endpointSliceNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all EndpointSlices in the indexer for a given namespace. +func (s endpointSliceNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.EndpointSlice)) + }) + return ret, err +} + +// Get retrieves the EndpointSlice from the indexer for a given namespace and name. +func (s endpointSliceNamespaceLister) Get(name string) (*v1alpha1.EndpointSlice, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("endpointslice"), name) + } + return obj.(*v1alpha1.EndpointSlice), nil +} diff --git a/vendor/k8s.io/client-go/listers/discovery/v1alpha1/expansion_generated.go b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/expansion_generated.go new file mode 100644 index 0000000000..d47af59aa8 --- /dev/null +++ b/vendor/k8s.io/client-go/listers/discovery/v1alpha1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// EndpointSliceListerExpansion allows custom methods to be added to +// EndpointSliceLister. +type EndpointSliceListerExpansion interface{} + +// EndpointSliceNamespaceListerExpansion allows custom methods to be added to +// EndpointSliceNamespaceLister. +type EndpointSliceNamespaceListerExpansion interface{} diff --git a/vendor/k8s.io/client-go/rest/config.go b/vendor/k8s.io/client-go/rest/config.go index e25994721d..fb81fb7b1c 100644 --- a/vendor/k8s.io/client-go/rest/config.go +++ b/vendor/k8s.io/client-go/rest/config.go @@ -211,6 +211,12 @@ type TLSClientConfig struct { // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). // CAData takes precedence over CAFile CAData []byte + + // NextProtos is a list of supported application level protocols, in order of preference. + // Used to populate tls.Config.NextProtos. + // To indicate to the server http/1.1 is preferred over http/2, set to ["http/1.1", "h2"] (though the server is free to ignore that preference). + // To use only http/1.1, set to ["http/1.1"]. + NextProtos []string } var _ fmt.Stringer = TLSClientConfig{} @@ -236,6 +242,7 @@ func (c TLSClientConfig) String() string { CertData: c.CertData, KeyData: c.KeyData, CAData: c.CAData, + NextProtos: c.NextProtos, } // Explicitly mark non-empty credential fields as redacted. if len(cc.CertData) != 0 { @@ -503,6 +510,7 @@ func AnonymousClientConfig(config *Config) *Config { ServerName: config.ServerName, CAFile: config.TLSClientConfig.CAFile, CAData: config.TLSClientConfig.CAData, + NextProtos: config.TLSClientConfig.NextProtos, }, RateLimiter: config.RateLimiter, UserAgent: config.UserAgent, @@ -541,6 +549,7 @@ func CopyConfig(config *Config) *Config { CertData: config.TLSClientConfig.CertData, KeyData: config.TLSClientConfig.KeyData, CAData: config.TLSClientConfig.CAData, + NextProtos: config.TLSClientConfig.NextProtos, }, UserAgent: config.UserAgent, DisableCompression: config.DisableCompression, diff --git a/vendor/k8s.io/client-go/rest/transport.go b/vendor/k8s.io/client-go/rest/transport.go index 81b9dfde33..0800e4ec74 100644 --- a/vendor/k8s.io/client-go/rest/transport.go +++ b/vendor/k8s.io/client-go/rest/transport.go @@ -74,6 +74,7 @@ func (c *Config) TransportConfig() (*transport.Config, error) { CertData: c.CertData, KeyFile: c.KeyFile, KeyData: c.KeyData, + NextProtos: c.NextProtos, }, Username: c.Username, Password: c.Password, diff --git a/vendor/k8s.io/client-go/rest/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/rest/zz_generated.deepcopy.go index c1ab45f337..da4a1624e8 100644 --- a/vendor/k8s.io/client-go/rest/zz_generated.deepcopy.go +++ b/vendor/k8s.io/client-go/rest/zz_generated.deepcopy.go @@ -38,6 +38,11 @@ func (in *TLSClientConfig) DeepCopyInto(out *TLSClientConfig) { *out = make([]byte, len(*in)) copy(*out, *in) } + if in.NextProtos != nil { + in, out := &in.NextProtos, &out.NextProtos + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/vendor/k8s.io/client-go/tools/cache/BUILD.bazel b/vendor/k8s.io/client-go/tools/cache/BUILD.bazel index 381b114481..8748031edd 100644 --- a/vendor/k8s.io/client-go/tools/cache/BUILD.bazel +++ b/vendor/k8s.io/client-go/tools/cache/BUILD.bazel @@ -38,6 +38,7 @@ go_library( "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/naming:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go index 73e7f8d7ae..27a1c52cdf 100644 --- a/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -131,6 +131,8 @@ func (c *controller) HasSynced() bool { } func (c *controller) LastSyncResourceVersion() string { + c.reflectorMutex.RLock() + defer c.reflectorMutex.RUnlock() if c.reflector == nil { return "" } diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index 4c14aaf787..8abde7131a 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -22,11 +22,8 @@ import ( "fmt" "io" "math/rand" - "net" - "net/url" "reflect" "sync" - "syscall" "time" apierrs "k8s.io/apimachinery/pkg/api/errors" @@ -35,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/naming" + utilnet "k8s.io/apimachinery/pkg/util/net" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -285,13 +283,9 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { // It doesn't make sense to re-list all objects because most likely we will be able to restart // watch where we ended. // If that's the case wait and resend watch request. - if urlError, ok := err.(*url.Error); ok { - if opError, ok := urlError.Err.(*net.OpError); ok { - if errno, ok := opError.Err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED { - time.Sleep(time.Second) - continue - } - } + if utilnet.IsConnectionRefused(err) { + time.Sleep(time.Second) + continue } return nil } diff --git a/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go index 351c85b903..c37423b665 100644 --- a/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -190,8 +190,24 @@ const ( initialBufferSize = 1024 ) +// WaitForNamedCacheSync is a wrapper around WaitForCacheSync that generates log messages +// indicating that the caller identified by name is waiting for syncs, followed by +// either a successful or failed sync. +func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { + klog.Infof("Waiting for caches to sync for %s", controllerName) + + if !WaitForCacheSync(stopCh, cacheSyncs...) { + utilruntime.HandleError(fmt.Errorf("unable to sync caches for %s", controllerName)) + return false + } + + klog.Infof("Caches are synced for %s ", controllerName) + return true +} + // WaitForCacheSync waits for caches to populate. It returns true if it was successful, false // if the controller should shutdown +// callers should prefer WaitForNamedCacheSync() func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { err := wait.PollUntil(syncedPollPeriod, func() (bool, error) { diff --git a/vendor/k8s.io/client-go/tools/clientcmd/validation.go b/vendor/k8s.io/client-go/tools/clientcmd/validation.go index 720d0b8866..2f927072bd 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/validation.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation.go @@ -185,9 +185,10 @@ func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) [ } if len(clusterInfo.CertificateAuthority) != 0 { clientCertCA, err := os.Open(clusterInfo.CertificateAuthority) - defer clientCertCA.Close() if err != nil { validationErrors = append(validationErrors, fmt.Errorf("unable to read certificate-authority %v for %v due to %v", clusterInfo.CertificateAuthority, clusterName, err)) + } else { + defer clientCertCA.Close() } } @@ -223,16 +224,18 @@ func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []err if len(authInfo.ClientCertificate) != 0 { clientCertFile, err := os.Open(authInfo.ClientCertificate) - defer clientCertFile.Close() if err != nil { validationErrors = append(validationErrors, fmt.Errorf("unable to read client-cert %v for %v due to %v", authInfo.ClientCertificate, authInfoName, err)) + } else { + defer clientCertFile.Close() } } if len(authInfo.ClientKey) != 0 { clientKeyFile, err := os.Open(authInfo.ClientKey) - defer clientKeyFile.Close() if err != nil { validationErrors = append(validationErrors, fmt.Errorf("unable to read client-key %v for %v due to %v", authInfo.ClientKey, authInfoName, err)) + } else { + defer clientKeyFile.Close() } } } diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go index 12c669037c..980d36ae12 100644 --- a/vendor/k8s.io/client-go/transport/cache.go +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -20,6 +20,7 @@ import ( "fmt" "net" "net/http" + "strings" "sync" "time" @@ -45,6 +46,7 @@ type tlsCacheKey struct { keyData string getCert string serverName string + nextProtos string dial string disableCompression bool } @@ -114,6 +116,7 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) { keyData: string(c.TLS.KeyData), getCert: fmt.Sprintf("%p", c.TLS.GetCert), serverName: c.TLS.ServerName, + nextProtos: strings.Join(c.TLS.NextProtos, ","), dial: fmt.Sprintf("%p", c.Dial), disableCompression: c.DisableCompression, }, nil diff --git a/vendor/k8s.io/client-go/transport/config.go b/vendor/k8s.io/client-go/transport/config.go index 8a73589e17..9e18d11d38 100644 --- a/vendor/k8s.io/client-go/transport/config.go +++ b/vendor/k8s.io/client-go/transport/config.go @@ -126,5 +126,11 @@ type TLSConfig struct { CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile. KeyData []byte // Bytes of the PEM-encoded client key. Supercedes KeyFile. + // NextProtos is a list of supported application level protocols, in order of preference. + // Used to populate tls.Config.NextProtos. + // To indicate to the server http/1.1 is preferred over http/2, set to ["http/1.1", "h2"] (though the server is free to ignore that preference). + // To use only http/1.1, set to ["http/1.1"]. + NextProtos []string + GetCert func() (*tls.Certificate, error) // Callback that returns a TLS client certificate. CertData, CertFile, KeyData and KeyFile supercede this field. } diff --git a/vendor/k8s.io/client-go/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go index 844ee9a21b..a272753ae2 100644 --- a/vendor/k8s.io/client-go/transport/round_trippers.go +++ b/vendor/k8s.io/client-go/transport/round_trippers.go @@ -80,10 +80,6 @@ func DebugWrappers(rt http.RoundTripper) http.RoundTripper { return rt } -type requestCanceler interface { - CancelRequest(*http.Request) -} - type authProxyRoundTripper struct { username string groups []string @@ -140,11 +136,7 @@ func SetAuthProxyHeaders(req *http.Request, username string, groups []string, ex } func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.rt) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } func (rt *authProxyRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } @@ -168,11 +160,7 @@ func (rt *userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, e } func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.rt) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } func (rt *userAgentRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } @@ -199,11 +187,7 @@ func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, e } func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.rt) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } func (rt *basicAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } @@ -259,11 +243,7 @@ func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Respons } func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.delegate.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.delegate) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } func (rt *impersonatingRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.delegate } @@ -318,11 +298,7 @@ func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, } func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.rt.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.rt) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } func (rt *bearerAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } @@ -402,11 +378,7 @@ func newDebuggingRoundTripper(rt http.RoundTripper, levels ...debugLevel) *debug } func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) { - if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok { - canceler.CancelRequest(req) - } else { - klog.Errorf("CancelRequest not implemented by %T", rt.delegatedRoundTripper) - } + tryCancelRequest(rt.WrappedRoundTripper(), req) } var knownAuthTypes = map[string]bool{ diff --git a/vendor/k8s.io/client-go/transport/token_source.go b/vendor/k8s.io/client-go/transport/token_source.go index b8cadd382a..bb32c3b4df 100644 --- a/vendor/k8s.io/client-go/transport/token_source.go +++ b/vendor/k8s.io/client-go/transport/token_source.go @@ -25,6 +25,7 @@ import ( "time" "golang.org/x/oauth2" + "k8s.io/klog" ) @@ -81,6 +82,14 @@ func (tst *tokenSourceTransport) RoundTrip(req *http.Request) (*http.Response, e return tst.ort.RoundTrip(req) } +func (tst *tokenSourceTransport) CancelRequest(req *http.Request) { + if req.Header.Get("Authorization") != "" { + tryCancelRequest(tst.base, req) + return + } + tryCancelRequest(tst.ort, req) +} + type fileTokenSource struct { path string period time.Duration diff --git a/vendor/k8s.io/client-go/transport/transport.go b/vendor/k8s.io/client-go/transport/transport.go index 2a145c971a..cd8de98285 100644 --- a/vendor/k8s.io/client-go/transport/transport.go +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -23,6 +23,9 @@ import ( "fmt" "io/ioutil" "net/http" + + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/klog" ) // New returns an http.RoundTripper that will provide the authentication @@ -53,7 +56,7 @@ func New(config *Config) (http.RoundTripper, error) { // TLSConfigFor returns a tls.Config that will provide the transport level security defined // by the provided Config. Will return nil if no transport level security is requested. func TLSConfigFor(c *Config) (*tls.Config, error) { - if !(c.HasCA() || c.HasCertAuth() || c.HasCertCallback() || c.TLS.Insecure || len(c.TLS.ServerName) > 0) { + if !(c.HasCA() || c.HasCertAuth() || c.HasCertCallback() || c.TLS.Insecure || len(c.TLS.ServerName) > 0 || len(c.TLS.NextProtos) > 0) { return nil, nil } if c.HasCA() && c.TLS.Insecure { @@ -70,6 +73,7 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { MinVersion: tls.VersionTLS12, InsecureSkipVerify: c.TLS.Insecure, ServerName: c.TLS.ServerName, + NextProtos: c.TLS.NextProtos, } if c.HasCA() { @@ -225,3 +229,17 @@ func (b *contextCanceller) RoundTrip(req *http.Request) (*http.Response, error) return b.rt.RoundTrip(req) } } + +func tryCancelRequest(rt http.RoundTripper, req *http.Request) { + type canceler interface { + CancelRequest(*http.Request) + } + switch rt := rt.(type) { + case canceler: + rt.CancelRequest(req) + case utilnet.RoundTripperWrapper: + tryCancelRequest(rt.WrappedRoundTripper(), req) + default: + klog.Warningf("Unable to cancel request for %T", rt) + } +} diff --git a/vendor/k8s.io/component-base/metrics/BUILD.bazel b/vendor/k8s.io/component-base/metrics/BUILD.bazel new file mode 100644 index 0000000000..4f24686a44 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/BUILD.bazel @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "counter.go", + "gauge.go", + "histogram.go", + "metric.go", + "opts.go", + "processstarttime.go", + "registry.go", + "summary.go", + "version.go", + "version_parser.go", + "wrappers.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics", + importpath = "k8s.io/component-base/metrics", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/blang/semver:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/github.com/prometheus/client_model/go:go_default_library", + "//vendor/github.com/prometheus/procfs:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", + "//vendor/k8s.io/component-base/version:go_default_library", + "//vendor/k8s.io/klog:go_default_library", + ], +) diff --git a/vendor/k8s.io/component-base/metrics/counter.go b/vendor/k8s.io/component-base/metrics/counter.go new file mode 100644 index 0000000000..17386ed5a8 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/counter.go @@ -0,0 +1,165 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" +) + +// Counter is our internal representation for our wrapping struct around prometheus +// counters. Counter implements both kubeCollector and CounterMetric. +type Counter struct { + CounterMetric + *CounterOpts + lazyMetric + selfCollector +} + +// NewCounter returns an object which satisfies the kubeCollector and CounterMetric interfaces. +// However, the object returned will not measure anything unless the collector is first +// registered, since the metric is lazily instantiated. +func NewCounter(opts *CounterOpts) *Counter { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + kc := &Counter{ + CounterOpts: opts, + lazyMetric: lazyMetric{}, + } + kc.setPrometheusCounter(noop) + kc.lazyInit(kc) + return kc +} + +// setPrometheusCounter sets the underlying CounterMetric object, i.e. the thing that does the measurement. +func (c *Counter) setPrometheusCounter(counter prometheus.Counter) { + c.CounterMetric = counter + c.initSelfCollection(counter) +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (c *Counter) DeprecatedVersion() *semver.Version { + return parseSemver(c.CounterOpts.DeprecatedVersion) +} + +// initializeMetric invocation creates the actual underlying Counter. Until this method is called +// the underlying counter is a no-op. +func (c *Counter) initializeMetric() { + c.CounterOpts.annotateStabilityLevel() + // this actually creates the underlying prometheus counter. + c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) +} + +// initializeDeprecatedMetric invocation creates the actual (but deprecated) Counter. Until this method +// is called the underlying counter is a no-op. +func (c *Counter) initializeDeprecatedMetric() { + c.CounterOpts.markDeprecated() + c.initializeMetric() +} + +// CounterVec is the internal representation of our wrapping struct around prometheus +// counterVecs. CounterVec implements both kubeCollector and CounterVecMetric. +type CounterVec struct { + *prometheus.CounterVec + *CounterOpts + lazyMetric + originalLabels []string +} + +// NewCounterVec returns an object which satisfies the kubeCollector and CounterVecMetric interfaces. +// However, the object returned will not measure anything unless the collector is first +// registered, since the metric is lazily instantiated. +func NewCounterVec(opts *CounterOpts, labels []string) *CounterVec { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + cv := &CounterVec{ + CounterVec: noopCounterVec, + CounterOpts: opts, + originalLabels: labels, + lazyMetric: lazyMetric{}, + } + cv.lazyInit(cv) + return cv +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (v *CounterVec) DeprecatedVersion() *semver.Version { + return parseSemver(v.CounterOpts.DeprecatedVersion) + +} + +// initializeMetric invocation creates the actual underlying CounterVec. Until this method is called +// the underlying counterVec is a no-op. +func (v *CounterVec) initializeMetric() { + v.CounterOpts.annotateStabilityLevel() + v.CounterVec = prometheus.NewCounterVec(v.CounterOpts.toPromCounterOpts(), v.originalLabels) +} + +// initializeDeprecatedMetric invocation creates the actual (but deprecated) CounterVec. Until this method is called +// the underlying counterVec is a no-op. +func (v *CounterVec) initializeDeprecatedMetric() { + v.CounterOpts.markDeprecated() + v.initializeMetric() +} + +// Default Prometheus behavior actually results in the creation of a new metric +// if a metric with the unique label values is not found in the underlying stored metricMap. +// This means that if this function is called but the underlying metric is not registered +// (which means it will never be exposed externally nor consumed), the metric will exist in memory +// for perpetuity (i.e. throughout application lifecycle). +// +// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/counter.go#L179-L197 + +// WithLabelValues returns the Counter for the given slice of label +// values (same order as the VariableLabels in Desc). If that combination of +// label values is accessed for the first time, a new Counter is created IFF the counterVec +// has been registered to a metrics registry. +func (v *CounterVec) WithLabelValues(lvs ...string) CounterMetric { + if !v.IsCreated() { + return noop // return no-op counter + } + return v.CounterVec.WithLabelValues(lvs...) +} + +// With returns the Counter for the given Labels map (the label names +// must match those of the VariableLabels in Desc). If that label map is +// accessed for the first time, a new Counter is created IFF the counterVec has +// been registered to a metrics registry. +func (v *CounterVec) With(labels prometheus.Labels) CounterMetric { + if !v.IsCreated() { + return noop // return no-op counter + } + return v.CounterVec.With(labels) +} + +// Delete deletes the metric where the variable labels are the same as those +// passed in as labels. It returns true if a metric was deleted. +// +// It is not an error if the number and names of the Labels are inconsistent +// with those of the VariableLabels in Desc. However, such inconsistent Labels +// can never match an actual metric, so the method will always return false in +// that case. +func (v *CounterVec) Delete(labels prometheus.Labels) bool { + if !v.IsCreated() { + return false // since we haven't created the metric, we haven't deleted a metric with the passed in values + } + return v.CounterVec.Delete(labels) +} diff --git a/vendor/k8s.io/component-base/metrics/gauge.go b/vendor/k8s.io/component-base/metrics/gauge.go new file mode 100644 index 0000000000..82b982d9d6 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/gauge.go @@ -0,0 +1,164 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" +) + +// Gauge is our internal representation for our wrapping struct around prometheus +// gauges. kubeGauge implements both kubeCollector and KubeGauge. +type Gauge struct { + GaugeMetric + *GaugeOpts + lazyMetric + selfCollector +} + +// NewGauge returns an object which satisfies the kubeCollector and KubeGauge interfaces. +// However, the object returned will not measure anything unless the collector is first +// registered, since the metric is lazily instantiated. +func NewGauge(opts *GaugeOpts) *Gauge { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + kc := &Gauge{ + GaugeOpts: opts, + lazyMetric: lazyMetric{}, + } + kc.setPrometheusGauge(noop) + kc.lazyInit(kc) + return kc +} + +// setPrometheusGauge sets the underlying KubeGauge object, i.e. the thing that does the measurement. +func (g *Gauge) setPrometheusGauge(gauge prometheus.Gauge) { + g.GaugeMetric = gauge + g.initSelfCollection(gauge) +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (g *Gauge) DeprecatedVersion() *semver.Version { + return parseSemver(g.GaugeOpts.DeprecatedVersion) +} + +// initializeMetric invocation creates the actual underlying Gauge. Until this method is called +// the underlying gauge is a no-op. +func (g *Gauge) initializeMetric() { + g.GaugeOpts.annotateStabilityLevel() + // this actually creates the underlying prometheus gauge. + g.setPrometheusGauge(prometheus.NewGauge(g.GaugeOpts.toPromGaugeOpts())) +} + +// initializeDeprecatedMetric invocation creates the actual (but deprecated) Gauge. Until this method +// is called the underlying gauge is a no-op. +func (g *Gauge) initializeDeprecatedMetric() { + g.GaugeOpts.markDeprecated() + g.initializeMetric() +} + +// GaugeVec is the internal representation of our wrapping struct around prometheus +// gaugeVecs. kubeGaugeVec implements both kubeCollector and KubeGaugeVec. +type GaugeVec struct { + *prometheus.GaugeVec + *GaugeOpts + lazyMetric + originalLabels []string +} + +// NewGaugeVec returns an object which satisfies the kubeCollector and KubeGaugeVec interfaces. +// However, the object returned will not measure anything unless the collector is first +// registered, since the metric is lazily instantiated. +func NewGaugeVec(opts *GaugeOpts, labels []string) *GaugeVec { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + cv := &GaugeVec{ + GaugeVec: noopGaugeVec, + GaugeOpts: opts, + originalLabels: labels, + lazyMetric: lazyMetric{}, + } + cv.lazyInit(cv) + return cv +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (v *GaugeVec) DeprecatedVersion() *semver.Version { + return parseSemver(v.GaugeOpts.DeprecatedVersion) +} + +// initializeMetric invocation creates the actual underlying GaugeVec. Until this method is called +// the underlying gaugeVec is a no-op. +func (v *GaugeVec) initializeMetric() { + v.GaugeOpts.annotateStabilityLevel() + v.GaugeVec = prometheus.NewGaugeVec(v.GaugeOpts.toPromGaugeOpts(), v.originalLabels) +} + +// initializeDeprecatedMetric invocation creates the actual (but deprecated) GaugeVec. Until this method is called +// the underlying gaugeVec is a no-op. +func (v *GaugeVec) initializeDeprecatedMetric() { + v.GaugeOpts.markDeprecated() + v.initializeMetric() +} + +// Default Prometheus behavior actually results in the creation of a new metric +// if a metric with the unique label values is not found in the underlying stored metricMap. +// This means that if this function is called but the underlying metric is not registered +// (which means it will never be exposed externally nor consumed), the metric will exist in memory +// for perpetuity (i.e. throughout application lifecycle). +// +// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/gauge.go#L190-L208 + +// WithLabelValues returns the GaugeMetric for the given slice of label +// values (same order as the VariableLabels in Desc). If that combination of +// label values is accessed for the first time, a new GaugeMetric is created IFF the gaugeVec +// has been registered to a metrics registry. +func (v *GaugeVec) WithLabelValues(lvs ...string) GaugeMetric { + if !v.IsCreated() { + return noop // return no-op gauge + } + return v.GaugeVec.WithLabelValues(lvs...) +} + +// With returns the GaugeMetric for the given Labels map (the label names +// must match those of the VariableLabels in Desc). If that label map is +// accessed for the first time, a new GaugeMetric is created IFF the gaugeVec has +// been registered to a metrics registry. +func (v *GaugeVec) With(labels prometheus.Labels) GaugeMetric { + if !v.IsCreated() { + return noop // return no-op gauge + } + return v.GaugeVec.With(labels) +} + +// Delete deletes the metric where the variable labels are the same as those +// passed in as labels. It returns true if a metric was deleted. +// +// It is not an error if the number and names of the Labels are inconsistent +// with those of the VariableLabels in Desc. However, such inconsistent Labels +// can never match an actual metric, so the method will always return false in +// that case. +func (v *GaugeVec) Delete(labels prometheus.Labels) bool { + if !v.IsCreated() { + return false // since we haven't created the metric, we haven't deleted a metric with the passed in values + } + return v.GaugeVec.Delete(labels) +} diff --git a/vendor/k8s.io/component-base/metrics/histogram.go b/vendor/k8s.io/component-base/metrics/histogram.go new file mode 100644 index 0000000000..38d2d41647 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/histogram.go @@ -0,0 +1,159 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" +) + +// Histogram is our internal representation for our wrapping struct around prometheus +// histograms. Summary implements both kubeCollector and ObserverMetric +type Histogram struct { + ObserverMetric + *HistogramOpts + lazyMetric + selfCollector +} + +// NewHistogram returns an object which is Histogram-like. However, nothing +// will be measured until the histogram is registered somewhere. +func NewHistogram(opts *HistogramOpts) *Histogram { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + h := &Histogram{ + HistogramOpts: opts, + lazyMetric: lazyMetric{}, + } + h.setPrometheusHistogram(noopMetric{}) + h.lazyInit(h) + return h +} + +// setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. +func (h *Histogram) setPrometheusHistogram(histogram prometheus.Histogram) { + h.ObserverMetric = histogram + h.initSelfCollection(histogram) +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (h *Histogram) DeprecatedVersion() *semver.Version { + return parseSemver(h.HistogramOpts.DeprecatedVersion) +} + +// initializeMetric invokes the actual prometheus.Histogram object instantiation +// and stores a reference to it +func (h *Histogram) initializeMetric() { + h.HistogramOpts.annotateStabilityLevel() + // this actually creates the underlying prometheus gauge. + h.setPrometheusHistogram(prometheus.NewHistogram(h.HistogramOpts.toPromHistogramOpts())) +} + +// initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation +// but modifies the Help description prior to object instantiation. +func (h *Histogram) initializeDeprecatedMetric() { + h.HistogramOpts.markDeprecated() + h.initializeMetric() +} + +// HistogramVec is the internal representation of our wrapping struct around prometheus +// histogramVecs. +type HistogramVec struct { + *prometheus.HistogramVec + *HistogramOpts + lazyMetric + originalLabels []string +} + +// NewHistogramVec returns an object which satisfies kubeCollector and wraps the +// prometheus.HistogramVec object. However, the object returned will not measure +// anything unless the collector is first registered, since the metric is lazily instantiated. +func NewHistogramVec(opts *HistogramOpts, labels []string) *HistogramVec { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + v := &HistogramVec{ + HistogramVec: noopHistogramVec, + HistogramOpts: opts, + originalLabels: labels, + lazyMetric: lazyMetric{}, + } + v.lazyInit(v) + return v +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (v *HistogramVec) DeprecatedVersion() *semver.Version { + return parseSemver(v.HistogramOpts.DeprecatedVersion) +} + +func (v *HistogramVec) initializeMetric() { + v.HistogramOpts.annotateStabilityLevel() + v.HistogramVec = prometheus.NewHistogramVec(v.HistogramOpts.toPromHistogramOpts(), v.originalLabels) +} + +func (v *HistogramVec) initializeDeprecatedMetric() { + v.HistogramOpts.markDeprecated() + v.initializeMetric() +} + +// Default Prometheus behavior actually results in the creation of a new metric +// if a metric with the unique label values is not found in the underlying stored metricMap. +// This means that if this function is called but the underlying metric is not registered +// (which means it will never be exposed externally nor consumed), the metric will exist in memory +// for perpetuity (i.e. throughout application lifecycle). +// +// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/histogram.go#L460-L470 + +// WithLabelValues returns the ObserverMetric for the given slice of label +// values (same order as the VariableLabels in Desc). If that combination of +// label values is accessed for the first time, a new ObserverMetric is created IFF the HistogramVec +// has been registered to a metrics registry. +func (v *HistogramVec) WithLabelValues(lvs ...string) ObserverMetric { + if !v.IsCreated() { + return noop + } + return v.HistogramVec.WithLabelValues(lvs...) +} + +// With returns the ObserverMetric for the given Labels map (the label names +// must match those of the VariableLabels in Desc). If that label map is +// accessed for the first time, a new ObserverMetric is created IFF the HistogramVec has +// been registered to a metrics registry. +func (v *HistogramVec) With(labels prometheus.Labels) ObserverMetric { + if !v.IsCreated() { + return noop + } + return v.HistogramVec.With(labels) +} + +// Delete deletes the metric where the variable labels are the same as those +// passed in as labels. It returns true if a metric was deleted. +// +// It is not an error if the number and names of the Labels are inconsistent +// with those of the VariableLabels in Desc. However, such inconsistent Labels +// can never match an actual metric, so the method will always return false in +// that case. +func (v *HistogramVec) Delete(labels prometheus.Labels) bool { + if !v.IsCreated() { + return false // since we haven't created the metric, we haven't deleted a metric with the passed in values + } + return v.HistogramVec.Delete(labels) +} diff --git a/vendor/k8s.io/component-base/metrics/legacyregistry/BUILD.bazel b/vendor/k8s.io/component-base/metrics/legacyregistry/BUILD.bazel new file mode 100644 index 0000000000..a50dda9607 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/legacyregistry/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["registry.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics/legacyregistry", + importpath = "k8s.io/component-base/metrics/legacyregistry", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/github.com/prometheus/client_golang/prometheus/promhttp:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + ], +) diff --git a/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go b/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go new file mode 100644 index 0000000000..bc08e3c890 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go @@ -0,0 +1,85 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package legacyregistry + +import ( + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" + "k8s.io/component-base/metrics" + "net/http" +) + +var ( + defaultRegistry = metrics.NewKubeRegistry() + // DefaultGatherer exposes the global registry gatherer + DefaultGatherer prometheus.Gatherer = defaultRegistry +) + +func init() { + RawMustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{})) + RawMustRegister(prometheus.NewGoCollector()) +} + +// Handler returns an HTTP handler for the DefaultGatherer. It is +// already instrumented with InstrumentHandler (using "prometheus" as handler +// name). +// +// Deprecated: Please note the issues described in the doc comment of +// InstrumentHandler. You might want to consider using promhttp.Handler instead. +func Handler() http.Handler { + return prometheus.InstrumentHandler("prometheus", promhttp.HandlerFor(defaultRegistry, promhttp.HandlerOpts{})) +} + +// Register registers a collectable metric but uses the global registry +func Register(c metrics.Registerable) error { + err := defaultRegistry.Register(c) + // sideload global prom registry as fallback + prometheus.Register(c) + return err +} + +// MustRegister registers registerable metrics but uses the global registry. +func MustRegister(cs ...metrics.Registerable) { + defaultRegistry.MustRegister(cs...) + // sideload global prom registry as fallback + for _, c := range cs { + prometheus.Register(c) + } +} + +// RawMustRegister registers prometheus collectors but uses the global registry, this +// bypasses the metric stability framework +// +// Deprecated +func RawMustRegister(cs ...prometheus.Collector) { + defaultRegistry.RawMustRegister(cs...) + // sideload global prom registry as fallback + for _, c := range cs { + prometheus.Register(c) + } +} + +// RawRegister registers a prometheus collector but uses the global registry, this +// bypasses the metric stability framework +// +// Deprecated +func RawRegister(c prometheus.Collector) error { + err := defaultRegistry.RawRegister(c) + // sideload global prom registry as fallback + prometheus.Register(c) + return err +} diff --git a/vendor/k8s.io/component-base/metrics/metric.go b/vendor/k8s.io/component-base/metrics/metric.go new file mode 100644 index 0000000000..0337829e91 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/metric.go @@ -0,0 +1,206 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" + dto "github.com/prometheus/client_model/go" + "k8s.io/klog" + "sync" +) + +/* +kubeCollector extends the prometheus.Collector interface to allow customization of the metric +registration process. Defer metric initialization until Create() is called, which then +delegates to the underlying metric's initializeMetric or initializeDeprecatedMetric +method call depending on whether the metric is deprecated or not. +*/ +type kubeCollector interface { + Collector + lazyKubeMetric + DeprecatedVersion() *semver.Version + // Each collector metric should provide an initialization function + // for both deprecated and non-deprecated variants of a metric. This + // is necessary since metric instantiation will be deferred + // until the metric is actually registered somewhere. + initializeMetric() + initializeDeprecatedMetric() +} + +/* +lazyKubeMetric defines our metric registration interface. lazyKubeMetric objects are expected +to lazily instantiate metrics (i.e defer metric instantiation until when +the Create() function is explicitly called). +*/ +type lazyKubeMetric interface { + Create(*semver.Version) bool + IsCreated() bool + IsHidden() bool + IsDeprecated() bool +} + +/* +lazyMetric implements lazyKubeMetric. A lazy metric is lazy because it waits until metric +registration time before instantiation. Add it as an anonymous field to a struct that +implements kubeCollector to get deferred registration behavior. You must call lazyInit +with the kubeCollector itself as an argument. +*/ +type lazyMetric struct { + isDeprecated bool + isHidden bool + isCreated bool + createLock sync.RWMutex + markDeprecationOnce sync.Once + createOnce sync.Once + self kubeCollector +} + +func (r *lazyMetric) IsCreated() bool { + r.createLock.RLock() + defer r.createLock.RUnlock() + return r.isCreated +} + +// lazyInit provides the lazyMetric with a reference to the kubeCollector it is supposed +// to allow lazy initialization for. It should be invoked in the factory function which creates new +// kubeCollector type objects. +func (r *lazyMetric) lazyInit(self kubeCollector) { + r.self = self +} + +// determineDeprecationStatus figures out whether the lazy metric should be deprecated or not. +// This method takes a Version argument which should be the version of the binary in which +// this code is currently being executed. +func (r *lazyMetric) determineDeprecationStatus(version semver.Version) { + selfVersion := r.self.DeprecatedVersion() + if selfVersion == nil { + return + } + r.markDeprecationOnce.Do(func() { + if selfVersion.LTE(version) { + r.isDeprecated = true + } + if ShouldShowHidden() { + klog.Warningf("Hidden metrics have been manually overridden, showing this very deprecated metric.") + return + } + if selfVersion.LT(version) { + klog.Warningf("This metric has been deprecated for more than one release, hiding.") + r.isHidden = true + } + }) +} + +func (r *lazyMetric) IsHidden() bool { + return r.isHidden +} + +func (r *lazyMetric) IsDeprecated() bool { + return r.isDeprecated +} + +// Create forces the initialization of metric which has been deferred until +// the point at which this method is invoked. This method will determine whether +// the metric is deprecated or hidden, no-opting if the metric should be considered +// hidden. Furthermore, this function no-opts and returns true if metric is already +// created. +func (r *lazyMetric) Create(version *semver.Version) bool { + if version != nil { + r.determineDeprecationStatus(*version) + } + // let's not create if this metric is slated to be hidden + if r.IsHidden() { + return false + } + r.createOnce.Do(func() { + r.createLock.Lock() + defer r.createLock.Unlock() + r.isCreated = true + if r.IsDeprecated() { + r.self.initializeDeprecatedMetric() + } else { + r.self.initializeMetric() + } + }) + return r.IsCreated() +} + +/* +This code is directly lifted from the prometheus codebase. It's a convenience struct which +allows you satisfy the Collector interface automatically if you already satisfy the Metric interface. + +For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/collector.go#L98-L120 +*/ +type selfCollector struct { + metric prometheus.Metric +} + +func (c *selfCollector) initSelfCollection(m prometheus.Metric) { + c.metric = m +} + +func (c *selfCollector) Describe(ch chan<- *prometheus.Desc) { + ch <- c.metric.Desc() +} + +func (c *selfCollector) Collect(ch chan<- prometheus.Metric) { + ch <- c.metric +} + +// no-op vecs for convenience +var noopCounterVec = &prometheus.CounterVec{} +var noopHistogramVec = &prometheus.HistogramVec{} +var noopSummaryVec = &prometheus.SummaryVec{} +var noopGaugeVec = &prometheus.GaugeVec{} +var noopObserverVec = &noopObserverVector{} + +// just use a convenience struct for all the no-ops +var noop = &noopMetric{} + +type noopMetric struct{} + +func (noopMetric) Inc() {} +func (noopMetric) Add(float64) {} +func (noopMetric) Dec() {} +func (noopMetric) Set(float64) {} +func (noopMetric) Sub(float64) {} +func (noopMetric) Observe(float64) {} +func (noopMetric) SetToCurrentTime() {} +func (noopMetric) Desc() *prometheus.Desc { return nil } +func (noopMetric) Write(*dto.Metric) error { return nil } +func (noopMetric) Describe(chan<- *prometheus.Desc) {} +func (noopMetric) Collect(chan<- prometheus.Metric) {} + +type noopObserverVector struct{} + +func (noopObserverVector) GetMetricWith(prometheus.Labels) (prometheus.Observer, error) { + return noop, nil +} +func (noopObserverVector) GetMetricWithLabelValues(...string) (prometheus.Observer, error) { + return noop, nil +} +func (noopObserverVector) With(prometheus.Labels) prometheus.Observer { return noop } +func (noopObserverVector) WithLabelValues(...string) prometheus.Observer { return noop } +func (noopObserverVector) CurryWith(prometheus.Labels) (prometheus.ObserverVec, error) { + return noopObserverVec, nil +} +func (noopObserverVector) MustCurryWith(prometheus.Labels) prometheus.ObserverVec { + return noopObserverVec +} +func (noopObserverVector) Describe(chan<- *prometheus.Desc) {} +func (noopObserverVector) Collect(chan<- prometheus.Metric) {} diff --git a/vendor/k8s.io/component-base/metrics/opts.go b/vendor/k8s.io/component-base/metrics/opts.go new file mode 100644 index 0000000000..4fd1048b16 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/opts.go @@ -0,0 +1,211 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "fmt" + "github.com/prometheus/client_golang/prometheus" + "sync" + "time" +) + +// KubeOpts is superset struct for prometheus.Opts. The prometheus Opts structure +// is purposefully not embedded here because that would change struct initialization +// in the manner which people are currently accustomed. +// +// Name must be set to a non-empty string. DeprecatedVersion is defined only +// if the metric for which this options applies is, in fact, deprecated. +type KubeOpts struct { + Namespace string + Subsystem string + Name string + Help string + ConstLabels prometheus.Labels + DeprecatedVersion string + deprecateOnce sync.Once + annotateOnce sync.Once + StabilityLevel StabilityLevel +} + +// StabilityLevel represents the API guarantees for a given defined metric. +type StabilityLevel string + +const ( + // ALPHA metrics have no stability guarantees, as such, labels may + // be arbitrarily added/removed and the metric may be deleted at any time. + ALPHA StabilityLevel = "ALPHA" + // STABLE metrics are guaranteed not be mutated and removal is governed by + // the deprecation policy outlined in by the control plane metrics stability KEP. + STABLE StabilityLevel = "STABLE" +) + +// CounterOpts is an alias for Opts. See there for doc comments. +type CounterOpts KubeOpts + +// Modify help description on the metric description. +func (o *CounterOpts) markDeprecated() { + o.deprecateOnce.Do(func() { + o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) + }) +} + +// annotateStabilityLevel annotates help description on the metric description with the stability level +// of the metric +func (o *CounterOpts) annotateStabilityLevel() { + o.annotateOnce.Do(func() { + o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) + }) +} + +// convenience function to allow easy transformation to the prometheus +// counterpart. This will do more once we have a proper label abstraction +func (o *CounterOpts) toPromCounterOpts() prometheus.CounterOpts { + return prometheus.CounterOpts{ + Namespace: o.Namespace, + Subsystem: o.Subsystem, + Name: o.Name, + Help: o.Help, + ConstLabels: o.ConstLabels, + } +} + +// GaugeOpts is an alias for Opts. See there for doc comments. +type GaugeOpts KubeOpts + +// Modify help description on the metric description. +func (o *GaugeOpts) markDeprecated() { + o.deprecateOnce.Do(func() { + o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) + }) +} + +// annotateStabilityLevel annotates help description on the metric description with the stability level +// of the metric +func (o *GaugeOpts) annotateStabilityLevel() { + o.annotateOnce.Do(func() { + o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) + }) +} + +// convenience function to allow easy transformation to the prometheus +// counterpart. This will do more once we have a proper label abstraction +func (o GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts { + return prometheus.GaugeOpts{ + Namespace: o.Namespace, + Subsystem: o.Subsystem, + Name: o.Name, + Help: o.Help, + ConstLabels: o.ConstLabels, + } +} + +// HistogramOpts bundles the options for creating a Histogram metric. It is +// mandatory to set Name to a non-empty string. All other fields are optional +// and can safely be left at their zero value, although it is strongly +// encouraged to set a Help string. +type HistogramOpts struct { + Namespace string + Subsystem string + Name string + Help string + ConstLabels prometheus.Labels + Buckets []float64 + DeprecatedVersion string + deprecateOnce sync.Once + annotateOnce sync.Once + StabilityLevel StabilityLevel +} + +// Modify help description on the metric description. +func (o *HistogramOpts) markDeprecated() { + o.deprecateOnce.Do(func() { + o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) + }) +} + +// annotateStabilityLevel annotates help description on the metric description with the stability level +// of the metric +func (o *HistogramOpts) annotateStabilityLevel() { + o.annotateOnce.Do(func() { + o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) + }) +} + +// convenience function to allow easy transformation to the prometheus +// counterpart. This will do more once we have a proper label abstraction +func (o HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts { + return prometheus.HistogramOpts{ + Namespace: o.Namespace, + Subsystem: o.Subsystem, + Name: o.Name, + Help: o.Help, + ConstLabels: o.ConstLabels, + Buckets: o.Buckets, + } +} + +// SummaryOpts bundles the options for creating a Summary metric. It is +// mandatory to set Name to a non-empty string. While all other fields are +// optional and can safely be left at their zero value, it is recommended to set +// a help string and to explicitly set the Objectives field to the desired value +// as the default value will change in the upcoming v0.10 of the library. +type SummaryOpts struct { + Namespace string + Subsystem string + Name string + Help string + ConstLabels prometheus.Labels + Objectives map[float64]float64 + MaxAge time.Duration + AgeBuckets uint32 + BufCap uint32 + DeprecatedVersion string + deprecateOnce sync.Once + annotateOnce sync.Once + StabilityLevel StabilityLevel +} + +// Modify help description on the metric description. +func (o *SummaryOpts) markDeprecated() { + o.deprecateOnce.Do(func() { + o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) + }) +} + +// annotateStabilityLevel annotates help description on the metric description with the stability level +// of the metric +func (o *SummaryOpts) annotateStabilityLevel() { + o.annotateOnce.Do(func() { + o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) + }) +} + +// convenience function to allow easy transformation to the prometheus +// counterpart. This will do more once we have a proper label abstraction +func (o SummaryOpts) toPromSummaryOpts() prometheus.SummaryOpts { + return prometheus.SummaryOpts{ + Namespace: o.Namespace, + Subsystem: o.Subsystem, + Name: o.Name, + Help: o.Help, + ConstLabels: o.ConstLabels, + Objectives: o.Objectives, + MaxAge: o.MaxAge, + AgeBuckets: o.AgeBuckets, + BufCap: o.BufCap, + } +} diff --git a/vendor/k8s.io/component-base/metrics/processstarttime.go b/vendor/k8s.io/component-base/metrics/processstarttime.go new file mode 100644 index 0000000000..7091279853 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/processstarttime.go @@ -0,0 +1,64 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/procfs" + "k8s.io/klog" + "os" + "time" +) + +var processStartTime = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "process_start_time_seconds", + Help: "Start time of the process since unix epoch in seconds.", + }, + []string{}, +) + +// Registerer is an interface expected by RegisterProcessStartTime in order to register the metric +type Registerer interface { + Register(prometheus.Collector) error +} + +// RegisterProcessStartTime registers the process_start_time_seconds to +// a prometheus registry. This metric needs to be included to ensure counter +// data fidelity. +func RegisterProcessStartTime(registrationFunc func(prometheus.Collector) error) error { + start, err := getProcessStart() + if err != nil { + klog.Errorf("Could not get process start time, %v", err) + start = float64(time.Now().Unix()) + } + processStartTime.WithLabelValues().Set(start) + return registrationFunc(processStartTime) +} + +func getProcessStart() (float64, error) { + pid := os.Getpid() + p, err := procfs.NewProc(pid) + if err != nil { + return 0, err + } + + if stat, err := p.NewStat(); err == nil { + return stat.StartTime() + } + return 0, err +} diff --git a/vendor/k8s.io/component-base/metrics/prometheus/clientgo/BUILD.bazel b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/BUILD.bazel new file mode 100644 index 0000000000..44bf4b4f80 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["metrics.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics/prometheus/clientgo", + importpath = "k8s.io/component-base/metrics/prometheus/clientgo", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection:go_default_library", + "//vendor/k8s.io/component-base/metrics/prometheus/restclient:go_default_library", + "//vendor/k8s.io/component-base/metrics/prometheus/workqueue:go_default_library", + ], +) diff --git a/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/BUILD.bazel b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/BUILD.bazel new file mode 100644 index 0000000000..0516022a34 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/BUILD.bazel @@ -0,0 +1,14 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["metrics.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection", + importpath = "k8s.io/component-base/metrics/prometheus/clientgo/leaderelection", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/client-go/tools/leaderelection:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/adapter.go b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/metrics.go similarity index 63% rename from vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/adapter.go rename to vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/metrics.go index 58753c2900..6592c755b3 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/adapter.go +++ b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/leaderelection/metrics.go @@ -14,36 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -package prometheus +package leaderelection import ( - "github.com/prometheus/client_golang/prometheus" "k8s.io/client-go/tools/leaderelection" + k8smetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) -// Package prometheus sets the workqueue DefaultMetricsFactory to produce -// prometheus metrics. To use this package, you just have to import it. +var ( + leaderGauge = k8smetrics.NewGaugeVec(&k8smetrics.GaugeOpts{ + Name: "leader_election_master_status", + Help: "Gauge of if the reporting system is master of the relevant lease, 0 indicates backup, 1 indicates master. 'name' is the string used to identify the lease. Please make sure to group by name.", + }, []string{"name"}) +) func init() { + legacyregistry.MustRegister(leaderGauge) leaderelection.SetProvider(prometheusMetricsProvider{}) } type prometheusMetricsProvider struct{} func (prometheusMetricsProvider) NewLeaderMetric() leaderelection.SwitchMetric { - leaderGauge := prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Name: "leader_election_master_status", - Help: "Gauge of if the reporting system is master of the relevant lease, 0 indicates backup, 1 indicates master. 'name' is the string used to identify the lease. Please make sure to group by name.", - }, - []string{"name"}, - ) - prometheus.Register(leaderGauge) return &switchAdapter{gauge: leaderGauge} } type switchAdapter struct { - gauge *prometheus.GaugeVec + gauge *k8smetrics.GaugeVec } func (s *switchAdapter) On(name string) { diff --git a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/adapters.go b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/metrics.go similarity index 56% rename from vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/adapters.go rename to vendor/k8s.io/component-base/metrics/prometheus/clientgo/metrics.go index 75b316015f..43574ca9a3 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/adapters.go +++ b/vendor/k8s.io/component-base/metrics/prometheus/clientgo/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package prometheusclientgo +package clientgo -// Provided metrics needing adapting import ( - _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration - _ "k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection" // for leader election metric registration - _ "k8s.io/kubernetes/pkg/util/workqueue/prometheus" // for workqueue metric registration + _ "k8s.io/component-base/metrics/prometheus/clientgo/leaderelection" // load leaderelection metrics + _ "k8s.io/component-base/metrics/prometheus/restclient" // load restclient metrics + _ "k8s.io/component-base/metrics/prometheus/workqueue" // load the workqueue metrics ) diff --git a/vendor/k8s.io/component-base/metrics/prometheus/restclient/BUILD.bazel b/vendor/k8s.io/component-base/metrics/prometheus/restclient/BUILD.bazel new file mode 100644 index 0000000000..a56b75edfe --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/prometheus/restclient/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["metrics.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics/prometheus/restclient", + importpath = "k8s.io/component-base/metrics/prometheus/restclient", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/k8s.io/client-go/tools/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/prometheus.go b/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go similarity index 77% rename from vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/prometheus.go rename to vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go index c7804dfc2c..805ef722ef 100644 --- a/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/prometheus.go +++ b/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go @@ -14,24 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package prometheus creates and registers prometheus metrics with -// rest clients. To use this package, you just have to import it. -package prometheus +package restclient import ( "net/url" "time" - "k8s.io/client-go/tools/metrics" - "github.com/prometheus/client_golang/prometheus" + + "k8s.io/client-go/tools/metrics" + k8smetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) var ( // requestLatency is a Prometheus Summary metric type partitioned by // "verb" and "url" labels. It is used for the rest client latency metrics. - requestLatency = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + requestLatency = k8smetrics.NewHistogramVec( + &k8smetrics.HistogramOpts{ Name: "rest_client_request_duration_seconds", Help: "Request latency in seconds. Broken down by verb and URL.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 10), @@ -40,8 +40,8 @@ var ( ) // deprecatedRequestLatency is deprecated, please use requestLatency. - deprecatedRequestLatency = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ + deprecatedRequestLatency = k8smetrics.NewHistogramVec( + &k8smetrics.HistogramOpts{ Name: "rest_client_request_latency_seconds", Help: "(Deprecated) Request latency in seconds. Broken down by verb and URL.", Buckets: prometheus.ExponentialBuckets(0.001, 2, 10), @@ -49,8 +49,8 @@ var ( []string{"verb", "url"}, ) - requestResult = prometheus.NewCounterVec( - prometheus.CounterOpts{ + requestResult = k8smetrics.NewCounterVec( + &k8smetrics.CounterOpts{ Name: "rest_client_requests_total", Help: "Number of HTTP requests, partitioned by status code, method, and host.", }, @@ -59,15 +59,15 @@ var ( ) func init() { - prometheus.MustRegister(requestLatency) - prometheus.MustRegister(deprecatedRequestLatency) - prometheus.MustRegister(requestResult) + legacyregistry.MustRegister(requestLatency) + legacyregistry.MustRegister(deprecatedRequestLatency) + legacyregistry.MustRegister(requestResult) metrics.Register(&latencyAdapter{m: requestLatency, dm: deprecatedRequestLatency}, &resultAdapter{requestResult}) } type latencyAdapter struct { - m *prometheus.HistogramVec - dm *prometheus.HistogramVec + m *k8smetrics.HistogramVec + dm *k8smetrics.HistogramVec } func (l *latencyAdapter) Observe(verb string, u url.URL, latency time.Duration) { @@ -76,7 +76,7 @@ func (l *latencyAdapter) Observe(verb string, u url.URL, latency time.Duration) } type resultAdapter struct { - m *prometheus.CounterVec + m *k8smetrics.CounterVec } func (r *resultAdapter) Increment(code, method, host string) { diff --git a/vendor/k8s.io/component-base/metrics/prometheus/workqueue/BUILD.bazel b/vendor/k8s.io/component-base/metrics/prometheus/workqueue/BUILD.bazel new file mode 100644 index 0000000000..4ffdbcef02 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/prometheus/workqueue/BUILD.bazel @@ -0,0 +1,15 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = ["metrics.go"], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/metrics/prometheus/workqueue", + importpath = "k8s.io/component-base/metrics/prometheus/workqueue", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", + "//vendor/k8s.io/client-go/util/workqueue:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/prometheus.go b/vendor/k8s.io/component-base/metrics/prometheus/workqueue/metrics.go similarity index 51% rename from vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/prometheus.go rename to vendor/k8s.io/component-base/metrics/prometheus/workqueue/metrics.go index 8b26d35fff..bd9e6d11f0 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/prometheus.go +++ b/vendor/k8s.io/component-base/metrics/prometheus/workqueue/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package prometheus +package workqueue import ( - "k8s.io/client-go/util/workqueue" - "github.com/prometheus/client_golang/prometheus" + + "k8s.io/client-go/util/workqueue" + k8smetrics "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) // Package prometheus sets the workqueue DefaultMetricsFactory to produce @@ -38,95 +40,69 @@ const ( ) var ( - depth = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Subsystem: WorkQueueSubsystem, - Name: DepthKey, - Help: "Current depth of workqueue", - }, - []string{"name"}, - ) - - adds = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Subsystem: WorkQueueSubsystem, - Name: AddsKey, - Help: "Total number of adds handled by workqueue", - }, - []string{"name"}, - ) - - latency = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Subsystem: WorkQueueSubsystem, - Name: QueueLatencyKey, - Help: "How long in seconds an item stays in workqueue before being requested.", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), - }, - []string{"name"}, - ) - - workDuration = prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Subsystem: WorkQueueSubsystem, - Name: WorkDurationKey, - Help: "How long in seconds processing an item from workqueue takes.", - Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), - }, - []string{"name"}, - ) - - unfinished = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Subsystem: WorkQueueSubsystem, - Name: UnfinishedWorkKey, - Help: "How many seconds of work has done that " + - "is in progress and hasn't been observed by work_duration. Large " + - "values indicate stuck threads. One can deduce the number of stuck " + - "threads by observing the rate at which this increases.", - }, - []string{"name"}, - ) - - longestRunningProcessor = prometheus.NewGaugeVec( - prometheus.GaugeOpts{ - Subsystem: WorkQueueSubsystem, - Name: LongestRunningProcessorKey, - Help: "How many seconds has the longest running " + - "processor for workqueue been running.", - }, - []string{"name"}, - ) - - retries = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Subsystem: WorkQueueSubsystem, - Name: RetriesKey, - Help: "Total number of retries handled by workqueue", - }, - []string{"name"}, - ) + depth = k8smetrics.NewGaugeVec(&k8smetrics.GaugeOpts{ + Subsystem: WorkQueueSubsystem, + Name: DepthKey, + Help: "Current depth of workqueue", + }, []string{"name"}) + + adds = k8smetrics.NewCounterVec(&k8smetrics.CounterOpts{ + Subsystem: WorkQueueSubsystem, + Name: AddsKey, + Help: "Total number of adds handled by workqueue", + }, []string{"name"}) + + latency = k8smetrics.NewHistogramVec(&k8smetrics.HistogramOpts{ + Subsystem: WorkQueueSubsystem, + Name: QueueLatencyKey, + Help: "How long in seconds an item stays in workqueue before being requested.", + Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), + }, []string{"name"}) + + workDuration = k8smetrics.NewHistogramVec(&k8smetrics.HistogramOpts{ + Subsystem: WorkQueueSubsystem, + Name: WorkDurationKey, + Help: "How long in seconds processing an item from workqueue takes.", + Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10), + }, []string{"name"}) + + unfinished = k8smetrics.NewGaugeVec(&k8smetrics.GaugeOpts{ + Subsystem: WorkQueueSubsystem, + Name: UnfinishedWorkKey, + Help: "How many seconds of work has done that " + + "is in progress and hasn't been observed by work_duration. Large " + + "values indicate stuck threads. One can deduce the number of stuck " + + "threads by observing the rate at which this increases.", + }, []string{"name"}) + + longestRunningProcessor = k8smetrics.NewGaugeVec(&k8smetrics.GaugeOpts{ + Subsystem: WorkQueueSubsystem, + Name: LongestRunningProcessorKey, + Help: "How many seconds has the longest running " + + "processor for workqueue been running.", + }, []string{"name"}) + + retries = k8smetrics.NewCounterVec(&k8smetrics.CounterOpts{ + Subsystem: WorkQueueSubsystem, + Name: RetriesKey, + Help: "Total number of retries handled by workqueue", + }, []string{"name"}) + + metrics = []k8smetrics.Registerable{ + depth, adds, latency, workDuration, unfinished, longestRunningProcessor, retries, + } ) -func registerMetrics() { - prometheus.MustRegister( - depth, - adds, - latency, - workDuration, - unfinished, - longestRunningProcessor, - retries, - ) +type prometheusMetricsProvider struct { } func init() { - registerMetrics() + for _, m := range metrics { + legacyregistry.MustRegister(m) + } workqueue.SetProvider(prometheusMetricsProvider{}) } -type prometheusMetricsProvider struct{} - func (prometheusMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric { return depth.WithLabelValues(name) } diff --git a/vendor/k8s.io/component-base/metrics/registry.go b/vendor/k8s.io/component-base/metrics/registry.go new file mode 100644 index 0000000000..701f151999 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/registry.go @@ -0,0 +1,161 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "sync" + "sync/atomic" + + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" + dto "github.com/prometheus/client_model/go" + + apimachineryversion "k8s.io/apimachinery/pkg/version" + "k8s.io/component-base/version" +) + +var ( + showHiddenOnce sync.Once + showHidden atomic.Value +) + +// SetShowHidden will enable showing hidden metrics. This will no-opt +// after the initial call +func SetShowHidden() { + showHiddenOnce.Do(func() { + showHidden.Store(true) + }) +} + +// ShouldShowHidden returns whether showing hidden deprecated metrics +// is enabled. While the primary usecase for this is internal (to determine +// registration behavior) this can also be used to introspect +func ShouldShowHidden() bool { + return showHidden.Load() != nil && showHidden.Load().(bool) +} + +// Registerable is an interface for a collector metric which we +// will register with KubeRegistry. +type Registerable interface { + prometheus.Collector + Create(version *semver.Version) bool +} + +// KubeRegistry is an interface which implements a subset of prometheus.Registerer and +// prometheus.Gatherer interfaces +type KubeRegistry interface { + // Deprecated + RawRegister(prometheus.Collector) error + // Deprecated + RawMustRegister(...prometheus.Collector) + Register(Registerable) error + MustRegister(...Registerable) + Unregister(Registerable) bool + Gather() ([]*dto.MetricFamily, error) +} + +// kubeRegistry is a wrapper around a prometheus registry-type object. Upon initialization +// the kubernetes binary version information is loaded into the registry object, so that +// automatic behavior can be configured for metric versioning. +type kubeRegistry struct { + PromRegistry + version semver.Version +} + +// Register registers a new Collector to be included in metrics +// collection. It returns an error if the descriptors provided by the +// Collector are invalid or if they — in combination with descriptors of +// already registered Collectors — do not fulfill the consistency and +// uniqueness criteria described in the documentation of metric.Desc. +func (kr *kubeRegistry) Register(c Registerable) error { + if c.Create(&kr.version) { + return kr.PromRegistry.Register(c) + } + return nil +} + +// MustRegister works like Register but registers any number of +// Collectors and panics upon the first registration that causes an +// error. +func (kr *kubeRegistry) MustRegister(cs ...Registerable) { + metrics := make([]prometheus.Collector, 0, len(cs)) + for _, c := range cs { + if c.Create(&kr.version) { + metrics = append(metrics, c) + } + } + kr.PromRegistry.MustRegister(metrics...) +} + +// RawRegister takes a native prometheus.Collector and registers the collector +// to the registry. This bypasses metrics safety checks, so should only be used +// to register custom prometheus collectors. +// +// Deprecated +func (kr *kubeRegistry) RawRegister(c prometheus.Collector) error { + return kr.PromRegistry.Register(c) +} + +// RawMustRegister takes a native prometheus.Collector and registers the collector +// to the registry. This bypasses metrics safety checks, so should only be used +// to register custom prometheus collectors. +// +// Deprecated +func (kr *kubeRegistry) RawMustRegister(cs ...prometheus.Collector) { + kr.PromRegistry.MustRegister(cs...) +} + +// Unregister unregisters the Collector that equals the Collector passed +// in as an argument. (Two Collectors are considered equal if their +// Describe method yields the same set of descriptors.) The function +// returns whether a Collector was unregistered. Note that an unchecked +// Collector cannot be unregistered (as its Describe method does not +// yield any descriptor). +func (kr *kubeRegistry) Unregister(collector Registerable) bool { + return kr.PromRegistry.Unregister(collector) +} + +// Gather calls the Collect method of the registered Collectors and then +// gathers the collected metrics into a lexicographically sorted slice +// of uniquely named MetricFamily protobufs. Gather ensures that the +// returned slice is valid and self-consistent so that it can be used +// for valid exposition. As an exception to the strict consistency +// requirements described for metric.Desc, Gather will tolerate +// different sets of label names for metrics of the same metric family. +func (kr *kubeRegistry) Gather() ([]*dto.MetricFamily, error) { + return kr.PromRegistry.Gather() +} + +func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { + r := &kubeRegistry{ + PromRegistry: prometheus.NewRegistry(), + version: parseVersion(v), + } + return r +} + +func registerMetadataMetrics(r *kubeRegistry) { + RegisterBuildInfo(r) +} + +// NewKubeRegistry creates a new vanilla Registry without any Collectors +// pre-registered. +func NewKubeRegistry() KubeRegistry { + r := newKubeRegistry(version.Get()) + registerMetadataMetrics(r) + return r +} diff --git a/vendor/k8s.io/component-base/metrics/summary.go b/vendor/k8s.io/component-base/metrics/summary.go new file mode 100644 index 0000000000..ff57378224 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/summary.go @@ -0,0 +1,166 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/blang/semver" + "github.com/prometheus/client_golang/prometheus" +) + +// Summary is our internal representation for our wrapping struct around prometheus +// summaries. Summary implements both kubeCollector and ObserverMetric +// +// DEPRECATED: as per the metrics overhaul KEP +type Summary struct { + ObserverMetric + *SummaryOpts + lazyMetric + selfCollector +} + +// NewSummary returns an object which is Summary-like. However, nothing +// will be measured until the summary is registered somewhere. +// +// DEPRECATED: as per the metrics overhaul KEP +func NewSummary(opts *SummaryOpts) *Summary { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + s := &Summary{ + SummaryOpts: opts, + lazyMetric: lazyMetric{}, + } + s.setPrometheusSummary(noopMetric{}) + s.lazyInit(s) + return s +} + +// setPrometheusSummary sets the underlying KubeGauge object, i.e. the thing that does the measurement. +func (s *Summary) setPrometheusSummary(summary prometheus.Summary) { + s.ObserverMetric = summary + s.initSelfCollection(summary) +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (s *Summary) DeprecatedVersion() *semver.Version { + return parseSemver(s.SummaryOpts.DeprecatedVersion) +} + +// initializeMetric invokes the actual prometheus.Summary object instantiation +// and stores a reference to it +func (s *Summary) initializeMetric() { + s.SummaryOpts.annotateStabilityLevel() + // this actually creates the underlying prometheus gauge. + s.setPrometheusSummary(prometheus.NewSummary(s.SummaryOpts.toPromSummaryOpts())) +} + +// initializeDeprecatedMetric invokes the actual prometheus.Summary object instantiation +// but modifies the Help description prior to object instantiation. +func (s *Summary) initializeDeprecatedMetric() { + s.SummaryOpts.markDeprecated() + s.initializeMetric() +} + +// SummaryVec is the internal representation of our wrapping struct around prometheus +// summaryVecs. +// +// DEPRECATED: as per the metrics overhaul KEP +type SummaryVec struct { + *prometheus.SummaryVec + *SummaryOpts + lazyMetric + originalLabels []string +} + +// NewSummaryVec returns an object which satisfies kubeCollector and wraps the +// prometheus.SummaryVec object. However, the object returned will not measure +// anything unless the collector is first registered, since the metric is lazily instantiated. +// +// DEPRECATED: as per the metrics overhaul KEP +func NewSummaryVec(opts *SummaryOpts, labels []string) *SummaryVec { + // todo: handle defaulting better + if opts.StabilityLevel == "" { + opts.StabilityLevel = ALPHA + } + v := &SummaryVec{ + SummaryOpts: opts, + originalLabels: labels, + lazyMetric: lazyMetric{}, + } + v.lazyInit(v) + return v +} + +// DeprecatedVersion returns a pointer to the Version or nil +func (v *SummaryVec) DeprecatedVersion() *semver.Version { + return parseSemver(v.SummaryOpts.DeprecatedVersion) +} + +func (v *SummaryVec) initializeMetric() { + v.SummaryOpts.annotateStabilityLevel() + v.SummaryVec = prometheus.NewSummaryVec(v.SummaryOpts.toPromSummaryOpts(), v.originalLabels) +} + +func (v *SummaryVec) initializeDeprecatedMetric() { + v.SummaryOpts.markDeprecated() + v.initializeMetric() +} + +// Default Prometheus behavior actually results in the creation of a new metric +// if a metric with the unique label values is not found in the underlying stored metricMap. +// This means that if this function is called but the underlying metric is not registered +// (which means it will never be exposed externally nor consumed), the metric will exist in memory +// for perpetuity (i.e. throughout application lifecycle). +// +// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/summary.go#L485-L495 + +// WithLabelValues returns the ObserverMetric for the given slice of label +// values (same order as the VariableLabels in Desc). If that combination of +// label values is accessed for the first time, a new ObserverMetric is created IFF the summaryVec +// has been registered to a metrics registry. +func (v *SummaryVec) WithLabelValues(lvs ...string) ObserverMetric { + if !v.IsCreated() { + return noop + } + return v.SummaryVec.WithLabelValues(lvs...) +} + +// With returns the ObserverMetric for the given Labels map (the label names +// must match those of the VariableLabels in Desc). If that label map is +// accessed for the first time, a new ObserverMetric is created IFF the summaryVec has +// been registered to a metrics registry. +func (v *SummaryVec) With(labels prometheus.Labels) ObserverMetric { + if !v.IsCreated() { + return noop + } + return v.SummaryVec.With(labels) +} + +// Delete deletes the metric where the variable labels are the same as those +// passed in as labels. It returns true if a metric was deleted. +// +// It is not an error if the number and names of the Labels are inconsistent +// with those of the VariableLabels in Desc. However, such inconsistent Labels +// can never match an actual metric, so the method will always return false in +// that case. +func (v *SummaryVec) Delete(labels prometheus.Labels) bool { + if !v.IsCreated() { + return false // since we haven't created the metric, we haven't deleted a metric with the passed in values + } + return v.SummaryVec.Delete(labels) +} diff --git a/vendor/k8s.io/component-base/metrics/version.go b/vendor/k8s.io/component-base/metrics/version.go new file mode 100644 index 0000000000..63cc606e4c --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/version.go @@ -0,0 +1,37 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import "k8s.io/component-base/version" + +var ( + buildInfo = NewGaugeVec( + &GaugeOpts{ + Name: "kubernetes_build_info", + Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.", + StabilityLevel: ALPHA, + }, + []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, + ) +) + +// RegisterBuildInfo registers the build and version info in a metadata metric in prometheus +func RegisterBuildInfo(r KubeRegistry) { + info := version.Get() + r.MustRegister(buildInfo) + buildInfo.WithLabelValues(info.Major, info.Minor, info.GitVersion, info.GitCommit, info.GitTreeState, info.BuildDate, info.GoVersion, info.Compiler, info.Platform).Set(1) +} diff --git a/vendor/k8s.io/component-base/metrics/version_parser.go b/vendor/k8s.io/component-base/metrics/version_parser.go new file mode 100644 index 0000000000..d2f7aee437 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/version_parser.go @@ -0,0 +1,48 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "fmt" + "github.com/blang/semver" + apimachineryversion "k8s.io/apimachinery/pkg/version" + "regexp" +) + +const ( + versionRegexpString = `^v(\d+\.\d+\.\d+)` +) + +var ( + versionRe = regexp.MustCompile(versionRegexpString) +) + +func parseSemver(s string) *semver.Version { + if s != "" { + sv := semver.MustParse(s) + return &sv + } + return nil +} +func parseVersion(ver apimachineryversion.Info) semver.Version { + matches := versionRe.FindAllStringSubmatch(ver.String(), -1) + + if len(matches) != 1 { + panic(fmt.Sprintf("version string \"%v\" doesn't match expected regular expression: \"%v\"", ver.String(), versionRe.String())) + } + return semver.MustParse(matches[0][1]) +} diff --git a/vendor/k8s.io/component-base/metrics/wrappers.go b/vendor/k8s.io/component-base/metrics/wrappers.go new file mode 100644 index 0000000000..fa40314dc6 --- /dev/null +++ b/vendor/k8s.io/component-base/metrics/wrappers.go @@ -0,0 +1,81 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "github.com/prometheus/client_golang/prometheus" + + dto "github.com/prometheus/client_model/go" +) + +// This file contains a series of interfaces which we explicitly define for +// integrating with prometheus. We redefine the interfaces explicitly here +// so that we can prevent breakage if methods are ever added to prometheus +// variants of them. + +// Collector defines a subset of prometheus.Collector interface methods +type Collector interface { + Describe(chan<- *prometheus.Desc) + Collect(chan<- prometheus.Metric) +} + +// Metric defines a subset of prometheus.Metric interface methods +type Metric interface { + Desc() *prometheus.Desc + Write(*dto.Metric) error +} + +// CounterMetric is a Metric that represents a single numerical value that only ever +// goes up. That implies that it cannot be used to count items whose number can +// also go down, e.g. the number of currently running goroutines. Those +// "counters" are represented by Gauges. + +// CounterMetric is an interface which defines a subset of the interface provided by prometheus.Counter +type CounterMetric interface { + Inc() + Add(float64) +} + +// CounterVecMetric is an interface which prometheus.CounterVec satisfies. +type CounterVecMetric interface { + WithLabelValues(...string) CounterMetric + With(prometheus.Labels) CounterMetric +} + +// GaugeMetric is an interface which defines a subset of the interface provided by prometheus.Gauge +type GaugeMetric interface { + Set(float64) + Inc() + Dec() + Add(float64) + Write(out *dto.Metric) error + SetToCurrentTime() +} + +// ObserverMetric captures individual observations. +type ObserverMetric interface { + Observe(float64) +} + +// PromRegistry is an interface which implements a subset of prometheus.Registerer and +// prometheus.Gatherer interfaces +type PromRegistry interface { + Register(prometheus.Collector) error + MustRegister(...prometheus.Collector) + Unregister(prometheus.Collector) bool + Gather() ([]*dto.MetricFamily, error) +} diff --git a/vendor/k8s.io/component-base/version/BUILD.bazel b/vendor/k8s.io/component-base/version/BUILD.bazel new file mode 100644 index 0000000000..910ba20363 --- /dev/null +++ b/vendor/k8s.io/component-base/version/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "base.go", + "version.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/component-base/version", + importpath = "k8s.io/component-base/version", + visibility = ["//visibility:public"], + deps = ["//vendor/k8s.io/apimachinery/pkg/version:go_default_library"], +) diff --git a/vendor/k8s.io/component-base/version/base.go b/vendor/k8s.io/component-base/version/base.go new file mode 100644 index 0000000000..c84c6d2d1c --- /dev/null +++ b/vendor/k8s.io/component-base/version/base.go @@ -0,0 +1,63 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +// Base version information. +// +// This is the fallback data used when version information from git is not +// provided via go ldflags. It provides an approximation of the Kubernetes +// version for ad-hoc builds (e.g. `go build`) that cannot get the version +// information from git. +// +// If you are looking at these fields in the git tree, they look +// strange. They are modified on the fly by the build process. The +// in-tree values are dummy values used for "git archive", which also +// works for GitHub tar downloads. +// +// When releasing a new Kubernetes version, this file is updated by +// build/mark_new_version.sh to reflect the new version, and then a +// git annotated tag (using format vX.Y where X == Major version and Y +// == Minor version) is created to point to the commit that updates +// pkg/version/base.go +var ( + // TODO: Deprecate gitMajor and gitMinor, use only gitVersion + // instead. First step in deprecation, keep the fields but make + // them irrelevant. (Next we'll take it out, which may muck with + // scripts consuming the kubectl version output - but most of + // these should be looking at gitVersion already anyways.) + gitMajor string // major version, always numeric + gitMinor string // minor version, numeric possibly followed by "+" + + // semantic version, derived by build scripts (see + // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md + // for a detailed discussion of this field) + // + // TODO: This field is still called "gitVersion" for legacy + // reasons. For prerelease versions, the build metadata on the + // semantic version is a git hash, but the version itself is no + // longer the direct output of "git describe", but a slight + // translation to be semver compliant. + + // NOTE: The $Format strings are replaced during 'git archive' thanks to the + // companion .gitattributes file containing 'export-subst' in this same + // directory. See also https://git-scm.com/docs/gitattributes + gitVersion = "v0.0.0-master+$Format:%h$" + gitCommit = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) + gitTreeState = "" // state of git tree, either "clean" or "dirty" + + buildDate = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ') +) diff --git a/vendor/k8s.io/component-base/version/version.go b/vendor/k8s.io/component-base/version/version.go new file mode 100644 index 0000000000..d1e76dc00e --- /dev/null +++ b/vendor/k8s.io/component-base/version/version.go @@ -0,0 +1,42 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +import ( + "fmt" + "runtime" + + apimachineryversion "k8s.io/apimachinery/pkg/version" +) + +// Get returns the overall codebase version. It's for detecting +// what code a binary was built from. +func Get() apimachineryversion.Info { + // These variables typically come from -ldflags settings and in + // their absence fallback to the settings in ./base.go + return apimachineryversion.Info{ + Major: gitMajor, + Minor: gitMinor, + GitVersion: gitVersion, + GitCommit: gitCommit, + GitTreeState: gitTreeState, + BuildDate: buildDate, + GoVersion: runtime.Version(), + Compiler: runtime.Compiler, + Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), + } +} diff --git a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go index db869f34b6..3d040abdcb 100644 --- a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go +++ b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/types.go @@ -111,6 +111,9 @@ type KubeControllerManagerConfiguration struct { // EndpointControllerConfiguration holds configuration for EndpointController // related features. EndpointController EndpointControllerConfiguration + // EndpointSliceControllerConfiguration holds configuration for + // EndpointSliceController related features. + EndpointSliceController EndpointSliceControllerConfiguration // GarbageCollectorControllerConfiguration holds configuration for // GarbageCollectorController related features. GarbageCollectorController GarbageCollectorControllerConfiguration @@ -297,6 +300,20 @@ type EndpointControllerConfiguration struct { EndpointUpdatesBatchPeriod metav1.Duration } +// EndpointSliceControllerConfiguration contains elements describing +// EndpointSliceController. +type EndpointSliceControllerConfiguration struct { + // concurrentServiceEndpointSyncs is the number of service endpoint syncing + // operations that will be done concurrently. Larger number = faster + // endpoint slice updating, but more CPU (and network) load. + ConcurrentServiceEndpointSyncs int32 + + // maxEndpointsPerSlice is the maximum number of endpoints that will be + // added to an EndpointSlice. More endpoints per slice will result in fewer + // and larger endpoint slices, but larger resources. + MaxEndpointsPerSlice int32 +} + // GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController. type GarbageCollectorControllerConfiguration struct { // enables the generic garbage collector. MUST be synced with the @@ -361,6 +378,8 @@ type NamespaceControllerConfiguration struct { type NodeIPAMControllerConfiguration struct { // serviceCIDR is CIDR Range for Services in cluster. ServiceCIDR string + // secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR + SecondaryServiceCIDR string // NodeCIDRMaskSize is the mask size for node cidr in cluster. NodeCIDRMaskSize int32 } diff --git a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go index 6c9475879e..e5ed6f2d7d 100644 --- a/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kube-controller-manager/config/v1alpha1/zz_generated.deepcopy.go @@ -140,6 +140,22 @@ func (in *EndpointControllerConfiguration) DeepCopy() *EndpointControllerConfigu return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSliceControllerConfiguration) DeepCopyInto(out *EndpointSliceControllerConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceControllerConfiguration. +func (in *EndpointSliceControllerConfiguration) DeepCopy() *EndpointSliceControllerConfiguration { + if in == nil { + return nil + } + out := new(EndpointSliceControllerConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GarbageCollectorControllerConfiguration) DeepCopyInto(out *GarbageCollectorControllerConfiguration) { *out = *in @@ -289,6 +305,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa out.StatefulSetController = in.StatefulSetController out.DeprecatedController = in.DeprecatedController out.EndpointController = in.EndpointController + out.EndpointSliceController = in.EndpointSliceController in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController) in.HPAController.DeepCopyInto(&out.HPAController) out.JobController = in.JobController diff --git a/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go b/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go index 072c8ec4ae..fd0e77cbbc 100644 --- a/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go +++ b/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go @@ -31,8 +31,6 @@ import ( const ( OpenAPIVersion = "2.0" - // TODO: Make this configurable. - extensionPrefix = "x-kubernetes-" ) type openAPI struct { @@ -154,6 +152,11 @@ func (o *openAPI) buildDefinitionRecursively(name string) error { schema.Extensions[k] = v } } + if v, ok := item.Schema.Extensions[common.ExtensionV2Schema]; ok { + if v2Schema, isOpenAPISchema := v.(spec.Schema); isOpenAPISchema { + schema = v2Schema + } + } o.swagger.Definitions[uniqueName] = schema for _, v := range item.Dependencies { if err := o.buildDefinitionRecursively(v); err != nil { @@ -270,7 +273,7 @@ func (o *openAPI) buildOperations(route restful.Route, inPathCommonParamsMap map }, } for k, v := range route.Metadata { - if strings.HasPrefix(k, extensionPrefix) { + if strings.HasPrefix(k, common.ExtensionPrefix) { if ret.Extensions == nil { ret.Extensions = spec.Extensions{} } diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go index 7d5534b24e..f1c87c3008 100644 --- a/vendor/k8s.io/kube-openapi/pkg/common/common.go +++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go @@ -24,6 +24,12 @@ import ( "github.com/go-openapi/spec" ) +const ( + // TODO: Make this configurable. + ExtensionPrefix = "x-kubernetes-" + ExtensionV2Schema = ExtensionPrefix + "v2-schema" +) + // OpenAPIDefinition describes single type. Normally these definitions are auto-generated using gen-openapi. type OpenAPIDefinition struct { Schema spec.Schema @@ -43,6 +49,10 @@ type OpenAPIDefinitionGetter interface { OpenAPIDefinition() *OpenAPIDefinition } +type OpenAPIV3DefinitionGetter interface { + OpenAPIV3Definition() *OpenAPIDefinition +} + type PathHandler interface { Handle(path string, handler http.Handler) } @@ -172,3 +182,11 @@ func EscapeJsonPointer(p string) string { p = strings.Replace(p, "/", "~1", -1) return p } + +func EmbedOpenAPIDefinitionIntoV2Extension(main OpenAPIDefinition, embedded OpenAPIDefinition) OpenAPIDefinition { + if main.Schema.Extensions == nil { + main.Schema.Extensions = make(map[string]interface{}) + } + main.Schema.Extensions[ExtensionV2Schema] = embedded.Schema + return main +} diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go index 7f808ab85a..e5a78ee97b 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go @@ -30,9 +30,16 @@ import ( // ToSchema converts openapi definitions into a schema suitable for structured // merge (i.e. kubectl apply v2). func ToSchema(models proto.Models) (*schema.Schema, error) { + return ToSchemaWithPreserveUnknownFields(models, false) +} + +// ToSchemaWithPreserveUnknownFields converts openapi definitions into a schema suitable for structured +// merge (i.e. kubectl apply v2), it will preserve unknown fields if specified. +func ToSchemaWithPreserveUnknownFields(models proto.Models, preserveUnknownFields bool) (*schema.Schema, error) { c := convert{ - input: models, - output: &schema.Schema{}, + input: models, + preserveUnknownFields: preserveUnknownFields, + output: &schema.Schema{}, } if err := c.convertAll(); err != nil { return nil, err @@ -42,8 +49,9 @@ func ToSchema(models proto.Models) (*schema.Schema, error) { } type convert struct { - input proto.Models - output *schema.Schema + input proto.Models + preserveUnknownFields bool + output *schema.Schema currentName string current *schema.Atom @@ -52,10 +60,11 @@ type convert struct { func (c *convert) push(name string, a *schema.Atom) *convert { return &convert{ - input: c.input, - output: c.output, - currentName: name, - current: a, + input: c.input, + preserveUnknownFields: c.preserveUnknownFields, + output: c.output, + currentName: name, + current: a, } } @@ -98,6 +107,7 @@ func (c *convert) insertTypeDef(name string, model proto.Schema) { func (c *convert) addCommonTypes() { c.output.Types = append(c.output.Types, untypedDef) + c.output.Types = append(c.output.Types, deducedDef) } var untypedName string = "__untyped_atomic_" @@ -121,7 +131,28 @@ var untypedDef schema.TypeDef = schema.TypeDef{ }, } -func (c *convert) makeRef(model proto.Schema) schema.TypeRef { +var deducedName string = "__untyped_deduced_" + +var deducedDef schema.TypeDef = schema.TypeDef{ + Name: deducedName, + Atom: schema.Atom{ + Scalar: ptr(schema.Scalar("untyped")), + List: &schema.List{ + ElementType: schema.TypeRef{ + NamedType: &untypedName, + }, + ElementRelationship: schema.Atomic, + }, + Map: &schema.Map{ + ElementType: schema.TypeRef{ + NamedType: &deducedName, + }, + ElementRelationship: schema.Separable, + }, + }, +} + +func (c *convert) makeRef(model proto.Schema, preserveUnknownFields bool) schema.TypeRef { var tr schema.TypeRef if r, ok := model.(*proto.Ref); ok { if r.Reference() == "io.k8s.apimachinery.pkg.runtime.RawExtension" { @@ -135,6 +166,7 @@ func (c *convert) makeRef(model proto.Schema) schema.TypeRef { } else { // compute the type inline c2 := c.push("inlined in "+c.currentName, &tr.Inlined) + c2.preserveUnknownFields = preserveUnknownFields model.Accept(c2) c.pop(c2) @@ -250,11 +282,16 @@ func makeUnion(extensions map[string]interface{}) (schema.Union, error) { } func (c *convert) VisitKind(k *proto.Kind) { + preserveUnknownFields := c.preserveUnknownFields + if p, ok := k.GetExtensions()["x-kubernetes-preserve-unknown-fields"]; ok && p == true { + preserveUnknownFields = true + } + a := c.top() a.Map = &schema.Map{} for _, name := range k.FieldOrder { member := k.Fields[name] - tr := c.makeRef(member) + tr := c.makeRef(member, preserveUnknownFields) a.Map.Fields = append(a.Map.Fields, schema.StructField{ Name: name, Type: tr, @@ -270,7 +307,11 @@ func (c *convert) VisitKind(k *proto.Kind) { // specified in the union are actual fields in the struct. a.Map.Unions = unions - // TODO: Get element relationship when we start adding it to the spec. + if preserveUnknownFields { + a.Map.ElementType = schema.TypeRef{ + NamedType: &deducedName, + } + } } func toStringSlice(o interface{}) (out []string, ok bool) { @@ -293,7 +334,7 @@ func (c *convert) VisitArray(a *proto.Array) { ElementRelationship: schema.Atomic, } l := atom.List - l.ElementType = c.makeRef(a.SubType) + l.ElementType = c.makeRef(a.SubType, c.preserveUnknownFields) ext := a.GetExtensions() @@ -341,7 +382,7 @@ func (c *convert) VisitArray(a *proto.Array) { func (c *convert) VisitMap(m *proto.Map) { a := c.top() a.Map = &schema.Map{} - a.Map.ElementType = c.makeRef(m.SubType) + a.Map.ElementType = c.makeRef(m.SubType, c.preserveUnknownFields) // TODO: Get element relationship when we start putting it into the // spec. @@ -379,6 +420,9 @@ func (c *convert) VisitPrimitive(p *proto.Primitive) { func (c *convert) VisitArbitrary(a *proto.Arbitrary) { *c.top() = untypedDef.Atom + if c.preserveUnknownFields { + *c.top() = deducedDef.Atom + } } func (c *convert) VisitReference(proto.Reference) { diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD.bazel b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD.bazel index eab49b5a2e..667b25e1b9 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/BUILD.bazel @@ -10,7 +10,6 @@ go_library( importpath = "k8s.io/kubernetes/cmd/controller-manager/app", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", @@ -22,6 +21,7 @@ go_library( "//vendor/k8s.io/apiserver/pkg/server/routes:go_default_library", "//vendor/k8s.io/client-go/kubernetes:go_default_library", "//vendor/k8s.io/component-base/config:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/kubernetes/pkg/api/legacyscheme:go_default_library", "//vendor/k8s.io/kubernetes/pkg/util/configz:go_default_library", diff --git a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go index c0e507b7ac..127ed02ced 100644 --- a/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go +++ b/vendor/k8s.io/kubernetes/cmd/controller-manager/app/serve.go @@ -17,7 +17,6 @@ limitations under the License. package app import ( - "github.com/prometheus/client_golang/prometheus" "net/http" goruntime "runtime" @@ -29,6 +28,7 @@ import ( "k8s.io/apiserver/pkg/server/mux" "k8s.io/apiserver/pkg/server/routes" componentbaseconfig "k8s.io/component-base/config" + "k8s.io/component-base/metrics/legacyregistry" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/util/configz" ) @@ -46,13 +46,14 @@ func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.Aut handler = genericapifilters.WithAuthentication(handler, authenticationInfo.Authenticator, failedHandler, nil) } handler = genericapifilters.WithRequestInfo(handler, requestInfoResolver) + handler = genericapifilters.WithCacheControl(handler) handler = genericfilters.WithPanicRecovery(handler) return handler } // NewBaseHandler takes in CompletedConfig and returns a handler. -func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, checks ...healthz.HealthzChecker) *mux.PathRecorderMux { +func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, checks ...healthz.HealthChecker) *mux.PathRecorderMux { mux := mux.NewPathRecorderMux("controller-manager") healthz.InstallHandler(mux, checks...) if c.EnableProfiling { @@ -62,7 +63,7 @@ func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, checks ...hea } } configz.InstallHandler(mux) - mux.Handle("/metrics", prometheus.Handler()) + mux.Handle("/metrics", legacyregistry.Handler()) return mux } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go index b56ec96cb3..4f5f20a34d 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/register.go @@ -23,8 +23,10 @@ import ( ) var ( + // SchemeBuilder stores functions to add things to a scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme + // AddToScheme applies all stored functions t oa scheme. + AddToScheme = SchemeBuilder.AddToScheme ) // GroupName is the group name use in this package diff --git a/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go index 9af2f389e0..28a26e6ff6 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go @@ -81,13 +81,13 @@ const ( // ordering constraints. When a scale operation is performed with this // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. - RollingUpdateStatefulSetStrategyType = "RollingUpdate" + RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version // tracking and ordered rolling restarts are disabled. Pods are recreated // from the StatefulSetSpec when they are manually deleted. When a scale // operation is performed with this strategy,specification version indicated // by the StatefulSet's currentRevision. - OnDeleteStatefulSetStrategyType = "OnDelete" + OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. @@ -198,6 +198,7 @@ type StatefulSetStatus struct { Conditions []StatefulSetCondition } +// StatefulSetConditionType describes the condition types of StatefulSets. type StatefulSetConditionType string // TODO: Add valid condition types for Statefulsets. @@ -237,7 +238,7 @@ type StatefulSetList struct { type ControllerRevision struct { metav1.TypeMeta // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta @@ -262,6 +263,7 @@ type ControllerRevisionList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// Deployment provides declarative updates for Pods and ReplicaSets. type Deployment struct { metav1.TypeMeta // +optional @@ -276,6 +278,7 @@ type Deployment struct { Status DeploymentStatus } +// DeploymentSpec specifies the state of a Deployment. type DeploymentSpec struct { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. @@ -342,6 +345,7 @@ type DeploymentRollback struct { RollbackTo RollbackConfig } +// RollbackConfig specifies the state of a revision to roll back to. // DEPRECATED. type RollbackConfig struct { // The revision to rollback to. If set to 0, rollback to the last revision. @@ -356,6 +360,8 @@ const ( DefaultDeploymentUniqueLabelKey string = "pod-template-hash" ) +// DeploymentStrategy stores information about the strategy and rolling-update +// behavior of a deployment. type DeploymentStrategy struct { // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. // +optional @@ -370,6 +376,7 @@ type DeploymentStrategy struct { RollingUpdate *RollingUpdateDeployment } +// DeploymentStrategyType defines strategies with a deployment. type DeploymentStrategyType string const ( @@ -409,6 +416,7 @@ type RollingUpdateDeployment struct { MaxSurge intstr.IntOrString } +// DeploymentStatus holds information about the observed status of a deployment. type DeploymentStatus struct { // The generation observed by the deployment controller. // +optional @@ -446,6 +454,7 @@ type DeploymentStatus struct { CollisionCount *int32 } +// DeploymentConditionType defines conditions of a deployment. type DeploymentConditionType string // These are valid conditions of a deployment. @@ -481,6 +490,7 @@ type DeploymentCondition struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// DeploymentList defines multiple deployments. type DeploymentList struct { metav1.TypeMeta // +optional @@ -490,6 +500,7 @@ type DeploymentList struct { Items []Deployment } +// DaemonSetUpdateStrategy defines a strategy to update a daemon set. type DaemonSetUpdateStrategy struct { // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". // Default is OnDelete. @@ -505,6 +516,8 @@ type DaemonSetUpdateStrategy struct { RollingUpdate *RollingUpdateDaemonSet } +// DaemonSetUpdateStrategyType is a strategy according to which a daemon set +// gets updated. type DaemonSetUpdateStrategyType string const ( @@ -623,6 +636,7 @@ type DaemonSetStatus struct { Conditions []DaemonSetCondition } +// DaemonSetConditionType defines a daemon set condition. type DaemonSetConditionType string // TODO: Add valid condition types of a DaemonSet. @@ -647,12 +661,12 @@ type DaemonSetCondition struct { type DaemonSet struct { metav1.TypeMeta // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta // The desired behavior of this daemon set. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec DaemonSetSpec @@ -660,7 +674,7 @@ type DaemonSet struct { // out of date by some window of time. // Populated by the system. // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Status DaemonSetStatus } @@ -679,7 +693,7 @@ const ( type DaemonSetList struct { metav1.TypeMeta // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta @@ -768,6 +782,7 @@ type ReplicaSetStatus struct { Conditions []ReplicaSetCondition } +// ReplicaSetConditionType is a condition of a replica set. type ReplicaSetConditionType string // These are valid conditions of a replica set. diff --git a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go index 8a43436766..bd461a02fe 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/types.go @@ -27,15 +27,15 @@ import ( // Scale represents a scaling request for a resource. type Scale struct { metav1.TypeMeta - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec ScaleSpec - // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only. + // current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only. // +optional Status ScaleStatus } @@ -62,7 +62,7 @@ type ScaleStatus struct { // CrossVersionObjectReference contains enough information to let you identify the referred resource. type CrossVersionObjectReference struct { - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" Kind string // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names Name string @@ -394,12 +394,12 @@ type MetricValueStatus struct { type HorizontalPodAutoscaler struct { metav1.TypeMeta // Metadata is the standard object metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta // Spec is the specification for the behaviour of the autoscaler. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. // +optional Spec HorizontalPodAutoscalerSpec diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/types.go b/vendor/k8s.io/kubernetes/pkg/apis/core/types.go index b02c5749eb..562b632fdf 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/types.go @@ -1924,7 +1924,7 @@ type Probe struct { // +optional PeriodSeconds int32 // Minimum consecutive successes for the probe to be considered successful after having failed. - // Must be 1 for liveness. + // Must be 1 for liveness and startup. // +optional SuccessThreshold int32 // Minimum consecutive failures for the probe to be considered failed after having succeeded. @@ -2042,6 +2042,8 @@ type Container struct { // +optional ReadinessProbe *Probe // +optional + StartupProbe *Probe + // +optional Lifecycle *Lifecycle // Required. // +optional @@ -2090,7 +2092,7 @@ type Lifecycle struct { // +optional PostStart *Handler // PreStop is called immediately before a container is terminated due to an - // API request or management event such as liveness probe failure, + // API request or management event such as liveness/startup probe failure, // preemption, resource contention, etc. The handler is not called if the // container crashes or exits. The reason for termination is passed to the // handler. The Pod's termination grace period countdown begins before the @@ -2174,6 +2176,7 @@ type ContainerStatus struct { ImageID string // +optional ContainerID string + Started *bool } // PodPhase is a label for the condition of a pod at the current time. @@ -2591,12 +2594,10 @@ type PodSpec struct { InitContainers []Container // List of containers belonging to the pod. Containers []Container - // EphemeralContainers is the list of ephemeral containers that run in this pod. Ephemeral containers - // are added to an existing pod as a result of a user-initiated action such as troubleshooting. - // This list is read-only in the pod spec. It may not be specified in a create or modified in an - // update of a pod or pod template. - // To add an ephemeral container use the pod's ephemeralcontainers subresource, which allows update - // using the EphemeralContainers kind. + // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + // pod to perform user-initiated actions such as debugging. This list cannot be specified when + // creating a pod, and it cannot be modified by updating the pod spec. In order to add an + // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. // +optional EphemeralContainers []EphemeralContainer @@ -2882,6 +2883,10 @@ type PodIP struct { IP string } +// EphemeralContainerCommon is a copy of all fields in Container to be inlined in +// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer +// to Container and allows separate documentation for the fields of EphemeralContainer. +// When a new field is added to Container it must be added here as well. type EphemeralContainerCommon struct { // Required: This must be a DNS_LABEL. Each container in a pod must // have a unique name. @@ -2934,6 +2939,9 @@ type EphemeralContainerCommon struct { // Probes are not allowed for ephemeral containers. // +optional ReadinessProbe *Probe + // Probes are not allowed for ephemeral containers. + // +optional + StartupProbe *Probe // Lifecycle is not allowed for ephemeral containers. // +optional Lifecycle *Lifecycle @@ -2962,16 +2970,20 @@ type EphemeralContainerCommon struct { // these two types. var _ = Container(EphemeralContainerCommon{}) -// An EphemeralContainer is a special type of container which doesn't come with any resource -// or scheduling guarantees but can be added to a pod that has already been created. They are -// intended for user-initiated activities such as troubleshooting a running pod. -// Ephemeral containers will not be restarted when they exit, and they will be killed if the -// pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource +// An EphemeralContainer is a temporary container that may be added to an existing pod for +// user-initiated activities such as debugging. Ephemeral containers have no resource or +// scheduling guarantees, and they will not be restarted when they exit or when a pod is +// removed or restarted. If an ephemeral container causes a pod to exceed its resource // allocation, the pod may be evicted. -// Ephemeral containers are added via a pod's ephemeralcontainers subresource and will appear -// in the pod spec once added. +// Ephemeral containers may not be added by directly updating the pod spec. They must be added +// via the pod's ephemeralcontainers subresource, and they will appear in the pod spec +// once added. // This is an alpha feature enabled by the EphemeralContainers feature flag. type EphemeralContainer struct { + // Ephemeral containers have all of the fields of Container, plus additional fields + // specific to ephemeral containers. Fields in common with Container are in the + // following inlined struct so than an EphemeralContainer may easily be converted + // to a Container. EphemeralContainerCommon // If set, the name of the container from PodSpec that this ephemeral container targets. @@ -3030,7 +3042,7 @@ type PodStatus struct { // +optional ContainerStatuses []ContainerStatus - // Status for any ephemeral containers that running in this pod. + // Status for any ephemeral containers that have run in this pod. // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. // +optional EphemeralContainerStatuses []ContainerStatus @@ -3330,6 +3342,17 @@ type LoadBalancerIngress struct { Hostname string } +// IPFamily represents the IP Family (IPv4 or IPv6). This type is used +// to express the family of an IP expressed by a type (i.e. service.Spec.IPFamily) +type IPFamily string + +const ( + // IPv4Protocol indicates that this IP is IPv4 protocol + IPv4Protocol IPFamily = "IPv4" + // IPv6Protocol indicates that this IP is IPv6 protocol + IPv6Protocol IPFamily = "IPv6" +) + // ServiceSpec describes the attributes that a user creates on a service type ServiceSpec struct { // Type determines how the Service is exposed. Defaults to ClusterIP. Valid @@ -3430,6 +3453,16 @@ type ServiceSpec struct { // of peer discovery. // +optional PublishNotReadyAddresses bool + + // ipFamily specifies whether this Service has a preference for a particular IP family (e.g. IPv4 vs. + // IPv6). If a specific IP family is requested, the clusterIP field will be allocated from that family, if it is + // available in the cluster. If no IP family is requested, the cluster's primary IP family will be used. + // Other IP fields (loadBalancerIP, loadBalancerSourceRanges, externalIPs) and controllers which + // allocate external load-balancers should use the same IP family. Endpoints for this Service will be of + // this family. This field is immutable after creation. Assigning a ServiceIPFamily not available in the + // cluster (e.g. IPv6 in IPv4 only cluster) is an error condition and will fail during clusterIP assignment. + // +optional + IPFamily *IPFamily } type ServicePort struct { @@ -3985,6 +4018,8 @@ type NamespaceStatus struct { // Phase is the current lifecycle phase of the namespace. // +optional Phase NamespacePhase + // +optional + Conditions []NamespaceCondition } type NamespacePhase string @@ -3997,6 +4032,30 @@ const ( NamespaceTerminating NamespacePhase = "Terminating" ) +// NamespaceConditionType defines constants reporting on status during namespace lifetime and deletion progress +type NamespaceConditionType string + +// These are valid conditions of a namespace. +const ( + NamespaceDeletionDiscoveryFailure NamespaceConditionType = "NamespaceDeletionDiscoveryFailure" + NamespaceDeletionContentFailure NamespaceConditionType = "NamespaceDeletionContentFailure" + NamespaceDeletionGVParsingFailure NamespaceConditionType = "NamespaceDeletionGroupVersionParsingFailure" +) + +// NamespaceCondition contains details about state of namespace. +type NamespaceCondition struct { + // Type of namespace controller condition. + Type NamespaceConditionType + // Status of the condition, one of True, False, Unknown. + Status ConditionStatus + // +optional + LastTransitionTime metav1.Time + // +optional + Reason string + // +optional + Message string +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // A namespace provides a scope for Names. @@ -4042,13 +4101,15 @@ type Binding struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// A list of ephemeral containers used in API operations +// A list of ephemeral containers used with the Pod ephemeralcontainers subresource. type EphemeralContainers struct { metav1.TypeMeta // +optional metav1.ObjectMeta - // The new set of ephemeral containers to use for a pod. + // A list of ephemeral containers associated with this pod. New ephemeral containers + // may be appended to this list, but existing ephemeral containers may not be removed + // or modified. EphemeralContainers []EphemeralContainer } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD.bazel index c055a52d6c..e920d4d4de 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/BUILD.bazel @@ -23,9 +23,12 @@ go_library( "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", "//vendor/k8s.io/kubernetes/pkg/apis/apps:go_default_library", "//vendor/k8s.io/kubernetes/pkg/apis/core:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", "//vendor/k8s.io/kubernetes/pkg/util/parsers:go_default_library", + "//vendor/k8s.io/utils/net:go_default_library", "//vendor/k8s.io/utils/pointer:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go index 4f681a5a77..bc56c78307 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go @@ -24,6 +24,10 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/kubernetes/pkg/util/parsers" utilpointer "k8s.io/utils/pointer" + + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/kubernetes/pkg/features" + utilnet "k8s.io/utils/net" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -128,6 +132,33 @@ func SetDefaults_Service(obj *v1.Service) { obj.Spec.ExternalTrafficPolicy == "" { obj.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyTypeCluster } + + // if dualstack feature gate is on then we need to default + // Spec.IPFamily correctly. This is to cover the case + // when an existing cluster have been converted to dualstack + // i.e. it already contain services with Spec.IPFamily==nil + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && + obj.Spec.Type != v1.ServiceTypeExternalName && + obj.Spec.ClusterIP != "" && /*has an ip already set*/ + obj.Spec.ClusterIP != "None" && /* not converting from ExternalName to other */ + obj.Spec.IPFamily == nil /* family was not previously set */ { + + // there is a change that the ClusterIP (set by user) is unparsable. + // in this case, the family will be set mistakenly to ipv4 (because + // the util function does not parse errors *sigh*). The error + // will be caught in validation which asserts the validity of the + // IP and the service object will not be persisted with the wrong IP + // family + + ipv6 := v1.IPv6Protocol + ipv4 := v1.IPv4Protocol + if utilnet.IsIPv6String(obj.Spec.ClusterIP) { + obj.Spec.IPFamily = &ipv6 + } else { + obj.Spec.IPFamily = &ipv4 + } + } + } func SetDefaults_Pod(obj *v1.Pod) { // If limits are specified, but requests are not, default requests to limits @@ -141,7 +172,7 @@ func SetDefaults_Pod(obj *v1.Pod) { } for key, value := range obj.Spec.Containers[i].Resources.Limits { if _, exists := obj.Spec.Containers[i].Resources.Requests[key]; !exists { - obj.Spec.Containers[i].Resources.Requests[key] = *(value.Copy()) + obj.Spec.Containers[i].Resources.Requests[key] = value.DeepCopy() } } } @@ -153,7 +184,7 @@ func SetDefaults_Pod(obj *v1.Pod) { } for key, value := range obj.Spec.InitContainers[i].Resources.Limits { if _, exists := obj.Spec.InitContainers[i].Resources.Requests[key]; !exists { - obj.Spec.InitContainers[i].Resources.Requests[key] = *(value.Copy()) + obj.Spec.InitContainers[i].Resources.Requests[key] = value.DeepCopy() } } } @@ -315,7 +346,7 @@ func SetDefaults_NodeStatus(obj *v1.NodeStatus) { if obj.Allocatable == nil && obj.Capacity != nil { obj.Allocatable = make(v1.ResourceList, len(obj.Capacity)) for key, value := range obj.Capacity { - obj.Allocatable[key] = *(value.Copy()) + obj.Allocatable[key] = value.DeepCopy() } obj.Allocatable = obj.Capacity } @@ -339,19 +370,19 @@ func SetDefaults_LimitRangeItem(obj *v1.LimitRangeItem) { // If a default limit is unspecified, but the max is specified, default the limit to the max for key, value := range obj.Max { if _, exists := obj.Default[key]; !exists { - obj.Default[key] = *(value.Copy()) + obj.Default[key] = value.DeepCopy() } } // If a default limit is specified, but the default request is not, default request to limit for key, value := range obj.Default { if _, exists := obj.DefaultRequest[key]; !exists { - obj.DefaultRequest[key] = *(value.Copy()) + obj.DefaultRequest[key] = value.DeepCopy() } } // If a default request is not specified, but the min is provided, default request to the min for key, value := range obj.Min { if _, exists := obj.DefaultRequest[key]; !exists { - obj.DefaultRequest[key] = *(value.Copy()) + obj.DefaultRequest[key] = value.DeepCopy() } } } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go index 116f3457ad..8ad0b84c77 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go @@ -870,6 +870,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*v1.NamespaceCondition)(nil), (*core.NamespaceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_NamespaceCondition_To_core_NamespaceCondition(a.(*v1.NamespaceCondition), b.(*core.NamespaceCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*core.NamespaceCondition)(nil), (*v1.NamespaceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_core_NamespaceCondition_To_v1_NamespaceCondition(a.(*core.NamespaceCondition), b.(*v1.NamespaceCondition), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*v1.NamespaceList)(nil), (*core.NamespaceList)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_NamespaceList_To_core_NamespaceList(a.(*v1.NamespaceList), b.(*core.NamespaceList), scope) }); err != nil { @@ -2871,6 +2881,7 @@ func autoConvert_v1_Container_To_core_Container(in *v1.Container, out *core.Cont out.VolumeDevices = *(*[]core.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices)) out.LivenessProbe = (*core.Probe)(unsafe.Pointer(in.LivenessProbe)) out.ReadinessProbe = (*core.Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.StartupProbe = (*core.Probe)(unsafe.Pointer(in.StartupProbe)) out.Lifecycle = (*core.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath out.TerminationMessagePolicy = core.TerminationMessagePolicy(in.TerminationMessagePolicy) @@ -2903,6 +2914,7 @@ func autoConvert_core_Container_To_v1_Container(in *core.Container, out *v1.Cont out.VolumeDevices = *(*[]v1.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices)) out.LivenessProbe = (*v1.Probe)(unsafe.Pointer(in.LivenessProbe)) out.ReadinessProbe = (*v1.Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.StartupProbe = (*v1.Probe)(unsafe.Pointer(in.StartupProbe)) out.Lifecycle = (*v1.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath out.TerminationMessagePolicy = v1.TerminationMessagePolicy(in.TerminationMessagePolicy) @@ -3080,6 +3092,7 @@ func autoConvert_v1_ContainerStatus_To_core_ContainerStatus(in *v1.ContainerStat out.Image = in.Image out.ImageID = in.ImageID out.ContainerID = in.ContainerID + out.Started = (*bool)(unsafe.Pointer(in.Started)) return nil } @@ -3101,6 +3114,7 @@ func autoConvert_core_ContainerStatus_To_v1_ContainerStatus(in *core.ContainerSt out.Image = in.Image out.ImageID = in.ImageID out.ContainerID = in.ContainerID + out.Started = (*bool)(unsafe.Pointer(in.Started)) return nil } @@ -3453,6 +3467,7 @@ func autoConvert_v1_EphemeralContainerCommon_To_core_EphemeralContainerCommon(in out.VolumeDevices = *(*[]core.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices)) out.LivenessProbe = (*core.Probe)(unsafe.Pointer(in.LivenessProbe)) out.ReadinessProbe = (*core.Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.StartupProbe = (*core.Probe)(unsafe.Pointer(in.StartupProbe)) out.Lifecycle = (*core.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath out.TerminationMessagePolicy = core.TerminationMessagePolicy(in.TerminationMessagePolicy) @@ -3485,6 +3500,7 @@ func autoConvert_core_EphemeralContainerCommon_To_v1_EphemeralContainerCommon(in out.VolumeDevices = *(*[]v1.VolumeDevice)(unsafe.Pointer(&in.VolumeDevices)) out.LivenessProbe = (*v1.Probe)(unsafe.Pointer(in.LivenessProbe)) out.ReadinessProbe = (*v1.Probe)(unsafe.Pointer(in.ReadinessProbe)) + out.StartupProbe = (*v1.Probe)(unsafe.Pointer(in.StartupProbe)) out.Lifecycle = (*v1.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.TerminationMessagePath = in.TerminationMessagePath out.TerminationMessagePolicy = v1.TerminationMessagePolicy(in.TerminationMessagePolicy) @@ -4397,6 +4413,34 @@ func Convert_core_Namespace_To_v1_Namespace(in *core.Namespace, out *v1.Namespac return autoConvert_core_Namespace_To_v1_Namespace(in, out, s) } +func autoConvert_v1_NamespaceCondition_To_core_NamespaceCondition(in *v1.NamespaceCondition, out *core.NamespaceCondition, s conversion.Scope) error { + out.Type = core.NamespaceConditionType(in.Type) + out.Status = core.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_v1_NamespaceCondition_To_core_NamespaceCondition is an autogenerated conversion function. +func Convert_v1_NamespaceCondition_To_core_NamespaceCondition(in *v1.NamespaceCondition, out *core.NamespaceCondition, s conversion.Scope) error { + return autoConvert_v1_NamespaceCondition_To_core_NamespaceCondition(in, out, s) +} + +func autoConvert_core_NamespaceCondition_To_v1_NamespaceCondition(in *core.NamespaceCondition, out *v1.NamespaceCondition, s conversion.Scope) error { + out.Type = v1.NamespaceConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + out.LastTransitionTime = in.LastTransitionTime + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +// Convert_core_NamespaceCondition_To_v1_NamespaceCondition is an autogenerated conversion function. +func Convert_core_NamespaceCondition_To_v1_NamespaceCondition(in *core.NamespaceCondition, out *v1.NamespaceCondition, s conversion.Scope) error { + return autoConvert_core_NamespaceCondition_To_v1_NamespaceCondition(in, out, s) +} + func autoConvert_v1_NamespaceList_To_core_NamespaceList(in *v1.NamespaceList, out *core.NamespaceList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]core.Namespace)(unsafe.Pointer(&in.Items)) @@ -4441,6 +4485,7 @@ func Convert_core_NamespaceSpec_To_v1_NamespaceSpec(in *core.NamespaceSpec, out func autoConvert_v1_NamespaceStatus_To_core_NamespaceStatus(in *v1.NamespaceStatus, out *core.NamespaceStatus, s conversion.Scope) error { out.Phase = core.NamespacePhase(in.Phase) + out.Conditions = *(*[]core.NamespaceCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -4451,6 +4496,7 @@ func Convert_v1_NamespaceStatus_To_core_NamespaceStatus(in *v1.NamespaceStatus, func autoConvert_core_NamespaceStatus_To_v1_NamespaceStatus(in *core.NamespaceStatus, out *v1.NamespaceStatus, s conversion.Scope) error { out.Phase = v1.NamespacePhase(in.Phase) + out.Conditions = *(*[]v1.NamespaceCondition)(unsafe.Pointer(&in.Conditions)) return nil } @@ -7236,6 +7282,7 @@ func autoConvert_v1_ServiceSpec_To_core_ServiceSpec(in *v1.ServiceSpec, out *cor out.HealthCheckNodePort = in.HealthCheckNodePort out.PublishNotReadyAddresses = in.PublishNotReadyAddresses out.SessionAffinityConfig = (*core.SessionAffinityConfig)(unsafe.Pointer(in.SessionAffinityConfig)) + out.IPFamily = (*core.IPFamily)(unsafe.Pointer(in.IPFamily)) return nil } @@ -7258,6 +7305,7 @@ func autoConvert_core_ServiceSpec_To_v1_ServiceSpec(in *core.ServiceSpec, out *v out.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyType(in.ExternalTrafficPolicy) out.HealthCheckNodePort = in.HealthCheckNodePort out.PublishNotReadyAddresses = in.PublishNotReadyAddresses + out.IPFamily = (*v1.IPFamily)(unsafe.Pointer(in.IPFamily)) return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go index 6476c70b7d..05867995ab 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.defaults.go @@ -114,6 +114,12 @@ func SetObjectDefaults_EphemeralContainers(in *v1.EphemeralContainers) { SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet) } } + if a.EphemeralContainerCommon.StartupProbe != nil { + SetDefaults_Probe(a.EphemeralContainerCommon.StartupProbe) + if a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet) + } + } if a.EphemeralContainerCommon.Lifecycle != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart.HTTPGet != nil { @@ -296,6 +302,12 @@ func SetObjectDefaults_Pod(in *v1.Pod) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -338,6 +350,12 @@ func SetObjectDefaults_Pod(in *v1.Pod) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -379,6 +397,12 @@ func SetObjectDefaults_Pod(in *v1.Pod) { SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet) } } + if a.EphemeralContainerCommon.StartupProbe != nil { + SetDefaults_Probe(a.EphemeralContainerCommon.StartupProbe) + if a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet) + } + } if a.EphemeralContainerCommon.Lifecycle != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart.HTTPGet != nil { @@ -484,6 +508,12 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -526,6 +556,12 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -567,6 +603,12 @@ func SetObjectDefaults_PodTemplate(in *v1.PodTemplate) { SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet) } } + if a.EphemeralContainerCommon.StartupProbe != nil { + SetDefaults_Probe(a.EphemeralContainerCommon.StartupProbe) + if a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet) + } + } if a.EphemeralContainerCommon.Lifecycle != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart.HTTPGet != nil { @@ -674,6 +716,12 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -716,6 +764,12 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) { SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet) } } + if a.StartupProbe != nil { + SetDefaults_Probe(a.StartupProbe) + if a.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet) + } + } if a.Lifecycle != nil { if a.Lifecycle.PostStart != nil { if a.Lifecycle.PostStart.HTTPGet != nil { @@ -757,6 +811,12 @@ func SetObjectDefaults_ReplicationController(in *v1.ReplicationController) { SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet) } } + if a.EphemeralContainerCommon.StartupProbe != nil { + SetDefaults_Probe(a.EphemeralContainerCommon.StartupProbe) + if a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet != nil { + SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet) + } + } if a.EphemeralContainerCommon.Lifecycle != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart != nil { if a.EphemeralContainerCommon.Lifecycle.PostStart.HTTPGet != nil { diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go index 426cea4b3b..d841ea3223 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go @@ -904,8 +904,6 @@ func validateQuobyteVolumeSource(quobyte *core.QuobyteVolumeSource, fldPath *fie allErrs := field.ErrorList{} if len(quobyte.Registry) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("registry"), "must be a host:port pair or multiple pairs separated by commas")) - } else if len(quobyte.Tenant) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("tenant"), "must be a UUID provided by the configuration and may not be omitted ")) } else if len(quobyte.Tenant) >= 65 { allErrs = append(allErrs, field.Required(fldPath.Child("tenant"), "must be a UUID and may not exceed a length of 64 characters")) } else { @@ -2698,6 +2696,9 @@ func validateInitContainers(containers, otherContainers []core.Container, device if ctr.ReadinessProbe != nil { allErrs = append(allErrs, field.Invalid(idxPath.Child("readinessProbe"), ctr.ReadinessProbe, "must not be set for init containers")) } + if ctr.StartupProbe != nil { + allErrs = append(allErrs, field.Invalid(idxPath.Child("startupProbe"), ctr.StartupProbe, "must not be set for init containers")) + } } return allErrs } @@ -2740,6 +2741,11 @@ func validateContainers(containers []core.Container, isInitContainers bool, volu if ctr.LivenessProbe != nil && ctr.LivenessProbe.SuccessThreshold != 1 { allErrs = append(allErrs, field.Invalid(idxPath.Child("livenessProbe", "successThreshold"), ctr.LivenessProbe.SuccessThreshold, "must be 1")) } + allErrs = append(allErrs, validateProbe(ctr.StartupProbe, idxPath.Child("startupProbe"))...) + // Startup-specific validation + if ctr.StartupProbe != nil && ctr.StartupProbe.SuccessThreshold != 1 { + allErrs = append(allErrs, field.Invalid(idxPath.Child("startupProbe", "successThreshold"), ctr.StartupProbe.SuccessThreshold, "must be 1")) + } switch ctr.TerminationMessagePolicy { case core.TerminationMessageReadFile, core.TerminationMessageFallbackToLogsOnError: @@ -3895,6 +3901,7 @@ func ValidatePodTemplateUpdate(newPod, oldPod *core.PodTemplate) field.ErrorList var supportedSessionAffinityType = sets.NewString(string(core.ServiceAffinityClientIP), string(core.ServiceAffinityNone)) var supportedServiceType = sets.NewString(string(core.ServiceTypeClusterIP), string(core.ServiceTypeNodePort), string(core.ServiceTypeLoadBalancer), string(core.ServiceTypeExternalName)) +var supportedServiceIPFamily = sets.NewString(string(core.IPv4Protocol), string(core.IPv6Protocol)) // ValidateService tests if required fields/annotations of a Service are valid. func ValidateService(service *core.Service) field.ErrorList { @@ -4066,8 +4073,22 @@ func ValidateService(service *core.Service) field.ErrorList { } } - allErrs = append(allErrs, validateServiceExternalTrafficFieldsValue(service)...) + //if an ipfamily provided then it has to be one of the supported values + // note: + // - we don't validate service.Spec.IPFamily is supported by the cluster + // - we don't validate service.Spec.ClusterIP is within a range supported by the cluster + // both of these validations are done by the ipallocator + + // if the gate is on this field is required (and defaulted by REST if not provided by user) + if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) && service.Spec.IPFamily == nil { + allErrs = append(allErrs, field.Required(specPath.Child("ipFamily"), "")) + } + if service.Spec.IPFamily != nil && !supportedServiceIPFamily.Has(string(*service.Spec.IPFamily)) { + allErrs = append(allErrs, field.NotSupported(specPath.Child("ipFamily"), service.Spec.IPFamily, supportedServiceIPFamily.List())) + } + + allErrs = append(allErrs, validateServiceExternalTrafficFieldsValue(service)...) return allErrs } @@ -4156,12 +4177,19 @@ func ValidateServiceExternalTrafficFieldsCombination(service *core.Service) fiel func ValidateServiceUpdate(service, oldService *core.Service) field.ErrorList { allErrs := ValidateObjectMetaUpdate(&service.ObjectMeta, &oldService.ObjectMeta, field.NewPath("metadata")) - // ClusterIP should be immutable for services using it (every type other than ExternalName) + // ClusterIP and IPFamily should be immutable for services using it (every type other than ExternalName) // which do not have ClusterIP assigned yet (empty string value) if service.Spec.Type != core.ServiceTypeExternalName { if oldService.Spec.Type != core.ServiceTypeExternalName && oldService.Spec.ClusterIP != "" { allErrs = append(allErrs, ValidateImmutableField(service.Spec.ClusterIP, oldService.Spec.ClusterIP, field.NewPath("spec", "clusterIP"))...) } + // notes: + // we drop the IPFamily field when the Dualstack gate is off. + // once the gate is on, we start assigning default ipfamily according to cluster settings. in other words + // though the field is immutable, we allow (onetime) change from nil==> to value + if oldService.Spec.IPFamily != nil { + allErrs = append(allErrs, ValidateImmutableField(service.Spec.IPFamily, oldService.Spec.IPFamily, field.NewPath("spec", "ipFamily"))...) + } } allErrs = append(allErrs, ValidateService(service)...) @@ -5498,12 +5526,12 @@ func ValidateSecurityContext(sc *core.SecurityContext, fldPath *field.Path) fiel // is the max character length for the USER itself. Both the DOMAIN and USER have their // own restrictions, and more information about them can be found here: // https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and -// https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/new-localuser?view=powershell-5.1 +// https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/bb726984(v=technet.10) const ( maxGMSACredentialSpecLengthInKiB = 64 maxGMSACredentialSpecLength = maxGMSACredentialSpecLengthInKiB * 1024 maxRunAsUserNameDomainLength = 256 - maxRunAsUserNameUserLength = 21 + maxRunAsUserNameUserLength = 104 ) var ( @@ -5584,8 +5612,8 @@ func validateWindowsSecurityContextOptions(windowsOptions *core.WindowsSecurityC if l := len(user); l == 0 { errMsg := fmt.Sprintf("runAsUserName's User cannot be empty") allErrs = append(allErrs, field.Invalid(fieldPath.Child("runAsUserName"), windowsOptions.RunAsUserName, errMsg)) - } else if l >= maxRunAsUserNameUserLength { - errMsg := fmt.Sprintf("runAsUserName's User length must be under %d characters", maxRunAsUserNameUserLength) + } else if l > maxRunAsUserNameUserLength { + errMsg := fmt.Sprintf("runAsUserName's User length must not be longer than %d characters", maxRunAsUserNameUserLength) allErrs = append(allErrs, field.Invalid(fieldPath.Child("runAsUserName"), windowsOptions.RunAsUserName, errMsg)) } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go index c01599322f..f5954a13a8 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go @@ -773,6 +773,11 @@ func (in *Container) DeepCopyInto(out *Container) { *out = new(Probe) (*in).DeepCopyInto(*out) } + if in.StartupProbe != nil { + in, out := &in.StartupProbe, &out.StartupProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle *out = new(Lifecycle) @@ -920,6 +925,11 @@ func (in *ContainerStatus) DeepCopyInto(out *ContainerStatus) { *out = *in in.State.DeepCopyInto(&out.State) in.LastTerminationState.DeepCopyInto(&out.LastTerminationState) + if in.Started != nil { + in, out := &in.Started, &out.Started + *out = new(bool) + **out = **in + } return } @@ -1350,6 +1360,11 @@ func (in *EphemeralContainerCommon) DeepCopyInto(out *EphemeralContainerCommon) *out = new(Probe) (*in).DeepCopyInto(*out) } + if in.StartupProbe != nil { + in, out := &in.StartupProbe, &out.StartupProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle *out = new(Lifecycle) @@ -2191,7 +2206,7 @@ func (in *Namespace) DeepCopyInto(out *Namespace) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -2213,6 +2228,23 @@ func (in *Namespace) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceCondition) DeepCopyInto(out *NamespaceCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceCondition. +func (in *NamespaceCondition) DeepCopy() *NamespaceCondition { + if in == nil { + return nil + } + out := new(NamespaceCondition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamespaceList) DeepCopyInto(out *NamespaceList) { *out = *in @@ -2270,6 +2302,13 @@ func (in *NamespaceSpec) DeepCopy() *NamespaceSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamespaceStatus) DeepCopyInto(out *NamespaceStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]NamespaceCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -5127,6 +5166,11 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.IPFamily != nil { + in, out := &in.IPFamily, &out.IPFamily + *out = new(IPFamily) + **out = **in + } return } diff --git a/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go b/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go index 627e6a5191..23bfad5449 100644 --- a/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go +++ b/vendor/k8s.io/kubernetes/pkg/apis/scheduling/types.go @@ -47,7 +47,7 @@ const ( // integer value. The value can be any valid integer. type PriorityClass struct { metav1.TypeMeta - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta @@ -80,7 +80,7 @@ type PriorityClass struct { type PriorityClassList struct { metav1.TypeMeta // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta diff --git a/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/BUILD.bazel deleted file mode 100644 index 6049f593f7..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["prometheus.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus", - importpath = "k8s.io/kubernetes/pkg/client/metrics/prometheus", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/client-go/tools/metrics:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/BUILD.bazel index 7ff567495f..39d706b7a0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/controller/BUILD.bazel @@ -31,7 +31,6 @@ go_library( "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD.bazel index b1626a6be7..3c589fc6a7 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/BUILD.bazel @@ -20,6 +20,7 @@ go_library( "//vendor/k8s.io/kubernetes/pkg/controller/daemon/config:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/deployment/config:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/endpoint/config:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/config:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/job/config:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/namespace/config:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go index 1767111837..b9f1d0f8fc 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/types.go @@ -23,6 +23,7 @@ import ( daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config" deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config" endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config" + endpointsliceconfig "k8s.io/kubernetes/pkg/controller/endpointslice/config" garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config" jobconfig "k8s.io/kubernetes/pkg/controller/job/config" namespaceconfig "k8s.io/kubernetes/pkg/controller/namespace/config" @@ -74,6 +75,9 @@ type KubeControllerManagerConfiguration struct { // EndpointControllerConfiguration holds configuration for EndpointController // related features. EndpointController endpointconfig.EndpointControllerConfiguration + // EndpointSliceControllerConfiguration holds configuration for + // EndpointSliceController related features. + EndpointSliceController endpointsliceconfig.EndpointSliceControllerConfiguration // GarbageCollectorControllerConfiguration holds configuration for // GarbageCollectorController related features. GarbageCollectorController garbagecollectorconfig.GarbageCollectorControllerConfiguration diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD.bazel index d36872a29b..cc4c465400 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/BUILD.bazel @@ -26,6 +26,7 @@ go_library( "//vendor/k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/job/config/v1alpha1:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go index 12e47bfbec..207145a341 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/defaults.go @@ -27,6 +27,7 @@ import ( daemonconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1" deploymentconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1" endpointconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1" + endpointsliceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1" garbagecollectorconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1" jobconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/job/config/v1alpha1" namespaceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1" @@ -78,6 +79,8 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *kubectrlmgrconfigv1alph statefulsetconfigv1alpha1.RecommendedDefaultStatefulSetControllerConfiguration(&obj.StatefulSetController) // Use the default RecommendedDefaultEndpointControllerConfiguration options endpointconfigv1alpha1.RecommendedDefaultEndpointControllerConfiguration(&obj.EndpointController) + // Use the default RecommendedDefaultEndpointSliceControllerConfiguration options + endpointsliceconfigv1alpha1.RecommendedDefaultEndpointSliceControllerConfiguration(&obj.EndpointSliceController) // Use the default RecommendedDefaultGenericControllerManagerConfiguration options garbagecollectorconfigv1alpha1.RecommendedDefaultGarbageCollectorControllerConfiguration(&obj.GarbageCollectorController) // Use the default RecommendedDefaultJobControllerConfiguration options diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go index 5a1df70651..bacd8cda6c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/doc.go @@ -21,6 +21,7 @@ limitations under the License. // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1 +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/job/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go index 287411ce09..fc05548f67 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1/zz_generated.conversion.go @@ -33,6 +33,7 @@ import ( daemonconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1" deploymentconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1" endpointconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1" + endpointsliceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1" garbagecollectorconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1" jobconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/job/config/v1alpha1" namespaceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1" @@ -313,6 +314,9 @@ func autoConvert_v1alpha1_KubeControllerManagerConfiguration_To_config_KubeContr if err := endpointconfigv1alpha1.Convert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(&in.EndpointController, &out.EndpointController, s); err != nil { return err } + if err := endpointsliceconfigv1alpha1.Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(&in.EndpointSliceController, &out.EndpointSliceController, s); err != nil { + return err + } if err := garbagecollectorconfigv1alpha1.Convert_v1alpha1_GarbageCollectorControllerConfiguration_To_config_GarbageCollectorControllerConfiguration(&in.GarbageCollectorController, &out.GarbageCollectorController, s); err != nil { return err } @@ -391,6 +395,9 @@ func autoConvert_config_KubeControllerManagerConfiguration_To_v1alpha1_KubeContr if err := endpointconfigv1alpha1.Convert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(&in.EndpointController, &out.EndpointController, s); err != nil { return err } + if err := endpointsliceconfigv1alpha1.Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(&in.EndpointSliceController, &out.EndpointSliceController, s); err != nil { + return err + } if err := garbagecollectorconfigv1alpha1.Convert_config_GarbageCollectorControllerConfiguration_To_v1alpha1_GarbageCollectorControllerConfiguration(&in.GarbageCollectorController, &out.GarbageCollectorController, s); err != nil { return err } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go index 0be838b746..6d4565fc97 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/apis/config/zz_generated.deepcopy.go @@ -115,6 +115,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa out.StatefulSetController = in.StatefulSetController out.DeprecatedController = in.DeprecatedController out.EndpointController = in.EndpointController + out.EndpointSliceController = in.EndpointSliceController in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController) out.HPAController = in.HPAController out.JobController = in.JobController diff --git a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go index 6e69643978..025bf9d5ac 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go @@ -35,7 +35,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/util/rand" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/util/wait" @@ -1022,21 +1021,6 @@ func PatchNodeTaints(c clientset.Interface, nodeName string, oldNode *v1.Node, n return err } -// WaitForCacheSync is a wrapper around cache.WaitForCacheSync that generates log messages -// indicating that the controller identified by controllerName is waiting for syncs, followed by -// either a successful or failed sync. -func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool { - klog.Infof("Waiting for caches to sync for %s controller", controllerName) - - if !cache.WaitForCacheSync(stopCh, cacheSyncs...) { - utilruntime.HandleError(fmt.Errorf("unable to sync caches for %s controller", controllerName)) - return false - } - - klog.Infof("Caches are synced for %s controller", controllerName) - return true -} - // ComputeHash returns a hash value calculated from pod template and // a collisionCount to avoid hash collision. The hash will be safe encoded to // avoid bad words. diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/BUILD.bazel new file mode 100644 index 0000000000..4a10cc99f9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/BUILD.bazel @@ -0,0 +1,13 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "types.go", + "zz_generated.deepcopy.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config", + importpath = "k8s.io/kubernetes/pkg/controller/endpointslice/config", + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/doc.go new file mode 100644 index 0000000000..fa47f0db09 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package + +package config // import "k8s.io/kubernetes/pkg/controller/endpointslice/config" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/types.go new file mode 100644 index 0000000000..1dd1296f29 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/types.go @@ -0,0 +1,31 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +// EndpointSliceControllerConfiguration contains elements describing +// EndpointSliceController. +type EndpointSliceControllerConfiguration struct { + // concurrentServiceEndpointSyncs is the number of service endpoint syncing + // operations that will be done concurrently. Larger number = faster + // endpoint slice updating, but more CPU (and network) load. + ConcurrentServiceEndpointSyncs int32 + + // maxEndpointsPerSlice is the maximum number of endpoints that will be + // added to an EndpointSlice. More endpoints per slice will result in fewer + // and larger endpoint slices, but larger resources. + MaxEndpointsPerSlice int32 +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/BUILD.bazel new file mode 100644 index 0000000000..e359df00bb --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/BUILD.bazel @@ -0,0 +1,23 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "conversion.go", + "defaults.go", + "doc.go", + "register.go", + "zz_generated.conversion.go", + "zz_generated.deepcopy.go", + ], + importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1", + importpath = "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1", + visibility = ["//visibility:public"], + deps = [ + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library", + "//vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config:go_default_library", + ], +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/conversion.go new file mode 100644 index 0000000000..637f36640d --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/conversion.go @@ -0,0 +1,40 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/kube-controller-manager/config/v1alpha1" + endpointsliceconfig "k8s.io/kubernetes/pkg/controller/endpointslice/config" +) + +// Important! The public back-and-forth conversion functions for the types in +// this package with EndpointControllerConfiguration types need to be manually +// exposed like this in order for other packages that reference this package to +// be able to call these conversion functions in an autogenerated manner. +// TODO: Fix the bug in conversion-gen so it automatically discovers these +// Convert_* functions in autogenerated code as well. + +// Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration is an autogenerated conversion function. +func Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(in *v1alpha1.EndpointSliceControllerConfiguration, out *endpointsliceconfig.EndpointSliceControllerConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(in, out, s) +} + +// Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration is an autogenerated conversion function. +func Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(in *endpointsliceconfig.EndpointSliceControllerConfiguration, out *v1alpha1.EndpointSliceControllerConfiguration, s conversion.Scope) error { + return autoConvert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/defaults.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/defaults.go new file mode 100644 index 0000000000..fa6340656c --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/defaults.go @@ -0,0 +1,41 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" +) + +// RecommendedDefaultEndpointSliceControllerConfiguration defaults a pointer to +// a EndpointSliceControllerConfiguration struct. This will set the recommended +// default values, but they may be subject to change between API versions. This +// function is intentionally not registered in the scheme as a "normal" +// `SetDefaults_Foo` function to allow consumers of this type to set whatever +// defaults for their embedded configs. Forcing consumers to use these defaults +// would be problematic as defaulting in the scheme is done as part of the +// conversion, and there would be no easy way to opt-out. Instead, if you want +// to use this defaulting method run it in your wrapper struct of this type in +// its `SetDefaults_` method. +func RecommendedDefaultEndpointSliceControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.EndpointSliceControllerConfiguration) { + if obj.ConcurrentServiceEndpointSyncs == 0 { + obj.ConcurrentServiceEndpointSyncs = 5 + } + + if obj.MaxEndpointsPerSlice == 0 { + obj.MaxEndpointsPerSlice = 100 + } +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/doc.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/doc.go new file mode 100644 index 0000000000..2ef2a1fee4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpointslice/config +// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1 + +package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1" diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/register.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/register.go new file mode 100644 index 0000000000..360b9d41a8 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/register.go @@ -0,0 +1,34 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +var ( + // SchemeBuilder is the scheme builder with scheme init functions to run for + // this API package + SchemeBuilder runtime.SchemeBuilder + // localSchemeBuilder extends the SchemeBuilder instance with the external + // types. In this package, defaulting and conversion init funcs are + // registered as well. + localSchemeBuilder = &SchemeBuilder + // AddToScheme is a global function that registers this API group & version + // to a scheme + AddToScheme = localSchemeBuilder.AddToScheme +) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.conversion.go new file mode 100644 index 0000000000..f31f67faa9 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,103 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1" + config "k8s.io/kubernetes/pkg/controller/endpointslice/config" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1alpha1.EndpointSliceControllerConfiguration)(nil), (*config.EndpointSliceControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(a.(*v1alpha1.EndpointSliceControllerConfiguration), b.(*config.EndpointSliceControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.EndpointSliceControllerConfiguration)(nil), (*v1alpha1.EndpointSliceControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(a.(*config.EndpointSliceControllerConfiguration), b.(*v1alpha1.EndpointSliceControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*config.EndpointSliceControllerConfiguration)(nil), (*v1alpha1.EndpointSliceControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(a.(*config.EndpointSliceControllerConfiguration), b.(*v1alpha1.EndpointSliceControllerConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha1.EndpointSliceControllerConfiguration)(nil), (*config.EndpointSliceControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(a.(*v1alpha1.EndpointSliceControllerConfiguration), b.(*config.EndpointSliceControllerConfiguration), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_EndpointSliceControllerConfiguration_To_config_EndpointSliceControllerConfiguration(in *v1alpha1.EndpointSliceControllerConfiguration, out *config.EndpointSliceControllerConfiguration, s conversion.Scope) error { + out.ConcurrentServiceEndpointSyncs = in.ConcurrentServiceEndpointSyncs + out.MaxEndpointsPerSlice = in.MaxEndpointsPerSlice + return nil +} + +func autoConvert_config_EndpointSliceControllerConfiguration_To_v1alpha1_EndpointSliceControllerConfiguration(in *config.EndpointSliceControllerConfiguration, out *v1alpha1.EndpointSliceControllerConfiguration, s conversion.Scope) error { + out.ConcurrentServiceEndpointSyncs = in.ConcurrentServiceEndpointSyncs + out.MaxEndpointsPerSlice = in.MaxEndpointsPerSlice + return nil +} + +func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + return nil +} + +// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function. +func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error { + return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s) +} + +func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error { + out.Group = in.Group + out.Resource = in.Resource + return nil +} + +// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function. +func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error { + return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s) +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..0ec19467c4 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,21 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 diff --git a/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/zz_generated.deepcopy.go new file mode 100644 index 0000000000..4b3289de43 --- /dev/null +++ b/vendor/k8s.io/kubernetes/pkg/controller/endpointslice/config/zz_generated.deepcopy.go @@ -0,0 +1,37 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package config + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointSliceControllerConfiguration) DeepCopyInto(out *EndpointSliceControllerConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSliceControllerConfiguration. +func (in *EndpointSliceControllerConfiguration) DeepCopy() *EndpointSliceControllerConfiguration { + if in == nil { + return nil + } + out := new(EndpointSliceControllerConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/types.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/types.go index 2b6cb01cd6..6609440638 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/types.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/types.go @@ -20,6 +20,8 @@ package config type NodeIPAMControllerConfiguration struct { // serviceCIDR is CIDR Range for Services in cluster. ServiceCIDR string + // secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR + SecondaryServiceCIDR string // NodeCIDRMaskSize is the mask size for node cidr in cluster. NodeCIDRMaskSize int32 } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1/zz_generated.conversion.go index bda86db776..b738642d7c 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1/zz_generated.conversion.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1/zz_generated.conversion.go @@ -92,12 +92,14 @@ func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, ou func autoConvert_v1alpha1_NodeIPAMControllerConfiguration_To_config_NodeIPAMControllerConfiguration(in *v1alpha1.NodeIPAMControllerConfiguration, out *config.NodeIPAMControllerConfiguration, s conversion.Scope) error { out.ServiceCIDR = in.ServiceCIDR + out.SecondaryServiceCIDR = in.SecondaryServiceCIDR out.NodeCIDRMaskSize = in.NodeCIDRMaskSize return nil } func autoConvert_config_NodeIPAMControllerConfiguration_To_v1alpha1_NodeIPAMControllerConfiguration(in *config.NodeIPAMControllerConfiguration, out *v1alpha1.NodeIPAMControllerConfiguration, s conversion.Scope) error { out.ServiceCIDR = in.ServiceCIDR + out.SecondaryServiceCIDR = in.SecondaryServiceCIDR out.NodeCIDRMaskSize = in.NodeCIDRMaskSize return nil } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD.bazel index f41ac2402d..2c7d4412b0 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/controller/route/BUILD.bazel @@ -26,7 +26,6 @@ go_library( "//vendor/k8s.io/client-go/util/retry:go_default_library", "//vendor/k8s.io/cloud-provider:go_default_library", "//vendor/k8s.io/klog:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", "//vendor/k8s.io/kubernetes/pkg/controller/util/node:go_default_library", "//vendor/k8s.io/kubernetes/pkg/util/metrics:go_default_library", "//vendor/k8s.io/kubernetes/pkg/util/node:go_default_library", diff --git a/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go index c2032ef8e1..3f0dbe5b76 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/route/route_controller.go @@ -40,7 +40,6 @@ import ( "k8s.io/client-go/tools/record" clientretry "k8s.io/client-go/util/retry" cloudprovider "k8s.io/cloud-provider" - "k8s.io/kubernetes/pkg/controller" nodeutil "k8s.io/kubernetes/pkg/controller/util/node" "k8s.io/kubernetes/pkg/util/metrics" utilnode "k8s.io/kubernetes/pkg/util/node" @@ -102,7 +101,7 @@ func (rc *RouteController) Run(stopCh <-chan struct{}, syncPeriod time.Duration) klog.Info("Starting route controller") defer klog.Info("Shutting down route controller") - if !controller.WaitForCacheSync("route", stopCh, rc.nodeListerSynced) { + if !cache.WaitForNamedCacheSync("route", stopCh, rc.nodeListerSynced) { return } diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD.bazel index 7d3be8cbe7..4308cd96b9 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/controller/service/BUILD.bazel @@ -31,9 +31,6 @@ go_library( "//vendor/k8s.io/cloud-provider/service/helpers:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", "//vendor/k8s.io/kubernetes/pkg/util/metrics:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/slice:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/service/service_controller.go b/vendor/k8s.io/kubernetes/pkg/controller/service/service_controller.go index 8fd896bfcc..3e24e387d1 100644 --- a/vendor/k8s.io/kubernetes/pkg/controller/service/service_controller.go +++ b/vendor/k8s.io/kubernetes/pkg/controller/service/service_controller.go @@ -42,10 +42,7 @@ import ( servicehelper "k8s.io/cloud-provider/service/helpers" "k8s.io/klog" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/pkg/controller" - kubefeatures "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/util/metrics" - "k8s.io/kubernetes/pkg/util/slice" ) const ( @@ -60,13 +57,38 @@ const ( minRetryDelay = 5 * time.Second maxRetryDelay = 300 * time.Second - // LabelNodeRoleMaster specifies that a node is a master - // It's copied over to kubeadm until it's merged in core: https://github.com/kubernetes/kubernetes/pull/39112 - LabelNodeRoleMaster = "node-role.kubernetes.io/master" - - // LabelNodeRoleExcludeBalancer specifies that the node should be - // exclude from load balancers created by a cloud provider. - LabelNodeRoleExcludeBalancer = "alpha.service-controller.kubernetes.io/exclude-balancer" + // labelNodeRoleMaster specifies that a node is a master. The use of this label within the + // controller is deprecated and only considered when the LegacyNodeRoleBehavior feature gate + // is on. + labelNodeRoleMaster = "node-role.kubernetes.io/master" + + // labelNodeRoleExcludeBalancer specifies that the node should not be considered as a target + // for external load-balancers which use nodes as a second hop (e.g. many cloud LBs which only + // understand nodes). For services that use externalTrafficPolicy=Local, this may mean that + // any backends on excluded nodes are not reachable by those external load-balancers. + // Implementations of this exclusion may vary based on provider. This label is honored starting + // in 1.16 when the ServiceNodeExclusion gate is on. + labelNodeRoleExcludeBalancer = "node.kubernetes.io/exclude-from-external-load-balancers" + + // labelAlphaNodeRoleExcludeBalancer specifies that the node should be + // exclude from load balancers created by a cloud provider. This label is deprecated and will + // be removed in 1.17. + labelAlphaNodeRoleExcludeBalancer = "alpha.service-controller.kubernetes.io/exclude-balancer" + + // serviceNodeExclusionFeature is the feature gate name that + // enables nodes to exclude themselves from service load balancers + // originated from: https://github.com/kubernetes/kubernetes/blob/28e800245e/pkg/features/kube_features.go#L178 + serviceNodeExclusionFeature = "ServiceNodeExclusion" + + // serviceLoadBalancerFinalizerFeature is the feature gate name that + // enables Finalizer Protection for Service LoadBalancers. + // orginated from: https://github.com/kubernetes/kubernetes/blob/28e800245e/pkg/features/kube_features.go#L433 + serviceLoadBalancerFinalizerFeature = "ServiceLoadBalancerFinalizer" + + // legacyNodeRoleBehaviro is the feature gate name that enables legacy + // behavior to vary cluster functionality on the node-role.kubernetes.io + // labels. + legacyNodeRoleBehaviorFeature = "LegacyNodeRoleBehavior" ) type cachedService struct { @@ -150,7 +172,7 @@ func New( } }, DeleteFunc: func(old interface{}) { - if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.ServiceLoadBalancerFinalizer) { + if utilfeature.DefaultFeatureGate.Enabled(serviceLoadBalancerFinalizerFeature) { // No need to handle deletion event if finalizer feature gate is // enabled. Because the deletion would be handled by the update // path when the deletion timestamp is added. @@ -172,7 +194,7 @@ func New( // obj could be an *v1.Service, or a DeletionFinalStateUnknown marker item. func (s *ServiceController) enqueueService(obj interface{}) { - key, err := controller.KeyFunc(obj) + key, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) if err != nil { runtime.HandleError(fmt.Errorf("couldn't get key for object %#v: %v", obj, err)) return @@ -197,7 +219,7 @@ func (s *ServiceController) Run(stopCh <-chan struct{}, workers int) { klog.Info("Starting service controller") defer klog.Info("Shutting down service controller") - if !controller.WaitForCacheSync("service", stopCh, s.serviceListerSynced, s.nodeListerSynced) { + if !cache.WaitForNamedCacheSync("service", stopCh, s.serviceListerSynced, s.nodeListerSynced) { return } @@ -327,7 +349,7 @@ func (s *ServiceController) syncLoadBalancerIfNeeded(service *v1.Service, key st op = ensureLoadBalancer klog.V(2).Infof("Ensuring load balancer for service %s", key) s.eventRecorder.Event(service, v1.EventTypeNormal, "EnsuringLoadBalancer", "Ensuring load balancer") - if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.ServiceLoadBalancerFinalizer) { + if utilfeature.DefaultFeatureGate.Enabled(serviceLoadBalancerFinalizerFeature) { // Always try to add finalizer prior to load balancer creation. // It will be a no-op if finalizer already exists. // Note this also retrospectively puts on finalizer if the cluster @@ -617,14 +639,19 @@ func getNodeConditionPredicate() corelisters.NodeConditionPredicate { return false } - // As of 1.6, we will taint the master, but not necessarily mark it unschedulable. - // Recognize nodes labeled as master, and filter them also, as we were doing previously. - if _, hasMasterRoleLabel := node.Labels[LabelNodeRoleMaster]; hasMasterRoleLabel { - return false + if utilfeature.DefaultFeatureGate.Enabled(legacyNodeRoleBehaviorFeature) { + // As of 1.6, we will taint the master, but not necessarily mark it unschedulable. + // Recognize nodes labeled as master, and filter them also, as we were doing previously. + if _, hasMasterRoleLabel := node.Labels[labelNodeRoleMaster]; hasMasterRoleLabel { + return false + } } - - if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.ServiceNodeExclusion) { - if _, hasExcludeBalancerLabel := node.Labels[LabelNodeRoleExcludeBalancer]; hasExcludeBalancerLabel { + if utilfeature.DefaultFeatureGate.Enabled(serviceNodeExclusionFeature) { + // Will be removed in 1.17 + if _, hasExcludeBalancerLabel := node.Labels[labelAlphaNodeRoleExcludeBalancer]; hasExcludeBalancerLabel { + return false + } + if _, hasExcludeBalancerLabel := node.Labels[labelNodeRoleExcludeBalancer]; hasExcludeBalancerLabel { return false } } @@ -818,13 +845,25 @@ func (s *ServiceController) removeFinalizer(service *v1.Service) error { // Make a copy so we don't mutate the shared informer cache. updated := service.DeepCopy() - updated.ObjectMeta.Finalizers = slice.RemoveString(updated.ObjectMeta.Finalizers, servicehelper.LoadBalancerCleanupFinalizer, nil) + updated.ObjectMeta.Finalizers = removeString(updated.ObjectMeta.Finalizers, servicehelper.LoadBalancerCleanupFinalizer) klog.V(2).Infof("Removing finalizer from service %s/%s", updated.Namespace, updated.Name) _, err := patch(s.kubeClient.CoreV1(), service, updated) return err } +// removeString returns a newly created []string that contains all items from slice that +// are not equal to s. +func removeString(slice []string, s string) []string { + var newSlice []string + for _, item := range slice { + if item != s { + newSlice = append(newSlice, item) + } + } + return newSlice +} + // patchStatus patches the service with the given LoadBalancerStatus. func (s *ServiceController) patchStatus(service *v1.Service, previousStatus, newStatus *v1.LoadBalancerStatus) error { if v1helper.LoadBalancerStatusEqual(previousStatus, newStatus) { diff --git a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go index 25eb7fedb8..a4dfbdd879 100644 --- a/vendor/k8s.io/kubernetes/pkg/features/kube_features.go +++ b/vendor/k8s.io/kubernetes/pkg/features/kube_features.go @@ -109,6 +109,7 @@ const ( // owner: @gnufied // alpha: v1.14 + // beta: v1.16 // Ability to expand CSI volumes ExpandCSIVolumes featuregate.Feature = "ExpandCSIVolumes" @@ -171,12 +172,24 @@ const ( // Enable pods to set sysctls on a pod Sysctls featuregate.Feature = "Sysctls" + // owner @smarterclayton + // alpha: v1.16 + // + // Enable legacy behavior to vary cluster functionality on the node-role.kubernetes.io labels. On by default (legacy), will be turned off in 1.18. + LegacyNodeRoleBehavior featuregate.Feature = "LegacyNodeRoleBehavior" + // owner @brendandburns // alpha: v1.9 // // Enable nodes to exclude themselves from service load balancers ServiceNodeExclusion featuregate.Feature = "ServiceNodeExclusion" + // owner @smarterclayton + // alpha: v1.16 + // + // Enable nodes to exclude themselves from network disruption checks + NodeDisruptionExclusion featuregate.Feature = "NodeDisruptionExclusion" + // owner: @jsafrane // alpha: v1.9 // @@ -316,6 +329,7 @@ const ( // owner: @vladimirvivien // alpha: v1.14 + // beta: v1.16 // // Enables CSI Inline volumes support for pods CSIInlineVolume featuregate.Feature = "CSIInlineVolume" @@ -404,6 +418,7 @@ const ( // owner: @wk8 // alpha: v1.14 + // beta: v1.16 // // Enables GMSA support for Windows workloads. WindowsGMSA featuregate.Feature = "WindowsGMSA" @@ -427,7 +442,7 @@ const ( deprecatedGCERegionalPersistentDisk featuregate.Feature = "GCERegionalPersistentDisk" // owner: @MrHohn - // alpha: v1.15 + // beta: v1.16 // // Enables Finalizer Protection for Service LoadBalancers. ServiceLoadBalancerFinalizer featuregate.Feature = "ServiceLoadBalancerFinalizer" @@ -447,6 +462,7 @@ const ( // owner: @j-griffith // alpha: v1.15 + // beta: v1.16 // // Enable support for specifying an existing PVC as a DataSource VolumePVCDataSource featuregate.Feature = "VolumePVCDataSource" @@ -463,11 +479,30 @@ const ( // Enables ipv6 dual stack IPv6DualStack featuregate.Feature = "IPv6DualStack" + // owner: @robscott @freehan + // alpha: v1.16 + // + // Enable Endpoint Slices for more scalable Service endpoints. + EndpointSlice featuregate.Feature = "EndpointSlice" + // owner: @Huang-Wei // alpha: v1.16 // // Schedule pods evenly across available topology domains. EvenPodsSpread featuregate.Feature = "EvenPodsSpread" + + // owner: @matthyx + // alpha: v1.16 + // + // Enables the startupProbe in kubelet worker. + StartupProbe featuregate.Feature = "StartupProbe" + + // owner @deads2k + // deprecated: v1.16 + // + // Enable the aggregated discovery timeout to ensure client responsiveness. Note this feature is present + // only for backward compatibility, it will be removed in the 1.17 release. + EnableAggregatedDiscoveryTimeout featuregate.Feature = "EnableAggregatedDiscoveryTimeout" ) func init() { @@ -495,12 +530,13 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS QOSReserved: {Default: false, PreRelease: featuregate.Alpha}, ExpandPersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, ExpandInUsePersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, - ExpandCSIVolumes: {Default: false, PreRelease: featuregate.Alpha}, + ExpandCSIVolumes: {Default: true, PreRelease: featuregate.Beta}, AttachVolumeLimit: {Default: true, PreRelease: featuregate.Beta}, CPUManager: {Default: true, PreRelease: featuregate.Beta}, CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha}, TopologyManager: {Default: false, PreRelease: featuregate.Alpha}, ServiceNodeExclusion: {Default: false, PreRelease: featuregate.Alpha}, + NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha}, MountContainers: {Default: false, PreRelease: featuregate.Alpha}, CSIDriverRegistry: {Default: true, PreRelease: featuregate.Beta}, CSINodeInfo: {Default: true, PreRelease: featuregate.Beta}, @@ -529,7 +565,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS VolumeSubpathEnvExpansion: {Default: true, PreRelease: featuregate.Beta}, ResourceQuotaScopeSelectors: {Default: true, PreRelease: featuregate.Beta}, CSIBlockVolume: {Default: true, PreRelease: featuregate.Beta}, - CSIInlineVolume: {Default: false, PreRelease: featuregate.Alpha}, + CSIInlineVolume: {Default: true, PreRelease: featuregate.Beta}, RuntimeClass: {Default: true, PreRelease: featuregate.Beta}, NodeLease: {Default: true, PreRelease: featuregate.Beta}, SCTPSupport: {Default: false, PreRelease: featuregate.Alpha}, @@ -537,15 +573,17 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS ProcMountType: {Default: false, PreRelease: featuregate.Alpha}, TTLAfterFinished: {Default: false, PreRelease: featuregate.Alpha}, KubeletPodResources: {Default: true, PreRelease: featuregate.Beta}, - WindowsGMSA: {Default: false, PreRelease: featuregate.Alpha}, + WindowsGMSA: {Default: true, PreRelease: featuregate.Beta}, WindowsRunAsUserName: {Default: false, PreRelease: featuregate.Alpha}, - ServiceLoadBalancerFinalizer: {Default: false, PreRelease: featuregate.Alpha}, + ServiceLoadBalancerFinalizer: {Default: true, PreRelease: featuregate.Beta}, LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha}, NonPreemptingPriority: {Default: false, PreRelease: featuregate.Alpha}, - VolumePVCDataSource: {Default: false, PreRelease: featuregate.Alpha}, + VolumePVCDataSource: {Default: true, PreRelease: featuregate.Beta}, PodOverhead: {Default: false, PreRelease: featuregate.Alpha}, IPv6DualStack: {Default: false, PreRelease: featuregate.Alpha}, + EndpointSlice: {Default: false, PreRelease: featuregate.Alpha}, EvenPodsSpread: {Default: false, PreRelease: featuregate.Alpha}, + StartupProbe: {Default: false, PreRelease: featuregate.Alpha}, // inherited features from generic apiserver, relisted here to get a conflict if it is changed // unintentionally on either side: @@ -556,18 +594,21 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIListChunking: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.DryRun: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.ServerSideApply: {Default: false, PreRelease: featuregate.Alpha}, + genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.RequestManagement: {Default: false, PreRelease: featuregate.Alpha}, // inherited features from apiextensions-apiserver, relisted here to get a conflict if it is changed // unintentionally on either side: - apiextensionsfeatures.CustomResourceValidation: {Default: true, PreRelease: featuregate.Beta}, - apiextensionsfeatures.CustomResourceSubresources: {Default: true, PreRelease: featuregate.Beta}, - apiextensionsfeatures.CustomResourceWebhookConversion: {Default: true, PreRelease: featuregate.Beta}, - apiextensionsfeatures.CustomResourcePublishOpenAPI: {Default: true, PreRelease: featuregate.Beta}, - apiextensionsfeatures.CustomResourceDefaulting: {Default: false, PreRelease: featuregate.Alpha}, + apiextensionsfeatures.CustomResourceValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + apiextensionsfeatures.CustomResourceSubresources: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + apiextensionsfeatures.CustomResourceWebhookConversion: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + apiextensionsfeatures.CustomResourcePublishOpenAPI: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + apiextensionsfeatures.CustomResourceDefaulting: {Default: true, PreRelease: featuregate.Beta}, + + EnableAggregatedDiscoveryTimeout: {Default: true, PreRelease: featuregate.Deprecated}, // features that enable backwards compatibility but are scheduled to be removed // ... - HPAScaleToZero: {Default: false, PreRelease: featuregate.Alpha}, + HPAScaleToZero: {Default: false, PreRelease: featuregate.Alpha}, + LegacyNodeRoleBehavior: {Default: true, PreRelease: featuregate.Alpha}, } diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go index 95c81f0a51..9c3d676cd0 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/types/pod_update.go @@ -88,9 +88,8 @@ func GetValidatedSources(sources []string) ([]string, error) { return []string{FileSource, HTTPSource, ApiserverSource}, nil case FileSource, HTTPSource, ApiserverSource: validated = append(validated, source) - break case "": - break + // Skip default: return []string{}, fmt.Errorf("unknown pod source %q", source) } @@ -165,10 +164,7 @@ func Preemptable(preemptor, preemptee *v1.Pod) bool { // IsCriticalPodBasedOnPriority checks if the given pod is a critical pod based on priority resolved from pod Spec. func IsCriticalPodBasedOnPriority(priority int32) bool { - if priority >= scheduling.SystemCriticalPriority { - return true - } - return false + return priority >= scheduling.SystemCriticalPriority } // IsStaticPod returns true if the pod is a static pod. diff --git a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go index 070fd099bd..6fc278b164 100644 --- a/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go +++ b/vendor/k8s.io/kubernetes/pkg/kubelet/util/format/pod.go @@ -68,5 +68,5 @@ func aggregatePods(pods []*v1.Pod, handler podHandler) string { for _, pod := range pods { podStrings = append(podStrings, handler(pod)) } - return fmt.Sprintf(strings.Join(podStrings, ", ")) + return strings.Join(podStrings, ", ") } diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/api/types.go b/vendor/k8s.io/kubernetes/pkg/scheduler/api/types.go index 5e958aadf0..eb76ea3983 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/api/types.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/api/types.go @@ -19,7 +19,7 @@ package api import ( "time" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ) @@ -147,10 +147,11 @@ type LabelPreference struct { Presence bool } -// RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function +// RequestedToCapacityRatioArguments holds arguments specific to RequestedToCapacityRatio priority function. type RequestedToCapacityRatioArguments struct { // Array of point defining priority function shape UtilizationShape []UtilizationShapePoint + Resources []ResourceSpec } // UtilizationShapePoint represents single point of priority function shape @@ -161,6 +162,14 @@ type UtilizationShapePoint struct { Score int } +// ResourceSpec represents single resource for bin packing of priority RequestedToCapacityRatioArguments. +type ResourceSpec struct { + // Name of the resource to be managed by RequestedToCapacityRatio function. + Name v1.ResourceName + // Weight of the resource. + Weight int +} + // ExtenderManagedResource describes the arguments of extended resources // managed by an extender. type ExtenderManagedResource struct { diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/api/zz_generated.deepcopy.go b/vendor/k8s.io/kubernetes/pkg/scheduler/api/zz_generated.deepcopy.go index 30c1013515..c8a8c6fe20 100644 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/api/zz_generated.deepcopy.go +++ b/vendor/k8s.io/kubernetes/pkg/scheduler/api/zz_generated.deepcopy.go @@ -575,6 +575,11 @@ func (in *RequestedToCapacityRatioArguments) DeepCopyInto(out *RequestedToCapaci *out = make([]UtilizationShapePoint, len(*in)) copy(*out, *in) } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]ResourceSpec, len(*in)) + copy(*out, *in) + } return } @@ -588,6 +593,22 @@ func (in *RequestedToCapacityRatioArguments) DeepCopy() *RequestedToCapacityRati return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec. +func (in *ResourceSpec) DeepCopy() *ResourceSpec { + if in == nil { + return nil + } + out := new(ResourceSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceAffinity) DeepCopyInto(out *ServiceAffinity) { *out = *in diff --git a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go index 233fdee2d6..ba03a22233 100644 --- a/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go +++ b/vendor/k8s.io/kubernetes/pkg/serviceaccount/jwt.go @@ -18,9 +18,11 @@ package serviceaccount import ( "context" + "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rsa" + "crypto/x509" "encoding/base64" "encoding/json" "fmt" @@ -29,7 +31,7 @@ import ( jose "gopkg.in/square/go-jose.v2" "gopkg.in/square/go-jose.v2/jwt" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apiserver/pkg/authentication/authenticator" ) @@ -53,43 +55,148 @@ type TokenGenerator interface { // JWTTokenGenerator returns a TokenGenerator that generates signed JWT tokens, using the given privateKey. // privateKey is a PEM-encoded byte array of a private RSA key. -// JWTTokenAuthenticator() func JWTTokenGenerator(iss string, privateKey interface{}) (TokenGenerator, error) { - var alg jose.SignatureAlgorithm + var signer jose.Signer + var err error switch pk := privateKey.(type) { case *rsa.PrivateKey: - alg = jose.RS256 + signer, err = signerFromRSAPrivateKey(pk) + if err != nil { + return nil, fmt.Errorf("could not generate signer for RSA keypair: %v", err) + } case *ecdsa.PrivateKey: - switch pk.Curve { - case elliptic.P256(): - alg = jose.ES256 - case elliptic.P384(): - alg = jose.ES384 - case elliptic.P521(): - alg = jose.ES512 - default: - return nil, fmt.Errorf("unknown private key curve, must be 256, 384, or 521") + signer, err = signerFromECDSAPrivateKey(pk) + if err != nil { + return nil, fmt.Errorf("could not generate signer for ECDSA keypair: %v", err) } case jose.OpaqueSigner: - alg = jose.SignatureAlgorithm(pk.Public().Algorithm) + signer, err = signerFromOpaqueSigner(pk) + if err != nil { + return nil, fmt.Errorf("could not generate signer for OpaqueSigner: %v", err) + } default: return nil, fmt.Errorf("unknown private key type %T, must be *rsa.PrivateKey, *ecdsa.PrivateKey, or jose.OpaqueSigner", privateKey) } + return &jwtTokenGenerator{ + iss: iss, + signer: signer, + }, nil +} + +// keyIDFromPublicKey derives a key ID non-reversibly from a public key. +// +// The Key ID is field on a given on JWTs and JWKs that help relying parties +// pick the correct key for verification when the identity party advertises +// multiple keys. +// +// Making the derivation non-reversible makes it impossible for someone to +// accidentally obtain the real key from the key ID and use it for token +// validation. +func keyIDFromPublicKey(publicKey interface{}) (string, error) { + publicKeyDERBytes, err := x509.MarshalPKIXPublicKey(publicKey) + if err != nil { + return "", fmt.Errorf("failed to serialize public key to DER format: %v", err) + } + + hasher := crypto.SHA256.New() + hasher.Write(publicKeyDERBytes) + publicKeyDERHash := hasher.Sum(nil) + + keyID := base64.RawURLEncoding.EncodeToString(publicKeyDERHash) + + return keyID, nil +} + +func signerFromRSAPrivateKey(keyPair *rsa.PrivateKey) (jose.Signer, error) { + keyID, err := keyIDFromPublicKey(&keyPair.PublicKey) + if err != nil { + return nil, fmt.Errorf("failed to derive keyID: %v", err) + } + + // Wrap the RSA keypair in a JOSE JWK with the designated key ID. + privateJWK := &jose.JSONWebKey{ + Algorithm: string(jose.RS256), + Key: keyPair, + KeyID: keyID, + Use: "sig", + } + + signer, err := jose.NewSigner( + jose.SigningKey{ + Algorithm: jose.RS256, + Key: privateJWK, + }, + nil, + ) + + if err != nil { + return nil, fmt.Errorf("failed to create signer: %v", err) + } + + return signer, nil +} + +func signerFromECDSAPrivateKey(keyPair *ecdsa.PrivateKey) (jose.Signer, error) { + var alg jose.SignatureAlgorithm + switch keyPair.Curve { + case elliptic.P256(): + alg = jose.ES256 + case elliptic.P384(): + alg = jose.ES384 + case elliptic.P521(): + alg = jose.ES512 + default: + return nil, fmt.Errorf("unknown private key curve, must be 256, 384, or 521") + } + + keyID, err := keyIDFromPublicKey(&keyPair.PublicKey) + if err != nil { + return nil, fmt.Errorf("failed to derive keyID: %v", err) + } + + // Wrap the ECDSA keypair in a JOSE JWK with the designated key ID. + privateJWK := &jose.JSONWebKey{ + Algorithm: string(alg), + Key: keyPair, + KeyID: keyID, + Use: "sig", + } + signer, err := jose.NewSigner( jose.SigningKey{ Algorithm: alg, - Key: privateKey, + Key: privateJWK, }, nil, ) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to create signer: %v", err) } - return &jwtTokenGenerator{ - iss: iss, - signer: signer, - }, nil + + return signer, nil +} + +func signerFromOpaqueSigner(opaqueSigner jose.OpaqueSigner) (jose.Signer, error) { + alg := jose.SignatureAlgorithm(opaqueSigner.Public().Algorithm) + + signer, err := jose.NewSigner( + jose.SigningKey{ + Algorithm: alg, + Key: &jose.JSONWebKey{ + Algorithm: string(alg), + Key: opaqueSigner, + KeyID: opaqueSigner.Public().KeyID, + Use: "sig", + }, + }, + nil, + ) + if err != nil { + return nil, fmt.Errorf("failed to create signer: %v", err) + } + + return signer, nil } type jwtTokenGenerator struct { @@ -155,6 +262,7 @@ func (j *jwtTokenAuthenticator) AuthenticateToken(ctx context.Context, tokenData public := &jwt.Claims{} private := j.validator.NewPrivateClaims() + // TODO: Pick the key that has the same key ID as `tok`, if one exists. var ( found bool errlist []error diff --git a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel index c2a29d4236..7cbc0d4ace 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel +++ b/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel @@ -7,7 +7,8 @@ go_library( importpath = "k8s.io/kubernetes/pkg/util/metrics", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", ], ) diff --git a/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go b/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go index f1bb7773ef..74d762faff 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go +++ b/vendor/k8s.io/kubernetes/pkg/util/metrics/util.go @@ -21,8 +21,8 @@ import ( "sync" "k8s.io/client-go/util/flowcontrol" - - "github.com/prometheus/client_golang/prometheus" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) var ( @@ -31,7 +31,7 @@ var ( ) type rateLimiterMetric struct { - metric prometheus.Gauge + metric metrics.GaugeMetric stopCh chan struct{} } @@ -43,12 +43,13 @@ func registerRateLimiterMetric(ownerName string) error { // only register once in Prometheus. We happen to see an ownerName reused in parallel integration tests. return nil } - metric := prometheus.NewGauge(prometheus.GaugeOpts{ - Name: "rate_limiter_use", - Subsystem: ownerName, - Help: fmt.Sprintf("A metric measuring the saturation of the rate limiter for %v", ownerName), + metric := metrics.NewGauge(&metrics.GaugeOpts{ + Name: "rate_limiter_use", + Subsystem: ownerName, + Help: fmt.Sprintf("A metric measuring the saturation of the rate limiter for %v", ownerName), + StabilityLevel: metrics.ALPHA, }) - if err := prometheus.Register(metric); err != nil { + if err := legacyregistry.Register(metric); err != nil { return fmt.Errorf("error registering rate limiter usage metric: %v", err) } stopCh := make(chan struct{}) diff --git a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/BUILD.bazel deleted file mode 100644 index d0d794327f..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["adapters.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo", - importpath = "k8s.io/kubernetes/pkg/util/prometheusclientgo", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/kubernetes/pkg/client/metrics/prometheus:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/BUILD.bazel deleted file mode 100644 index e30978b540..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["adapter.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection", - importpath = "k8s.io/kubernetes/pkg/util/prometheusclientgo/leaderelection", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/slice/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/slice/BUILD.bazel deleted file mode 100644 index ba64c990a4..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/slice/BUILD.bazel +++ /dev/null @@ -1,10 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["slice.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/util/slice", - importpath = "k8s.io/kubernetes/pkg/util/slice", - visibility = ["//visibility:public"], - deps = ["//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go b/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go deleted file mode 100644 index b9809cc297..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package slice provides utility methods for common operations on slices. -package slice - -import ( - "sort" - - utilrand "k8s.io/apimachinery/pkg/util/rand" -) - -// CopyStrings copies the contents of the specified string slice -// into a new slice. -func CopyStrings(s []string) []string { - if s == nil { - return nil - } - c := make([]string, len(s)) - copy(c, s) - return c -} - -// SortStrings sorts the specified string slice in place. It returns the same -// slice that was provided in order to facilitate method chaining. -func SortStrings(s []string) []string { - sort.Strings(s) - return s -} - -// ShuffleStrings copies strings from the specified slice into a copy in random -// order. It returns a new slice. -func ShuffleStrings(s []string) []string { - if s == nil { - return nil - } - shuffled := make([]string, len(s)) - perm := utilrand.Perm(len(s)) - for i, j := range perm { - shuffled[j] = s[i] - } - return shuffled -} - -// ContainsString checks if a given slice of strings contains the provided string. -// If a modifier func is provided, it is called with the slice item before the comparation. -func ContainsString(slice []string, s string, modifier func(s string) string) bool { - for _, item := range slice { - if item == s { - return true - } - if modifier != nil && modifier(item) == s { - return true - } - } - return false -} - -// RemoveString returns a newly created []string that contains all items from slice that -// are not equal to s and modifier(s) in case modifier func is provided. -func RemoveString(slice []string, s string, modifier func(s string) string) []string { - newSlice := make([]string, 0) - for _, item := range slice { - if item == s { - continue - } - if modifier != nil && modifier(item) == s { - continue - } - newSlice = append(newSlice, item) - } - if len(newSlice) == 0 { - // Sanitize for unit tests so we don't need to distinguish empty array - // and nil. - newSlice = nil - } - return newSlice -} diff --git a/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/BUILD.bazel deleted file mode 100644 index fba5643ea7..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["prometheus.go"], - importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/kubernetes/pkg/util/workqueue/prometheus", - importpath = "k8s.io/kubernetes/pkg/util/workqueue/prometheus", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - ], -) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/BUILD.bazel b/vendor/k8s.io/legacy-cloud-providers/azure/BUILD.bazel index a04bd17717..270879c4f2 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/BUILD.bazel +++ b/vendor/k8s.io/legacy-cloud-providers/azure/BUILD.bazel @@ -28,20 +28,20 @@ go_library( "azure_vmss_cache.go", "azure_wrap.go", "azure_zones.go", + "doc.go", ], importmap = "k8s.io/cloud-provider-azure/vendor/k8s.io/legacy-cloud-providers/azure", importpath = "k8s.io/legacy-cloud-providers/azure", visibility = ["//visibility:public"], deps = [ - "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network:go_default_library", - "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network:go_default_library", + "//vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage:go_default_library", "//vendor/github.com/Azure/azure-sdk-for-go/storage:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", "//vendor/github.com/Azure/go-autorest/autorest/to:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/github.com/rubiojr/go-vhd/vhd:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", @@ -67,6 +67,8 @@ go_library( "//vendor/k8s.io/cloud-provider/volume/errors:go_default_library", "//vendor/k8s.io/cloud-provider/volume/helpers:go_default_library", "//vendor/k8s.io/component-base/featuregate:go_default_library", + "//vendor/k8s.io/component-base/metrics:go_default_library", + "//vendor/k8s.io/component-base/metrics/legacyregistry:go_default_library", "//vendor/k8s.io/klog:go_default_library", "//vendor/k8s.io/legacy-cloud-providers/azure/auth:go_default_library", "//vendor/k8s.io/utils/keymutex:go_default_library", diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure.go index 6ba53575c7..81c586d03c 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -25,7 +27,7 @@ import ( "sync" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go index 91d9d3bde8..eeefe41c00 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_backoff.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -21,8 +23,8 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -656,6 +658,50 @@ func (az *Cloud) UpdateVmssVMWithRetry(resourceGroupName string, VMScaleSetName }) } +// CreateOrUpdateVmssWithRetry invokes az.VirtualMachineScaleSetsClient.Update with exponential backoff retry +func (az *Cloud) CreateOrUpdateVmssWithRetry(resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) error { + return wait.ExponentialBackoff(az.RequestBackoff(), func() (bool, error) { + ctx, cancel := getContextWithCancel() + defer cancel() + + // When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error. + // Since it is being deleted, we shouldn't send more CreateOrUpdate requests for it. + klog.V(3).Infof("CreateOrUpdateVmssWithRetry: verify the status of the vmss being created or updated") + vmss, err := az.VirtualMachineScaleSetsClient.Get(ctx, resourceGroupName, VMScaleSetName) + if vmss.ProvisioningState != nil && strings.EqualFold(*vmss.ProvisioningState, virtualMachineScaleSetsDeallocating) { + klog.V(3).Infof("CreateOrUpdateVmssWithRetry: found vmss %s being deleted, skipping", VMScaleSetName) + return true, nil + } + + resp, err := az.VirtualMachineScaleSetsClient.CreateOrUpdate(ctx, resourceGroupName, VMScaleSetName, parameters) + klog.V(10).Infof("UpdateVmssVMWithRetry: VirtualMachineScaleSetsClient.CreateOrUpdate(%s): end", VMScaleSetName) + + return az.processHTTPRetryResponse(nil, "", resp, err) + }) +} + +// GetScaleSetWithRetry gets scale set with exponential backoff retry +func (az *Cloud) GetScaleSetWithRetry(service *v1.Service, resourceGroupName, vmssName string) (compute.VirtualMachineScaleSet, error) { + var result compute.VirtualMachineScaleSet + var retryErr error + + err := wait.ExponentialBackoff(az.RequestBackoff(), func() (bool, error) { + ctx, cancel := getContextWithCancel() + defer cancel() + + result, retryErr = az.VirtualMachineScaleSetsClient.Get(ctx, resourceGroupName, vmssName) + if retryErr != nil { + az.Event(service, v1.EventTypeWarning, "GetVirtualMachineScaleSet", retryErr.Error()) + klog.Errorf("backoff: failure for scale set %q, will retry,err=%v", vmssName, retryErr) + return false, nil + } + klog.V(4).Infof("backoff: success for scale set %q", vmssName) + return true, nil + }) + + return result, err +} + // isSuccessHTTPResponse determines if the response from an HTTP request suggests success func isSuccessHTTPResponse(resp *http.Response) bool { if resp == nil { diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go index b75774e9a4..5811441625 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_blobDiskController.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -28,7 +30,7 @@ import ( "sync/atomic" "time" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" azstorage "github.com/Azure/azure-sdk-for-go/storage" "github.com/Azure/go-autorest/autorest/to" "github.com/rubiojr/go-vhd/vhd" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_cache.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_cache.go index ac959515a8..90bc7e163a 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_cache.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_cache.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_client.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_client.go index ef7c24f3d7..a273776ca6 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_client.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_client.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -22,9 +24,9 @@ import ( "net/http" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/adal" @@ -33,8 +35,9 @@ import ( ) const ( - // The version number is taken from "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network". - azureNetworkAPIVersion = "2018-08-01" + // The version number is taken from "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network". + azureNetworkAPIVersion = "2019-06-01" + virtualMachineScaleSetsDeallocating = "Deallocating" ) // Helpers for rate limiting error/error channel creation @@ -98,6 +101,7 @@ type SecurityGroupsClient interface { type VirtualMachineScaleSetsClient interface { Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result compute.VirtualMachineScaleSet, err error) List(ctx context.Context, resourceGroupName string) (result []compute.VirtualMachineScaleSet, err error) + CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (resp *http.Response, err error) } // VirtualMachineScaleSetVMsClient defines needed functions for azure compute.VirtualMachineScaleSetVMsClient @@ -973,6 +977,28 @@ func (az *azVirtualMachineScaleSetsClient) List(ctx context.Context, resourceGro return result, nil } +func (az *azVirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vmScaleSetName string, parameters compute.VirtualMachineScaleSet) (resp *http.Response, err error) { + /* Write rate limiting */ + if !az.rateLimiterWriter.TryAccept() { + err = createRateLimitErr(true, "NiCreateOrUpdate") + return + } + + klog.V(10).Infof("azVirtualMachineScaleSetsClient.CreateOrUpdate(%q,%q): start", resourceGroupName, vmScaleSetName) + defer func() { + klog.V(10).Infof("azVirtualMachineScaleSetsClient.CreateOrUpdate(%q,%q): end", resourceGroupName, vmScaleSetName) + }() + + mc := newMetricContext("vmss", "create_or_update", resourceGroupName, az.client.SubscriptionID, "") + future, err := az.client.CreateOrUpdate(ctx, resourceGroupName, vmScaleSetName, parameters) + if err != nil { + return future.Response(), mc.Observe(err) + } + + err = future.WaitForCompletionRef(ctx, az.client.Client) + return future.Response(), mc.Observe(err) +} + // azVirtualMachineScaleSetVMsClient implements VirtualMachineScaleSetVMsClient. type azVirtualMachineScaleSetVMsClient struct { client compute.VirtualMachineScaleSetVMsClient @@ -1064,7 +1090,7 @@ func (az *azVirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceG func (az *azVirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (resp *http.Response, err error) { if !az.rateLimiterWriter.TryAccept() { - err = createRateLimitErr(true, "VMSSUpdate") + err = createRateLimitErr(true, "VMSSVMUpdate") return } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go index 9ef26eab80..7f094e47e0 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_config.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2019 The Kubernetes Authors. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go index c10061da24..10518b05e2 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_common.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -19,13 +21,16 @@ package azure import ( "context" "fmt" + "path" + "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "k8s.io/apimachinery/pkg/types" kwait "k8s.io/apimachinery/pkg/util/wait" cloudprovider "k8s.io/cloud-provider" + volerr "k8s.io/cloud-provider/volume/errors" "k8s.io/klog" "k8s.io/utils/keymutex" ) @@ -93,6 +98,32 @@ func (c *controllerCommon) getNodeVMSet(nodeName types.NodeName) (VMSet, error) // AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI. // return (lun, error) func (c *controllerCommon) AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, cachingMode compute.CachingTypes) (int32, error) { + if isManagedDisk { + diskName := path.Base(diskURI) + resourceGroup, err := getResourceGroupFromDiskURI(diskURI) + if err != nil { + return -1, err + } + + ctx, cancel := getContextWithCancel() + defer cancel() + + disk, err := c.cloud.DisksClient.Get(ctx, resourceGroup, diskName) + if err != nil { + return -1, err + } + + if disk.ManagedBy != nil { + attachErr := fmt.Sprintf( + "disk(%s) already attached to node(%s), could not be attached to node(%s)", + diskURI, *disk.ManagedBy, nodeName) + attachedNode := path.Base(*disk.ManagedBy) + klog.V(2).Infof("found dangling volume %s attached to node %s", diskURI, attachedNode) + danglingErr := volerr.NewDanglingError(attachErr, types.NodeName(attachedNode), "") + return -1, danglingErr + } + } + vmset, err := c.getNodeVMSet(nodeName) if err != nil { return -1, err @@ -178,9 +209,9 @@ func (c *controllerCommon) GetDiskLun(diskName, diskURI string, nodeName types.N } for _, disk := range disks { - if disk.Lun != nil && (disk.Name != nil && diskName != "" && *disk.Name == diskName) || - (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && *disk.Vhd.URI == diskURI) || - (disk.ManagedDisk != nil && *disk.ManagedDisk.ID == diskURI) { + if disk.Lun != nil && (disk.Name != nil && diskName != "" && strings.EqualFold(*disk.Name, diskName)) || + (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && strings.EqualFold(*disk.Vhd.URI, diskURI)) || + (disk.ManagedDisk != nil && strings.EqualFold(*disk.ManagedDisk.ID, diskURI)) { // found the disk klog.V(2).Infof("azureDisk - find disk: lun %d name %q uri %q", *disk.Lun, diskName, diskURI) return *disk.Lun, nil @@ -232,7 +263,7 @@ func (c *controllerCommon) DisksAreAttached(diskNames []string, nodeName types.N for _, disk := range disks { for _, diskName := range diskNames { - if disk.Name != nil && diskName != "" && *disk.Name == diskName { + if disk.Name != nil && diskName != "" && strings.EqualFold(*disk.Name, diskName) { attached[diskName] = true } } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go index 19366f817b..7490d93fcf 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_standard.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -20,7 +22,7 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "k8s.io/apimachinery/pkg/types" "k8s.io/klog" @@ -118,9 +120,9 @@ func (as *availabilitySet) DetachDisk(diskName, diskURI string, nodeName types.N bFoundDisk := false for i, disk := range disks { - if disk.Lun != nil && (disk.Name != nil && diskName != "" && *disk.Name == diskName) || - (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && *disk.Vhd.URI == diskURI) || - (disk.ManagedDisk != nil && diskURI != "" && *disk.ManagedDisk.ID == diskURI) { + if disk.Lun != nil && (disk.Name != nil && diskName != "" && strings.EqualFold(*disk.Name, diskName)) || + (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && strings.EqualFold(*disk.Vhd.URI, diskURI)) || + (disk.ManagedDisk != nil && diskURI != "" && strings.EqualFold(*disk.ManagedDisk.ID, diskURI)) { // found the disk klog.V(2).Infof("azureDisk - detach disk: name %q uri %q", diskName, diskURI) disks = append(disks[:i], disks[i+1:]...) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go index 67955b3a50..5115d8043e 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_controller_vmss.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -20,7 +22,7 @@ import ( "net/http" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "k8s.io/apimachinery/pkg/types" "k8s.io/klog" @@ -123,9 +125,9 @@ func (ss *scaleSet) DetachDisk(diskName, diskURI string, nodeName types.NodeName } bFoundDisk := false for i, disk := range disks { - if disk.Lun != nil && (disk.Name != nil && diskName != "" && *disk.Name == diskName) || - (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && *disk.Vhd.URI == diskURI) || - (disk.ManagedDisk != nil && diskURI != "" && *disk.ManagedDisk.ID == diskURI) { + if disk.Lun != nil && (disk.Name != nil && diskName != "" && strings.EqualFold(*disk.Name, diskName)) || + (disk.Vhd != nil && disk.Vhd.URI != nil && diskURI != "" && strings.EqualFold(*disk.Vhd.URI, diskURI)) || + (disk.ManagedDisk != nil && diskURI != "" && strings.EqualFold(*disk.ManagedDisk.ID, diskURI)) { // found the disk klog.V(2).Infof("azureDisk - detach disk: name %q uri %q", diskName, diskURI) disks = append(disks[:i], disks[i+1:]...) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go index b69900b154..659ffa522b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_fakes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -24,9 +26,9 @@ import ( "strings" "sync" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/to" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go index 08e7e7d280..bc4106d2fc 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_file.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go index 5f803b90a3..187e77f679 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instance_metadata.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -50,8 +52,8 @@ type NetworkData struct { // IPAddress represents IP address information. type IPAddress struct { - PrivateIP string `json:"privateIPAddress"` - PublicIP string `json:"publicIPAddress"` + PrivateIP string `json:"privateIpAddress"` + PublicIP string `json:"publicIpAddress"` } // Subnet represents subnet information. @@ -62,6 +64,7 @@ type Subnet struct { // ComputeMetadata represents compute information type ComputeMetadata struct { + Environment string `json:"azEnvironment,omitempty"` SKU string `json:"sku,omitempty"` Name string `json:"name,omitempty"` Zone string `json:"zone,omitempty"` @@ -72,6 +75,7 @@ type ComputeMetadata struct { UpdateDomain string `json:"platformUpdateDomain,omitempty"` ResourceGroup string `json:"resourceGroupName,omitempty"` VMScaleSetName string `json:"vmScaleSetName,omitempty"` + SubscriptionID string `json:"subscriptionId,omitempty"` } // InstanceMetadata represents instance information. @@ -111,7 +115,7 @@ func (ims *InstanceMetadataService) getInstanceMetadata(key string) (interface{} q := req.URL.Query() q.Add("format", "json") - q.Add("api-version", "2017-12-01") + q.Add("api-version", "2019-03-11") req.URL.RawQuery = q.Encode() client := &http.Client{} diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go index 47980e6378..ae37614dc8 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_instances.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -281,12 +283,13 @@ func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, e return "", fmt.Errorf("no credentials provided for Azure cloud provider") } - // Get resource group name. + // Get resource group name and subscription ID. resourceGroup := strings.ToLower(metadata.Compute.ResourceGroup) + subscriptionID := strings.ToLower(metadata.Compute.SubscriptionID) // Compose instanceID based on nodeName for standard instance. - if az.VMType == vmTypeStandard { - return az.getStandardMachineID(resourceGroup, nodeName), nil + if metadata.Compute.VMScaleSetName == "" { + return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil } // Get scale set name and instanceID from vmName for vmss. @@ -294,12 +297,12 @@ func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, e if err != nil { if err == ErrorNotVmssInstance { // Compose machineID for standard Node. - return az.getStandardMachineID(resourceGroup, nodeName), nil + return az.getStandardMachineID(subscriptionID, resourceGroup, nodeName), nil } return "", err } // Compose instanceID based on ssName and instanceID for vmss instance. - return az.getVmssMachineID(resourceGroup, ssName, instanceID), nil + return az.getVmssMachineID(subscriptionID, resourceGroup, ssName, instanceID), nil } return az.vmSet.GetInstanceIDByNodeName(nodeName) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go index 175123cf63..8dfeb4f3a8 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -24,7 +26,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -33,6 +35,9 @@ import ( cloudprovider "k8s.io/cloud-provider" servicehelpers "k8s.io/cloud-provider/service/helpers" "k8s.io/klog" + + utilfeature "k8s.io/apiserver/pkg/util/feature" + utilnet "k8s.io/utils/net" ) const ( @@ -534,6 +539,23 @@ func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domai } } + if utilfeature.DefaultFeatureGate.Enabled(IPv6DualStack) { + // TODO: (khenidak) if we ever enable IPv6 single stack, then we should + // not wrap the following in a feature gate + ipv6 := utilnet.IsIPv6String(service.Spec.ClusterIP) + if ipv6 { + pip.PublicIPAddressVersion = network.IPv6 + klog.V(2).Infof("service(%s): pip(%s) - creating as ipv6 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP) + // static allocation on IPv6 on Azure is not allowed + pip.PublicIPAddressPropertiesFormat.PublicIPAllocationMethod = network.Dynamic + } else { + pip.PublicIPAddressVersion = network.IPv4 + klog.V(2).Infof("service(%s): pip(%s) - creating as ipv4 for clusterIP:%v", serviceName, *pip.Name, service.Spec.ClusterIP) + } + } + + klog.V(2).Infof("ensurePublicIPExists for service(%s): pip(%s) - creating", serviceName, *pip.Name) + klog.V(10).Infof("CreateOrUpdatePIP(%s, %q): start", pipResourceGroup, *pip.Name) err = az.CreateOrUpdatePIP(service, pipResourceGroup, pip) if err != nil { @@ -647,7 +669,7 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, klog.V(2).Infof("reconcileLoadBalancer for service(%s): lb(%s) wantLb(%t) resolved load balancer name", serviceName, lbName, wantLb) lbFrontendIPConfigName := az.getFrontendIPConfigName(service, subnet(service)) lbFrontendIPConfigID := az.getFrontendIPConfigID(lbName, lbFrontendIPConfigName) - lbBackendPoolName := getBackendPoolName(clusterName) + lbBackendPoolName := getBackendPoolName(clusterName, service) lbBackendPoolID := az.getBackendPoolID(lbName, lbBackendPoolName) lbIdleTimeout, err := getIdleTimeout(service) @@ -725,6 +747,13 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, // construct FrontendIPConfigurationPropertiesFormat var fipConfigurationProperties *network.FrontendIPConfigurationPropertiesFormat if isInternal { + // azure does not support ILB for IPv6 yet. + // TODO: remove this check when ILB supports IPv6 *and* the SDK + // have been rev'ed to 2019* version + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + return nil, fmt.Errorf("ensure(%s): lb(%s) - internal load balancers does not support IPv6", serviceName, lbName) + } + subnetName := subnet(service) if subnetName == nil { subnetName = &az.SubnetName @@ -1005,9 +1034,9 @@ func (az *Cloud) reconcileLoadBalancerRule( }) } - loadDistribution := network.Default + loadDistribution := network.LoadDistributionDefault if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP { - loadDistribution = network.SourceIP + loadDistribution = network.LoadDistributionSourceIP } expectedRule := network.LoadBalancingRule{ @@ -1023,11 +1052,18 @@ func (az *Cloud) reconcileLoadBalancerRule( LoadDistribution: loadDistribution, FrontendPort: to.Int32Ptr(port.Port), BackendPort: to.Int32Ptr(port.Port), - EnableFloatingIP: to.BoolPtr(true), DisableOutboundSnat: to.BoolPtr(az.disableLoadBalancerOutboundSNAT()), EnableTCPReset: enableTCPReset, }, } + // LB does not support floating IPs for IPV6 rules + if utilnet.IsIPv6String(service.Spec.ClusterIP) { + expectedRule.BackendPort = to.Int32Ptr(port.NodePort) + expectedRule.EnableFloatingIP = to.BoolPtr(false) + } else { + expectedRule.EnableFloatingIP = to.BoolPtr(true) + } + if protocol == v1.ProtocolTCP { expectedRule.LoadBalancingRulePropertiesFormat.IdleTimeoutInMinutes = lbIdleTimeout } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go index 743e015a04..ebbae1da8d 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -23,7 +25,7 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -314,7 +316,7 @@ func (c *Cloud) GetAzureDiskLabels(diskURI string) (map[string]string, error) { return nil, fmt.Errorf("failed to parse zone %v for AzureDisk %v: %v", zones, diskName, err) } - zone := c.makeZone(zoneID) + zone := c.makeZone(c.Location, zoneID) klog.V(4).Infof("Got zone %q for Azure disk %q", zone, diskName) labels := map[string]string{ v1.LabelZoneRegion: c.Location, diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_metrics.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_metrics.go index 7eddafab9f..3ba202756d 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_metrics.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_metrics.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. @@ -20,12 +22,13 @@ import ( "strings" "time" - "github.com/prometheus/client_golang/prometheus" + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" ) type apiCallMetrics struct { - latency *prometheus.HistogramVec - errors *prometheus.CounterVec + latency *metrics.HistogramVec + errors *metrics.CounterVec } var ( @@ -63,24 +66,26 @@ func (mc *metricContext) Observe(err error) error { func registerAPIMetrics(attributes ...string) *apiCallMetrics { metrics := &apiCallMetrics{ - latency: prometheus.NewHistogramVec( - prometheus.HistogramOpts{ - Name: "cloudprovider_azure_api_request_duration_seconds", - Help: "Latency of an Azure API call", + latency: metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Name: "cloudprovider_azure_api_request_duration_seconds", + Help: "Latency of an Azure API call", + StabilityLevel: metrics.ALPHA, }, attributes, ), - errors: prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "cloudprovider_azure_api_request_errors", - Help: "Number of errors for an Azure API call", + errors: metrics.NewCounterVec( + &metrics.CounterOpts{ + Name: "cloudprovider_azure_api_request_errors", + Help: "Number of errors for an Azure API call", + StabilityLevel: metrics.ALPHA, }, attributes, ), } - prometheus.MustRegister(metrics.latency) - prometheus.MustRegister(metrics.errors) + legacyregistry.MustRegister(metrics.latency) + legacyregistry.MustRegister(metrics.errors) return metrics } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go index 49b1d3d8b6..3cc689fa59 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -21,7 +23,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" "k8s.io/apimachinery/pkg/types" @@ -32,15 +34,13 @@ import ( // Azure route controller changes behavior if ipv6dual stack feature is turned on // remove this once the feature graduates utilfeature "k8s.io/apiserver/pkg/util/feature" - "k8s.io/component-base/featuregate" ) // copied to minimize the number of cross reference // and exceptions in publishing and allowed imports. const ( - IPv6DualStack featuregate.Feature = "IPv6DualStack" - routeNameFmt = "%s____%s" - routeNameSeparator = "____" + routeNameFmt = "%s____%s" + routeNameSeparator = "____" ) // ListRoutes lists all managed routes that belong to the specified clusterName diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go index f0c0621ff6..444584edf3 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_standard.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -26,8 +28,8 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -37,9 +39,17 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" cloudprovider "k8s.io/cloud-provider" "k8s.io/klog" + + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/component-base/featuregate" + utilnet "k8s.io/utils/net" ) const ( + // IPv6DualStack is here to avoid having to import features pkg + // and violate import rules + IPv6DualStack featuregate.Feature = "IPv6DualStack" + loadBalancerMinimumPriority = 500 loadBalancerMaximumPriority = 4096 @@ -66,10 +76,10 @@ var nicResourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGro var publicIPResourceGroupRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Network/publicIPAddresses/(?:.*)`) // getStandardMachineID returns the full identifier of a virtual machine. -func (az *Cloud) getStandardMachineID(resourceGroup, machineName string) string { +func (az *Cloud) getStandardMachineID(subscriptionID, resourceGroup, machineName string) string { return fmt.Sprintf( machineIDTemplate, - az.SubscriptionID, + subscriptionID, strings.ToLower(resourceGroup), machineName) } @@ -218,11 +228,50 @@ func getPrimaryIPConfig(nic network.Interface) (*network.InterfaceIPConfiguratio return nil, fmt.Errorf("failed to determine the primary ipconfig. nicname=%q", *nic.Name) } +// returns first ip configuration on a nic by family +func getIPConfigByIPFamily(nic network.Interface, IPv6 bool) (*network.InterfaceIPConfiguration, error) { + if nic.IPConfigurations == nil { + return nil, fmt.Errorf("nic.IPConfigurations for nic (nicname=%q) is nil", *nic.Name) + } + + var ipVersion network.IPVersion + if IPv6 { + ipVersion = network.IPv6 + } else { + ipVersion = network.IPv4 + } + for _, ref := range *nic.IPConfigurations { + if ref.PrivateIPAddress != nil && ref.PrivateIPAddressVersion == ipVersion { + return &ref, nil + } + } + return nil, fmt.Errorf("failed to determine the ipconfig(IPv6=%v). nicname=%q", IPv6, *nic.Name) +} + func isInternalLoadBalancer(lb *network.LoadBalancer) bool { return strings.HasSuffix(*lb.Name, InternalLoadBalancerNameSuffix) } -func getBackendPoolName(clusterName string) string { +// getBackendPoolName the LB BackendPool name for a service. +// to ensure backword and forward compat: +// SingleStack -v4 (pre v1.16) => BackendPool name == clusterName +// SingleStack -v6 => BackendPool name == clusterName (all cluster bootstrap uses this name) +// DualStack +// => IPv4 BackendPool name == clusterName +// => IPv6 BackendPool name == -IPv6 +// This means: +// clusters moving from IPv4 to duakstack will require no changes +// clusters moving from IPv6 (while not seen in the wild, we can not rule out their existence) +// to dualstack will require deleting backend pools (the reconciler will take care of creating correct backendpools) +func getBackendPoolName(clusterName string, service *v1.Service) string { + if !utilfeature.DefaultFeatureGate.Enabled(IPv6DualStack) { + return clusterName + } + IPv6 := utilnet.IsIPv6String(service.Spec.ClusterIP) + if IPv6 { + return fmt.Sprintf("%v-IPv6", clusterName) + } + return clusterName } @@ -413,7 +462,7 @@ func (as *availabilitySet) GetZoneByNodeName(name string) (cloudprovider.Zone, e return cloudprovider.Zone{}, fmt.Errorf("failed to parse zone %q: %v", zones, err) } - failureDomain = as.makeZone(zoneID) + failureDomain = as.makeZone(to.String(vm.Location), zoneID) } else { // Availability zone is not used for the node, falling back to fault domain. failureDomain = strconv.Itoa(int(*vm.VirtualMachineProperties.InstanceView.PlatformFaultDomain)) @@ -421,7 +470,7 @@ func (as *availabilitySet) GetZoneByNodeName(name string) (cloudprovider.Zone, e zone := cloudprovider.Zone{ FailureDomain: failureDomain, - Region: *(vm.Location), + Region: to.String(vm.Location), } return zone, nil } @@ -672,9 +721,17 @@ func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types. } var primaryIPConfig *network.InterfaceIPConfiguration - primaryIPConfig, err = getPrimaryIPConfig(nic) - if err != nil { - return err + if !utilfeature.DefaultFeatureGate.Enabled(IPv6DualStack) { + primaryIPConfig, err = getPrimaryIPConfig(nic) + if err != nil { + return err + } + } else { + ipv6 := utilnet.IsIPv6String(service.Spec.ClusterIP) + primaryIPConfig, err = getIPConfigByIPFamily(nic, ipv6) + if err != nil { + return err + } } foundPool := false diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go index 39aa2a4977..4fa273756f 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storage.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -19,7 +21,7 @@ package azure import ( "fmt" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" "k8s.io/klog" ) diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go index 8afbca48ee..890ce4988b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_storageaccount.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -20,7 +22,7 @@ import ( "fmt" "strings" - "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage" + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage" "github.com/Azure/go-autorest/autorest/to" "k8s.io/klog" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go index 3ddd51cfa6..26b6e1292c 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmsets.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -19,8 +21,8 @@ package azure import ( "net/http" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go index 74a3cfb389..040de1d88b 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2017 The Kubernetes Authors. @@ -24,8 +26,8 @@ import ( "strconv" "strings" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest/to" v1 "k8s.io/api/core/v1" @@ -33,6 +35,9 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" cloudprovider "k8s.io/cloud-provider" "k8s.io/klog" + + utilfeature "k8s.io/apiserver/pkg/util/feature" + utilnet "k8s.io/utils/net" ) var ( @@ -44,6 +49,7 @@ var ( vmssMachineIDTemplate = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s" vmssIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces(?:.*)`) vmssPIPConfigurationRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(.+)/networkInterfaces/(.+)/ipConfigurations/(.+)/publicIPAddresses/(.+)`) + vmssVMProviderIDRE = regexp.MustCompile(`azure:///subscriptions/(?:.*)/resourceGroups/(.+)/providers/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines/(?:\d+)`) ) // scaleSet implements VMSet interface for Azure scale set. @@ -280,7 +286,7 @@ func (ss *scaleSet) GetZoneByNodeName(name string) (cloudprovider.Zone, error) { return cloudprovider.Zone{}, fmt.Errorf("failed to parse zone %q: %v", zones, err) } - failureDomain = ss.makeZone(zoneID) + failureDomain = ss.makeZone(to.String(vm.Location), zoneID) } else if vm.InstanceView != nil && vm.InstanceView.PlatformFaultDomain != nil { // Availability zone is not used for the node, falling back to fault domain. failureDomain = strconv.Itoa(int(*vm.InstanceView.PlatformFaultDomain)) @@ -288,7 +294,7 @@ func (ss *scaleSet) GetZoneByNodeName(name string) (cloudprovider.Zone, error) { return cloudprovider.Zone{ FailureDomain: failureDomain, - Region: *vm.Location, + Region: to.String(vm.Location), }, nil } @@ -399,10 +405,10 @@ func (ss *scaleSet) getPrimaryInterfaceID(machine compute.VirtualMachineScaleSet } // getVmssMachineID returns the full identifier of a vmss virtual machine. -func (az *Cloud) getVmssMachineID(resourceGroup, scaleSetName, instanceID string) string { +func (az *Cloud) getVmssMachineID(subscriptionID, resourceGroup, scaleSetName, instanceID string) string { return fmt.Sprintf( vmssMachineIDTemplate, - az.SubscriptionID, + subscriptionID, strings.ToLower(resourceGroup), scaleSetName, instanceID) @@ -649,7 +655,23 @@ func (ss *scaleSet) getPrimaryNetworkInterfaceConfiguration(networkConfiguration return nil, fmt.Errorf("failed to find a primary network configuration for the scale set VM %q", nodeName) } -func (ss *scaleSet) getPrimaryIPConfigForScaleSet(config *compute.VirtualMachineScaleSetNetworkConfiguration, nodeName string) (*compute.VirtualMachineScaleSetIPConfiguration, error) { +// getPrimaryNetworkInterfaceConfigurationForScaleSet gets primary network interface configuration for scale set. +func (ss *scaleSet) getPrimaryNetworkInterfaceConfigurationForScaleSet(networkConfigurations []compute.VirtualMachineScaleSetNetworkConfiguration, vmssName string) (*compute.VirtualMachineScaleSetNetworkConfiguration, error) { + if len(networkConfigurations) == 1 { + return &networkConfigurations[0], nil + } + + for idx := range networkConfigurations { + networkConfig := &networkConfigurations[idx] + if networkConfig.Primary != nil && *networkConfig.Primary == true { + return networkConfig, nil + } + } + + return nil, fmt.Errorf("failed to find a primary network configuration for the scale set %q", vmssName) +} + +func getPrimaryIPConfigFromVMSSNetworkConfig(config *compute.VirtualMachineScaleSetNetworkConfiguration) (*compute.VirtualMachineScaleSetIPConfiguration, error) { ipConfigurations := *config.IPConfigurations if len(ipConfigurations) == 1 { return &ipConfigurations[0], nil @@ -662,7 +684,26 @@ func (ss *scaleSet) getPrimaryIPConfigForScaleSet(config *compute.VirtualMachine } } - return nil, fmt.Errorf("failed to find a primary IP configuration for the scale set VM %q", nodeName) + return nil, fmt.Errorf("failed to find a primary IP configuration") +} + +func (ss *scaleSet) getConfigForScaleSetByIPFamily(config *compute.VirtualMachineScaleSetNetworkConfiguration, nodeName string, IPv6 bool) (*compute.VirtualMachineScaleSetIPConfiguration, error) { + ipConfigurations := *config.IPConfigurations + + var ipVersion compute.IPVersion + if IPv6 { + ipVersion = compute.IPv6 + } else { + ipVersion = compute.IPv4 + } + for idx := range ipConfigurations { + ipConfig := &ipConfigurations[idx] + if ipConfig.PrivateIPAddressVersion == ipVersion { + return ipConfig, nil + } + } + + return nil, fmt.Errorf("failed to find a IPconfiguration(IPv6=%v) for the scale set VM %q", IPv6, nodeName) } // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is @@ -685,16 +726,31 @@ func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam } // Find primary network interface configuration. + if vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations == nil { + klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vm %s, probably because the vm's being deleted", vmName) + return nil + } + networkInterfaceConfigurations := *vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations primaryNetworkInterfaceConfiguration, err := ss.getPrimaryNetworkInterfaceConfiguration(networkInterfaceConfigurations, vmName) if err != nil { return err } - // Find primary IP configuration. - primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkInterfaceConfiguration, vmName) - if err != nil { - return err + var primaryIPConfiguration *compute.VirtualMachineScaleSetIPConfiguration + // Find primary network interface configuration. + if !utilfeature.DefaultFeatureGate.Enabled(IPv6DualStack) { + // Find primary IP configuration. + primaryIPConfiguration, err = getPrimaryIPConfigFromVMSSNetworkConfig(primaryNetworkInterfaceConfiguration) + if err != nil { + return err + } + } else { + ipv6 := utilnet.IsIPv6String(service.Spec.ClusterIP) + primaryIPConfiguration, err = ss.getConfigForScaleSetByIPFamily(primaryNetworkInterfaceConfiguration, vmName, ipv6) + if err != nil { + return err + } } // Update primary IP configuration's LoadBalancerBackendAddressPools. @@ -780,6 +836,141 @@ func (ss *scaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeNam return err } +func getVmssAndResourceGroupNameByVMProviderID(providerID string) (string, string, error) { + matches := vmssVMProviderIDRE.FindStringSubmatch(providerID) + if len(matches) != 3 { + return "", "", ErrorNotVmssInstance + } + return matches[1], matches[2], nil +} + +func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string) error { + vmssNamesMap := make(map[string]bool) + + // the standard load balancer supports multiple vmss in its backend while the basic sku doesn't + if ss.useStandardLoadBalancer() { + for _, node := range nodes { + if ss.excludeMasterNodesFromStandardLB() && isMasterNode(node) { + continue + } + // in this scenario the vmSetName is an empty string and the name of vmss should be obtained from the provider IDs of nodes + vmssName, resourceGroupName, err := getVmssAndResourceGroupNameByVMProviderID(node.Spec.ProviderID) + if err != nil { + klog.V(4).Infof("ensureVMSSInPool: found VMAS node %s, will skip checking and continue", node.Name) + continue + } + // only vmsses in the resource group same as it's in azure config are included + if strings.EqualFold(resourceGroupName, ss.ResourceGroup) { + vmssNamesMap[vmssName] = true + } + } + } else { + vmssNamesMap[vmSetName] = true + } + + for vmssName := range vmssNamesMap { + vmss, err := ss.GetScaleSetWithRetry(service, ss.ResourceGroup, vmssName) + if err != nil { + return err + } + + // When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error. + // Since it is being deleted, we shouldn't send more CreateOrUpdate requests for it. + if vmss.ProvisioningState != nil && strings.EqualFold(*vmss.ProvisioningState, virtualMachineScaleSetsDeallocating) { + klog.V(3).Infof("ensureVMSSInPool: found vmss %s being deleted, skipping", vmssName) + continue + } + + if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil { + klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName) + continue + } + vmssNIC := *vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations + primaryNIC, err := ss.getPrimaryNetworkInterfaceConfigurationForScaleSet(vmssNIC, vmssName) + if err != nil { + return err + } + primaryIPConfig, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC) + if err != nil { + return err + } + loadBalancerBackendAddressPools := []compute.SubResource{} + if primaryIPConfig.LoadBalancerBackendAddressPools != nil { + loadBalancerBackendAddressPools = *primaryIPConfig.LoadBalancerBackendAddressPools + } + + var found bool + for _, loadBalancerBackendAddressPool := range loadBalancerBackendAddressPools { + if strings.EqualFold(*loadBalancerBackendAddressPool.ID, backendPoolID) { + found = true + break + } + } + if found { + continue + } + + if ss.useStandardLoadBalancer() && len(loadBalancerBackendAddressPools) > 0 { + // Although standard load balancer supports backends from multiple scale + // sets, the same network interface couldn't be added to more than one load balancer of + // the same type. Omit those nodes (e.g. masters) so Azure ARM won't complain + // about this. + newBackendPoolsIDs := make([]string, 0, len(loadBalancerBackendAddressPools)) + for _, pool := range loadBalancerBackendAddressPools { + if pool.ID != nil { + newBackendPoolsIDs = append(newBackendPoolsIDs, *pool.ID) + } + } + isSameLB, oldLBName, err := isBackendPoolOnSameLB(backendPoolID, newBackendPoolsIDs) + if err != nil { + return err + } + if !isSameLB { + klog.V(4).Infof("VMSS %q has already been added to LB %q, omit adding it to a new one", vmssName, oldLBName) + return nil + } + } + + // Compose a new vmss with added backendPoolID. + loadBalancerBackendAddressPools = append(loadBalancerBackendAddressPools, + compute.SubResource{ + ID: to.StringPtr(backendPoolID), + }) + primaryIPConfig.LoadBalancerBackendAddressPools = &loadBalancerBackendAddressPools + newVMSS := compute.VirtualMachineScaleSet{ + Sku: vmss.Sku, + Location: vmss.Location, + VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ + VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{ + NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{ + NetworkInterfaceConfigurations: &vmssNIC, + }, + }, + }, + } + + // Update vmssVM with backoff. + ctx, cancel := getContextWithCancel() + defer cancel() + + klog.V(2).Infof("ensureVMSSInPool begins to update vmss(%s) with new backendPoolID %s", vmssName, backendPoolID) + resp, err := ss.VirtualMachineScaleSetsClient.CreateOrUpdate(ctx, ss.ResourceGroup, vmssName, newVMSS) + + if ss.CloudProviderBackoff && shouldRetryHTTPRequest(resp, err) { + klog.V(2).Infof("ensureVMSSInPool update backing off vmss(%s) with new backendPoolID %s, err: %v", vmssName, backendPoolID, err) + retryErr := ss.CreateOrUpdateVmssWithRetry(ss.ResourceGroup, vmssName, newVMSS) + if retryErr != nil { + err = retryErr + klog.Errorf("ensureVMSSInPool update abort backoff vmssVM(%s) with new backendPoolID %s, err: %v", vmssName, backendPoolID, err) + } + } + if err != nil { + return err + } + } + return nil +} + // EnsureHostsInPool ensures the given Node's primary IP configurations are // participating in the specified LoadBalancer Backend Pool. func (ss *scaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error { @@ -829,6 +1020,12 @@ func (ss *scaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac return utilerrors.Flatten(errs) } + // we need to add the LB backend updates back to VMSS model, see issue kubernetes/kubernetes#80365 for detailed information + err := ss.ensureVMSSInPool(service, nodes, backendPoolID, vmSetName) + if err != nil { + return err + } + return nil } @@ -840,14 +1037,18 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromNode(service *v1.Service, nodeNa } // Find primary network interface configuration. + if vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations == nil { + klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vm %s, probably because the vm's being deleted", nodeName) + return nil + } networkInterfaceConfigurations := *vm.NetworkProfileConfiguration.NetworkInterfaceConfigurations primaryNetworkInterfaceConfiguration, err := ss.getPrimaryNetworkInterfaceConfiguration(networkInterfaceConfigurations, nodeName) if err != nil { return err } - // Find primary IP configuration.4 - primaryIPConfiguration, err := ss.getPrimaryIPConfigForScaleSet(primaryNetworkInterfaceConfiguration, nodeName) + // Find primary IP configuration. + primaryIPConfiguration, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNetworkInterfaceConfiguration) if err != nil { return err } @@ -940,6 +1141,120 @@ func (ss *scaleSet) getNodeNameByIPConfigurationID(ipConfigurationID string) (st return "", nil } +func getScaleSetAndResourceGroupNameByIPConfigurationID(ipConfigurationID string) (string, string, error) { + matches := vmssIPConfigurationRE.FindStringSubmatch(ipConfigurationID) + if len(matches) != 4 { + klog.V(4).Infof("Can not extract scale set name from ipConfigurationID (%s), assuming it is mananaged by availability set", ipConfigurationID) + return "", "", ErrorNotVmssInstance + } + + resourceGroup := matches[1] + scaleSetName := matches[2] + return scaleSetName, resourceGroup, nil +} + +func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backendPoolID, vmSetName string, ipConfigurationIDs []string) error { + vmssNamesMap := make(map[string]bool) + + // the standard load balancer supports multiple vmss in its backend while the basic sku doesn't + if ss.useStandardLoadBalancer() { + for _, ipConfigurationID := range ipConfigurationIDs { + // in this scenario the vmSetName is an empty string and the name of vmss should be obtained from the provider IDs of nodes + vmssName, resourceGroupName, err := getScaleSetAndResourceGroupNameByIPConfigurationID(ipConfigurationID) + if err != nil { + klog.V(4).Infof("ensureBackendPoolDeletedFromVMSS: found VMAS ipcConfigurationID %s, will skip checking and continue", ipConfigurationID) + continue + } + // only vmsses in the resource group same as it's in azure config are included + if strings.EqualFold(resourceGroupName, ss.ResourceGroup) { + vmssNamesMap[vmssName] = true + } + } + } else { + vmssNamesMap[vmSetName] = true + } + + for vmssName := range vmssNamesMap { + vmss, err := ss.GetScaleSetWithRetry(service, ss.ResourceGroup, vmssName) + + // When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error. + // Since it is being deleted, we shouldn't send more CreateOrUpdate requests for it. + if vmss.ProvisioningState != nil && strings.EqualFold(*vmss.ProvisioningState, virtualMachineScaleSetsDeallocating) { + klog.V(3).Infof("ensureVMSSInPool: found vmss %s being deleted, skipping", vmssName) + continue + } + + if err != nil { + return err + } + if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil { + klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName) + continue + } + vmssNIC := *vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations + primaryNIC, err := ss.getPrimaryNetworkInterfaceConfigurationForScaleSet(vmssNIC, vmssName) + if err != nil { + return err + } + primaryIPConfig, err := getPrimaryIPConfigFromVMSSNetworkConfig(primaryNIC) + if err != nil { + return err + } + loadBalancerBackendAddressPools := []compute.SubResource{} + if primaryIPConfig.LoadBalancerBackendAddressPools != nil { + loadBalancerBackendAddressPools = *primaryIPConfig.LoadBalancerBackendAddressPools + } + + var found bool + var newBackendPools []compute.SubResource + for i := len(loadBalancerBackendAddressPools) - 1; i >= 0; i-- { + curPool := loadBalancerBackendAddressPools[i] + if strings.EqualFold(backendPoolID, *curPool.ID) { + klog.V(10).Infof("ensureBackendPoolDeletedFromVMSS gets unwanted backend pool %q for VMSS %s", backendPoolID, vmssName) + found = true + newBackendPools = append(loadBalancerBackendAddressPools[:i], loadBalancerBackendAddressPools[i+1:]...) + } + } + if !found { + continue + } + + // Compose a new vmss with added backendPoolID. + primaryIPConfig.LoadBalancerBackendAddressPools = &newBackendPools + newVMSS := compute.VirtualMachineScaleSet{ + Sku: vmss.Sku, + Location: vmss.Location, + VirtualMachineScaleSetProperties: &compute.VirtualMachineScaleSetProperties{ + VirtualMachineProfile: &compute.VirtualMachineScaleSetVMProfile{ + NetworkProfile: &compute.VirtualMachineScaleSetNetworkProfile{ + NetworkInterfaceConfigurations: &vmssNIC, + }, + }, + }, + } + + // Update vmssVM with backoff. + ctx, cancel := getContextWithCancel() + defer cancel() + + klog.V(2).Infof("ensureBackendPoolDeletedFromVMSS begins to update vmss(%s) with backendPoolID %s", vmssName, backendPoolID) + resp, err := ss.VirtualMachineScaleSetsClient.CreateOrUpdate(ctx, ss.ResourceGroup, vmssName, newVMSS) + if ss.CloudProviderBackoff && shouldRetryHTTPRequest(resp, err) { + klog.V(2).Infof("ensureBackendPoolDeletedFromVMSS update backing off vmss(%s) with backendPoolID %s, err: %v", vmssName, backendPoolID, err) + retryErr := ss.CreateOrUpdateVmssWithRetry(ss.ResourceGroup, vmssName, newVMSS) + if retryErr != nil { + err = retryErr + klog.Errorf("ensureBackendPoolDeletedFromVMSS update abort backoff vmssVM(%s) with backendPoolID %s, err: %v", vmssName, backendPoolID, err) + } + } + if err != nil { + return err + } + } + + return nil +} + // EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes. func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool) error { // Returns nil if backend address pools already deleted. @@ -965,7 +1280,9 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, ipConfigurationID := ipConfigurationIDs[i] f := func() error { - if scaleSetName, err := extractScaleSetNameByProviderID(ipConfigurationID); err == nil { + var scaleSetName string + var err error + if scaleSetName, err = extractScaleSetNameByProviderID(ipConfigurationID); err == nil { // Only remove nodes belonging to specified vmSet to basic LB backends. if !ss.useStandardLoadBalancer() && !strings.EqualFold(scaleSetName, vmSetName) { return nil @@ -996,5 +1313,10 @@ func (ss *scaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, return utilerrors.Flatten(errs) } + err := ss.ensureBackendPoolDeletedFromVMSS(service, backendPoolID, vmSetName, ipConfigurationIDs) + if err != nil { + return err + } + return nil } diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go index 172d06751f..a7ef5a5ff1 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2018 The Kubernetes Authors. diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go index 69ca7cf48b..5da34a1f40 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_wrap.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -23,8 +25,8 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" "github.com/Azure/go-autorest/autorest" "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go b/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go index 8ad5d14b92..e5c3c88905 100644 --- a/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go +++ b/vendor/k8s.io/legacy-cloud-providers/azure/azure_zones.go @@ -1,3 +1,5 @@ +// +build !providerless + /* Copyright 2016 The Kubernetes Authors. @@ -29,8 +31,8 @@ import ( ) // makeZone returns the zone value in format of -. -func (az *Cloud) makeZone(zoneID int) string { - return fmt.Sprintf("%s-%d", strings.ToLower(az.Location), zoneID) +func (az *Cloud) makeZone(location string, zoneID int) string { + return fmt.Sprintf("%s-%d", strings.ToLower(location), zoneID) } // isAvailabilityZone returns true if the zone is in format of -. @@ -57,16 +59,18 @@ func (az *Cloud) GetZone(ctx context.Context) (cloudprovider.Zone, error) { } if metadata.Compute == nil { + az.metadata.imsCache.Delete(metadataCacheKey) return cloudprovider.Zone{}, fmt.Errorf("failure of getting compute information from instance metadata") } zone := "" + location := metadata.Compute.Location if metadata.Compute.Zone != "" { zoneID, err := strconv.Atoi(metadata.Compute.Zone) if err != nil { return cloudprovider.Zone{}, fmt.Errorf("failed to parse zone ID %q: %v", metadata.Compute.Zone, err) } - zone = az.makeZone(zoneID) + zone = az.makeZone(location, zoneID) } else { klog.V(3).Infof("Availability zone is not enabled for the node, falling back to fault domain") zone = metadata.Compute.FaultDomain @@ -74,7 +78,7 @@ func (az *Cloud) GetZone(ctx context.Context) (cloudprovider.Zone, error) { return cloudprovider.Zone{ FailureDomain: zone, - Region: az.Location, + Region: location, }, nil } // if UseInstanceMetadata is false, get Zone name by calling ARM diff --git a/vendor/k8s.io/legacy-cloud-providers/azure/doc.go b/vendor/k8s.io/legacy-cloud-providers/azure/doc.go new file mode 100644 index 0000000000..55dd87189f --- /dev/null +++ b/vendor/k8s.io/legacy-cloud-providers/azure/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package azure From ec216d7e216601fa4ee4dbd9ec50fdeca471c61d Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Mon, 9 Sep 2019 05:35:59 +0000 Subject: [PATCH 4/5] Run gofmt for all files --- cmd/cloud-controller-manager/app/controllermanager.go | 2 +- cmd/cloud-node-manager/app/nodemanager.go | 2 +- pkg/node/node.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cloud-controller-manager/app/controllermanager.go b/cmd/cloud-controller-manager/app/controllermanager.go index 5a203696df..02b4167547 100644 --- a/cmd/cloud-controller-manager/app/controllermanager.go +++ b/cmd/cloud-controller-manager/app/controllermanager.go @@ -62,7 +62,7 @@ func NewCloudControllerManagerCommand() *cobra.Command { } cmd := &cobra.Command{ - Use: "cloud-controller-manager", + Use: "cloud-controller-manager", Long: `The Cloud controller manager is a daemon that embeds the cloud specific control loops shipped with Kubernetes.`, Run: func(cmd *cobra.Command, args []string) { verflag.PrintAndExitIfRequested("Cloud Provider Azure") diff --git a/cmd/cloud-node-manager/app/nodemanager.go b/cmd/cloud-node-manager/app/nodemanager.go index 02f4e2553e..5da6f8e2d6 100644 --- a/cmd/cloud-node-manager/app/nodemanager.go +++ b/cmd/cloud-node-manager/app/nodemanager.go @@ -49,7 +49,7 @@ func NewCloudNodeManagerCommand() *cobra.Command { } cmd := &cobra.Command{ - Use: "cloud-node-manager", + Use: "cloud-node-manager", Long: `The Cloud node manager is a daemon that reconciles node information for its running node.`, Run: func(cmd *cobra.Command, args []string) { verflag.PrintAndExitIfRequested("Cloud Node Manager") diff --git a/pkg/node/node.go b/pkg/node/node.go index fbfb0786f7..dfd8190eb6 100644 --- a/pkg/node/node.go +++ b/pkg/node/node.go @@ -23,8 +23,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" cloudprovider "k8s.io/cloud-provider" - azureprovider "k8s.io/legacy-cloud-providers/azure" "k8s.io/klog" + azureprovider "k8s.io/legacy-cloud-providers/azure" ) // IMDSNodeProvider implements nodemanager.NodeProvider. From 92154859a672c730cd016461fbad218a493f3fd8 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Mon, 9 Sep 2019 06:34:43 +0000 Subject: [PATCH 5/5] Swith to capacity.DeepCopy() --- tests/e2e/autoscaling/autoscaler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/autoscaling/autoscaler.go b/tests/e2e/autoscaling/autoscaler.go index 50a8529d00..cd52401f8d 100644 --- a/tests/e2e/autoscaling/autoscaler.go +++ b/tests/e2e/autoscaling/autoscaler.go @@ -75,7 +75,7 @@ var _ = Describe("Cluster size autoscaler [Serial][Slow]", func() { runningQuantity, err := utils.GetAvailableNodeCapacity(cs) Expect(err).NotTo(HaveOccurred()) - emptyQuantity := initNodeCapacity.Copy() + emptyQuantity := initNodeCapacity.DeepCopy() emptyQuantity.Sub(runningQuantity) podCount = int(emptyQuantity.MilliValue()/podSize) + 1