From 3aa7457b2d4e5def22942a80eabcee73cecbc8ca Mon Sep 17 00:00:00 2001 From: Pradeep Mamillapalli Date: Thu, 7 Jan 2021 13:06:14 -0500 Subject: [PATCH] xds client: Updated v3 type for http connection manager (#4137) --- xds/internal/client/client_lds_test.go | 8 +++----- xds/internal/version/version.go | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xds/internal/client/client_lds_test.go b/xds/internal/client/client_lds_test.go index eedfe72f94e2..bb100aea48b1 100644 --- a/xds/internal/client/client_lds_test.go +++ b/xds/internal/client/client_lds_test.go @@ -29,6 +29,7 @@ import ( v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" v3httppb "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3" "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" anypb "github.com/golang/protobuf/ptypes/any" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -84,14 +85,11 @@ func (s) TestUnmarshalListener(t *testing.T) { }, }, } - mcm, _ := proto.Marshal(cm) + mcm, _ := ptypes.MarshalAny(cm) lis := &v3listenerpb.Listener{ Name: v3LDSTarget, ApiListener: &v3listenerpb.ApiListener{ - ApiListener: &anypb.Any{ - TypeUrl: version.V3HTTPConnManagerURL, - Value: mcm, - }, + ApiListener: mcm, }, } mLis, _ := proto.Marshal(lis) diff --git a/xds/internal/version/version.go b/xds/internal/version/version.go index 39344187d9e4..6e05b77e825c 100644 --- a/xds/internal/version/version.go +++ b/xds/internal/version/version.go @@ -45,6 +45,6 @@ const ( V3RouteConfigURL = "type.googleapis.com/envoy.config.route.v3.RouteConfiguration" V3ClusterURL = "type.googleapis.com/envoy.config.cluster.v3.Cluster" V3EndpointsURL = "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment" - V3HTTPConnManagerURL = "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v3.HttpConnectionManager" + V3HTTPConnManagerURL = "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager" V3UpstreamTLSContextURL = "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext" )