From dac5cc0fba978581afc55d918a8b115d34757163 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Mon, 30 Dec 2019 04:05:18 +0000 Subject: [PATCH] api: rename ConnectionSourceType::LOCAL to SAME_IP_OR_LOOPBACK. (#9518) Also Utility::isLocalConnection() to Utility::isSameIpOrLoopback(). The idea is to improve descriptive accuracy, see https://github.com/envoyproxy/envoy/pull/7840#issuecomment-524002499. Risk level: Low Testing: additional protoxform golden test added for enum value renames. Fixes #8081 Signed-off-by: Harvey Tuch Mirrored from https://github.com/envoyproxy/envoy @ 2a9175a41ec8075af7f8429555825c8bc2dcdce2 --- envoy/api/v2/listener/BUILD | 1 + envoy/api/v2/listener/listener.proto | 3 ++- envoy/api/v3alpha/listener/listener.proto | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/envoy/api/v2/listener/BUILD b/envoy/api/v2/listener/BUILD index 3a88d9fd..b1c016b8 100644 --- a/envoy/api/v2/listener/BUILD +++ b/envoy/api/v2/listener/BUILD @@ -8,5 +8,6 @@ api_proto_package( deps = [ "//envoy/api/v2/auth:pkg", "//envoy/api/v2/core:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", ], ) diff --git a/envoy/api/v2/listener/listener.proto b/envoy/api/v2/listener/listener.proto index 65caf2b9..c5399e76 100644 --- a/envoy/api/v2/listener/listener.proto +++ b/envoy/api/v2/listener/listener.proto @@ -10,6 +10,7 @@ import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/wrappers.proto"; +import "udpa/annotations/migrate.proto"; import "validate/validate.proto"; option java_package = "io.envoyproxy.envoy.api.v2.listener"; @@ -72,7 +73,7 @@ message FilterChainMatch { ANY = 0; // Match a connection originating from the same host. - LOCAL = 1; + LOCAL = 1 [(udpa.annotations.enum_value_migrate).rename = "SAME_IP_OR_LOOPBACK"]; // Match a connection originating from a different host. EXTERNAL = 2; diff --git a/envoy/api/v3alpha/listener/listener.proto b/envoy/api/v3alpha/listener/listener.proto index 0e72c5b5..49ce51e6 100644 --- a/envoy/api/v3alpha/listener/listener.proto +++ b/envoy/api/v3alpha/listener/listener.proto @@ -76,7 +76,7 @@ message FilterChainMatch { ANY = 0; // Match a connection originating from the same host. - LOCAL = 1; + SAME_IP_OR_LOOPBACK = 1; // Match a connection originating from a different host. EXTERNAL = 2;