From cb3c46bcf9d4f900869a7bb9cc8070b96775f369 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Wed, 18 Jul 2018 18:20:41 -0400 Subject: [PATCH] Move well known names from ALL_CAPS to CamelCase. Signed-off-by: Matt Rice --- source/common/config/bootstrap_json.cc | 4 +- source/common/config/filter_json.cc | 2 +- source/common/config/rds_json.cc | 2 +- source/common/router/config_impl.cc | 2 +- source/common/upstream/health_checker_impl.cc | 2 +- source/common/upstream/upstream_impl.cc | 4 +- .../extensions/access_loggers/file/config.cc | 2 +- .../access_loggers/http_grpc/config.cc | 2 +- .../access_loggers/well_known_names.h | 4 +- .../filters/http/buffer/buffer_filter.cc | 2 +- .../extensions/filters/http/buffer/config.h | 2 +- source/extensions/filters/http/cors/config.h | 2 +- .../extensions/filters/http/dynamo/config.h | 2 +- .../filters/http/ext_authz/config.h | 2 +- source/extensions/filters/http/fault/config.h | 2 +- .../filters/http/fault/fault_filter.cc | 2 +- .../filters/http/grpc_http1_bridge/config.h | 2 +- .../http/grpc_json_transcoder/config.h | 2 +- .../extensions/filters/http/grpc_web/config.h | 2 +- source/extensions/filters/http/gzip/config.h | 2 +- .../filters/http/header_to_metadata/config.h | 2 +- .../header_to_metadata_filter.cc | 2 +- .../filters/http/health_check/config.h | 2 +- .../filters/http/ip_tagging/config.h | 2 +- .../filters/http/jwt_authn/filter_factory.h | 2 +- source/extensions/filters/http/lua/config.h | 2 +- .../extensions/filters/http/lua/lua_filter.h | 2 +- .../filters/http/ratelimit/config.h | 2 +- source/extensions/filters/http/rbac/config.h | 2 +- .../filters/http/rbac/rbac_filter.cc | 2 +- .../extensions/filters/http/router/config.h | 2 +- .../extensions/filters/http/squash/config.h | 2 +- .../filters/http/well_known_names.h | 42 +++++++++---------- .../filters/listener/original_dst/config.cc | 2 +- .../filters/listener/proxy_protocol/config.cc | 2 +- .../filters/listener/tls_inspector/config.cc | 2 +- .../listener/tls_inspector/tls_inspector.cc | 2 +- .../filters/listener/well_known_names.h | 6 +-- .../filters/network/client_ssl_auth/config.h | 2 +- .../extensions/filters/network/echo/config.cc | 2 +- .../filters/network/ext_authz/config.h | 2 +- .../network/http_connection_manager/config.h | 2 +- .../filters/network/mongo_proxy/config.h | 2 +- .../filters/network/ratelimit/config.h | 2 +- .../filters/network/redis_proxy/config.h | 2 +- .../filters/network/tcp_proxy/config.h | 2 +- .../filters/network/thrift_proxy/config.h | 2 +- .../filters/network/well_known_names.h | 22 +++++----- .../grpc_credentials/example/config.h | 2 +- .../file_based_metadata/config.cc | 2 +- .../file_based_metadata/config.h | 2 +- .../grpc_credentials/well_known_names.h | 4 +- .../extensions/health_checkers/redis/config.h | 2 +- .../health_checkers/well_known_names.h | 2 +- .../stat_sinks/dog_statsd/config.cc | 2 +- .../extensions/stat_sinks/hystrix/config.cc | 2 +- .../stat_sinks/metrics_service/config.cc | 2 +- source/extensions/stat_sinks/statsd/config.cc | 2 +- .../extensions/stat_sinks/well_known_names.h | 8 ++-- .../extensions/tracers/dynamic_ot/config.cc | 2 +- source/extensions/tracers/lightstep/config.cc | 2 +- source/extensions/tracers/well_known_names.h | 6 +-- source/extensions/tracers/zipkin/config.cc | 2 +- .../transport_sockets/capture/config.h | 2 +- .../transport_sockets/raw_buffer/config.h | 2 +- .../extensions/transport_sockets/ssl/config.h | 2 +- .../transport_sockets/well_known_names.h | 6 +-- source/server/connection_handler_impl.cc | 2 +- source/server/listener_manager_impl.cc | 12 +++--- .../grpc/grpc_client_integration_test.cc | 10 ++--- test/common/tcp_proxy/tcp_proxy_test.cc | 6 +-- .../access_loggers/file/config_test.cc | 4 +- .../access_loggers/http_grpc/config_test.cc | 2 +- .../filters/http/buffer/buffer_filter_test.cc | 4 +- .../filters/http/fault/fault_filter_test.cc | 4 +- .../http/jwt_authn/filter_integration_test.cc | 2 +- .../filters/http/lua/lua_integration_test.cc | 2 +- .../http/rbac/rbac_filter_integration_test.cc | 2 +- .../filters/http/rbac/rbac_filter_test.cc | 2 +- .../filters/http/router/config_test.cc | 2 +- .../network/client_ssl_auth/config_test.cc | 2 +- ...le_based_metadata_grpc_credentials_test.cc | 8 ++-- .../stats_sinks/dog_statsd/config_test.cc | 2 +- .../stats_sinks/hystrix/config_test.cc | 2 +- .../stats_sinks/statsd/config_test.cc | 12 +++--- test/server/configuration_impl_test.cc | 2 +- 86 files changed, 151 insertions(+), 151 deletions(-) diff --git a/source/common/config/bootstrap_json.cc b/source/common/config/bootstrap_json.cc index 6af1394ec723..4373f5f69e37 100644 --- a/source/common/config/bootstrap_json.cc +++ b/source/common/config/bootstrap_json.cc @@ -78,7 +78,7 @@ void BootstrapJson::translateBootstrap(const Json::Object& json_config, auto* stats_sinks = bootstrap.mutable_stats_sinks(); if (json_config.hasObject("statsd_udp_ip_address")) { auto* stats_sink = stats_sinks->Add(); - stats_sink->set_name(Extensions::StatSinks::StatsSinkNames::get().STATSD); + stats_sink->set_name(Extensions::StatSinks::StatsSinkNames::get().Statsd); envoy::config::metrics::v2::StatsdSink statsd_sink; AddressJson::translateAddress(json_config.getString("statsd_udp_ip_address"), false, true, *statsd_sink.mutable_address()); @@ -87,7 +87,7 @@ void BootstrapJson::translateBootstrap(const Json::Object& json_config, if (json_config.hasObject("statsd_tcp_cluster_name")) { auto* stats_sink = stats_sinks->Add(); - stats_sink->set_name(Extensions::StatSinks::StatsSinkNames::get().STATSD); + stats_sink->set_name(Extensions::StatSinks::StatsSinkNames::get().Statsd); envoy::config::metrics::v2::StatsdSink statsd_sink; statsd_sink.set_tcp_cluster_name(json_config.getString("statsd_tcp_cluster_name")); MessageUtil::jsonConvert(statsd_sink, *stats_sink->mutable_config()); diff --git a/source/common/config/filter_json.cc b/source/common/config/filter_json.cc index a00b45280088..1b912766e9c6 100644 --- a/source/common/config/filter_json.cc +++ b/source/common/config/filter_json.cc @@ -116,7 +116,7 @@ void FilterJson::translateAccessLog(const Json::Object& json_config, // Statically registered access logs are a v2-only feature, so use the standard internal file // access log for json config conversion. - proto_config.set_name(Extensions::AccessLoggers::AccessLogNames::get().FILE); + proto_config.set_name(Extensions::AccessLoggers::AccessLogNames::get().File); if (json_config.hasObject("filter")) { translateAccessLogFilter(*json_config.getObject("filter"), *proto_config.mutable_filter()); diff --git a/source/common/config/rds_json.cc b/source/common/config/rds_json.cc index 946623b54ba7..8e91e524ecbf 100644 --- a/source/common/config/rds_json.cc +++ b/source/common/config/rds_json.cc @@ -342,7 +342,7 @@ void RdsJson::translateRoute(const Json::Object& json_route, envoy::api::v2::rou const Json::ObjectSharedPtr obj = json_route.getObject("opaque_config"); auto& filter_metadata = (*route.mutable_metadata() - ->mutable_filter_metadata())[Extensions::HttpFilters::HttpFilterNames::get().ROUTER]; + ->mutable_filter_metadata())[Extensions::HttpFilters::HttpFilterNames::get().Router]; obj->iterate([&filter_metadata](const std::string& name, const Json::Object& value) { (*filter_metadata.mutable_fields())[name].set_string_value(value.asString()); return true; diff --git a/source/common/router/config_impl.cc b/source/common/router/config_impl.cc index 10e4a680c638..cb0b726f9182 100644 --- a/source/common/router/config_impl.cc +++ b/source/common/router/config_impl.cc @@ -462,7 +462,7 @@ RouteEntryImplBase::parseOpaqueConfig(const envoy::api::v2::route::Route& route) std::multimap ret; if (route.has_metadata()) { const auto filter_metadata = route.metadata().filter_metadata().find( - Extensions::HttpFilters::HttpFilterNames::get().ROUTER); + Extensions::HttpFilters::HttpFilterNames::get().Router); if (filter_metadata == route.metadata().filter_metadata().end()) { return ret; } diff --git a/source/common/upstream/health_checker_impl.cc b/source/common/upstream/health_checker_impl.cc index 32afce10eb2b..cc90ab28aab6 100644 --- a/source/common/upstream/health_checker_impl.cc +++ b/source/common/upstream/health_checker_impl.cc @@ -73,7 +73,7 @@ HealthCheckerFactory::create(const envoy::api::v2::core::HealthCheck& hc_config, auto& factory = Config::Utility::getAndCheckFactory( hc_config.has_redis_health_check() - ? Extensions::HealthCheckers::HealthCheckerNames::get().REDIS_HEALTH_CHECKER + ? Extensions::HealthCheckers::HealthCheckerNames::get().RedisHealthChecker : std::string(hc_config.custom_health_check().name())); std::unique_ptr context( new HealthCheckerFactoryContextImpl(cluster, runtime, random, dispatcher, diff --git a/source/common/upstream/upstream_impl.cc b/source/common/upstream/upstream_impl.cc index 2c10cfd68c6c..014c9a6c9400 100644 --- a/source/common/upstream/upstream_impl.cc +++ b/source/common/upstream/upstream_impl.cc @@ -299,11 +299,11 @@ ClusterInfoImpl::ClusterInfoImpl(const envoy::api::v2::Cluster& config, auto transport_socket = config.transport_socket(); if (!config.has_transport_socket()) { if (config.has_tls_context()) { - transport_socket.set_name(Extensions::TransportSockets::TransportSocketNames::get().TLS); + transport_socket.set_name(Extensions::TransportSockets::TransportSocketNames::get().Tls); MessageUtil::jsonConvert(config.tls_context(), *transport_socket.mutable_config()); } else { transport_socket.set_name( - Extensions::TransportSockets::TransportSocketNames::get().RAW_BUFFER); + Extensions::TransportSockets::TransportSocketNames::get().RawBuffer); } } diff --git a/source/extensions/access_loggers/file/config.cc b/source/extensions/access_loggers/file/config.cc index 8494f39db931..8490a72eccb0 100644 --- a/source/extensions/access_loggers/file/config.cc +++ b/source/extensions/access_loggers/file/config.cc @@ -35,7 +35,7 @@ ProtobufTypes::MessagePtr FileAccessLogFactory::createEmptyConfigProto() { return ProtobufTypes::MessagePtr{new envoy::config::accesslog::v2::FileAccessLog()}; } -std::string FileAccessLogFactory::name() const { return AccessLogNames::get().FILE; } +std::string FileAccessLogFactory::name() const { return AccessLogNames::get().File; } /** * Static registration for the file access log. @see RegisterFactory. diff --git a/source/extensions/access_loggers/http_grpc/config.cc b/source/extensions/access_loggers/http_grpc/config.cc index ec24ebaea407..4953c2bd3d59 100644 --- a/source/extensions/access_loggers/http_grpc/config.cc +++ b/source/extensions/access_loggers/http_grpc/config.cc @@ -44,7 +44,7 @@ ProtobufTypes::MessagePtr HttpGrpcAccessLogFactory::createEmptyConfigProto() { return ProtobufTypes::MessagePtr{new envoy::config::accesslog::v2::HttpGrpcAccessLogConfig()}; } -std::string HttpGrpcAccessLogFactory::name() const { return AccessLogNames::get().HTTP_GRPC; } +std::string HttpGrpcAccessLogFactory::name() const { return AccessLogNames::get().HttpGrpc; } /** * Static registration for the HTTP gRPC access log. @see RegisterFactory. diff --git a/source/extensions/access_loggers/well_known_names.h b/source/extensions/access_loggers/well_known_names.h index 1b1c22fa758a..737a4b9c04d3 100644 --- a/source/extensions/access_loggers/well_known_names.h +++ b/source/extensions/access_loggers/well_known_names.h @@ -13,9 +13,9 @@ namespace AccessLoggers { class AccessLogNameValues { public: // File access log - const std::string FILE = "envoy.file_access_log"; + const std::string File = "envoy.file_access_log"; // HTTP gRPC access log - const std::string HTTP_GRPC = "envoy.http_grpc_access_log"; + const std::string HttpGrpc = "envoy.http_grpc_access_log"; }; typedef ConstSingleton AccessLogNames; diff --git a/source/extensions/filters/http/buffer/buffer_filter.cc b/source/extensions/filters/http/buffer/buffer_filter.cc index 36b45f31fd93..6db61bdc0745 100644 --- a/source/extensions/filters/http/buffer/buffer_filter.cc +++ b/source/extensions/filters/http/buffer/buffer_filter.cc @@ -58,7 +58,7 @@ void BufferFilter::initConfig() { return; } - const std::string& name = HttpFilterNames::get().BUFFER; + const std::string& name = HttpFilterNames::get().Buffer; const auto* entry = callbacks_->route()->routeEntry(); const BufferFilterSettings* route_local = diff --git a/source/extensions/filters/http/buffer/config.h b/source/extensions/filters/http/buffer/config.h index 98c14afb3868..232acd431592 100644 --- a/source/extensions/filters/http/buffer/config.h +++ b/source/extensions/filters/http/buffer/config.h @@ -17,7 +17,7 @@ class BufferFilterFactory : public Common::FactoryBase { public: - BufferFilterFactory() : FactoryBase(HttpFilterNames::get().BUFFER) {} + BufferFilterFactory() : FactoryBase(HttpFilterNames::get().Buffer) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string& stats_prefix, diff --git a/source/extensions/filters/http/cors/config.h b/source/extensions/filters/http/cors/config.h index b1e2f947a08c..9ce14197fc43 100644 --- a/source/extensions/filters/http/cors/config.h +++ b/source/extensions/filters/http/cors/config.h @@ -15,7 +15,7 @@ namespace Cors { */ class CorsFilterConfig : public Common::EmptyHttpFilterConfig { public: - CorsFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().CORS) {} + CorsFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().Cors) {} Http::FilterFactoryCb createFilter(const std::string&, Server::Configuration::FactoryContext&) override; diff --git a/source/extensions/filters/http/dynamo/config.h b/source/extensions/filters/http/dynamo/config.h index ce75bebb150f..d452985beb2f 100644 --- a/source/extensions/filters/http/dynamo/config.h +++ b/source/extensions/filters/http/dynamo/config.h @@ -15,7 +15,7 @@ namespace Dynamo { */ class DynamoFilterConfig : public Common::EmptyHttpFilterConfig { public: - DynamoFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().DYNAMO) {} + DynamoFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().Dynamo) {} Http::FilterFactoryCb createFilter(const std::string& stat_prefix, Server::Configuration::FactoryContext& context) override; diff --git a/source/extensions/filters/http/ext_authz/config.h b/source/extensions/filters/http/ext_authz/config.h index e9ba463b4044..71f003c8fe97 100644 --- a/source/extensions/filters/http/ext_authz/config.h +++ b/source/extensions/filters/http/ext_authz/config.h @@ -16,7 +16,7 @@ namespace ExtAuthz { class ExtAuthzFilterConfig : public Common::FactoryBase { public: - ExtAuthzFilterConfig() : FactoryBase(HttpFilterNames::get().EXT_AUTHORIZATION) {} + ExtAuthzFilterConfig() : FactoryBase(HttpFilterNames::get().ExtAuthorization) {} private: static constexpr uint64_t DefaultTimeout = 200; diff --git a/source/extensions/filters/http/fault/config.h b/source/extensions/filters/http/fault/config.h index ae41ebc42261..240c2f7dab52 100644 --- a/source/extensions/filters/http/fault/config.h +++ b/source/extensions/filters/http/fault/config.h @@ -16,7 +16,7 @@ namespace Fault { class FaultFilterFactory : public Common::FactoryBase { public: - FaultFilterFactory() : FactoryBase(HttpFilterNames::get().FAULT) {} + FaultFilterFactory() : FactoryBase(HttpFilterNames::get().Fault) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string& stats_prefix, diff --git a/source/extensions/filters/http/fault/fault_filter.cc b/source/extensions/filters/http/fault/fault_filter.cc index 9669b8b041d7..47bfbec25900 100644 --- a/source/extensions/filters/http/fault/fault_filter.cc +++ b/source/extensions/filters/http/fault/fault_filter.cc @@ -76,7 +76,7 @@ Http::FilterHeadersStatus FaultFilter::decodeHeaders(Http::HeaderMap& headers, b // configured at the filter level. fault_settings_ = config_->settings(); if (callbacks_->route() && callbacks_->route()->routeEntry()) { - const std::string& name = Extensions::HttpFilters::HttpFilterNames::get().FAULT; + const std::string& name = Extensions::HttpFilters::HttpFilterNames::get().Fault; const auto* route_entry = callbacks_->route()->routeEntry(); const FaultSettings* per_route_settings_ = diff --git a/source/extensions/filters/http/grpc_http1_bridge/config.h b/source/extensions/filters/http/grpc_http1_bridge/config.h index 7edb9106adec..b8a698f0d785 100644 --- a/source/extensions/filters/http/grpc_http1_bridge/config.h +++ b/source/extensions/filters/http/grpc_http1_bridge/config.h @@ -16,7 +16,7 @@ namespace GrpcHttp1Bridge { class GrpcHttp1BridgeFilterConfig : public Common::EmptyHttpFilterConfig { public: GrpcHttp1BridgeFilterConfig() - : Common::EmptyHttpFilterConfig(HttpFilterNames::get().GRPC_HTTP1_BRIDGE) {} + : Common::EmptyHttpFilterConfig(HttpFilterNames::get().GrpcHttp1Bridge) {} Http::FilterFactoryCb createFilter(const std::string&, Server::Configuration::FactoryContext& context) override; diff --git a/source/extensions/filters/http/grpc_json_transcoder/config.h b/source/extensions/filters/http/grpc_json_transcoder/config.h index 8c332d342a3d..8b910725c690 100644 --- a/source/extensions/filters/http/grpc_json_transcoder/config.h +++ b/source/extensions/filters/http/grpc_json_transcoder/config.h @@ -16,7 +16,7 @@ namespace GrpcJsonTranscoder { class GrpcJsonTranscoderFilterConfig : public Common::FactoryBase { public: - GrpcJsonTranscoderFilterConfig() : FactoryBase(HttpFilterNames::get().GRPC_JSON_TRANSCODER) {} + GrpcJsonTranscoderFilterConfig() : FactoryBase(HttpFilterNames::get().GrpcJsonTranscoder) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string& stats_prefix, diff --git a/source/extensions/filters/http/grpc_web/config.h b/source/extensions/filters/http/grpc_web/config.h index 98fabcf17c81..a1402b15fce5 100644 --- a/source/extensions/filters/http/grpc_web/config.h +++ b/source/extensions/filters/http/grpc_web/config.h @@ -12,7 +12,7 @@ namespace GrpcWeb { class GrpcWebFilterConfig : public Common::EmptyHttpFilterConfig { public: - GrpcWebFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().GRPC_WEB) {} + GrpcWebFilterConfig() : Common::EmptyHttpFilterConfig(HttpFilterNames::get().GrpcWeb) {} Http::FilterFactoryCb createFilter(const std::string&, Server::Configuration::FactoryContext& context) override; diff --git a/source/extensions/filters/http/gzip/config.h b/source/extensions/filters/http/gzip/config.h index 06e2e70a5ae6..8dd48de622d3 100644 --- a/source/extensions/filters/http/gzip/config.h +++ b/source/extensions/filters/http/gzip/config.h @@ -15,7 +15,7 @@ namespace Gzip { */ class GzipFilterFactory : public Common::FactoryBase { public: - GzipFilterFactory() : FactoryBase(HttpFilterNames::get().ENVOY_GZIP) {} + GzipFilterFactory() : FactoryBase(HttpFilterNames::get().EnvoyGzip) {} private: Http::FilterFactoryCb diff --git a/source/extensions/filters/http/header_to_metadata/config.h b/source/extensions/filters/http/header_to_metadata/config.h index bbc548376bc7..11ced03b1cbf 100644 --- a/source/extensions/filters/http/header_to_metadata/config.h +++ b/source/extensions/filters/http/header_to_metadata/config.h @@ -16,7 +16,7 @@ namespace HeaderToMetadataFilter { class HeaderToMetadataConfig : public Common::FactoryBase { public: - HeaderToMetadataConfig() : FactoryBase(HttpFilterNames::get().HEADER_TO_METADATA) {} + HeaderToMetadataConfig() : FactoryBase(HttpFilterNames::get().HeaderToMetadata) {} private: Http::FilterFactoryCb createFilterFactoryFromProtoTyped( diff --git a/source/extensions/filters/http/header_to_metadata/header_to_metadata_filter.cc b/source/extensions/filters/http/header_to_metadata/header_to_metadata_filter.cc index 83f7a356cb94..722c0d16a59d 100644 --- a/source/extensions/filters/http/header_to_metadata/header_to_metadata_filter.cc +++ b/source/extensions/filters/http/header_to_metadata/header_to_metadata_filter.cc @@ -132,7 +132,7 @@ bool HeaderToMetadataFilter::addMetadata(StructMap& map, const std::string& meta } const std::string& HeaderToMetadataFilter::decideNamespace(const std::string& nspace) const { - return nspace.empty() ? HttpFilterNames::get().HEADER_TO_METADATA : nspace; + return nspace.empty() ? HttpFilterNames::get().HeaderToMetadata : nspace; } void HeaderToMetadataFilter::writeHeaderToMetadata(Http::HeaderMap& headers, diff --git a/source/extensions/filters/http/health_check/config.h b/source/extensions/filters/http/health_check/config.h index 71bd8c91baad..d7763d6f0e96 100644 --- a/source/extensions/filters/http/health_check/config.h +++ b/source/extensions/filters/http/health_check/config.h @@ -13,7 +13,7 @@ namespace HealthCheck { class HealthCheckFilterConfig : public Common::FactoryBase { public: - HealthCheckFilterConfig() : FactoryBase(HttpFilterNames::get().HEALTH_CHECK) {} + HealthCheckFilterConfig() : FactoryBase(HttpFilterNames::get().HealthCheck) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string&, diff --git a/source/extensions/filters/http/ip_tagging/config.h b/source/extensions/filters/http/ip_tagging/config.h index 98bd55cb6304..01da576853bc 100644 --- a/source/extensions/filters/http/ip_tagging/config.h +++ b/source/extensions/filters/http/ip_tagging/config.h @@ -16,7 +16,7 @@ namespace IpTagging { class IpTaggingFilterFactory : public Common::FactoryBase { public: - IpTaggingFilterFactory() : FactoryBase(HttpFilterNames::get().IP_TAGGING) {} + IpTaggingFilterFactory() : FactoryBase(HttpFilterNames::get().IpTagging) {} private: Http::FilterFactoryCb createFilterFactoryFromProtoTyped( diff --git a/source/extensions/filters/http/jwt_authn/filter_factory.h b/source/extensions/filters/http/jwt_authn/filter_factory.h index 67f653bf053a..6bdee97bae50 100644 --- a/source/extensions/filters/http/jwt_authn/filter_factory.h +++ b/source/extensions/filters/http/jwt_authn/filter_factory.h @@ -17,7 +17,7 @@ namespace JwtAuthn { class FilterFactory : public Common::FactoryBase< ::envoy::config::filter::http::jwt_authn::v2alpha::JwtAuthentication> { public: - FilterFactory() : FactoryBase(HttpFilterNames::get().JWT_AUTHN) {} + FilterFactory() : FactoryBase(HttpFilterNames::get().JwtAuthn) {} private: Http::FilterFactoryCb createFilterFactoryFromProtoTyped( diff --git a/source/extensions/filters/http/lua/config.h b/source/extensions/filters/http/lua/config.h index 82d9ec287fbd..6921fc6b349a 100644 --- a/source/extensions/filters/http/lua/config.h +++ b/source/extensions/filters/http/lua/config.h @@ -15,7 +15,7 @@ namespace Lua { */ class LuaFilterConfig : public Common::FactoryBase { public: - LuaFilterConfig() : FactoryBase(HttpFilterNames::get().LUA) {} + LuaFilterConfig() : FactoryBase(HttpFilterNames::get().Lua) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string& stats_prefix, diff --git a/source/extensions/filters/http/lua/lua_filter.h b/source/extensions/filters/http/lua/lua_filter.h index 5ba7a9b0191b..bd306801606a 100644 --- a/source/extensions/filters/http/lua/lua_filter.h +++ b/source/extensions/filters/http/lua/lua_filter.h @@ -18,7 +18,7 @@ const ProtobufWkt::Struct& getMetadata(Http::StreamFilterCallbacks* callbacks) { return ProtobufWkt::Struct::default_instance(); } const auto& metadata = callbacks->route()->routeEntry()->metadata(); - const auto& filter_it = metadata.filter_metadata().find(HttpFilterNames::get().LUA); + const auto& filter_it = metadata.filter_metadata().find(HttpFilterNames::get().Lua); if (filter_it == metadata.filter_metadata().end()) { return ProtobufWkt::Struct::default_instance(); } diff --git a/source/extensions/filters/http/ratelimit/config.h b/source/extensions/filters/http/ratelimit/config.h index 91ec643de135..bf9ebadfe256 100644 --- a/source/extensions/filters/http/ratelimit/config.h +++ b/source/extensions/filters/http/ratelimit/config.h @@ -16,7 +16,7 @@ namespace RateLimitFilter { class RateLimitFilterConfig : public Common::FactoryBase { public: - RateLimitFilterConfig() : FactoryBase(HttpFilterNames::get().RATE_LIMIT) {} + RateLimitFilterConfig() : FactoryBase(HttpFilterNames::get().RateLimit) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string&, diff --git a/source/extensions/filters/http/rbac/config.h b/source/extensions/filters/http/rbac/config.h index c6002fb28401..f24235eb783f 100644 --- a/source/extensions/filters/http/rbac/config.h +++ b/source/extensions/filters/http/rbac/config.h @@ -18,7 +18,7 @@ class RoleBasedAccessControlFilterConfigFactory : public Common::FactoryBase { public: - RoleBasedAccessControlFilterConfigFactory() : FactoryBase(HttpFilterNames::get().RBAC) {} + RoleBasedAccessControlFilterConfigFactory() : FactoryBase(HttpFilterNames::get().Rbac) {} private: Http::FilterFactoryCb diff --git a/source/extensions/filters/http/rbac/rbac_filter.cc b/source/extensions/filters/http/rbac/rbac_filter.cc index 4fe193a5da6b..08a347a79aa9 100644 --- a/source/extensions/filters/http/rbac/rbac_filter.cc +++ b/source/extensions/filters/http/rbac/rbac_filter.cc @@ -36,7 +36,7 @@ RoleBasedAccessControlFilterConfig::engine(const Router::RouteConstSharedPtr rou return engine(mode); } - const std::string& name = HttpFilterNames::get().RBAC; + const std::string& name = HttpFilterNames::get().Rbac; const auto* entry = route->routeEntry(); const auto* route_local = diff --git a/source/extensions/filters/http/router/config.h b/source/extensions/filters/http/router/config.h index dcf0957ca4b1..11c4d74f8a45 100644 --- a/source/extensions/filters/http/router/config.h +++ b/source/extensions/filters/http/router/config.h @@ -18,7 +18,7 @@ namespace RouterFilter { class RouterFilterConfig : public Common::FactoryBase { public: - RouterFilterConfig() : FactoryBase(HttpFilterNames::get().ROUTER) {} + RouterFilterConfig() : FactoryBase(HttpFilterNames::get().Router) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string& stat_prefix, diff --git a/source/extensions/filters/http/squash/config.h b/source/extensions/filters/http/squash/config.h index 9cb83b0096f2..10647ebdb6b0 100644 --- a/source/extensions/filters/http/squash/config.h +++ b/source/extensions/filters/http/squash/config.h @@ -16,7 +16,7 @@ namespace Squash { class SquashFilterConfigFactory : public Common::FactoryBase { public: - SquashFilterConfigFactory() : FactoryBase(HttpFilterNames::get().SQUASH) {} + SquashFilterConfigFactory() : FactoryBase(HttpFilterNames::get().Squash) {} Http::FilterFactoryCb createFilterFactory(const Json::Object& json_config, const std::string&, diff --git a/source/extensions/filters/http/well_known_names.h b/source/extensions/filters/http/well_known_names.h index f71960625e0e..238671e6da28 100644 --- a/source/extensions/filters/http/well_known_names.h +++ b/source/extensions/filters/http/well_known_names.h @@ -13,50 +13,50 @@ namespace HttpFilters { class HttpFilterNameValues { public: // Buffer filter - const std::string BUFFER = "envoy.buffer"; + const std::string Buffer = "envoy.buffer"; // CORS filter - const std::string CORS = "envoy.cors"; + const std::string Cors = "envoy.cors"; // Dynamo filter - const std::string DYNAMO = "envoy.http_dynamo_filter"; + const std::string Dynamo = "envoy.http_dynamo_filter"; // Fault filter - const std::string FAULT = "envoy.fault"; + const std::string Fault = "envoy.fault"; // GRPC http1 bridge filter - const std::string GRPC_HTTP1_BRIDGE = "envoy.grpc_http1_bridge"; + const std::string GrpcHttp1Bridge = "envoy.grpc_http1_bridge"; // GRPC json transcoder filter - const std::string GRPC_JSON_TRANSCODER = "envoy.grpc_json_transcoder"; + const std::string GrpcJsonTranscoder = "envoy.grpc_json_transcoder"; // GRPC web filter - const std::string GRPC_WEB = "envoy.grpc_web"; + const std::string GrpcWeb = "envoy.grpc_web"; // Gzip filter - const std::string ENVOY_GZIP = "envoy.gzip"; + const std::string EnvoyGzip = "envoy.gzip"; // IP tagging filter - const std::string IP_TAGGING = "envoy.ip_tagging"; + const std::string IpTagging = "envoy.ip_tagging"; // Rate limit filter - const std::string RATE_LIMIT = "envoy.rate_limit"; + const std::string RateLimit = "envoy.rate_limit"; // Router filter - const std::string ROUTER = "envoy.router"; + const std::string Router = "envoy.router"; // Health checking filter - const std::string HEALTH_CHECK = "envoy.health_check"; + const std::string HealthCheck = "envoy.health_check"; // Lua filter - const std::string LUA = "envoy.lua"; + const std::string Lua = "envoy.lua"; // Squash filter - const std::string SQUASH = "envoy.squash"; + const std::string Squash = "envoy.squash"; // External Authorization filter - const std::string EXT_AUTHORIZATION = "envoy.ext_authz"; + const std::string ExtAuthorization = "envoy.ext_authz"; // RBAC HTTP Authorization filter - const std::string RBAC = "envoy.filters.http.rbac"; + const std::string Rbac = "envoy.filters.http.rbac"; // JWT authentication filter - const std::string JWT_AUTHN = "envoy.filters.http.jwt_authn"; + const std::string JwtAuthn = "envoy.filters.http.jwt_authn"; // Header to metadata filter - const std::string HEADER_TO_METADATA = "envoy.filters.http.header_to_metadata"; + const std::string HeaderToMetadata = "envoy.filters.http.header_to_metadata"; // Converts names from v1 to v2 const Config::V1Converter v1_converter_; // NOTE: Do not add any new filters to this list. All future filters are v2 only. HttpFilterNameValues() - : v1_converter_({BUFFER, CORS, DYNAMO, FAULT, GRPC_HTTP1_BRIDGE, GRPC_JSON_TRANSCODER, - GRPC_WEB, HEADER_TO_METADATA, HEALTH_CHECK, IP_TAGGING, RATE_LIMIT, ROUTER, - LUA, EXT_AUTHORIZATION}) {} + : v1_converter_({Buffer, Cors, Dynamo, Fault, GrpcHttp1Bridge, GrpcJsonTranscoder, GrpcWeb, + HeaderToMetadata, HealthCheck, IpTagging, RateLimit, Router, Lua, + ExtAuthorization}) {} }; typedef ConstSingleton HttpFilterNames; diff --git a/source/extensions/filters/listener/original_dst/config.cc b/source/extensions/filters/listener/original_dst/config.cc index 1176508cb103..63e858ee463f 100644 --- a/source/extensions/filters/listener/original_dst/config.cc +++ b/source/extensions/filters/listener/original_dst/config.cc @@ -29,7 +29,7 @@ class OriginalDstConfigFactory : public Server::Configuration::NamedListenerFilt return std::make_unique(); } - std::string name() override { return ListenerFilterNames::get().ORIGINAL_DST; } + std::string name() override { return ListenerFilterNames::get().OriginalDst; } }; /** diff --git a/source/extensions/filters/listener/proxy_protocol/config.cc b/source/extensions/filters/listener/proxy_protocol/config.cc index 3ce2d851f808..6cbe967666e0 100644 --- a/source/extensions/filters/listener/proxy_protocol/config.cc +++ b/source/extensions/filters/listener/proxy_protocol/config.cc @@ -28,7 +28,7 @@ class ProxyProtocolConfigFactory : public Server::Configuration::NamedListenerFi return std::make_unique(); } - std::string name() override { return ListenerFilterNames::get().PROXY_PROTOCOL; } + std::string name() override { return ListenerFilterNames::get().ProxyProtocol; } }; /** diff --git a/source/extensions/filters/listener/tls_inspector/config.cc b/source/extensions/filters/listener/tls_inspector/config.cc index a75bb315da48..af8f8170683c 100644 --- a/source/extensions/filters/listener/tls_inspector/config.cc +++ b/source/extensions/filters/listener/tls_inspector/config.cc @@ -30,7 +30,7 @@ class TlsInspectorConfigFactory : public Server::Configuration::NamedListenerFil return std::make_unique(); } - std::string name() override { return ListenerFilterNames::get().TLS_INSPECTOR; } + std::string name() override { return ListenerFilterNames::get().TlsInspector; } }; /** diff --git a/source/extensions/filters/listener/tls_inspector/tls_inspector.cc b/source/extensions/filters/listener/tls_inspector/tls_inspector.cc index 407cabdddbce..a462a812c870 100644 --- a/source/extensions/filters/listener/tls_inspector/tls_inspector.cc +++ b/source/extensions/filters/listener/tls_inspector/tls_inspector.cc @@ -210,7 +210,7 @@ void Filter::parseClientHello(const void* data, size_t len) { } else { config_->stats().alpn_not_found_.inc(); } - cb_->socket().setDetectedTransportProtocol(TransportSockets::TransportSocketNames::get().TLS); + cb_->socket().setDetectedTransportProtocol(TransportSockets::TransportSocketNames::get().Tls); } else { config_->stats().tls_not_found_.inc(); } diff --git a/source/extensions/filters/listener/well_known_names.h b/source/extensions/filters/listener/well_known_names.h index f9a4fbce5518..ae66726a10a2 100644 --- a/source/extensions/filters/listener/well_known_names.h +++ b/source/extensions/filters/listener/well_known_names.h @@ -13,11 +13,11 @@ namespace ListenerFilters { class ListenerFilterNameValues { public: // Original destination listener filter - const std::string ORIGINAL_DST = "envoy.listener.original_dst"; + const std::string OriginalDst = "envoy.listener.original_dst"; // Proxy Protocol listener filter - const std::string PROXY_PROTOCOL = "envoy.listener.proxy_protocol"; + const std::string ProxyProtocol = "envoy.listener.proxy_protocol"; // TLS Inspector listener filter - const std::string TLS_INSPECTOR = "envoy.listener.tls_inspector"; + const std::string TlsInspector = "envoy.listener.tls_inspector"; }; typedef ConstSingleton ListenerFilterNames; diff --git a/source/extensions/filters/network/client_ssl_auth/config.h b/source/extensions/filters/network/client_ssl_auth/config.h index 896e29923ba3..8953d3be6b2c 100644 --- a/source/extensions/filters/network/client_ssl_auth/config.h +++ b/source/extensions/filters/network/client_ssl_auth/config.h @@ -17,7 +17,7 @@ class ClientSslAuthConfigFactory : public Common::FactoryBase< envoy::config::filter::network::client_ssl_auth::v2::ClientSSLAuth> { public: - ClientSslAuthConfigFactory() : FactoryBase(NetworkFilterNames::get().CLIENT_SSL_AUTH) {} + ClientSslAuthConfigFactory() : FactoryBase(NetworkFilterNames::get().ClientSslAuth) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/echo/config.cc b/source/extensions/filters/network/echo/config.cc index d092b074ae2d..990a3bf5ac01 100644 --- a/source/extensions/filters/network/echo/config.cc +++ b/source/extensions/filters/network/echo/config.cc @@ -34,7 +34,7 @@ class EchoConfigFactory : public Server::Configuration::NamedNetworkFilterConfig return ProtobufTypes::MessagePtr{new Envoy::ProtobufWkt::Empty()}; } - std::string name() override { return NetworkFilterNames::get().ECHO; } + std::string name() override { return NetworkFilterNames::get().Echo; } }; /** diff --git a/source/extensions/filters/network/ext_authz/config.h b/source/extensions/filters/network/ext_authz/config.h index 6c801436aa88..05fccafbb1f5 100644 --- a/source/extensions/filters/network/ext_authz/config.h +++ b/source/extensions/filters/network/ext_authz/config.h @@ -17,7 +17,7 @@ namespace ExtAuthz { class ExtAuthzConfigFactory : public Common::FactoryBase { public: - ExtAuthzConfigFactory() : FactoryBase(NetworkFilterNames::get().EXT_AUTHORIZATION) {} + ExtAuthzConfigFactory() : FactoryBase(NetworkFilterNames::get().ExtAuthorization) {} private: Network::FilterFactoryCb createFilterFactoryFromProtoTyped( diff --git a/source/extensions/filters/network/http_connection_manager/config.h b/source/extensions/filters/network/http_connection_manager/config.h index 9e5863b0efcb..f8f5c6fd4cb0 100644 --- a/source/extensions/filters/network/http_connection_manager/config.h +++ b/source/extensions/filters/network/http_connection_manager/config.h @@ -32,7 +32,7 @@ class HttpConnectionManagerFilterConfigFactory envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager> { public: HttpConnectionManagerFilterConfigFactory() - : FactoryBase(NetworkFilterNames::get().HTTP_CONNECTION_MANAGER) {} + : FactoryBase(NetworkFilterNames::get().HttpConnectionManager) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/mongo_proxy/config.h b/source/extensions/filters/network/mongo_proxy/config.h index 78ae8f8eb8c3..c69ce12d5b2d 100644 --- a/source/extensions/filters/network/mongo_proxy/config.h +++ b/source/extensions/filters/network/mongo_proxy/config.h @@ -19,7 +19,7 @@ namespace MongoProxy { class MongoProxyFilterConfigFactory : public Common::FactoryBase { public: - MongoProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().MONGO_PROXY) {} + MongoProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().MongoProxy) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/ratelimit/config.h b/source/extensions/filters/network/ratelimit/config.h index fd68087efd4f..19c77ddd748e 100644 --- a/source/extensions/filters/network/ratelimit/config.h +++ b/source/extensions/filters/network/ratelimit/config.h @@ -17,7 +17,7 @@ namespace RateLimitFilter { class RateLimitConfigFactory : public Common::FactoryBase { public: - RateLimitConfigFactory() : FactoryBase(NetworkFilterNames::get().RATE_LIMIT) {} + RateLimitConfigFactory() : FactoryBase(NetworkFilterNames::get().RateLimit) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/redis_proxy/config.h b/source/extensions/filters/network/redis_proxy/config.h index a499edc6acd1..51562452b0bb 100644 --- a/source/extensions/filters/network/redis_proxy/config.h +++ b/source/extensions/filters/network/redis_proxy/config.h @@ -19,7 +19,7 @@ namespace RedisProxy { class RedisProxyFilterConfigFactory : public Common::FactoryBase { public: - RedisProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().REDIS_PROXY) {} + RedisProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().RedisProxy) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/tcp_proxy/config.h b/source/extensions/filters/network/tcp_proxy/config.h index 8e7deba8fc12..e5664ed45a7f 100644 --- a/source/extensions/filters/network/tcp_proxy/config.h +++ b/source/extensions/filters/network/tcp_proxy/config.h @@ -16,7 +16,7 @@ namespace TcpProxy { class ConfigFactory : public Common::FactoryBase { public: - ConfigFactory() : FactoryBase(NetworkFilterNames::get().TCP_PROXY) {} + ConfigFactory() : FactoryBase(NetworkFilterNames::get().TcpProxy) {} // NamedNetworkFilterConfigFactory Network::FilterFactoryCb diff --git a/source/extensions/filters/network/thrift_proxy/config.h b/source/extensions/filters/network/thrift_proxy/config.h index d578bd96591a..40aa4b418774 100644 --- a/source/extensions/filters/network/thrift_proxy/config.h +++ b/source/extensions/filters/network/thrift_proxy/config.h @@ -20,7 +20,7 @@ class ThriftProxyFilterConfigFactory : public Common::FactoryBase< envoy::extensions::filters::network::thrift_proxy::v2alpha1::ThriftProxy> { public: - ThriftProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().THRIFT_PROXY) {} + ThriftProxyFilterConfigFactory() : FactoryBase(NetworkFilterNames::get().ThriftProxy) {} private: Network::FilterFactoryCb createFilterFactoryFromProtoTyped( diff --git a/source/extensions/filters/network/well_known_names.h b/source/extensions/filters/network/well_known_names.h index deffa01fb759..f9014eb0de7c 100644 --- a/source/extensions/filters/network/well_known_names.h +++ b/source/extensions/filters/network/well_known_names.h @@ -13,31 +13,31 @@ namespace NetworkFilters { class NetworkFilterNameValues { public: // Client ssl auth filter - const std::string CLIENT_SSL_AUTH = "envoy.client_ssl_auth"; + const std::string ClientSslAuth = "envoy.client_ssl_auth"; // Echo filter - const std::string ECHO = "envoy.echo"; + const std::string Echo = "envoy.echo"; // HTTP connection manager filter - const std::string HTTP_CONNECTION_MANAGER = "envoy.http_connection_manager"; + const std::string HttpConnectionManager = "envoy.http_connection_manager"; // Mongo proxy filter - const std::string MONGO_PROXY = "envoy.mongo_proxy"; + const std::string MongoProxy = "envoy.mongo_proxy"; // Rate limit filter - const std::string RATE_LIMIT = "envoy.ratelimit"; + const std::string RateLimit = "envoy.ratelimit"; // Redis proxy filter - const std::string REDIS_PROXY = "envoy.redis_proxy"; + const std::string RedisProxy = "envoy.redis_proxy"; // IP tagging filter - const std::string TCP_PROXY = "envoy.tcp_proxy"; + const std::string TcpProxy = "envoy.tcp_proxy"; // Authorization filter - const std::string EXT_AUTHORIZATION = "envoy.ext_authz"; + const std::string ExtAuthorization = "envoy.ext_authz"; // Thrift proxy filter - const std::string THRIFT_PROXY = "envoy.filters.network.thrift_proxy"; + const std::string ThriftProxy = "envoy.filters.network.thrift_proxy"; // Converts names from v1 to v2 const Config::V1Converter v1_converter_; // NOTE: Do not add any new filters to this list. All future filters are v2 only. NetworkFilterNameValues() - : v1_converter_({CLIENT_SSL_AUTH, ECHO, HTTP_CONNECTION_MANAGER, MONGO_PROXY, RATE_LIMIT, - REDIS_PROXY, TCP_PROXY, EXT_AUTHORIZATION}) {} + : v1_converter_({ClientSslAuth, Echo, HttpConnectionManager, MongoProxy, RateLimit, + RedisProxy, TcpProxy, ExtAuthorization}) {} }; typedef ConstSingleton NetworkFilterNames; diff --git a/source/extensions/grpc_credentials/example/config.h b/source/extensions/grpc_credentials/example/config.h index 1313dbd9ac02..053b79335dc3 100644 --- a/source/extensions/grpc_credentials/example/config.h +++ b/source/extensions/grpc_credentials/example/config.h @@ -30,7 +30,7 @@ class AccessTokenExampleGrpcCredentialsFactory : public Grpc::GoogleGrpcCredenti virtual std::shared_ptr getChannelCredentials(const envoy::api::v2::core::GrpcService& grpc_service_config) override; - std::string name() const override { return GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; } + std::string name() const override { return GrpcCredentialsNames::get().AccessTokenExample; } }; /* diff --git a/source/extensions/grpc_credentials/file_based_metadata/config.cc b/source/extensions/grpc_credentials/file_based_metadata/config.cc index 987827a637de..951f11c6c6ee 100644 --- a/source/extensions/grpc_credentials/file_based_metadata/config.cc +++ b/source/extensions/grpc_credentials/file_based_metadata/config.cc @@ -25,7 +25,7 @@ FileBasedMetadataGrpcCredentialsFactory::getChannelCredentials( for (const auto& credential : google_grpc.call_credentials()) { switch (credential.credential_specifier_case()) { case envoy::api::v2::core::GrpcService::GoogleGrpc::CallCredentials::kFromPlugin: { - if (credential.from_plugin().name() == GrpcCredentialsNames::get().FILE_BASED_METADATA) { + if (credential.from_plugin().name() == GrpcCredentialsNames::get().FileBasedMetadata) { FileBasedMetadataGrpcCredentialsFactory file_based_metadata_credentials_factory; const Envoy::ProtobufTypes::MessagePtr file_based_metadata_config_message = Envoy::Config::Utility::translateToFactoryConfig( diff --git a/source/extensions/grpc_credentials/file_based_metadata/config.h b/source/extensions/grpc_credentials/file_based_metadata/config.h index 1880d62c9ffe..9325e0b7d3d0 100644 --- a/source/extensions/grpc_credentials/file_based_metadata/config.h +++ b/source/extensions/grpc_credentials/file_based_metadata/config.h @@ -30,7 +30,7 @@ class FileBasedMetadataGrpcCredentialsFactory : public Grpc::GoogleGrpcCredentia return std::make_unique(); } - std::string name() const override { return GrpcCredentialsNames::get().FILE_BASED_METADATA; } + std::string name() const override { return GrpcCredentialsNames::get().FileBasedMetadata; } }; class FileBasedMetadataAuthenticator : public grpc::MetadataCredentialsPlugin { diff --git a/source/extensions/grpc_credentials/well_known_names.h b/source/extensions/grpc_credentials/well_known_names.h index 95678f1edbdc..81ee6d22ef0b 100644 --- a/source/extensions/grpc_credentials/well_known_names.h +++ b/source/extensions/grpc_credentials/well_known_names.h @@ -13,9 +13,9 @@ namespace GrpcCredentials { class GrpcCredentialsNameValues { public: // Access Token Example. - const std::string ACCESS_TOKEN_EXAMPLE = "envoy.grpc_credentials.access_token_example"; + const std::string AccessTokenExample = "envoy.grpc_credentials.access_token_example"; // File Based Metadata credentials - const std::string FILE_BASED_METADATA = "envoy.grpc_credentials.file_based_metadata"; + const std::string FileBasedMetadata = "envoy.grpc_credentials.file_based_metadata"; }; typedef ConstSingleton GrpcCredentialsNames; diff --git a/source/extensions/health_checkers/redis/config.h b/source/extensions/health_checkers/redis/config.h index 1f15a8f44d16..534496050c05 100644 --- a/source/extensions/health_checkers/redis/config.h +++ b/source/extensions/health_checkers/redis/config.h @@ -19,7 +19,7 @@ class RedisHealthCheckerFactory : public Server::Configuration::CustomHealthChec createCustomHealthChecker(const envoy::api::v2::core::HealthCheck& config, Server::Configuration::HealthCheckerFactoryContext& context) override; - std::string name() override { return HealthCheckerNames::get().REDIS_HEALTH_CHECKER; } + std::string name() override { return HealthCheckerNames::get().RedisHealthChecker; } }; } // namespace RedisHealthChecker diff --git a/source/extensions/health_checkers/well_known_names.h b/source/extensions/health_checkers/well_known_names.h index 9120d9cfd6b8..26271e859b6a 100644 --- a/source/extensions/health_checkers/well_known_names.h +++ b/source/extensions/health_checkers/well_known_names.h @@ -13,7 +13,7 @@ namespace HealthCheckers { class HealthCheckerNameValues { public: // Redis health checker. - const std::string REDIS_HEALTH_CHECKER = "envoy.health_checkers.redis"; + const std::string RedisHealthChecker = "envoy.health_checkers.redis"; }; typedef ConstSingleton HealthCheckerNames; diff --git a/source/extensions/stat_sinks/dog_statsd/config.cc b/source/extensions/stat_sinks/dog_statsd/config.cc index 4e8a4b7d32bb..9ae4436ba5ea 100644 --- a/source/extensions/stat_sinks/dog_statsd/config.cc +++ b/source/extensions/stat_sinks/dog_statsd/config.cc @@ -30,7 +30,7 @@ ProtobufTypes::MessagePtr DogStatsdSinkFactory::createEmptyConfigProto() { new envoy::config::metrics::v2::DogStatsdSink()); } -std::string DogStatsdSinkFactory::name() { return StatsSinkNames::get().DOG_STATSD; } +std::string DogStatsdSinkFactory::name() { return StatsSinkNames::get().DogStatsd; } /** * Static registration for the this sink factory. @see RegisterFactory. diff --git a/source/extensions/stat_sinks/hystrix/config.cc b/source/extensions/stat_sinks/hystrix/config.cc index 736c0811be8c..59abdb0d29c3 100644 --- a/source/extensions/stat_sinks/hystrix/config.cc +++ b/source/extensions/stat_sinks/hystrix/config.cc @@ -26,7 +26,7 @@ ProtobufTypes::MessagePtr HystrixSinkFactory::createEmptyConfigProto() { new envoy::config::metrics::v2::HystrixSink()); } -std::string HystrixSinkFactory::name() { return StatsSinkNames::get().HYSTRIX; } +std::string HystrixSinkFactory::name() { return StatsSinkNames::get().Hystrix; } /** * Static registration for the statsd sink factory. @see RegisterFactory. diff --git a/source/extensions/stat_sinks/metrics_service/config.cc b/source/extensions/stat_sinks/metrics_service/config.cc index 4020c35f9b45..234b46b37740 100644 --- a/source/extensions/stat_sinks/metrics_service/config.cc +++ b/source/extensions/stat_sinks/metrics_service/config.cc @@ -37,7 +37,7 @@ ProtobufTypes::MessagePtr MetricsServiceSinkFactory::createEmptyConfigProto() { std::make_unique()); } -std::string MetricsServiceSinkFactory::name() { return StatsSinkNames::get().METRICS_SERVICE; } +std::string MetricsServiceSinkFactory::name() { return StatsSinkNames::get().MetricsService; } /** * Static registration for the this sink factory. @see RegisterFactory. diff --git a/source/extensions/stat_sinks/statsd/config.cc b/source/extensions/stat_sinks/statsd/config.cc index 38c19257f1e0..ddb28d0d0d08 100644 --- a/source/extensions/stat_sinks/statsd/config.cc +++ b/source/extensions/stat_sinks/statsd/config.cc @@ -43,7 +43,7 @@ ProtobufTypes::MessagePtr StatsdSinkFactory::createEmptyConfigProto() { new envoy::config::metrics::v2::StatsdSink()); } -std::string StatsdSinkFactory::name() { return StatsSinkNames::get().STATSD; } +std::string StatsdSinkFactory::name() { return StatsSinkNames::get().Statsd; } /** * Static registration for the statsd sink factory. @see RegisterFactory. diff --git a/source/extensions/stat_sinks/well_known_names.h b/source/extensions/stat_sinks/well_known_names.h index 033f40a2334e..8b4b6022c867 100644 --- a/source/extensions/stat_sinks/well_known_names.h +++ b/source/extensions/stat_sinks/well_known_names.h @@ -13,13 +13,13 @@ namespace StatSinks { class StatsSinkNameValues { public: // Statsd sink - const std::string STATSD = "envoy.statsd"; + const std::string Statsd = "envoy.statsd"; // DogStatsD compatible stastsd sink - const std::string DOG_STATSD = "envoy.dog_statsd"; + const std::string DogStatsd = "envoy.dog_statsd"; // MetricsService sink - const std::string METRICS_SERVICE = "envoy.metrics_service"; + const std::string MetricsService = "envoy.metrics_service"; // Hystrix sink - const std::string HYSTRIX = "envoy.stat_sinks.hystrix"; + const std::string Hystrix = "envoy.stat_sinks.hystrix"; }; typedef ConstSingleton StatsSinkNames; diff --git a/source/extensions/tracers/dynamic_ot/config.cc b/source/extensions/tracers/dynamic_ot/config.cc index 0c94a4be4f9b..b82f3f8e8b8c 100644 --- a/source/extensions/tracers/dynamic_ot/config.cc +++ b/source/extensions/tracers/dynamic_ot/config.cc @@ -23,7 +23,7 @@ DynamicOpenTracingTracerFactory::createHttpTracer(const Json::Object& json_confi return std::make_unique(std::move(dynamic_driver), server.localInfo()); } -std::string DynamicOpenTracingTracerFactory::name() { return TracerNames::get().DYNAMIC_OT; } +std::string DynamicOpenTracingTracerFactory::name() { return TracerNames::get().DynamicOt; } /** * Static registration for the dynamic opentracing tracer. @see RegisterFactory. diff --git a/source/extensions/tracers/lightstep/config.cc b/source/extensions/tracers/lightstep/config.cc index 22a1b83428d4..e1b1c5a947b3 100644 --- a/source/extensions/tracers/lightstep/config.cc +++ b/source/extensions/tracers/lightstep/config.cc @@ -31,7 +31,7 @@ Tracing::HttpTracerPtr LightstepTracerFactory::createHttpTracer(const Json::Obje return std::make_unique(std::move(lightstep_driver), server.localInfo()); } -std::string LightstepTracerFactory::name() { return TracerNames::get().LIGHTSTEP; } +std::string LightstepTracerFactory::name() { return TracerNames::get().Lightstep; } /** * Static registration for the lightstep tracer. @see RegisterFactory. diff --git a/source/extensions/tracers/well_known_names.h b/source/extensions/tracers/well_known_names.h index 630649a7d0b4..d545eecedad9 100644 --- a/source/extensions/tracers/well_known_names.h +++ b/source/extensions/tracers/well_known_names.h @@ -13,11 +13,11 @@ namespace Tracers { class TracerNameValues { public: // Lightstep tracer - const std::string LIGHTSTEP = "envoy.lightstep"; + const std::string Lightstep = "envoy.lightstep"; // Zipkin tracer - const std::string ZIPKIN = "envoy.zipkin"; + const std::string Zipkin = "envoy.zipkin"; // Dynamic tracer - const std::string DYNAMIC_OT = "envoy.dynamic.ot"; + const std::string DynamicOt = "envoy.dynamic.ot"; }; typedef ConstSingleton TracerNames; diff --git a/source/extensions/tracers/zipkin/config.cc b/source/extensions/tracers/zipkin/config.cc index da0562478ffe..278aebadfbc4 100644 --- a/source/extensions/tracers/zipkin/config.cc +++ b/source/extensions/tracers/zipkin/config.cc @@ -26,7 +26,7 @@ Tracing::HttpTracerPtr ZipkinTracerFactory::createHttpTracer(const Json::Object& new Tracing::HttpTracerImpl(std::move(zipkin_driver), server.localInfo())); } -std::string ZipkinTracerFactory::name() { return TracerNames::get().ZIPKIN; } +std::string ZipkinTracerFactory::name() { return TracerNames::get().Zipkin; } /** * Static registration for the lightstep tracer. @see RegisterFactory. diff --git a/source/extensions/transport_sockets/capture/config.h b/source/extensions/transport_sockets/capture/config.h index c844430a3f35..02b7ae481b74 100644 --- a/source/extensions/transport_sockets/capture/config.h +++ b/source/extensions/transport_sockets/capture/config.h @@ -17,7 +17,7 @@ class CaptureSocketConfigFactory : public virtual Server::Configuration::TransportSocketConfigFactory { public: virtual ~CaptureSocketConfigFactory() {} - std::string name() const override { return TransportSocketNames::get().CAPTURE; } + std::string name() const override { return TransportSocketNames::get().Capture; } ProtobufTypes::MessagePtr createEmptyConfigProto() override; }; diff --git a/source/extensions/transport_sockets/raw_buffer/config.h b/source/extensions/transport_sockets/raw_buffer/config.h index 20f5bc06f9f2..e4f909be49a2 100644 --- a/source/extensions/transport_sockets/raw_buffer/config.h +++ b/source/extensions/transport_sockets/raw_buffer/config.h @@ -16,7 +16,7 @@ namespace RawBuffer { class RawBufferSocketFactory : public virtual Server::Configuration::TransportSocketConfigFactory { public: virtual ~RawBufferSocketFactory() {} - std::string name() const override { return TransportSocketNames::get().RAW_BUFFER; } + std::string name() const override { return TransportSocketNames::get().RawBuffer; } ProtobufTypes::MessagePtr createEmptyConfigProto() override; }; diff --git a/source/extensions/transport_sockets/ssl/config.h b/source/extensions/transport_sockets/ssl/config.h index 1b5a84dea64e..5fba4de55f6d 100644 --- a/source/extensions/transport_sockets/ssl/config.h +++ b/source/extensions/transport_sockets/ssl/config.h @@ -16,7 +16,7 @@ namespace SslTransport { class SslSocketConfigFactory : public virtual Server::Configuration::TransportSocketConfigFactory { public: virtual ~SslSocketConfigFactory() {} - std::string name() const override { return TransportSocketNames::get().TLS; } + std::string name() const override { return TransportSocketNames::get().Tls; } }; class UpstreamSslSocketFactory : public Server::Configuration::UpstreamTransportSocketConfigFactory, diff --git a/source/extensions/transport_sockets/well_known_names.h b/source/extensions/transport_sockets/well_known_names.h index 2fd92d7cea9d..0cf096fe30e4 100644 --- a/source/extensions/transport_sockets/well_known_names.h +++ b/source/extensions/transport_sockets/well_known_names.h @@ -12,9 +12,9 @@ namespace TransportSockets { */ class TransportSocketNameValues { public: - const std::string CAPTURE = "envoy.transport_sockets.capture"; - const std::string RAW_BUFFER = "raw_buffer"; - const std::string TLS = "tls"; + const std::string Capture = "envoy.transport_sockets.capture"; + const std::string RawBuffer = "raw_buffer"; + const std::string Tls = "tls"; }; typedef ConstSingleton TransportSocketNames; diff --git a/source/server/connection_handler_impl.cc b/source/server/connection_handler_impl.cc index 854180cd4914..f37255621d75 100644 --- a/source/server/connection_handler_impl.cc +++ b/source/server/connection_handler_impl.cc @@ -153,7 +153,7 @@ void ConnectionHandlerImpl::ActiveSocket::continueFilterChain(bool success) { // Set default transport protocol if none of the listener filters did it. if (socket_->detectedTransportProtocol().empty()) { socket_->setDetectedTransportProtocol( - Extensions::TransportSockets::TransportSocketNames::get().RAW_BUFFER); + Extensions::TransportSockets::TransportSocketNames::get().RawBuffer); } // Create a new connection on this listener. listener_.newConnection(std::move(socket_)); diff --git a/source/server/listener_manager_impl.cc b/source/server/listener_manager_impl.cc index 84ecdac8f911..393fdfe1e35e 100644 --- a/source/server/listener_manager_impl.cc +++ b/source/server/listener_manager_impl.cc @@ -154,7 +154,7 @@ ListenerImpl::ListenerImpl(const envoy::api::v2::Listener& config, const std::st if (PROTOBUF_GET_WRAPPED_OR_DEFAULT(config, use_original_dst, false)) { auto& factory = Config::Utility::getAndCheckFactory( - Extensions::ListenerFilters::ListenerFilterNames::get().ORIGINAL_DST); + Extensions::ListenerFilters::ListenerFilterNames::get().OriginalDst); listener_filter_factories_.push_back( factory.createFilterFactoryFromProto(Envoy::ProtobufWkt::Empty(), *this)); } @@ -165,7 +165,7 @@ ListenerImpl::ListenerImpl(const envoy::api::v2::Listener& config, const std::st if (PROTOBUF_GET_WRAPPED_OR_DEFAULT(config.filter_chains()[0], use_proxy_proto, false)) { auto& factory = Config::Utility::getAndCheckFactory( - Extensions::ListenerFilters::ListenerFilterNames::get().PROXY_PROTOCOL); + Extensions::ListenerFilters::ListenerFilterNames::get().ProxyProtocol); listener_filter_factories_.push_back( factory.createFilterFactoryFromProto(Envoy::ProtobufWkt::Empty(), *this)); } @@ -189,11 +189,11 @@ ListenerImpl::ListenerImpl(const envoy::api::v2::Listener& config, const std::st auto transport_socket = filter_chain.transport_socket(); if (!filter_chain.has_transport_socket()) { if (filter_chain.has_tls_context()) { - transport_socket.set_name(Extensions::TransportSockets::TransportSocketNames::get().TLS); + transport_socket.set_name(Extensions::TransportSockets::TransportSocketNames::get().Tls); MessageUtil::jsonConvert(filter_chain.tls_context(), *transport_socket.mutable_config()); } else { transport_socket.set_name( - Extensions::TransportSockets::TransportSocketNames::get().RAW_BUFFER); + Extensions::TransportSockets::TransportSocketNames::get().RawBuffer); } } @@ -257,7 +257,7 @@ ListenerImpl::ListenerImpl(const envoy::api::v2::Listener& config, const std::st // Automatically inject TLS Inspector if it wasn't configured explicitly and it's needed. if (need_tls_inspector) { for (const auto& filter : config.listener_filters()) { - if (filter.name() == Extensions::ListenerFilters::ListenerFilterNames::get().TLS_INSPECTOR) { + if (filter.name() == Extensions::ListenerFilters::ListenerFilterNames::get().TlsInspector) { need_tls_inspector = false; break; } @@ -272,7 +272,7 @@ ListenerImpl::ListenerImpl(const envoy::api::v2::Listener& config, const std::st auto& factory = Config::Utility::getAndCheckFactory( - Extensions::ListenerFilters::ListenerFilterNames::get().TLS_INSPECTOR); + Extensions::ListenerFilters::ListenerFilterNames::get().TlsInspector); listener_filter_factories_.push_back( factory.createFilterFactoryFromProto(Envoy::ProtobufWkt::Empty(), *this)); } diff --git a/test/common/grpc/grpc_client_integration_test.cc b/test/common/grpc/grpc_client_integration_test.cc index 163089293b04..65046f2052d7 100644 --- a/test/common/grpc/grpc_client_integration_test.cc +++ b/test/common/grpc/grpc_client_integration_test.cc @@ -396,7 +396,7 @@ TEST_P(GrpcAccessTokenClientIntegrationTest, AccessTokenAuthRequest) { SKIP_IF_GRPC_CLIENT(ClientType::EnvoyGrpc); access_token_value_ = "accesstokenvalue"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().AccessTokenExample; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -408,7 +408,7 @@ TEST_P(GrpcAccessTokenClientIntegrationTest, AccessTokenAuthStream) { SKIP_IF_GRPC_CLIENT(ClientType::EnvoyGrpc); access_token_value_ = "accesstokenvalue"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().AccessTokenExample; initialize(); auto stream = createStream(empty_metadata_); stream->sendServerInitialMetadata(empty_metadata_); @@ -424,7 +424,7 @@ TEST_P(GrpcAccessTokenClientIntegrationTest, MultipleAccessTokens) { access_token_value_ = "accesstokenvalue"; access_token_value_2_ = "accesstokenvalue2"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().AccessTokenExample; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -437,7 +437,7 @@ TEST_P(GrpcAccessTokenClientIntegrationTest, ExtraCredentialParams) { access_token_value_ = "accesstokenvalue"; refresh_token_value_ = "refreshtokenvalue"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().AccessTokenExample; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -448,7 +448,7 @@ TEST_P(GrpcAccessTokenClientIntegrationTest, ExtraCredentialParams) { TEST_P(GrpcAccessTokenClientIntegrationTest, NoAccessTokens) { SKIP_IF_GRPC_CLIENT(ClientType::EnvoyGrpc); credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().ACCESS_TOKEN_EXAMPLE; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().AccessTokenExample; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); diff --git a/test/common/tcp_proxy/tcp_proxy_test.cc b/test/common/tcp_proxy/tcp_proxy_test.cc index b8c61ed9f7c7..9fc16635fef6 100644 --- a/test/common/tcp_proxy/tcp_proxy_test.cc +++ b/test/common/tcp_proxy/tcp_proxy_test.cc @@ -315,7 +315,7 @@ TEST(ConfigTest, EmptyRouteConfig) { TEST(ConfigTest, AccessLogConfig) { envoy::config::filter::network::tcp_proxy::v2::TcpProxy config; envoy::config::filter::accesslog::v2::AccessLog* log = config.mutable_access_log()->Add(); - log->set_name(Extensions::AccessLoggers::AccessLogNames::get().FILE); + log->set_name(Extensions::AccessLoggers::AccessLogNames::get().File); { envoy::config::accesslog::v2::FileAccessLog file_access_log; file_access_log.set_path("some_path"); @@ -325,7 +325,7 @@ TEST(ConfigTest, AccessLogConfig) { } log = config.mutable_access_log()->Add(); - log->set_name(Extensions::AccessLoggers::AccessLogNames::get().FILE); + log->set_name(Extensions::AccessLoggers::AccessLogNames::get().File); { envoy::config::accesslog::v2::FileAccessLog file_access_log; file_access_log.set_path("another path"); @@ -365,7 +365,7 @@ class TcpProxyTest : public testing::Test { envoy::config::filter::network::tcp_proxy::v2::TcpProxy config = defaultConfig(); envoy::config::filter::accesslog::v2::AccessLog* access_log = config.mutable_access_log()->Add(); - access_log->set_name(Extensions::AccessLoggers::AccessLogNames::get().FILE); + access_log->set_name(Extensions::AccessLoggers::AccessLogNames::get().File); envoy::config::accesslog::v2::FileAccessLog file_access_log; file_access_log.set_path("unused"); file_access_log.set_format(access_log_format); diff --git a/test/extensions/access_loggers/file/config_test.cc b/test/extensions/access_loggers/file/config_test.cc index 6e7facb54c4b..7bd56fea2110 100644 --- a/test/extensions/access_loggers/file/config_test.cc +++ b/test/extensions/access_loggers/file/config_test.cc @@ -37,7 +37,7 @@ TEST(FileAccessLogConfigTest, ConfigureFromProto) { EXPECT_THROW_WITH_MESSAGE(AccessLog::AccessLogFactory::fromProto(config, context), EnvoyException, "Provided name for static registration lookup was empty."); - config.set_name(AccessLogNames::get().FILE); + config.set_name(AccessLogNames::get().File); AccessLog::InstanceSharedPtr log = AccessLog::AccessLogFactory::fromProto(config, context); @@ -53,7 +53,7 @@ TEST(FileAccessLogConfigTest, ConfigureFromProto) { TEST(FileAccessLogConfigTest, FileAccessLogTest) { auto factory = Registry::FactoryRegistry::getFactory( - AccessLogNames::get().FILE); + AccessLogNames::get().File); ASSERT_NE(nullptr, factory); ProtobufTypes::MessagePtr message = factory->createEmptyConfigProto(); diff --git a/test/extensions/access_loggers/http_grpc/config_test.cc b/test/extensions/access_loggers/http_grpc/config_test.cc index c04331e52c1c..04bc4049d34c 100644 --- a/test/extensions/access_loggers/http_grpc/config_test.cc +++ b/test/extensions/access_loggers/http_grpc/config_test.cc @@ -23,7 +23,7 @@ class HttpGrpcAccessLogConfigTest : public testing::Test { void SetUp() override { factory_ = Registry::FactoryRegistry::getFactory( - AccessLogNames::get().HTTP_GRPC); + AccessLogNames::get().HttpGrpc); ASSERT_NE(nullptr, factory_); message_ = factory_->createEmptyConfigProto(); diff --git a/test/extensions/filters/http/buffer/buffer_filter_test.cc b/test/extensions/filters/http/buffer/buffer_filter_test.cc index b1749f70cbf4..6a2cf88b6dde 100644 --- a/test/extensions/filters/http/buffer/buffer_filter_test.cc +++ b/test/extensions/filters/http/buffer/buffer_filter_test.cc @@ -46,10 +46,10 @@ class BufferFilterTest : public testing::Test { void routeLocalConfig(const Router::RouteSpecificFilterConfig* route_settings, const Router::RouteSpecificFilterConfig* vhost_settings) { - ON_CALL(callbacks_.route_->route_entry_, perFilterConfig(HttpFilterNames::get().BUFFER)) + ON_CALL(callbacks_.route_->route_entry_, perFilterConfig(HttpFilterNames::get().Buffer)) .WillByDefault(Return(route_settings)); ON_CALL(callbacks_.route_->route_entry_.virtual_host_, - perFilterConfig(HttpFilterNames::get().BUFFER)) + perFilterConfig(HttpFilterNames::get().Buffer)) .WillByDefault(Return(vhost_settings)); } diff --git a/test/extensions/filters/http/fault/fault_filter_test.cc b/test/extensions/filters/http/fault/fault_filter_test.cc index c231a6796bd1..420c065208b5 100644 --- a/test/extensions/filters/http/fault/fault_filter_test.cc +++ b/test/extensions/filters/http/fault/fault_filter_test.cc @@ -756,10 +756,10 @@ void FaultFilterTest::TestPerFilterConfigFault( const Router::RouteSpecificFilterConfig* vhost_fault) { ON_CALL(filter_callbacks_.route_->route_entry_, - perFilterConfig(Extensions::HttpFilters::HttpFilterNames::get().FAULT)) + perFilterConfig(Extensions::HttpFilters::HttpFilterNames::get().Fault)) .WillByDefault(Return(route_fault)); ON_CALL(filter_callbacks_.route_->route_entry_.virtual_host_, - perFilterConfig(Extensions::HttpFilters::HttpFilterNames::get().FAULT)) + perFilterConfig(Extensions::HttpFilters::HttpFilterNames::get().Fault)) .WillByDefault(Return(vhost_fault)); const std::string upstream_cluster("www1"); diff --git a/test/extensions/filters/http/jwt_authn/filter_integration_test.cc b/test/extensions/filters/http/jwt_authn/filter_integration_test.cc index b6a2870014c2..283481bdd482 100644 --- a/test/extensions/filters/http/jwt_authn/filter_integration_test.cc +++ b/test/extensions/filters/http/jwt_authn/filter_integration_test.cc @@ -26,7 +26,7 @@ std::string getFilterConfig(bool use_local_jwks) { } HttpFilter filter; - filter.set_name(HttpFilterNames::get().JWT_AUTHN); + filter.set_name(HttpFilterNames::get().JwtAuthn); MessageUtil::jsonConvert(proto_config, *filter.mutable_config()); return MessageUtil::getJsonStringFromMessage(filter); } diff --git a/test/extensions/filters/http/lua/lua_integration_test.cc b/test/extensions/filters/http/lua/lua_integration_test.cc index 353e40b82e06..83b877e378c0 100644 --- a/test/extensions/filters/http/lua/lua_integration_test.cc +++ b/test/extensions/filters/http/lua/lua_integration_test.cc @@ -45,7 +45,7 @@ class LuaIntegrationTest : public HttpIntegrationTest, new_route->mutable_match()->set_prefix("/alt/route"); new_route->mutable_route()->set_cluster("alt_cluster"); - const std::string key = Extensions::HttpFilters::HttpFilterNames::get().LUA; + const std::string key = Extensions::HttpFilters::HttpFilterNames::get().Lua; const std::string yaml = R"EOF( foo.bar: diff --git a/test/extensions/filters/http/rbac/rbac_filter_integration_test.cc b/test/extensions/filters/http/rbac/rbac_filter_integration_test.cc index fd41f57beb8e..9e766f7bc4f5 100644 --- a/test/extensions/filters/http/rbac/rbac_filter_integration_test.cc +++ b/test/extensions/filters/http/rbac/rbac_filter_integration_test.cc @@ -77,7 +77,7 @@ TEST_P(RBACIntegrationTest, RouteOverride) { ->Mutable(0) ->mutable_per_filter_config(); - (*config)[Extensions::HttpFilters::HttpFilterNames::get().RBAC] = pfc; + (*config)[Extensions::HttpFilters::HttpFilterNames::get().Rbac] = pfc; }); config_helper_.addFilter(RBAC_CONFIG); diff --git a/test/extensions/filters/http/rbac/rbac_filter_test.cc b/test/extensions/filters/http/rbac/rbac_filter_test.cc index 68f39ef1ea2b..7e1d89ff852b 100644 --- a/test/extensions/filters/http/rbac/rbac_filter_test.cc +++ b/test/extensions/filters/http/rbac/rbac_filter_test.cc @@ -101,7 +101,7 @@ TEST_F(RoleBasedAccessControlFilterTest, RouteLocalOverride) { EXPECT_CALL(engine, allowed(_, _, _)).WillRepeatedly(Return(true)); EXPECT_CALL(per_route_config_, engine()).WillRepeatedly(ReturnRef(engine)); - EXPECT_CALL(callbacks_.route_->route_entry_, perFilterConfig(HttpFilterNames::get().RBAC)) + EXPECT_CALL(callbacks_.route_->route_entry_, perFilterConfig(HttpFilterNames::get().Rbac)) .WillRepeatedly(Return(&per_route_config_)); EXPECT_EQ(Http::FilterHeadersStatus::Continue, filter_.decodeHeaders(headers_, true)); diff --git a/test/extensions/filters/http/router/config_test.cc b/test/extensions/filters/http/router/config_test.cc index fe6943aa4041..89732808e578 100644 --- a/test/extensions/filters/http/router/config_test.cc +++ b/test/extensions/filters/http/router/config_test.cc @@ -73,7 +73,7 @@ TEST(RouterFilterConfigTest, DoubleRegistrationTest) { (Registry::RegisterFactory()), EnvoyException, - fmt::format("Double registration for name: '{}'", HttpFilterNames::get().ROUTER)); + fmt::format("Double registration for name: '{}'", HttpFilterNames::get().Router)); } } // namespace RouterFilter diff --git a/test/extensions/filters/network/client_ssl_auth/config_test.cc b/test/extensions/filters/network/client_ssl_auth/config_test.cc index a3c19a211087..d815680aec90 100644 --- a/test/extensions/filters/network/client_ssl_auth/config_test.cc +++ b/test/extensions/filters/network/client_ssl_auth/config_test.cc @@ -99,7 +99,7 @@ TEST(ClientSslAuthConfigFactoryTest, DoubleRegistrationTest) { (Registry::RegisterFactory()), EnvoyException, - fmt::format("Double registration for name: '{}'", NetworkFilterNames::get().CLIENT_SSL_AUTH)); + fmt::format("Double registration for name: '{}'", NetworkFilterNames::get().ClientSslAuth)); } } // namespace ClientSslAuth diff --git a/test/extensions/grpc_credentials/file_based_metadata/file_based_metadata_grpc_credentials_test.cc b/test/extensions/grpc_credentials/file_based_metadata/file_based_metadata_grpc_credentials_test.cc index dec34bb1c9ab..40e10ab1b5e2 100644 --- a/test/extensions/grpc_credentials/file_based_metadata/file_based_metadata_grpc_credentials_test.cc +++ b/test/extensions/grpc_credentials/file_based_metadata/file_based_metadata_grpc_credentials_test.cc @@ -86,7 +86,7 @@ TEST_P(GrpcFileBasedMetadataClientIntegrationTest, FileBasedMetadataGrpcAuthRequ header_prefix_1_ = "prefix1"; header_value_1_ = "secretvalue"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().FILE_BASED_METADATA; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().FileBasedMetadata; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -101,7 +101,7 @@ TEST_P(GrpcFileBasedMetadataClientIntegrationTest, DoubleFileBasedMetadataGrpcAu header_value_1_ = "secretvalue"; header_value_2_ = "secret2"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().FILE_BASED_METADATA; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().FileBasedMetadata; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -112,7 +112,7 @@ TEST_P(GrpcFileBasedMetadataClientIntegrationTest, DoubleFileBasedMetadataGrpcAu TEST_P(GrpcFileBasedMetadataClientIntegrationTest, EmptyFileBasedMetadataGrpcAuthRequest) { SKIP_IF_GRPC_CLIENT(ClientType::EnvoyGrpc); credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().FILE_BASED_METADATA; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().FileBasedMetadata; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); @@ -127,7 +127,7 @@ TEST_P(GrpcFileBasedMetadataClientIntegrationTest, ExtraConfigFileBasedMetadataG header_prefix_1_ = "prefix1"; header_value_1_ = "secretvalue"; credentials_factory_name_ = - Extensions::GrpcCredentials::GrpcCredentialsNames::get().FILE_BASED_METADATA; + Extensions::GrpcCredentials::GrpcCredentialsNames::get().FileBasedMetadata; initialize(); auto request = createRequest(empty_metadata_); request->sendReply(); diff --git a/test/extensions/stats_sinks/dog_statsd/config_test.cc b/test/extensions/stats_sinks/dog_statsd/config_test.cc index d3afecfa8f99..c54a1687772f 100644 --- a/test/extensions/stats_sinks/dog_statsd/config_test.cc +++ b/test/extensions/stats_sinks/dog_statsd/config_test.cc @@ -32,7 +32,7 @@ INSTANTIATE_TEST_CASE_P(IpVersions, DogStatsdConfigLoopbackTest, TestUtility::ipTestParamsToString); TEST_P(DogStatsdConfigLoopbackTest, ValidUdpIp) { - const std::string name = StatsSinkNames::get().DOG_STATSD; + const std::string name = StatsSinkNames::get().DogStatsd; envoy::config::metrics::v2::DogStatsdSink sink_config; envoy::api::v2::core::Address& address = *sink_config.mutable_address(); diff --git a/test/extensions/stats_sinks/hystrix/config_test.cc b/test/extensions/stats_sinks/hystrix/config_test.cc index 520b36ae51a2..ec224c4ddb91 100644 --- a/test/extensions/stats_sinks/hystrix/config_test.cc +++ b/test/extensions/stats_sinks/hystrix/config_test.cc @@ -26,7 +26,7 @@ namespace StatSinks { namespace Hystrix { TEST(StatsConfigTest, ValidHystrixSink) { - const std::string name = StatsSinkNames::get().HYSTRIX; + const std::string name = StatsSinkNames::get().Hystrix; envoy::config::metrics::v2::HystrixSink sink_config; diff --git a/test/extensions/stats_sinks/statsd/config_test.cc b/test/extensions/stats_sinks/statsd/config_test.cc index 68b31829242d..fc4eeee983c4 100644 --- a/test/extensions/stats_sinks/statsd/config_test.cc +++ b/test/extensions/stats_sinks/statsd/config_test.cc @@ -28,7 +28,7 @@ namespace StatSinks { namespace Statsd { TEST(StatsConfigTest, ValidTcpStatsd) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; envoy::config::metrics::v2::StatsdSink sink_config; sink_config.set_tcp_cluster_name("fake_cluster"); @@ -53,7 +53,7 @@ INSTANTIATE_TEST_CASE_P(IpVersions, StatsConfigParameterizedTest, TestUtility::ipTestParamsToString); TEST_P(StatsConfigParameterizedTest, UdpSinkDefaultPrefix) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; auto defaultPrefix = Common::Statsd::getDefaultPrefix(); envoy::config::metrics::v2::StatsdSink sink_config; @@ -84,7 +84,7 @@ TEST_P(StatsConfigParameterizedTest, UdpSinkDefaultPrefix) { } TEST_P(StatsConfigParameterizedTest, UdpSinkCustomPrefix) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; const std::string customPrefix = "prefix.test"; envoy::config::metrics::v2::StatsdSink sink_config; @@ -116,7 +116,7 @@ TEST_P(StatsConfigParameterizedTest, UdpSinkCustomPrefix) { } TEST(StatsConfigTest, TcpSinkDefaultPrefix) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; envoy::config::metrics::v2::StatsdSink sink_config; auto defaultPrefix = Common::Statsd::getDefaultPrefix(); @@ -139,7 +139,7 @@ TEST(StatsConfigTest, TcpSinkDefaultPrefix) { } TEST(StatsConfigTest, TcpSinkCustomPrefix) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; envoy::config::metrics::v2::StatsdSink sink_config; ProtobufTypes::String prefix = "prefixTest"; @@ -169,7 +169,7 @@ INSTANTIATE_TEST_CASE_P(IpVersions, StatsConfigLoopbackTest, TestUtility::ipTestParamsToString); TEST_P(StatsConfigLoopbackTest, ValidUdpIpStatsd) { - const std::string name = StatsSinkNames::get().STATSD; + const std::string name = StatsSinkNames::get().Statsd; envoy::config::metrics::v2::StatsdSink sink_config; envoy::api::v2::core::Address& address = *sink_config.mutable_address(); diff --git a/test/server/configuration_impl_test.cc b/test/server/configuration_impl_test.cc index bec9bb6d0567..eb18e1b86288 100644 --- a/test/server/configuration_impl_test.cc +++ b/test/server/configuration_impl_test.cc @@ -242,7 +242,7 @@ TEST_F(ConfigurationImplTest, ProtoSpecifiedStatsSink) { envoy::config::bootstrap::v2::Bootstrap bootstrap = TestUtility::parseBootstrapFromJson(json); auto& sink = *bootstrap.mutable_stats_sinks()->Add(); - sink.set_name(Extensions::StatSinks::StatsSinkNames::get().STATSD); + sink.set_name(Extensions::StatSinks::StatsSinkNames::get().Statsd); auto& field_map = *sink.mutable_config()->mutable_fields(); field_map["tcp_cluster_name"].set_string_value("fake_cluster");