This is an automated email from the ASF dual-hosted git repository. cmcfarlen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new cab52476be Remove mgmt library (#9388) cab52476be is described below commit cab52476be1025bf4696145e3a9324bf3f03d849 Author: Chris McFarlen <ch...@mcfarlen.us> AuthorDate: Fri Feb 10 13:34:18 2023 -0600 Remove mgmt library (#9388) * remove mgmt library * remove libmgmt from build * fix library order for clang * missed a few * link mgmt utils lib * fix include for quic test --------- Co-authored-by: Chris McFarlen <cmcfar...@apple.com> --- include/records/I_RecCore.h | 1 - .../records/I_RecordsConfig.h | 0 include/tscpp/util/Makefile.am | 3 +- {mgmt => include/tscpp/util}/YamlCfg.h | 0 iocore/aio/Makefile.am | 2 - iocore/cache/Makefile.am | 1 - iocore/cache/test/main.h | 2 +- iocore/dns/P_SplitDNSProcessor.h | 2 +- .../eventsystem/ConfigProcessor.cc | 2 +- .../eventsystem/ConfigProcessor.h | 0 iocore/eventsystem/Makefile.am | 5 +- iocore/eventsystem/unit_tests/test_IOBuffer.cc | 2 +- iocore/hostdb/Makefile.am | 2 - iocore/net/Makefile.am | 4 - iocore/net/P_SSLCertLookup.h | 2 +- iocore/net/P_SSLClientCoordinator.h | 2 +- iocore/net/P_SSLConfig.h | 2 +- iocore/net/SSLNetVConnection.cc | 2 - iocore/net/SSLSNIConfig.h | 2 +- iocore/net/quic/Makefile.am | 1 - iocore/net/quic/QUICConfig.h | 2 +- iocore/net/quic/test/event_processor_main.cc | 2 +- iocore/net/quic/test/main.cc | 2 +- mgmt/DerivativeMetrics.cc | 138 ------- mgmt/DerivativeMetrics.h | 40 -- mgmt/Makefile.am | 25 -- mgmt/WebMgmtUtils.cc | 423 --------------------- mgmt/WebMgmtUtils.h | 54 --- mgmt/rpc/Makefile.am | 9 +- proxy/CacheControl.cc | 2 +- proxy/ControlMatcher.cc | 2 +- proxy/IPAllow.h | 2 +- proxy/InkAPIInternal.h | 2 +- proxy/ParentSelection.cc | 2 +- proxy/ParentSelection.h | 2 +- proxy/ReverseProxy.cc | 2 +- proxy/StatPages.cc | 2 +- proxy/Transform.cc | 2 +- proxy/hdrs/Makefile.am | 2 - proxy/http/HttpCacheSM.h | 2 +- proxy/http/HttpConfig.cc | 2 +- proxy/http/HttpConfig.h | 2 +- proxy/http/HttpSM.cc | 2 +- proxy/http/HttpTransact.h | 2 +- proxy/http/Makefile.am | 3 +- proxy/http/remap/Makefile.am | 4 - proxy/http/remap/NextHopConsistentHash.cc | 2 +- proxy/http/remap/NextHopSelectionStrategy.cc | 2 +- proxy/http/remap/NextHopStrategyFactory.cc | 2 +- proxy/http/remap/UrlRewrite.cc | 2 +- proxy/http2/Makefile.am | 2 - proxy/http2/unit_tests/main.cc | 2 +- proxy/http3/Http3Config.h | 2 +- proxy/http3/Makefile.am | 1 - proxy/http3/test/main.cc | 2 +- proxy/http3/test/main_qpack.cc | 2 +- proxy/logging/LogConfig.h | 2 +- proxy/logging/LogStandalone.cc | 2 +- proxy/logging/unit-tests/benchmark_LogObject.cc | 2 - src/records/Makefile.am | 9 +- src/records/P_RecCore.cc | 3 - src/records/RecCore.cc | 2 +- src/records/RecUtils.cc | 2 +- src/records/RecYAMLDecoder.cc | 2 +- {mgmt => src/records}/RecordsConfig.cc | 2 +- {mgmt => src/records}/RecordsConfigUtils.cc | 2 +- src/traffic_crashlog/Makefile.inc | 1 - src/traffic_crashlog/traffic_crashlog.cc | 2 +- src/traffic_layout/Makefile.inc | 1 - src/traffic_layout/engine.cc | 2 +- src/traffic_layout/info.cc | 2 +- src/traffic_logcat/Makefile.inc | 4 +- src/traffic_logstats/Makefile.inc | 4 +- src/traffic_quic/Makefile.inc | 4 +- src/traffic_quic/traffic_quic.cc | 2 +- src/traffic_server/InkAPI.cc | 4 +- src/traffic_server/Makefile.inc | 5 +- src/traffic_server/traffic_server.cc | 4 +- src/tscpp/util/Makefile.am | 8 +- {mgmt => src/tscpp/util}/YamlCfg.cc | 4 +- 80 files changed, 73 insertions(+), 790 deletions(-) diff --git a/include/records/I_RecCore.h b/include/records/I_RecCore.h index 378e47c63f..e1b62351f4 100644 --- a/include/records/I_RecCore.h +++ b/include/records/I_RecCore.h @@ -135,7 +135,6 @@ RecErrT RecRegisterRawStatUpdateFunc(const char *name, RecRawStatBlock *rsb, int // be sure to set 'lock' to 'false' as the hash-table rwlock has // already been taken out for the callback. -// RecSetRecordConvert -> WebMgmtUtils.cc::varSetFromStr() RecErrT RecSetRecordConvert(const char *name, const RecString rec_string, RecSourceT source, bool lock = true); RecErrT RecSetRecordInt(const char *name, RecInt rec_int, RecSourceT source, bool lock = true); RecErrT RecSetRecordFloat(const char *name, RecFloat rec_float, RecSourceT source, bool lock = true); diff --git a/mgmt/RecordsConfig.h b/include/records/I_RecordsConfig.h similarity index 100% rename from mgmt/RecordsConfig.h rename to include/records/I_RecordsConfig.h diff --git a/include/tscpp/util/Makefile.am b/include/tscpp/util/Makefile.am index bde4eb3d01..d420b1e30d 100644 --- a/include/tscpp/util/Makefile.am +++ b/include/tscpp/util/Makefile.am @@ -26,4 +26,5 @@ library_include_HEADERS = \ PostScript.h \ Strerror.h \ TextView.h \ - TsSharedMutex.h + TsSharedMutex.h \ + YamlCfg.h diff --git a/mgmt/YamlCfg.h b/include/tscpp/util/YamlCfg.h similarity index 100% rename from mgmt/YamlCfg.h rename to include/tscpp/util/YamlCfg.h diff --git a/iocore/aio/Makefile.am b/iocore/aio/Makefile.am index da0509a3be..af610f2e41 100644 --- a/iocore/aio/Makefile.am +++ b/iocore/aio/Makefile.am @@ -55,8 +55,6 @@ test_AIO_CPPFLAGS = \ test_AIO_LDADD = \ libinkaio.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am index b6953f1564..b38070fc57 100644 --- a/iocore/cache/Makefile.am +++ b/iocore/cache/Makefile.am @@ -101,7 +101,6 @@ test_LDADD = \ $(top_builddir)/proxy/logging/liblogging.a \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/proxy/shared/libdiagsconfig.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/utils/libinkutils.a \ $(top_builddir)/iocore/aio/libinkaio.a \ $(top_builddir)/src/tscore/libtscore.la \ diff --git a/iocore/cache/test/main.h b/iocore/cache/test/main.h index 5bcc4f82a2..1bda1920e1 100644 --- a/iocore/cache/test/main.h +++ b/iocore/cache/test/main.h @@ -31,7 +31,7 @@ #include "tscore/Diags.h" #include "tscore/TSSystemState.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "records/I_RecProcess.h" #include "P_AIO.h" #include "P_CacheDisk.h" diff --git a/iocore/dns/P_SplitDNSProcessor.h b/iocore/dns/P_SplitDNSProcessor.h index 7424ccfdc7..8031cbd3d2 100644 --- a/iocore/dns/P_SplitDNSProcessor.h +++ b/iocore/dns/P_SplitDNSProcessor.h @@ -30,7 +30,7 @@ #pragma once -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "tscore/HostLookup.h" diff --git a/mgmt/ProxyConfig.cc b/iocore/eventsystem/ConfigProcessor.cc similarity index 99% rename from mgmt/ProxyConfig.cc rename to iocore/eventsystem/ConfigProcessor.cc index e7b36df6de..664608e68a 100644 --- a/mgmt/ProxyConfig.cc +++ b/iocore/eventsystem/ConfigProcessor.cc @@ -21,7 +21,7 @@ limitations under the License. */ -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "P_EventSystem.h" #if TS_HAS_TESTS #include "tscore/TestBox.h" diff --git a/mgmt/ProxyConfig.h b/iocore/eventsystem/ConfigProcessor.h similarity index 100% rename from mgmt/ProxyConfig.h rename to iocore/eventsystem/ConfigProcessor.h diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am index 10c3e54875..0bd1e21035 100644 --- a/iocore/eventsystem/Makefile.am +++ b/iocore/eventsystem/Makefile.am @@ -68,7 +68,9 @@ libinkevent_a_SOURCES = \ Thread.cc \ UnixEThread.cc \ UnixEvent.cc \ - UnixEventProcessor.cc + UnixEventProcessor.cc \ + ConfigProcessor.cc \ + ConfigProcessor.h check_PROGRAMS = test_IOBuffer \ test_EventSystem \ @@ -94,7 +96,6 @@ test_CPP_FLAGS = \ test_LD_ADD = \ libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ diff --git a/iocore/eventsystem/unit_tests/test_IOBuffer.cc b/iocore/eventsystem/unit_tests/test_IOBuffer.cc index 1c2c407212..fe91e7e182 100644 --- a/iocore/eventsystem/unit_tests/test_IOBuffer.cc +++ b/iocore/eventsystem/unit_tests/test_IOBuffer.cc @@ -27,7 +27,7 @@ #include "tscore/I_Layout.h" #include "I_EventSystem.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "diags.i" diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am index 1855570ef9..6be2cfa413 100644 --- a/iocore/hostdb/Makefile.am +++ b/iocore/hostdb/Makefile.am @@ -73,8 +73,6 @@ test_CPP_FLAGS = \ test_LD_ADD = \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am index 4278a1898d..eb2e19de63 100644 --- a/iocore/net/Makefile.am +++ b/iocore/net/Makefile.am @@ -80,8 +80,6 @@ test_UDPNet_LDADD = \ libinknet.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/src/tscore/libtscore.la $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/proxy/ParentSelectionStrategy.o \ @@ -116,8 +114,6 @@ test_libinknet_LDADD = \ libinknet.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ diff --git a/iocore/net/P_SSLCertLookup.h b/iocore/net/P_SSLCertLookup.h index e8ddf627d1..23192681d8 100644 --- a/iocore/net/P_SSLCertLookup.h +++ b/iocore/net/P_SSLCertLookup.h @@ -28,7 +28,7 @@ #include <mutex> #include <unordered_map> -#include "ProxyConfig.h" +#include "ConfigProcessor.h" struct SSLConfigParams; struct SSLContextStorage; diff --git a/iocore/net/P_SSLClientCoordinator.h b/iocore/net/P_SSLClientCoordinator.h index 779653ee06..245266b3f5 100644 --- a/iocore/net/P_SSLClientCoordinator.h +++ b/iocore/net/P_SSLClientCoordinator.h @@ -21,7 +21,7 @@ limitations under the License. */ -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include <memory> // A class to pass the ConfigUpdateHandler, so both SSLConfig and SNIConfig get updated diff --git a/iocore/net/P_SSLConfig.h b/iocore/net/P_SSLConfig.h index 6f8ff6890e..acabd45829 100644 --- a/iocore/net/P_SSLConfig.h +++ b/iocore/net/P_SSLConfig.h @@ -37,7 +37,7 @@ #include "tscore/ink_inet.h" #include "tscore/IpMap.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "SSLSessionCache.h" #include "YamlSNIConfig.h" diff --git a/iocore/net/SSLNetVConnection.cc b/iocore/net/SSLNetVConnection.cc index db355bb80e..5472525b7a 100644 --- a/iocore/net/SSLNetVConnection.cc +++ b/iocore/net/SSLNetVConnection.cc @@ -40,10 +40,8 @@ #include "P_SSLNetVConnection.h" #include "BIO_fastopen.h" #include "SSLStats.h" -#include "SSLInternal.h" #include "P_ALPNSupport.h" -#include <climits> #include <string> #include <cstring> diff --git a/iocore/net/SSLSNIConfig.h b/iocore/net/SSLSNIConfig.h index 70a051d61c..b00dc68357 100644 --- a/iocore/net/SSLSNIConfig.h +++ b/iocore/net/SSLSNIConfig.h @@ -35,7 +35,7 @@ #include <strings.h> #include <memory> -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "SNIActionPerformer.h" #include "YamlSNIConfig.h" diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am index 5546fc8551..f1866e88cb 100644 --- a/iocore/net/quic/Makefile.am +++ b/iocore/net/quic/Makefile.am @@ -170,7 +170,6 @@ test_LDADD = \ libquic.a \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ diff --git a/iocore/net/quic/QUICConfig.h b/iocore/net/quic/QUICConfig.h index 08090e51fd..82f9c7e936 100644 --- a/iocore/net/quic/QUICConfig.h +++ b/iocore/net/quic/QUICConfig.h @@ -25,7 +25,7 @@ #include <openssl/ssl.h> -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "P_SSLCertLookup.h" class QUICConfigParams : public ConfigInfo diff --git a/iocore/net/quic/test/event_processor_main.cc b/iocore/net/quic/test/event_processor_main.cc index e430ac67f6..9a6f1ad822 100644 --- a/iocore/net/quic/test/event_processor_main.cc +++ b/iocore/net/quic/test/event_processor_main.cc @@ -30,7 +30,7 @@ #include "tscore/Diags.h" #include "I_EventSystem.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "QUICConfig.h" diff --git a/iocore/net/quic/test/main.cc b/iocore/net/quic/test/main.cc index 3eeb7cd30f..49dbba250e 100644 --- a/iocore/net/quic/test/main.cc +++ b/iocore/net/quic/test/main.cc @@ -29,7 +29,7 @@ #include "tscore/I_Layout.h" #include "tscore/Diags.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "QUICGlobals.h" #include "QUICConfig.h" diff --git a/mgmt/DerivativeMetrics.cc b/mgmt/DerivativeMetrics.cc deleted file mode 100644 index eab5c3b656..0000000000 --- a/mgmt/DerivativeMetrics.cc +++ /dev/null @@ -1,138 +0,0 @@ -/** @file - - Calculate some derivative metrics (for convenience). - - @section license License - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. - */ -#include <vector> - -#include "DerivativeMetrics.h" - -// ToDo: It's a little bizarre that we include this here, but it's the only way to get to RecSetRecord(). We should -// move that elsewhere... But other places in our core does the same thing. -#include "records/P_RecCore.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// This currently only supports one type of derivative metrics: Sums() of other, existing metrics. It's ok to add -// additional metrics here, and we prefer to call them proxy.process now that traffic_manager died. -// -static const std::vector<DerivativeSum> sum_metrics = { - // Total bytes of client request body + headers - {"proxy.process.http.user_agent_total_request_bytes", - RECD_INT, {"proxy.process.http.user_agent_request_document_total_size", "proxy.process.http.user_agent_request_header_total_size"} }, - // Total bytes of client response body + headers - {"proxy.process.http.user_agent_total_response_bytes", - RECD_INT, {"proxy.process.http.user_agent_response_document_total_size", "proxy.process.http.user_agent_response_header_total_size"} }, - // Total bytes of origin server request body + headers - {"proxy.process.http.origin_server_total_request_bytes", - RECD_INT, {"proxy.process.http.origin_server_request_document_total_size", "proxy.process.http.origin_server_request_header_total_size"}}, - // Total bytes of origin server response body + headers - {"proxy.process.http.origin_server_total_response_bytes", - RECD_INT, {"proxy.process.http.origin_server_response_document_total_size", - "proxy.process.http.origin_server_response_header_total_size"} }, - // Total bytes of client request and response (total traffic to and from clients) - {"proxy.process.user_agent_total_bytes", - RECD_INT, {"proxy.process.http.user_agent_total_request_bytes", "proxy.process.http.user_agent_total_response_bytes"} }, - // Total bytes of origin/parent request and response - {"proxy.process.origin_server_total_bytes", - RECD_INT, {"proxy.process.http.origin_server_total_request_bytes", "proxy.process.http.origin_server_total_response_bytes", - "proxy.process.http.parent_proxy_request_total_bytes", "proxy.process.http.parent_proxy_response_total_bytes"} }, - // Total requests which are cache hits - {"proxy.process.cache_total_hits", - RECD_COUNTER, {"proxy.process.http.cache_hit_fresh", "proxy.process.http.cache_hit_revalidated", "proxy.process.http.cache_hit_ims", - "proxy.process.http.cache_hit_stale_served"} }, - // Total requests which are cache misses - {"proxy.process.cache_total_misses", - RECD_COUNTER, {"proxy.process.http.cache_miss_cold", "proxy.process.http.cache_miss_changed", "proxy.process.http.cache_miss_client_no_cache", - "proxy.process.http.cache_miss_ims", "proxy.process.http.cache_miss_client_not_cacheable"} }, - // Total requests, both hits and misses (this is slightly superfluous, but assures correct percentage calculations) - {"proxy.process.cache_total_requests", RECD_COUNTER, {"proxy.process.cache_total_hits", "proxy.process.cache_total_misses"} }, - // Total cache requests bytes which are cache hits - {"proxy.process.cache_total_hits_bytes", - RECD_INT, {"proxy.process.http.tcp_hit_user_agent_bytes_stat", "proxy.process.http.tcp_refresh_hit_user_agent_bytes_stat", - "proxy.process.http.tcp_ims_hit_user_agent_bytes_stat"} }, - // Total cache requests bytes which are cache misses - {"proxy.process.cache_total_misses_bytes", - RECD_INT, {"proxy.process.http.tcp_miss_user_agent_bytes_stat", "proxy.process.http.tcp_expired_miss_user_agent_bytes_stat", - "proxy.process.http.tcp_refresh_miss_user_agent_bytes_stat", "proxy.process.http.tcp_ims_miss_user_agent_bytes_stat"} }, - // Total request bytes, both hits and misses - {"proxy.process.cache_total_bytes", RECD_INT, {"proxy.process.cache_total_hits_bytes", "proxy.process.cache_total_misses_bytes"} }, - // Total of all server connections (sum of origins and parent connections) - {"proxy.process.current_server_connections", - RECD_INT, {"proxy.process.http.current_server_connections", "proxy.process.http.current_parent_proxy_connections"} } -}; - -// The constructor is responsible for registering the new metrics. ToDo: At some point we could -// in theory expand this to support some sort of configuration, and then replace the hardcoded metrics -// here with parameters to an Add() method. -DerivativeMetrics::DerivativeMetrics() -{ - // Add all the sum derived metrics to LibRecords - for (auto &&[derived_metric, type, metric_parts] : sum_metrics) { - (void)metric_parts; - - switch (type) { - case RECD_INT: - RecRegisterStatInt(RECT_PROCESS, derived_metric, static_cast<RecInt>(0), RECP_NON_PERSISTENT); - break; - case RECD_COUNTER: - RecRegisterStatCounter(RECT_PROCESS, derived_metric, static_cast<RecCounter>(0), RECP_NON_PERSISTENT); - break; - default: - ink_release_assert(!"Unsupported metric type"); - break; - } - } -} - -// Updates all the derived metrics -void -DerivativeMetrics::Update() -{ - int error = REC_ERR_FAIL; - RecData sum; - RecInt int_val; - RecCounter counter_val; - - for (auto &&[derived_metric, type, metric_parts] : sum_metrics) { - ink_zero(sum); - for (auto &&metric : metric_parts) { - switch (type) { - case RECD_INT: - error = RecGetRecordInt(metric, &int_val); - sum.rec_int += int_val; - break; - case RECD_COUNTER: - error = RecGetRecordCounter(metric, &counter_val); - sum.rec_counter += counter_val; - break; - default: - ink_release_assert(!"Unsupported metric type"); - break; - } - if (error) { // No point in continuing here, since the metric is failing for odd reasons - break; - } - } - - if (!error) { - RecSetRecord(RECT_NULL, derived_metric, type, &sum, nullptr, REC_SOURCE_EXPLICIT); - } - } -} diff --git a/mgmt/DerivativeMetrics.h b/mgmt/DerivativeMetrics.h deleted file mode 100644 index 6a99a225cb..0000000000 --- a/mgmt/DerivativeMetrics.h +++ /dev/null @@ -1,40 +0,0 @@ -/** @file - - Calculate some derivative metrics (for convenience). - - @section license License - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. - */ - -#pragma once - -#include <tuple> -#include "records/I_RecDefs.h" - -using DerivativeSum = std::tuple<const char *, RecDataT, std::vector<const char *>>; - -class DerivativeMetrics -{ -public: - DerivativeMetrics(); - void Update(); - - // Don't allow copy and assign - DerivativeMetrics(DerivativeMetrics const &) = delete; - DerivativeMetrics &operator=(DerivativeMetrics const &) = delete; -}; diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am index 63b5ddb698..365a376634 100644 --- a/mgmt/Makefile.am +++ b/mgmt/Makefile.am @@ -19,11 +19,6 @@ SUBDIRS = utils api config rpc -# Decoder ring: -# libmgmt_c.la Configuration records (defaults). -# libmgmt_p.la libmgmt for Process Manager applications (everything else) -noinst_LTLIBRARIES = libmgmt_c.la libmgmt_p.la - AM_CPPFLAGS += \ $(iocore_include_dirs) \ -I$(abs_top_srcdir)/include \ @@ -36,26 +31,6 @@ AM_CPPFLAGS += \ @YAMLCPP_INCLUDES@ \ $(TS_INCLUDES) -libmgmt_c_la_SOURCES = \ - RecordsConfig.cc \ - RecordsConfig.h - -libmgmt_COMMON = \ - MgmtDefs.h \ - RecordsConfigUtils.cc - -libmgmt_p_la_SOURCES = \ - $(libmgmt_COMMON) \ - ProxyConfig.cc \ - ProxyConfig.h \ - YamlCfg.cc \ - YamlCfg.h - -libmgmt_p_la_LIBADD = \ - libmgmt_c.la \ - $(top_builddir)/mgmt/utils/libutils_p.la \ - @YAMLCPP_LIBS@ - include $(top_srcdir)/build/tidy.mk clang-tidy-local: $(DIST_SOURCES) diff --git a/mgmt/WebMgmtUtils.cc b/mgmt/WebMgmtUtils.cc deleted file mode 100644 index 3dc2bdad1d..0000000000 --- a/mgmt/WebMgmtUtils.cc +++ /dev/null @@ -1,423 +0,0 @@ -/** @file - - Functions for interfacing to management records - - @section license License - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. - */ - -#include "tscore/ink_string.h" -#include "tscore/Tokenizer.h" -#include "tscore/ink_file.h" -#include "MgmtUtils.h" -#include "WebMgmtUtils.h" -#include "tscore/Regex.h" - -// bool varSetFloat(const char* varName, RecFloat value) -// -// Sets the variable specified by varName to value. varName -// must be a RecFloat variable. No conversion is done for -// other types unless convert is set to true. In the case -// of convert is true, type conversion is perform if applicable. -// By default, convert is set to be false and can be overridden -// when the function is called. -// -bool -varSetFloat(const char *varName, RecFloat value, bool convert) -{ - RecDataT varDataType = RECD_NULL; - bool found = true; - int err = REC_ERR_FAIL; - - err = RecGetRecordDataType(const_cast<char *>(varName), &varDataType); - if (err != REC_ERR_OKAY) { - return found; - } - - switch (varDataType) { - case RECD_FLOAT: - RecSetRecordFloat(const_cast<char *>(varName), value, REC_SOURCE_EXPLICIT); - break; - - case RECD_INT: - if (convert) { - value += 0.5; // rounding up - RecSetRecordInt(const_cast<char *>(varName), static_cast<RecInt>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_COUNTER: - if (convert) { - RecSetRecordCounter(const_cast<char *>(varName), static_cast<RecCounter>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_STRING: - case RECD_NULL: - default: - found = false; - break; - } - - return found; -} - -// bool varSetCounter(const char* varName, RecCounter value) -// -// Sets the variable specified by varName to value. varName -// must be an RecCounter variable. No conversion is done for -// other types unless convert is set to true. In the case -// of convert is true, type conversion is perform if applicable. -// By default, convert is set to be false and can be overridden -// when the function is called. -// -bool -varSetCounter(const char *varName, RecCounter value, bool convert) -{ - RecDataT varDataType = RECD_NULL; - bool found = true; - int err = REC_ERR_FAIL; - - err = RecGetRecordDataType(const_cast<char *>(varName), &varDataType); - if (err != REC_ERR_OKAY) { - return found; - } - - switch (varDataType) { - case RECD_COUNTER: - RecSetRecordCounter(const_cast<char *>(varName), value, REC_SOURCE_EXPLICIT); - break; - - case RECD_INT: - if (convert) { - RecSetRecordInt(const_cast<char *>(varName), static_cast<RecInt>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_FLOAT: - if (convert) { - RecSetRecordFloat(const_cast<char *>(varName), static_cast<RecFloat>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_STRING: - case RECD_NULL: - default: - found = false; - break; - } - - return found; -} - -// bool varSetInt(const char* varName, RecInt value) -// -// Sets the variable specified by varName to value. varName -// must be an RecInt variable. No conversion is done for -// other types unless convert is set to true. In the case -// of convert is true, type conversion is perform if applicable. -// By default, convert is set to be false and can be overridden -// when the function is called. -// -bool -varSetInt(const char *varName, RecInt value, bool convert) -{ - RecDataT varDataType = RECD_NULL; - bool found = true; - int err = REC_ERR_FAIL; - - err = RecGetRecordDataType(const_cast<char *>(varName), &varDataType); - if (err != REC_ERR_OKAY) { - return found; - } - - switch (varDataType) { - case RECD_INT: - RecSetRecordInt(const_cast<char *>(varName), value, REC_SOURCE_EXPLICIT); - break; - - case RECD_COUNTER: - if (convert) { - RecSetRecordCounter(const_cast<char *>(varName), static_cast<RecCounter>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_FLOAT: - if (convert) { - RecSetRecordFloat(const_cast<char *>(varName), static_cast<RecFloat>(value), REC_SOURCE_EXPLICIT); - break; - } - // fallthrough - - case RECD_STRING: - case RECD_NULL: - default: - found = false; - break; - } - - return found; -} - -// bool varSetData(RecDataT varType, const char *varName, RecData value) -// -// Sets the variable specified by varName to value. value and varName -// must be varType variables. -// -bool -varSetData(RecDataT varType, const char *varName, RecData value) -{ - RecErrT err = REC_ERR_FAIL; - - switch (varType) { - case RECD_INT: - err = RecSetRecordInt(const_cast<char *>(varName), value.rec_int, REC_SOURCE_EXPLICIT); - break; - case RECD_COUNTER: - err = RecSetRecordCounter(const_cast<char *>(varName), value.rec_counter, REC_SOURCE_EXPLICIT); - break; - case RECD_FLOAT: - err = RecSetRecordFloat(const_cast<char *>(varName), value.rec_float, REC_SOURCE_EXPLICIT); - break; - default: - Fatal("unsupported type:%d\n", varType); - } - return (err == REC_ERR_OKAY); -} - -// bool varDataFromName(RecDataT varType, const char *varName, RecData *value) -// -// Sets the *value to value of the varName according varType. -// -// return true if bufVal was successfully set -// and false otherwise -// -bool -varDataFromName(RecDataT varType, const char *varName, RecData *value) -{ - int err; - - err = RecGetRecord_Xmalloc(varName, varType, value, true); - - return (err == REC_ERR_OKAY); -} - -// void percentStrFromFloat(MgmtFloat, char* bufVal) -// -// Converts a float to a percent string -void -percentStrFromFloat(RecFloat val, char *bufVal, int bufLen) -{ - int percent = static_cast<int>((val * 100.0) + 0.5); - snprintf(bufVal, bufLen, "%d%%", percent); -} - -// void commaStrFromInt(RecInt bytes, char* bufVal) -// Converts an Int to string with commas in it -void -commaStrFromInt(RecInt bytes, char *bufVal, int bufLen) -{ - char *curPtr; - - int len = snprintf(bufVal, bufLen, "%" PRId64 "", bytes); - - // The string is too short to need commas - if (len < 4) { - return; - } - - int numCommas = (len - 1) / 3; - ink_release_assert(bufLen > numCommas + len); - curPtr = bufVal + (len + numCommas); - *curPtr = '\0'; - curPtr--; - - for (int i = 0; i < len; i++) { - *curPtr = bufVal[len - 1 - i]; - - if ((i + 1) % 3 == 0 && curPtr != bufVal) { - curPtr--; - *curPtr = ','; - } - curPtr--; - } - - ink_assert(curPtr + 1 == bufVal); -} - -// void MbytesFromInt(RecInt bytes, char* bufVal) -// Converts into a string in units of megabytes No unit specification is added -void -MbytesFromInt(RecInt bytes, char *bufVal, int bufLen) -{ - RecInt mBytes = bytes / 1048576; - - snprintf(bufVal, bufLen, "%" PRId64 "", mBytes); -} - -// void bytesFromInt(RecInt bytes, char* bufVal) -// -// Converts mgmt into a string with one of -// GB, MB, KB, B units -// -// bufVal must point to adequate space a la sprintf -void -bytesFromInt(RecInt bytes, char *bufVal, int bufLen) -{ - const int64_t gb = 1073741824; - const long int mb = 1048576; - const long int kb = 1024; - double unitBytes; - - if (bytes >= gb) { - unitBytes = bytes / static_cast<double>(gb); - snprintf(bufVal, bufLen, "%.1f GB", unitBytes); - } else { - // Reduce the precision of the bytes parameter - // because we know that it less than 1GB which - // has plenty of precision for a regular int - // and saves from 64 bit arithmetic which may - // be expensive on some processors - int bytesP = static_cast<int>(bytes); - if (bytesP >= mb) { - unitBytes = bytes / static_cast<double>(mb); - snprintf(bufVal, bufLen, "%.1f MB", unitBytes); - } else if (bytesP >= kb) { - unitBytes = bytes / static_cast<double>(kb); - snprintf(bufVal, bufLen, "%.1f KB", unitBytes); - } else { - snprintf(bufVal, bufLen, "%d", bytesP); - } - } -} - -// -// Removes any cr/lf line breaks from the text data -// -int -convertHtmlToUnix(char *buffer) -{ - char *read = buffer; - char *write = buffer; - int numSub = 0; - - while (*read != '\0') { - if (*read == '\015') { - *write = ' '; - read++; - write++; - numSub++; - } else { - *write = *read; - write++; - read++; - } - } - *write = '\0'; - return numSub; -} - -// Substitutes HTTP unsafe character representations -// with their actual values. Modifies the passed -// in string -// -int -substituteUnsafeChars(char *buffer) -{ - char *read = buffer; - char *write = buffer; - char subStr[3]; - long charVal; - int numSub = 0; - - subStr[2] = '\0'; - while (*read != '\0') { - if (*read == '%') { - subStr[0] = *(++read); - subStr[1] = *(++read); - charVal = strtol(subStr, (char **)nullptr, 16); - *write = static_cast<char>(charVal); - read++; - write++; - numSub++; - } else if (*read == '+') { - *write = ' '; - write++; - read++; - } else { - *write = *read; - write++; - read++; - } - } - *write = '\0'; - return numSub; -} - -// Substitutes for characters that can be misconstrued -// as part of an HTML tag -// Allocates a new string which the -// the CALLEE MUST DELETE -// -char * -substituteForHTMLChars(const char *buffer) -{ - char *safeBuf; // the return "safe" character buffer - char *safeCurrent; // where we are in the return buffer - const char *inCurrent = buffer; // where we are in the original buffer - int inLength = strlen(buffer); // how long the orig buffer in - - // Maximum character expansion is one to three - unsigned int bufferToAllocate = (inLength * 5) + 1; - safeBuf = new char[bufferToAllocate]; - safeCurrent = safeBuf; - - while (*inCurrent != '\0') { - switch (*inCurrent) { - case '"': - ink_strlcpy(safeCurrent, """, bufferToAllocate); - safeCurrent += 6; - break; - case '<': - ink_strlcpy(safeCurrent, "<", bufferToAllocate); - safeCurrent += 4; - break; - case '>': - ink_strlcpy(safeCurrent, ">", bufferToAllocate); - safeCurrent += 4; - break; - case '&': - ink_strlcpy(safeCurrent, "&", bufferToAllocate); - safeCurrent += 5; - break; - default: - *safeCurrent = *inCurrent; - safeCurrent += 1; - break; - } - - inCurrent++; - } - *safeCurrent = '\0'; - return safeBuf; -} diff --git a/mgmt/WebMgmtUtils.h b/mgmt/WebMgmtUtils.h deleted file mode 100644 index d7f4070a72..0000000000 --- a/mgmt/WebMgmtUtils.h +++ /dev/null @@ -1,54 +0,0 @@ -/** @file - - Functions for interfacing to management records - - @section license License - - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. - */ - -#pragma once - -#include "MgmtDefs.h" -#include "records/P_RecCore.h" - -// Convert to byte units (GB, MB, KB) -void bytesFromInt(RecInt bytes, char *bufVal, int bufLen); - -// Convert to MB -void MbytesFromInt(RecInt bytes, char *bufVal, int bufLen); - -// Create comma string from int -void commaStrFromInt(RecInt bytes, char *bufVal, int bufLen); - -// Create percent string from float -void percentStrFromFloat(RecFloat val, char *bufVal, int bufLen); - -// Converts where applicable to specified type -bool varDataFromName(RecDataT varType, const char *varName, RecData *value); - -// No conversion done. varName must represent a value of the appropriate -// type -// Default argument "convert" added to allow great flexibility in type checking -bool varSetInt(const char *varName, RecInt value, bool convert = false); -bool varSetCounter(const char *varName, RecCounter value, bool convert = false); -bool varSetFloat(const char *varName, RecFloat value, bool convert = false); -bool varSetData(RecDataT varType, const char *varName, RecData value); - -int convertHtmlToUnix(char *buffer); -int substituteUnsafeChars(char *buffer); -char *substituteForHTMLChars(const char *buffer); diff --git a/mgmt/rpc/Makefile.am b/mgmt/rpc/Makefile.am index a6213dd273..56099602b2 100644 --- a/mgmt/rpc/Makefile.am +++ b/mgmt/rpc/Makefile.am @@ -33,8 +33,6 @@ check_PROGRAMS = test_jsonrpc test_jsonrpcserver TESTS = $(check_PROGRAMS) -# TODO: Remove libmgmt_p.la This can only be removed once we remove the ProcessManager dependency and the librecords -# Message stuff between TM and TS # TODO: handlers - mgmt/utils needed as ProcessManager.h is included in many pleaces, we should be able to remove it once # we move away from TM @@ -65,8 +63,6 @@ test_jsonrpc_SOURCES = \ jsonrpc/unit_tests/unit_test_main.cc \ jsonrpc/unit_tests/test_basic_protocol.cc -# TODO: Remove libmgmt_p.la - test_jsonrpc_LDADD = \ libjsonrpc_protocol.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ @@ -76,8 +72,8 @@ test_jsonrpc_LDADD = \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ + $(top_builddir)/mgmt/utils/libutils_p.la \ @YAMLCPP_LIBS@ @HWLOC_LIBS@ @@ -121,9 +117,8 @@ test_jsonrpcserver_LDADD = \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/src/tscore/libtscore.la \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ + $(top_builddir)/mgmt/utils/libutils_p.la \ @YAMLCPP_LIBS@ @HWLOC_LIBS@ @SWOC_LIBS@ @YAMLCPP_LIBS@ diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc index d2845e6b68..c82665a152 100644 --- a/proxy/CacheControl.cc +++ b/proxy/CacheControl.cc @@ -36,7 +36,7 @@ #include "ControlMatcher.h" #include "Main.h" #include "P_EventSystem.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "HTTP.h" #include "HttpConfig.h" #include "P_Cache.h" diff --git a/proxy/ControlMatcher.cc b/proxy/ControlMatcher.cc index 3866c8f88f..c200c92d8b 100644 --- a/proxy/ControlMatcher.cc +++ b/proxy/ControlMatcher.cc @@ -34,7 +34,7 @@ #include "tscore/MatcherUtils.h" #include "tscore/Tokenizer.h" #include "tscore/ts_file.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "ControlMatcher.h" #include "CacheControl.h" #include "ParentSelection.h" diff --git a/proxy/IPAllow.h b/proxy/IPAllow.h index 4f50396993..9c14262373 100644 --- a/proxy/IPAllow.h +++ b/proxy/IPAllow.h @@ -35,7 +35,7 @@ #include <vector> #include "hdrs/HTTP.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "swoc/TextView.h" #include "swoc/swoc_file.h" #include "swoc/swoc_ip.h" diff --git a/proxy/InkAPIInternal.h b/proxy/InkAPIInternal.h index 9728daac97..572a223b12 100644 --- a/proxy/InkAPIInternal.h +++ b/proxy/InkAPIInternal.h @@ -28,7 +28,7 @@ #include "I_Net.h" #include "HTTP.h" #include "tscore/List.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "I_Cache.h" #include "I_Tasks.h" #include "Plugin.h" diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc index 868a7c5e3e..f4648c4bd7 100644 --- a/proxy/ParentSelection.cc +++ b/proxy/ParentSelection.cc @@ -25,7 +25,7 @@ #include "ParentConsistentHash.h" #include "ParentRoundRobin.h" #include "ControlMatcher.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "HostStatus.h" #include "HTTP.h" #include "HttpTransact.h" diff --git a/proxy/ParentSelection.h b/proxy/ParentSelection.h index e2eac6a3c2..84662c97ac 100644 --- a/proxy/ParentSelection.h +++ b/proxy/ParentSelection.h @@ -30,7 +30,7 @@ #pragma once -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "ControlBase.h" #include "ControlMatcher.h" #include "records/I_RecProcess.h" diff --git a/proxy/ReverseProxy.cc b/proxy/ReverseProxy.cc index 2399f228dc..4500bd9cfa 100644 --- a/proxy/ReverseProxy.cc +++ b/proxy/ReverseProxy.cc @@ -32,7 +32,7 @@ #include <dlfcn.h> #include "P_EventSystem.h" #include "P_Cache.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "ReverseProxy.h" #include "tscore/MatcherUtils.h" #include "tscore/Tokenizer.h" diff --git a/proxy/StatPages.cc b/proxy/StatPages.cc index 2c311f39ab..7ad3726939 100644 --- a/proxy/StatPages.cc +++ b/proxy/StatPages.cc @@ -29,7 +29,7 @@ ****************************************************************************/ #include "tscore/ink_config.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "StatPages.h" #include "HdrUtils.h" #include "tscore/MatcherUtils.h" diff --git a/proxy/Transform.cc b/proxy/Transform.cc index bdb5efbdf4..6feabf7009 100644 --- a/proxy/Transform.cc +++ b/proxy/Transform.cc @@ -59,7 +59,7 @@ */ -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "P_Net.h" #include "TransformInternal.h" #include "HdrUtils.h" diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am index 1bc80ccb81..3de4cf11d7 100644 --- a/proxy/hdrs/Makefile.am +++ b/proxy/hdrs/Makefile.am @@ -88,7 +88,6 @@ test_proxy_hdrs_LDADD = \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ @SWOC_LIBS@ @HWLOC_LIBS@ \ @LIBCAP@ @@ -107,7 +106,6 @@ test_hdr_heap_LDADD = -L. -lhdrs \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ @SWOC_LIBS@ @HWLOC_LIBS@ \ @LIBCAP@ diff --git a/proxy/http/HttpCacheSM.h b/proxy/http/HttpCacheSM.h index 93c9a5edad..cb330c027a 100644 --- a/proxy/http/HttpCacheSM.h +++ b/proxy/http/HttpCacheSM.h @@ -33,7 +33,7 @@ #pragma once #include "I_Cache.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "URL.h" #include "HTTP.h" #include "HttpConfig.h" diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index 9d1bf3e918..6daa9d2fc5 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -28,7 +28,7 @@ #include <cstring> #include "HttpConfig.h" #include "HTTP.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "P_Net.h" #include "records/P_RecUtils.h" #include <records/I_RecHttp.h> diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index c3057058aa..13af7c8e86 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -49,7 +49,7 @@ #include "tscore/Regex.h" #include "tscore/BufferWriter.h" #include "HttpProxyAPIEnums.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "records/I_RecProcess.h" #include "HttpConnectionCount.h" diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 924cdc8b2d..db0096b476 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -27,7 +27,7 @@ #include "HttpTransact.h" #include "HttpBodyFactory.h" #include "HttpTransactHeaders.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "Http1ServerSession.h" #include "HttpDebugNames.h" #include "HttpSessionManager.h" diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h index efeba51ba7..b04a6622cf 100644 --- a/proxy/http/HttpTransact.h +++ b/proxy/http/HttpTransact.h @@ -34,7 +34,7 @@ #include "ControlMatcher.h" #include "CacheControl.h" #include "ParentSelection.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "Transform.h" #include "Milestones.h" #include "ts/remap.h" diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am index dab3678f01..048f0a9eb0 100644 --- a/proxy/http/Makefile.am +++ b/proxy/http/Makefile.am @@ -105,11 +105,10 @@ test_proxy_http_LDADD = \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/proxy/hdrs/libhdrs.a \ - $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/proxy/logging/liblogging.a \ + $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/utils/libinkutils.a \ @SWOC_LIBS@ @HWLOC_LIBS@ \ @LIBCAP@ diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am index 5b09475d06..84ae96f749 100644 --- a/proxy/http/remap/Makefile.am +++ b/proxy/http/remap/Makefile.am @@ -74,7 +74,6 @@ COMMON_PLUGINDSO_LDADDS = \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ @SWOC_LIBS@ @HWLOC_LIBS@ @@ -140,7 +139,6 @@ test_NextHopStrategyFactory_LDADD = \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/proxy/logging/liblogging.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/utils/libinkutils.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ @SWOC_LIBS@ \ @@ -172,7 +170,6 @@ test_NextHopRoundRobin_LDADD = \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/proxy/logging/liblogging.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/utils/libinkutils.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ @SWOC_LIBS@ \ @@ -204,7 +201,6 @@ test_NextHopConsistentHash_LDADD = \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/proxy/logging/liblogging.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/utils/libinkutils.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ @SWOC_LIBS@ \ diff --git a/proxy/http/remap/NextHopConsistentHash.cc b/proxy/http/remap/NextHopConsistentHash.cc index c12773ce6a..2de0d7b5ef 100644 --- a/proxy/http/remap/NextHopConsistentHash.cc +++ b/proxy/http/remap/NextHopConsistentHash.cc @@ -25,7 +25,7 @@ #include "HttpSM.h" #include "I_Machine.h" -#include "YamlCfg.h" +#include "tscpp/util/YamlCfg.h" #include "NextHopConsistentHash.h" // hash_key strings. diff --git a/proxy/http/remap/NextHopSelectionStrategy.cc b/proxy/http/remap/NextHopSelectionStrategy.cc index db96a48fc8..a924c8793e 100644 --- a/proxy/http/remap/NextHopSelectionStrategy.cc +++ b/proxy/http/remap/NextHopSelectionStrategy.cc @@ -24,7 +24,7 @@ #include <optional> #include <yaml-cpp/yaml.h> -#include <YamlCfg.h> +#include <tscpp/util/YamlCfg.h> #include "I_Machine.h" #include "HttpSM.h" #include "NextHopSelectionStrategy.h" diff --git a/proxy/http/remap/NextHopStrategyFactory.cc b/proxy/http/remap/NextHopStrategyFactory.cc index ec1d06bf14..68a6e117b9 100644 --- a/proxy/http/remap/NextHopStrategyFactory.cc +++ b/proxy/http/remap/NextHopStrategyFactory.cc @@ -29,7 +29,7 @@ #include "NextHopStrategyFactory.h" #include "NextHopConsistentHash.h" #include "NextHopRoundRobin.h" -#include <YamlCfg.h> +#include <tscpp/util/YamlCfg.h> NextHopStrategyFactory::NextHopStrategyFactory(const char *file) : fn(file) { diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc index 00858e2058..e6b3ef73c8 100644 --- a/proxy/http/remap/UrlRewrite.cc +++ b/proxy/http/remap/UrlRewrite.cc @@ -23,7 +23,7 @@ */ #include "UrlRewrite.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "ReverseProxy.h" #include "RemapConfig.h" #include "tscore/I_Layout.h" diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am index c0444d0102..9d39fad6aa 100644 --- a/proxy/http2/Makefile.am +++ b/proxy/http2/Makefile.am @@ -77,7 +77,6 @@ test_libhttp2_LDADD = \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ @SWOC_LIBS@ @HWLOC_LIBS@ @@ -130,7 +129,6 @@ test_HPACK_LDADD = \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ @SWOC_LIBS@ @HWLOC_LIBS@ diff --git a/proxy/http2/unit_tests/main.cc b/proxy/http2/unit_tests/main.cc index 6352dc4a23..567f084e41 100644 --- a/proxy/http2/unit_tests/main.cc +++ b/proxy/http2/unit_tests/main.cc @@ -27,7 +27,7 @@ #include "tscore/I_Layout.h" #include "I_EventSystem.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "diags.i" diff --git a/proxy/http3/Http3Config.h b/proxy/http3/Http3Config.h index 5efbbefa2e..9a4965db5c 100644 --- a/proxy/http3/Http3Config.h +++ b/proxy/http3/Http3Config.h @@ -23,7 +23,7 @@ #pragma once -#include "ProxyConfig.h" +#include "ConfigProcessor.h" namespace ts { diff --git a/proxy/http3/Makefile.am b/proxy/http3/Makefile.am index b0dcbd019b..8a00a6450f 100644 --- a/proxy/http3/Makefile.am +++ b/proxy/http3/Makefile.am @@ -73,7 +73,6 @@ test_LDADD = \ $(top_builddir)/iocore/net/TLSKeyLogger.o \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/proxy/hdrs/libhdrs.a \ diff --git a/proxy/http3/test/main.cc b/proxy/http3/test/main.cc index ef2b119b0b..11eb713643 100644 --- a/proxy/http3/test/main.cc +++ b/proxy/http3/test/main.cc @@ -29,7 +29,7 @@ #include "tscore/I_Layout.h" #include "tscore/Diags.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "Http3Config.h" #define TEST_THREADS 1 diff --git a/proxy/http3/test/main_qpack.cc b/proxy/http3/test/main_qpack.cc index 999dad78d2..b6e1d594f5 100644 --- a/proxy/http3/test/main_qpack.cc +++ b/proxy/http3/test/main_qpack.cc @@ -31,7 +31,7 @@ #include "tscore/Diags.h" #include "I_EventSystem.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "QUICConfig.h" #include "HuffmanCodec.h" diff --git a/proxy/logging/LogConfig.h b/proxy/logging/LogConfig.h index 309bdb3090..1885b0d05a 100644 --- a/proxy/logging/LogConfig.h +++ b/proxy/logging/LogConfig.h @@ -28,7 +28,7 @@ #include "tscore/ink_platform.h" #include "records/I_RecProcess.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "LogObject.h" #include "RolledLogDeleter.h" #include "swoc/MemSpan.h" diff --git a/proxy/logging/LogStandalone.cc b/proxy/logging/LogStandalone.cc index b5369dd6fb..1292ce1753 100644 --- a/proxy/logging/LogStandalone.cc +++ b/proxy/logging/LogStandalone.cc @@ -38,7 +38,7 @@ #include "MgmtUtils.h" // Needs LibRecordsConfigInit() -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #define LOG_FILENAME_SIZE 255 diff --git a/proxy/logging/unit-tests/benchmark_LogObject.cc b/proxy/logging/unit-tests/benchmark_LogObject.cc index 0241935849..1b54e369b2 100644 --- a/proxy/logging/unit-tests/benchmark_LogObject.cc +++ b/proxy/logging/unit-tests/benchmark_LogObject.cc @@ -34,7 +34,6 @@ benchmark_LogObject_LDADD = \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/logging/liblogging.a \ $(top_builddir)/lib/records/librecords_p.a \ $(top_builddir)/lib/records/librecords_lm.a \ @@ -42,7 +41,6 @@ benchmark_LogObject_LDADD = \ $(top_builddir)/proxy/http/libhttp.a \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ $(top_builddir)/proxy/shared/libdiagsconfig.a \ @HWLOC_LIBS@ diff --git a/src/records/Makefile.am b/src/records/Makefile.am index 7cdfb7d208..9df4186422 100644 --- a/src/records/Makefile.am +++ b/src/records/Makefile.am @@ -24,9 +24,6 @@ AM_CPPFLAGS += \ -I$(abs_top_srcdir)/lib/swoc/include \ -I$(abs_top_srcdir)/iocore/eventsystem \ -I$(abs_top_srcdir)/iocore/utils \ - -I$(abs_top_srcdir)/mgmt \ - -I$(abs_top_srcdir)/mgmt/api/include \ - -I$(abs_top_srcdir)/mgmt/utils \ -I$(abs_top_srcdir)/include \ -I$(abs_top_srcdir)/lib \ -I$(abs_top_srcdir)/ \ @@ -56,7 +53,9 @@ librecords_COMMON = \ RecMessage.cc \ RecMutex.cc \ RecRawStats.cc \ - RecUtils.cc + RecUtils.cc \ + RecordsConfig.cc \ + RecordsConfigUtils.cc librecords_p_a_SOURCES = \ $(librecords_COMMON) \ @@ -75,7 +74,6 @@ test_librecords_SOURCES = \ test_librecords_LDADD = \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/src/tscore/libtscore.la \ @@ -91,7 +89,6 @@ test_librecords_on_eventsystem_SOURCES = \ test_librecords_on_eventsystem_LDADD = \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/src/tscore/libtscore.la \ diff --git a/src/records/P_RecCore.cc b/src/records/P_RecCore.cc index 61cb1982d6..7dddcfde31 100644 --- a/src/records/P_RecCore.cc +++ b/src/records/P_RecCore.cc @@ -24,9 +24,6 @@ #include "tscore/ink_platform.h" #include "tscore/ink_memory.h" -#include "tscore/TextBuffer.h" -#include "tscore/Tokenizer.h" -#include "tscore/ink_defs.h" #include "tscore/ink_string.h" #include "records/P_RecFile.h" diff --git a/src/records/RecCore.cc b/src/records/RecCore.cc index 9159cd44d4..3b1609a64f 100644 --- a/src/records/RecCore.cc +++ b/src/records/RecCore.cc @@ -27,7 +27,7 @@ #include "tscore/Filenames.h" #include "tscore/ts_file.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "records/P_RecFile.h" #include "records/P_RecCore.h" #include "records/P_RecUtils.h" diff --git a/src/records/RecUtils.cc b/src/records/RecUtils.cc index 9f5ce8883d..cb9ec5a537 100644 --- a/src/records/RecUtils.cc +++ b/src/records/RecUtils.cc @@ -24,7 +24,7 @@ #include "tscore/ink_platform.h" #include "tscore/ink_memory.h" #include "tscore/ParseRules.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "records/P_RecUtils.h" #include "records/P_RecCore.h" diff --git a/src/records/RecYAMLDecoder.cc b/src/records/RecYAMLDecoder.cc index 9a7803e79b..6015bd686e 100644 --- a/src/records/RecYAMLDecoder.cc +++ b/src/records/RecYAMLDecoder.cc @@ -27,7 +27,7 @@ #include "tscore/Diags.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include <string_view> diff --git a/mgmt/RecordsConfig.cc b/src/records/RecordsConfig.cc similarity index 99% rename from mgmt/RecordsConfig.cc rename to src/records/RecordsConfig.cc index bbc08003ea..c30820ba32 100644 --- a/mgmt/RecordsConfig.cc +++ b/src/records/RecordsConfig.cc @@ -23,7 +23,7 @@ #include "tscore/ink_config.h" #include "tscore/Filenames.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #if TS_USE_REMOTE_UNWINDING #define MGMT_CRASHLOG_HELPER "traffic_crashlog" diff --git a/mgmt/RecordsConfigUtils.cc b/src/records/RecordsConfigUtils.cc similarity index 99% rename from mgmt/RecordsConfigUtils.cc rename to src/records/RecordsConfigUtils.cc index 171a7a1420..93a4c86bf5 100644 --- a/mgmt/RecordsConfigUtils.cc +++ b/src/records/RecordsConfigUtils.cc @@ -22,7 +22,7 @@ */ #include "tscore/ink_config.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" //------------------------------------------------------------------------- // LibRecordsConfigInit diff --git a/src/traffic_crashlog/Makefile.inc b/src/traffic_crashlog/Makefile.inc index 52435cd54e..5e0c49f0c2 100644 --- a/src/traffic_crashlog/Makefile.inc +++ b/src/traffic_crashlog/Makefile.inc @@ -39,7 +39,6 @@ traffic_crashlog_traffic_crashlog_SOURCES = \ traffic_crashlog_traffic_crashlog_LDADD = \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/iocore/net/libinknet.a \ diff --git a/src/traffic_crashlog/traffic_crashlog.cc b/src/traffic_crashlog/traffic_crashlog.cc index 3ca2afecc1..83dd081db7 100644 --- a/src/traffic_crashlog/traffic_crashlog.cc +++ b/src/traffic_crashlog/traffic_crashlog.cc @@ -28,7 +28,7 @@ #include "tscore/I_Layout.h" #include "tscore/ink_syslog.h" #include "records/I_RecProcess.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "tscore/BaseLogFile.h" #include "tscore/runroot.h" diff --git a/src/traffic_layout/Makefile.inc b/src/traffic_layout/Makefile.inc index 5f636c5b12..cc1fd4dca9 100644 --- a/src/traffic_layout/Makefile.inc +++ b/src/traffic_layout/Makefile.inc @@ -43,7 +43,6 @@ traffic_layout_traffic_layout_SOURCES = \ traffic_layout_traffic_layout_LDADD = \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ diff --git a/src/traffic_layout/engine.cc b/src/traffic_layout/engine.cc index 89b46f1d67..5adcc0fa3d 100644 --- a/src/traffic_layout/engine.cc +++ b/src/traffic_layout/engine.cc @@ -29,7 +29,7 @@ #include "tscore/ink_error.h" #include "tscore/ink_defs.h" #include "records/I_RecProcess.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "engine.h" #include "file_system.h" #include "info.h" diff --git a/src/traffic_layout/info.cc b/src/traffic_layout/info.cc index a54a1b10f4..529ca1876c 100644 --- a/src/traffic_layout/info.cc +++ b/src/traffic_layout/info.cc @@ -27,7 +27,7 @@ #include "tscore/Filenames.h" #include "tscore/BufferWriter.h" #include "records/I_RecProcess.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "info.h" #if TS_USE_HWLOC diff --git a/src/traffic_logcat/Makefile.inc b/src/traffic_logcat/Makefile.inc index 581e28078b..8d7578a726 100644 --- a/src/traffic_logcat/Makefile.inc +++ b/src/traffic_logcat/Makefile.inc @@ -43,11 +43,11 @@ traffic_logcat_traffic_logcat_LDADD = \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/proxy/shared/libdiagsconfig.a \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ - $(top_builddir)/src/tscpp/util/libtscpputil.la + $(top_builddir)/src/tscpp/util/libtscpputil.la \ + $(top_builddir)/mgmt/utils/libutils_p.la traffic_logcat_traffic_logcat_LDADD += \ @SWOC_LIBS@ @HWLOC_LIBS@ \ diff --git a/src/traffic_logstats/Makefile.inc b/src/traffic_logstats/Makefile.inc index 1d0c1e9816..140947bcfe 100644 --- a/src/traffic_logstats/Makefile.inc +++ b/src/traffic_logstats/Makefile.inc @@ -48,11 +48,11 @@ traffic_logstats_traffic_logstats_LDADD = \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/proxy/shared/libdiagsconfig.a \ $(top_builddir)/proxy/shared/libUglyLogStubs.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/src/records/librecords_p.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/tscore/libtscore.la \ - $(top_builddir)/src/tscpp/util/libtscpputil.la + $(top_builddir)/src/tscpp/util/libtscpputil.la \ + $(top_builddir)/mgmt/utils/libutils_p.la traffic_logstats_traffic_logstats_LDADD += \ @SWOC_LIBS@ \ diff --git a/src/traffic_quic/Makefile.inc b/src/traffic_quic/Makefile.inc index 09145e67da..7649c8279d 100644 --- a/src/traffic_quic/Makefile.inc +++ b/src/traffic_quic/Makefile.inc @@ -49,9 +49,8 @@ traffic_quic_traffic_quic_LDADD = \ $(top_builddir)/iocore/net/libinknet.a \ $(top_builddir)/iocore/aio/libinkaio.a \ $(top_builddir)/iocore/net/quic/libquic.a \ - $(top_builddir)/iocore/eventsystem/libinkevent.a \ + $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(top_builddir)/src/records/librecords_p.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ $(top_builddir)/src/tscore/libtscore.la \ $(top_builddir)/src/tscpp/util/libtscpputil.la \ $(top_builddir)/proxy/ParentSelectionStrategy.o \ @@ -59,6 +58,7 @@ traffic_quic_traffic_quic_LDADD = \ $(top_builddir)/proxy/http2/libhttp2.a \ $(top_builddir)/proxy/libproxy.a \ $(top_builddir)/proxy/hdrs/libhdrs.a \ + $(top_builddir)/mgmt/utils/libutils_p.la \ @HWLOC_LIBS@ \ @SWOC_LIBS@ \ @YAMLCPP_LIBS@ \ diff --git a/src/traffic_quic/traffic_quic.cc b/src/traffic_quic/traffic_quic.cc index ba995352df..ee6285da3f 100644 --- a/src/traffic_quic/traffic_quic.cc +++ b/src/traffic_quic/traffic_quic.cc @@ -26,7 +26,7 @@ #include "tscore/I_Layout.h" #include "tscore/I_Version.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "URL.h" #include "MIME.h" #include "HTTP.h" diff --git a/src/traffic_server/InkAPI.cc b/src/traffic_server/InkAPI.cc index 45b6f73f90..7467223faa 100644 --- a/src/traffic_server/InkAPI.cc +++ b/src/traffic_server/InkAPI.cc @@ -56,7 +56,7 @@ #include "SSLDiags.h" #include "SSLInternal.h" #include "TLSBasicSupport.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "Plugin.h" #include "LogObject.h" #include "LogConfig.h" @@ -70,7 +70,7 @@ #include "I_Tasks.h" #include "P_OCSPStapling.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "records/I_RecDefs.h" #include "records/I_RecCore.h" #include "I_Machine.h" diff --git a/src/traffic_server/Makefile.inc b/src/traffic_server/Makefile.inc index abd49f1871..ff58fd556b 100644 --- a/src/traffic_server/Makefile.inc +++ b/src/traffic_server/Makefile.inc @@ -71,11 +71,9 @@ traffic_server_traffic_server_LDADD = \ $(top_builddir)/proxy/http/libhttp.a \ $(top_builddir)/proxy/http/remap/libhttp_remap.a \ $(top_builddir)/proxy/http2/libhttp2.a \ - $(top_builddir)/proxy/logging/liblogging.a \ + $(top_builddir)/proxy/logging/liblogging.a \ $(top_builddir)/proxy/hdrs/libhdrs.a \ $(top_builddir)/proxy/shared/libdiagsconfig.a \ - $(top_builddir)/mgmt/libmgmt_p.la \ - $(top_builddir)/mgmt/libmgmt_c.la \ $(top_builddir)/iocore/utils/libinkutils.a \ $(top_builddir)/iocore/dns/libinkdns.a \ $(top_builddir)/iocore/hostdb/libinkhostdb.a \ @@ -93,6 +91,7 @@ traffic_server_traffic_server_LDADD = \ $(top_builddir)/mgmt/rpc/libjsonrpc_protocol.la \ $(top_builddir)/mgmt/config/libconfigmanager.la \ $(top_builddir)/mgmt/rpc/librpcpublichandlers.la \ + $(top_builddir)/mgmt/utils/libutils_p.la \ @HWLOC_LIBS@ \ @LIBPCRE@ \ @LIBRESOLV@ \ diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc index 222a070e85..6322af6e24 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -76,10 +76,10 @@ extern "C" int plock(int); #include "P_Cache.h" #include "tscore/I_Layout.h" #include "I_Machine.h" -#include "RecordsConfig.h" +#include "records/I_RecordsConfig.h" #include "records/I_RecProcess.h" #include "Transform.h" -#include "ProxyConfig.h" +#include "ConfigProcessor.h" #include "HttpProxyServerMain.h" #include "HttpBodyFactory.h" #include "ProxySession.h" diff --git a/src/tscpp/util/Makefile.am b/src/tscpp/util/Makefile.am index 66dffc2cc3..b0e1bf3f79 100644 --- a/src/tscpp/util/Makefile.am +++ b/src/tscpp/util/Makefile.am @@ -24,13 +24,13 @@ TESTS = $(check_PROGRAMS) lib_LTLIBRARIES = libtscpputil.la -AM_CPPFLAGS += -I$(abs_top_srcdir)/include @SWOC_INCLUDES@ +AM_CPPFLAGS += -I$(abs_top_srcdir)/include @SWOC_INCLUDES@ @YAMLCPP_INCLUDES@ -libtscpputil_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -version-info @TS_LIBTOOL_VERSION@ @SWOC_LDFLAGS@ -libtscpputil_la_LIBADD = @SWOC_LIBS@ +libtscpputil_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -version-info @TS_LIBTOOL_VERSION@ @SWOC_LDFLAGS@ @YAMLCPP_LDFLAGS@ +libtscpputil_la_LIBADD = @SWOC_LIBS@ @YAMLCPP_LIBS@ libtscpputil_la_SOURCES = \ - ts_diags.cc ts_ip.cc TextView.cc + ts_diags.cc ts_ip.cc TextView.cc YamlCfg.cc test_tscpputil_CPPFLAGS = $(AM_CPPFLAGS)\ -I$(abs_top_srcdir)/tests/include @SWOC_INCLUDES@ diff --git a/mgmt/YamlCfg.cc b/src/tscpp/util/YamlCfg.cc similarity index 96% rename from mgmt/YamlCfg.cc rename to src/tscpp/util/YamlCfg.cc index da267eed7e..d6f1a11691 100644 --- a/mgmt/YamlCfg.cc +++ b/src/tscpp/util/YamlCfg.cc @@ -21,7 +21,7 @@ limitations under the License. */ -#include "YamlCfg.h" +#include "tscpp/util/YamlCfg.h" #include <algorithm> #include <string> @@ -59,7 +59,7 @@ namespace Yaml Map::done() { if (!_bad && (_used_key.size() != _map.size())) { - ink_assert(_used_key.size() < _map.size()); + // ink_assert(_used_key.size() < _map.size()); std::string msg{(_map.size() - _used_key.size()) > 1 ? "keys " : "key "}; bool first{true};