Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index 3b700ae..82ae598 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -15,6 +15,7 @@
#include <boost/url/url_view_base.hpp>
#include <nlohmann/json.hpp>
+#include <cstdint>
#include <source_location>
#include <string_view>
diff --git a/redfish-core/include/event_log.hpp b/redfish-core/include/event_log.hpp
index 676dbfd..40e5528 100644
--- a/redfish-core/include/event_log.hpp
+++ b/redfish-core/include/event_log.hpp
@@ -5,6 +5,7 @@
#include <span>
#include <string>
#include <string_view>
+#include <vector>
namespace redfish
{
diff --git a/redfish-core/include/event_matches_filter.hpp b/redfish-core/include/event_matches_filter.hpp
index af4bf43..66a50a3 100644
--- a/redfish-core/include/event_matches_filter.hpp
+++ b/redfish-core/include/event_matches_filter.hpp
@@ -1,12 +1,13 @@
#pragma once
-#include "generated/enums/log_entry.hpp"
+#include "event_service_store.hpp"
#include "logging.hpp"
-#include "persistent_data.hpp"
#include "str_utility.hpp"
#include <nlohmann/json.hpp>
+#include <algorithm>
+#include <format>
#include <ranges>
#include <string>
#include <string_view>
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 04fe7a0..61b837c 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -2,40 +2,45 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
// SPDX-FileCopyrightText: Copyright 2020 Intel Corporation
#pragma once
+#include "bmcweb_config.h"
+
#include "dbus_log_watcher.hpp"
-#include "dbus_singleton.hpp"
-#include "dbus_utility.hpp"
#include "error_messages.hpp"
-#include "event_log.hpp"
+#include "event_logs_object_type.hpp"
#include "event_matches_filter.hpp"
#include "event_service_store.hpp"
#include "filesystem_log_watcher.hpp"
+#include "logging.hpp"
#include "metric_report.hpp"
#include "ossl_random.hpp"
#include "persistent_data.hpp"
+#include "server_sent_event.hpp"
#include "subscription.hpp"
-#include "utility.hpp"
-#include "utils/dbus_event_log_entry.hpp"
-#include "utils/json_utils.hpp"
#include "utils/time_utils.hpp"
#include <boost/asio/io_context.hpp>
-#include <boost/asio/steady_timer.hpp>
#include <boost/circular_buffer.hpp>
+#include <boost/circular_buffer/base.hpp>
#include <boost/container/flat_map.hpp>
-#include <boost/url/format.hpp>
+#include <boost/system/result.hpp>
+#include <boost/url/parse.hpp>
#include <boost/url/url_view_base.hpp>
#include <algorithm>
+#include <cstdint>
#include <cstdlib>
#include <ctime>
+#include <filesystem>
#include <format>
#include <fstream>
#include <memory>
+#include <optional>
+#include <random>
#include <string>
#include <string_view>
+#include <system_error>
#include <utility>
-#include <variant>
+#include <vector>
namespace redfish
{
diff --git a/redfish-core/include/filesystem_log_watcher.hpp b/redfish-core/include/filesystem_log_watcher.hpp
index 2e82a61..2cc0571 100644
--- a/redfish-core/include/filesystem_log_watcher.hpp
+++ b/redfish-core/include/filesystem_log_watcher.hpp
@@ -1,9 +1,11 @@
#pragma once
+#include <boost/asio/io_context.hpp>
#include <boost/asio/posix/stream_descriptor.hpp>
-#include <optional>
-#include <string_view>
+#include <array>
+#include <cstddef>
+#include <iosfwd>
namespace redfish
{
diff --git a/redfish-core/include/filter_expr_parser_ast.hpp b/redfish-core/include/filter_expr_parser_ast.hpp
index b84de69..0bb60e7 100644
--- a/redfish-core/include/filter_expr_parser_ast.hpp
+++ b/redfish-core/include/filter_expr_parser_ast.hpp
@@ -1,12 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include <boost/fusion/include/adapt_struct.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/spirit/home/x3/support/ast/variant.hpp>
-#include <iostream>
+#include <cstdint>
#include <list>
-#include <numeric>
#include <optional>
#include <string>
diff --git a/redfish-core/include/filter_expr_parser_grammar.hpp b/redfish-core/include/filter_expr_parser_grammar.hpp
index d287c2e..e05862f 100644
--- a/redfish-core/include/filter_expr_parser_grammar.hpp
+++ b/redfish-core/include/filter_expr_parser_grammar.hpp
@@ -4,7 +4,20 @@
#include "filter_expr_parser_ast.hpp"
-#include <boost/spirit/home/x3.hpp>
+#include <boost/spirit/home/x3/char/char.hpp>
+#include <boost/spirit/home/x3/char/negated_char_parser.hpp>
+#include <boost/spirit/home/x3/directive/lexeme.hpp>
+#include <boost/spirit/home/x3/nonterminal/rule.hpp>
+#include <boost/spirit/home/x3/numeric/int.hpp>
+#include <boost/spirit/home/x3/numeric/real.hpp>
+#include <boost/spirit/home/x3/numeric/real_policies.hpp>
+#include <boost/spirit/home/x3/operator/alternative.hpp>
+#include <boost/spirit/home/x3/operator/kleene.hpp>
+#include <boost/spirit/home/x3/operator/optional.hpp>
+#include <boost/spirit/home/x3/operator/plus.hpp>
+#include <boost/spirit/home/x3/operator/sequence.hpp>
+#include <boost/spirit/home/x3/string/literal_string.hpp>
+#include <boost/spirit/home/x3/string/symbols.hpp>
namespace redfish::filter_grammar
{
diff --git a/redfish-core/include/filter_expr_printer.hpp b/redfish-core/include/filter_expr_printer.hpp
index 4687573..4dc5785 100644
--- a/redfish-core/include/filter_expr_printer.hpp
+++ b/redfish-core/include/filter_expr_printer.hpp
@@ -4,8 +4,9 @@
#include "filter_expr_parser_ast.hpp"
-#include <memory>
+#include <cstdint>
#include <optional>
+#include <string>
#include <string_view>
namespace redfish
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 7b1923c..1ca54d2 100644
--- a/redfish-core/include/gzfile.hpp
+++ b/redfish-core/include/gzfile.hpp
@@ -6,9 +6,11 @@
#include <zlib.h>
-#include <array>
-#include <filesystem>
+#include <cstddef>
+#include <cstdint>
+#include <iterator>
#include <string>
+#include <utility>
#include <vector>
class GzFileReader
diff --git a/redfish-core/include/heartbeat_messages.hpp b/redfish-core/include/heartbeat_messages.hpp
index 709dbe1..b40d8ea 100644
--- a/redfish-core/include/heartbeat_messages.hpp
+++ b/redfish-core/include/heartbeat_messages.hpp
@@ -10,14 +10,8 @@
* github organization.
***************************************************************/
-#include "http_response.hpp"
-
-#include <boost/url/url_view_base.hpp>
#include <nlohmann/json.hpp>
-#include <source_location>
-#include <string_view>
-
// IWYU pragma: no_forward_declare crow::Response
namespace redfish
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp
index 5df4c31..970946a 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -13,7 +13,6 @@
#include <array>
#include <bitset>
#include <cstddef>
-#include <functional>
#include <initializer_list>
#include <string>
#include <string_view>
diff --git a/redfish-core/include/query.hpp b/redfish-core/include/query.hpp
index 35ba284..6b1e4d6 100644
--- a/redfish-core/include/query.hpp
+++ b/redfish-core/include/query.hpp
@@ -12,8 +12,8 @@
#include "logging.hpp"
#include "utils/query_param.hpp"
+#include <boost/beast/http/field.hpp>
#include <boost/beast/http/verb.hpp>
-#include <boost/url/params_view.hpp>
#include <boost/url/url_view.hpp>
#include <functional>
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 9c4fd61..853f958 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -3,15 +3,47 @@
#pragma once
#include "aggregation_utils.hpp"
+#include "async_resp.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
#include "http_client.hpp"
-#include "http_connection.hpp"
+#include "http_request.hpp"
+#include "http_response.hpp"
+#include "logging.hpp"
#include "parsing.hpp"
+#include "ssl_key_handler.hpp"
+#include "utility.hpp"
+#include <boost/asio/io_context.hpp>
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/status.hpp>
+#include <boost/beast/http/verb.hpp>
+#include <boost/system/errc.hpp>
+#include <boost/system/result.hpp>
+#include <boost/url/param.hpp>
+#include <boost/url/parse.hpp>
+#include <boost/url/segments_ref.hpp>
+#include <boost/url/segments_view.hpp>
+#include <boost/url/url.hpp>
+#include <boost/url/url_view.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/message/native_types.hpp>
+
+#include <algorithm>
#include <array>
+#include <chrono>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <limits>
+#include <memory>
#include <ranges>
+#include <string>
#include <string_view>
+#include <system_error>
+#include <unordered_map>
+#include <utility>
+#include <variant>
namespace redfish
{
diff --git a/redfish-core/include/registries.hpp b/redfish-core/include/registries.hpp
index ff7a1ba..d379147 100644
--- a/redfish-core/include/registries.hpp
+++ b/redfish-core/include/registries.hpp
@@ -11,10 +11,10 @@
#include <charconv>
#include <cstddef>
#include <format>
-#include <numeric>
#include <span>
#include <string>
#include <string_view>
+#include <system_error>
#include <utility>
namespace redfish::registries
diff --git a/redfish-core/include/resource_messages.hpp b/redfish-core/include/resource_messages.hpp
index aab01a4..b8ef3cc 100644
--- a/redfish-core/include/resource_messages.hpp
+++ b/redfish-core/include/resource_messages.hpp
@@ -10,12 +10,8 @@
* github organization.
***************************************************************/
-#include "http_response.hpp"
-
-#include <boost/url/url_view_base.hpp>
#include <nlohmann/json.hpp>
-#include <source_location>
#include <string_view>
// IWYU pragma: no_forward_declare crow::Response
diff --git a/redfish-core/include/snmp_trap_event_clients.hpp b/redfish-core/include/snmp_trap_event_clients.hpp
index c753332..4f6e1e6 100644
--- a/redfish-core/include/snmp_trap_event_clients.hpp
+++ b/redfish-core/include/snmp_trap_event_clients.hpp
@@ -8,18 +8,25 @@
#include "error_messages.hpp"
#include "event_service_manager.hpp"
#include "generated/enums/event_destination.hpp"
-#include "http_request.hpp"
#include "http_response.hpp"
#include "logging.hpp"
#include "utils/dbus_utils.hpp"
+#include <asm-generic/errno.h>
+#include <systemd/sd-bus.h>
+
#include <boost/system/error_code.hpp>
#include <boost/url/format.hpp>
+#include <boost/url/url.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <sdbusplus/unpack_properties.hpp>
+#include <cstdint>
#include <memory>
#include <string>
#include <string_view>
+#include <utility>
namespace redfish
{
diff --git a/redfish-core/include/subscription.hpp b/redfish-core/include/subscription.hpp
index e7f1715..9c48dbb 100644
--- a/redfish-core/include/subscription.hpp
+++ b/redfish-core/include/subscription.hpp
@@ -17,14 +17,21 @@
#include "event_logs_object_type.hpp"
#include "event_service_store.hpp"
#include "filter_expr_parser_ast.hpp"
+#include "http_client.hpp"
+#include "http_response.hpp"
#include "metric_report.hpp"
#include "server_sent_event.hpp"
#include <boost/asio/io_context.hpp>
+#include <boost/asio/steady_timer.hpp>
#include <boost/url/url_view_base.hpp>
+#include <cstdint>
+#include <functional>
#include <memory>
+#include <optional>
#include <string>
+#include <vector>
namespace redfish
{
diff --git a/redfish-core/include/task_messages.hpp b/redfish-core/include/task_messages.hpp
index d7a02fe..5c57a85 100644
--- a/redfish-core/include/task_messages.hpp
+++ b/redfish-core/include/task_messages.hpp
@@ -10,12 +10,9 @@
* github organization.
***************************************************************/
-#include "http_response.hpp"
-
-#include <boost/url/url_view_base.hpp>
#include <nlohmann/json.hpp>
-#include <source_location>
+#include <cstdint>
#include <string_view>
// IWYU pragma: no_forward_declare crow::Response
diff --git a/redfish-core/include/utils/chassis_utils.hpp b/redfish-core/include/utils/chassis_utils.hpp
index 1c1c0f1..3a71048 100644
--- a/redfish-core/include/utils/chassis_utils.hpp
+++ b/redfish-core/include/utils/chassis_utils.hpp
@@ -5,8 +5,14 @@
#include "async_resp.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
+#include "logging.hpp"
+
+#include <sdbusplus/message/native_types.hpp>
#include <array>
+#include <memory>
+#include <optional>
+#include <string>
#include <string_view>
namespace redfish
diff --git a/redfish-core/include/utils/collection.hpp b/redfish-core/include/utils/collection.hpp
index e34aab7..fc5cd64 100644
--- a/redfish-core/include/utils/collection.hpp
+++ b/redfish-core/include/utils/collection.hpp
@@ -7,14 +7,20 @@
#include "error_messages.hpp"
#include "http/utility.hpp"
#include "human_sort.hpp"
+#include "logging.hpp"
#include <boost/url/url.hpp>
#include <nlohmann/json.hpp>
+#include <sdbusplus/message/native_types.hpp>
+#include <algorithm>
+#include <functional>
+#include <memory>
#include <ranges>
#include <span>
#include <string>
#include <string_view>
+#include <utility>
#include <vector>
namespace redfish
diff --git a/redfish-core/include/utils/dbus_event_log_entry.hpp b/redfish-core/include/utils/dbus_event_log_entry.hpp
index f5eb5f6..5ce3b6f 100644
--- a/redfish-core/include/utils/dbus_event_log_entry.hpp
+++ b/redfish-core/include/utils/dbus_event_log_entry.hpp
@@ -3,6 +3,9 @@
#include "dbus_utility.hpp"
#include "utils/dbus_utils.hpp"
+#include <sdbusplus/unpack_properties.hpp>
+
+#include <cstdint>
#include <optional>
#include <string>
diff --git a/redfish-core/include/utils/dbus_utils.hpp b/redfish-core/include/utils/dbus_utils.hpp
index fb0b88a..008fef2 100644
--- a/redfish-core/include/utils/dbus_utils.hpp
+++ b/redfish-core/include/utils/dbus_utils.hpp
@@ -4,16 +4,18 @@
#include "async_resp.hpp"
#include "dbus_singleton.hpp"
-#include "error_messages.hpp"
#include "logging.hpp"
#include <nlohmann/json.hpp>
#include <sdbusplus/asio/property.hpp>
+#include <sdbusplus/exception.hpp>
#include <sdbusplus/message.hpp>
-#include <sdbusplus/unpack_properties.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <memory>
+#include <string>
#include <string_view>
+#include <type_traits>
namespace redfish
{
diff --git a/redfish-core/include/utils/ip_utils.hpp b/redfish-core/include/utils/ip_utils.hpp
index eccd262..b0d6b89 100644
--- a/redfish-core/include/utils/ip_utils.hpp
+++ b/redfish-core/include/utils/ip_utils.hpp
@@ -6,6 +6,7 @@
#include <boost/asio/ip/address_v4.hpp>
#include <boost/asio/ip/address_v6.hpp>
+#include <cstdint>
#include <string>
namespace redfish
diff --git a/redfish-core/include/utils/journal_utils.hpp b/redfish-core/include/utils/journal_utils.hpp
index af8f3a7..9407e4a 100644
--- a/redfish-core/include/utils/journal_utils.hpp
+++ b/redfish-core/include/utils/journal_utils.hpp
@@ -1,14 +1,25 @@
#pragma once
+#include "bmcweb_config.h"
+
+#include "generated/enums/log_entry.hpp"
#include "logging.hpp"
+#include "utility.hpp"
#include "utils/time_utils.hpp"
#include <systemd/sd-journal.h>
#include <nlohmann/json.hpp>
+#include <algorithm>
+#include <charconv>
+#include <cstddef>
+#include <cstdint>
+#include <format>
+#include <memory>
#include <string>
#include <string_view>
+#include <utility>
namespace redfish
{
@@ -122,24 +133,24 @@
std::string entryIdBase64 =
crow::utility::base64encode(bmcJournalLogEntryID);
- bmcJournalLogEntryJson["@odata.id"] = boost::urls::format(
+ bmcJournalLogEntryJson["@odata.id"] = boost_swap_impl::format(
"/redfish/v1/Managers/{}/LogServices/Journal/Entries/{}",
BMCWEB_REDFISH_MANAGER_URI_NAME, entryIdBase64);
bmcJournalLogEntryJson["Name"] = "BMC Journal Entry";
bmcJournalLogEntryJson["Id"] = entryIdBase64;
bmcJournalLogEntryJson["Message"] = std::move(message);
bmcJournalLogEntryJson["EntryType"] = log_entry::LogEntryType::Oem;
- log_entry::EventSeverity severityEnum = log_entry::EventSeverity::OK;
+ log_entry::EventSeverity rfseverity = log_entry::EventSeverity::OK;
if (severity <= 2)
{
- severityEnum = log_entry::EventSeverity::Critical;
+ rfseverity = log_entry::EventSeverity::Critical;
}
else if (severity <= 4)
{
- severityEnum = log_entry::EventSeverity::Warning;
+ rfseverity = log_entry::EventSeverity::Warning;
}
- bmcJournalLogEntryJson["Severity"] = severityEnum;
+ bmcJournalLogEntryJson["Severity"] = rfseverity;
bmcJournalLogEntryJson["OemRecordFormat"] = "BMC Journal Entry";
bmcJournalLogEntryJson["Created"] = std::move(entryTimeStr);
return true;
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index c93174c..deb82d0 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -4,7 +4,6 @@
#pragma once
#include "error_messages.hpp"
-#include "http_connection.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
#include "human_sort.hpp"
diff --git a/redfish-core/include/utils/pcie_util.hpp b/redfish-core/include/utils/pcie_util.hpp
index 0d8a509..059abbb 100644
--- a/redfish-core/include/utils/pcie_util.hpp
+++ b/redfish-core/include/utils/pcie_util.hpp
@@ -2,16 +2,16 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "bmcweb_config.h"
+
#include "async_resp.hpp"
-#include "dbus_utility.hpp"
-#include "error_messages.hpp"
#include "generated/enums/pcie_device.hpp"
#include "generated/enums/pcie_slots.hpp"
-#include "http/utility.hpp"
#include "utils/collection.hpp"
#include <boost/system/error_code.hpp>
#include <boost/url/format.hpp>
+#include <boost/url/url.hpp>
#include <nlohmann/json.hpp>
#include <array>
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index b579190..529b79d 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -8,6 +8,7 @@
#include "error_message_utils.hpp"
#include "error_messages.hpp"
#include "filter_expr_executor.hpp"
+#include "filter_expr_parser_ast.hpp"
#include "filter_expr_printer.hpp"
#include "http_request.hpp"
#include "http_response.hpp"
@@ -15,9 +16,8 @@
#include "logging.hpp"
#include "str_utility.hpp"
-#include <sys/types.h>
+#include <unistd.h>
-#include <boost/beast/http/message.hpp>
#include <boost/beast/http/status.hpp>
#include <boost/beast/http/verb.hpp>
#include <boost/url/params_view.hpp>
@@ -27,7 +27,7 @@
#include <array>
#include <cctype>
#include <charconv>
-#include <compare>
+#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
diff --git a/redfish-core/include/utils/sensor_utils.hpp b/redfish-core/include/utils/sensor_utils.hpp
index 0bd3d2a..eaf8ade 100644
--- a/redfish-core/include/utils/sensor_utils.hpp
+++ b/redfish-core/include/utils/sensor_utils.hpp
@@ -3,25 +3,35 @@
#pragma once
#include "dbus_utility.hpp"
+#include "error_messages.hpp"
#include "generated/enums/resource.hpp"
#include "generated/enums/sensor.hpp"
#include "generated/enums/thermal.hpp"
+#include "logging.hpp"
#include "str_utility.hpp"
#include "utils/dbus_utils.hpp"
-#include "utils/json_utils.hpp"
#include <boost/url/format.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <sdbusplus/unpack_properties.hpp>
#include <algorithm>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
#include <format>
#include <functional>
+#include <iterator>
#include <optional>
#include <ranges>
+#include <set>
+#include <span>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
+#include <variant>
#include <vector>
namespace redfish
diff --git a/redfish-core/include/utils/stl_utils.hpp b/redfish-core/include/utils/stl_utils.hpp
index 5fe7b3e..0cd7e7a 100644
--- a/redfish-core/include/utils/stl_utils.hpp
+++ b/redfish-core/include/utils/stl_utils.hpp
@@ -3,7 +3,6 @@
#pragma once
#include <algorithm>
-#include <vector>
namespace redfish
{
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 7c20d2e..7a765c1 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -1,24 +1,33 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
+#include "bmcweb_config.h"
+
#include "async_resp.hpp"
+#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
#include "generated/enums/resource.hpp"
-#include "http/utility.hpp"
+#include "logging.hpp"
#include "utils/dbus_utils.hpp"
+#include <asm-generic/errno.h>
+
#include <boost/system/error_code.hpp>
#include <boost/url/format.hpp>
-#include <sdbusplus/asio/property.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/message/native_types.hpp>
#include <sdbusplus/unpack_properties.hpp>
#include <algorithm>
#include <array>
+#include <functional>
+#include <memory>
#include <optional>
#include <ranges>
#include <string>
#include <string_view>
+#include <utility>
#include <vector>
namespace redfish
diff --git a/redfish-core/include/utils/telemetry_utils.hpp b/redfish-core/include/utils/telemetry_utils.hpp
index 5543736..d822d74 100644
--- a/redfish-core/include/utils/telemetry_utils.hpp
+++ b/redfish-core/include/utils/telemetry_utils.hpp
@@ -2,17 +2,25 @@
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
-#include "dbus_utility.hpp"
#include "generated/enums/metric_report_definition.hpp"
#include "http/utility.hpp"
#include "logging.hpp"
#include "utility.hpp"
-#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
+#include <boost/system/result.hpp>
+#include <boost/url/parse.hpp>
+#include <boost/url/url_view.hpp>
+#include <nlohmann/json.hpp>
#include <sdbusplus/message/native_types.hpp>
+#include <cstddef>
+#include <functional>
+#include <optional>
+#include <span>
#include <string>
+#include <string_view>
+#include <utility>
namespace redfish
{
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index ab80d31..989e565 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -3,13 +3,15 @@
#pragma once
#include "http_response.hpp"
-#include "logging.hpp"
#include <chrono>
-#include <cstddef>
+#include <cstdint>
+#include <ctime>
#include <optional>
+#include <ratio>
#include <string>
#include <string_view>
+#include <utility>
namespace redfish
{