summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-10-20 19:20:21 +0300
committerEd Tanous <ed@tanous.net>2023-10-24 21:17:16 +0300
commit5a39f77a17fa28911c87caea1e2903c059e7ec41 (patch)
treea2a2ff266238e7e9322e36eb2d9c92cf18829406
parente9cc1bc93c4ad9662c93e2a98d4c787e2dbf9f07 (diff)
downloadbmcweb-5a39f77a17fa28911c87caea1e2903c059e7ec41.tar.xz
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository. Change-Id: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r--.clang-format24
-rw-r--r--http/http2_connection.hpp2
-rw-r--r--http/http_connection.hpp4
-rw-r--r--http/http_server.hpp2
-rw-r--r--http/routing.hpp2
-rw-r--r--http/websocket.hpp2
-rw-r--r--include/async_resolve.hpp2
-rw-r--r--include/cors_preflight.hpp2
-rw-r--r--include/dbus_monitor.hpp229
-rw-r--r--include/dbus_privileges.hpp2
-rw-r--r--include/dbus_utility.hpp10
-rw-r--r--include/google/google_service_root.hpp4
-rw-r--r--include/hostname_monitor.hpp2
-rw-r--r--include/http_utility.hpp4
-rw-r--r--include/ibm/management_console_rest.hpp18
-rw-r--r--include/image_upload.hpp6
-rw-r--r--include/kvm_websocket.hpp56
-rw-r--r--include/nbd_proxy.hpp6
-rw-r--r--include/obmc_console.hpp8
-rw-r--r--include/openbmc_dbus_rest.hpp158
-rw-r--r--include/vm_websocket.hpp86
-rw-r--r--redfish-core/include/event_service_manager.hpp6
-rw-r--r--redfish-core/include/redfish_aggregator.hpp2
-rw-r--r--redfish-core/include/snmp_trap_event_clients.hpp8
-rw-r--r--redfish-core/include/utils/chassis_utils.hpp2
-rw-r--r--redfish-core/include/utils/json_utils.hpp6
-rw-r--r--redfish-core/include/utils/pcie_util.hpp2
-rw-r--r--redfish-core/include/utils/sw_utils.hpp8
-rw-r--r--redfish-core/lib/account_service.hpp234
-rw-r--r--redfish-core/lib/bios.hpp2
-rw-r--r--redfish-core/lib/cable.hpp8
-rw-r--r--redfish-core/lib/certificate_service.hpp20
-rw-r--r--redfish-core/lib/chassis.hpp28
-rw-r--r--redfish-core/lib/ethernet.hpp68
-rw-r--r--redfish-core/lib/event_service.hpp20
-rw-r--r--redfish-core/lib/fabric_adapters.hpp12
-rw-r--r--redfish-core/lib/fan.hpp18
-rw-r--r--redfish-core/lib/health.hpp4
-rw-r--r--redfish-core/lib/hypervisor_system.hpp81
-rw-r--r--redfish-core/lib/led.hpp10
-rw-r--r--redfish-core/lib/log_services.hpp94
-rw-r--r--redfish-core/lib/managers.hpp56
-rw-r--r--redfish-core/lib/memory.hpp10
-rw-r--r--redfish-core/lib/metric_report.hpp8
-rw-r--r--redfish-core/lib/metric_report_definition.hpp24
-rw-r--r--redfish-core/lib/network_protocol.hpp24
-rw-r--r--redfish-core/lib/pcie.hpp22
-rw-r--r--redfish-core/lib/pcie_slots.hpp6
-rw-r--r--redfish-core/lib/power.hpp6
-rw-r--r--redfish-core/lib/power_supply.hpp24
-rw-r--r--redfish-core/lib/processor.hpp41
-rw-r--r--redfish-core/lib/redfish_util.hpp8
-rw-r--r--redfish-core/lib/roles.hpp4
-rw-r--r--redfish-core/lib/sensors.hpp44
-rw-r--r--redfish-core/lib/storage.hpp42
-rw-r--r--redfish-core/lib/systems.hpp190
-rw-r--r--redfish-core/lib/task.hpp14
-rw-r--r--redfish-core/lib/telemetry_service.hpp2
-rw-r--r--redfish-core/lib/thermal.hpp4
-rw-r--r--redfish-core/lib/trigger.hpp10
-rw-r--r--redfish-core/lib/update_service.hpp36
-rw-r--r--redfish-core/lib/virtual_media.hpp20
-rw-r--r--redfish-core/src/registries.cpp4
63 files changed, 930 insertions, 931 deletions
diff --git a/.clang-format b/.clang-format
index d92a3f10a4..d43e884dbb 100644
--- a/.clang-format
+++ b/.clang-format
@@ -14,26 +14,30 @@ AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
+BitFieldColonSpacing: None
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
+ AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
- AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
+ BeforeLambdaBody: false
+ BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
@@ -48,17 +52,16 @@ BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
-DeriveLineEnding: false
DerivePointerAlignment: false
-PointerAlignment: Left
DisableFormat: false
-ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
-ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+ForEachMacros:
+ - foreach
+ - Q_FOREACH
+ - BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^[<"](gtest|gmock)'
@@ -78,6 +81,7 @@ IncludeCategories:
- Regex: '.*'
Priority: 6
IndentCaseLabels: true
+IndentExternBlock: NoIndent
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
@@ -92,6 +96,7 @@ NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 25
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
@@ -100,12 +105,13 @@ PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
+PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Left
ReflowComments: true
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: Keyword
-SortIncludes: true
+SortIncludes: CaseSensitive
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
@@ -117,7 +123,7 @@ SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
+SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
diff --git a/http/http2_connection.hpp b/http/http2_connection.hpp
index 4d1bcace55..d815119e96 100644
--- a/http/http2_connection.hpp
+++ b/http/http2_connection.hpp
@@ -519,7 +519,7 @@ class HTTP2Connection :
inBuffer.consume(consumed);
doRead();
- });
+ });
}
// A mapping from http2 stream ID to Stream Data
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 2a6afeb635..86cc49a2f7 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -486,7 +486,7 @@ class Connection :
}
doRead();
- });
+ });
}
void doRead()
@@ -529,7 +529,7 @@ class Connection :
cancelDeadlineTimer();
handle();
- });
+ });
}
void doWrite(crow::Response& thisRes)
diff --git a/http/http_server.hpp b/http/http_server.hpp
index dbb95b42dd..b290ad7902 100644
--- a/http/http_server.hpp
+++ b/http/http_server.hpp
@@ -188,7 +188,7 @@ class Server
[connection] { connection->start(); });
}
doAccept();
- });
+ });
}
private:
diff --git a/http/routing.hpp b/http/routing.hpp
index 49a51f18e7..6ab1327ffa 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -608,7 +608,7 @@ class Router
[&rule, asyncResp, adaptor(std::forward<Adaptor>(adaptor))](
Request& thisReq) mutable {
rule.handleUpgrade(thisReq, asyncResp, std::move(adaptor));
- });
+ });
}
void handle(Request& req,
diff --git a/http/websocket.hpp b/http/websocket.hpp
index 0fda7ee275..027ab24642 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -213,7 +213,7 @@ class ConnectionImpl : public Connection
BMCWEB_LOG_ERROR("Error closing websocket {}", ec);
return;
}
- });
+ });
}
boost::urls::url_view url() override
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp
index 71d2497e26..805fbad124 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -116,7 +116,7 @@ class Resolver
}
// All the resolved data is filled in the endpointList
handler(ec, endpointList);
- },
+ },
"org.freedesktop.resolve1", "/org/freedesktop/resolve1",
"org.freedesktop.resolve1.Manager", "ResolveHostname", 0, host,
AF_UNSPEC, flag);
diff --git a/include/cors_preflight.hpp b/include/cors_preflight.hpp
index 43e90738de..b7272229b1 100644
--- a/include/cors_preflight.hpp
+++ b/include/cors_preflight.hpp
@@ -14,6 +14,6 @@ inline void requestRoutes(App& app)
const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&) {
// An empty body handler that simply returns the headers bmcweb
// uses This allows browsers to do their CORS preflight checks
- });
+ });
}
} // namespace cors_preflight
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 26827172a4..25f0c7f772 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -114,141 +114,140 @@ inline void requestRoutes(App& app)
.privileges({{"Login"}})
.websocket()
.onopen([&](crow::websocket::Connection& conn) {
- BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
- sessions.try_emplace(&conn);
- })
+ BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+ sessions.try_emplace(&conn);
+ })
.onclose([&](crow::websocket::Connection& conn, const std::string&) {
- sessions.erase(&conn);
- })
+ sessions.erase(&conn);
+ })
.onmessage([&](crow::websocket::Connection& conn,
const std::string& data, bool) {
- const auto sessionPair = sessions.find(&conn);
- if (sessionPair == sessions.end())
- {
- conn.close("Internal error");
- }
- DbusWebsocketSession& thisSession = sessionPair->second;
- BMCWEB_LOG_DEBUG("Connection {} received {}", logPtr(&conn), data);
- nlohmann::json j = nlohmann::json::parse(data, nullptr, false);
- if (j.is_discarded())
- {
- BMCWEB_LOG_ERROR("Unable to parse json data for monitor");
- conn.close("Unable to parse json request");
- return;
- }
- nlohmann::json::iterator interfaces = j.find("interfaces");
- if (interfaces != j.end())
+ const auto sessionPair = sessions.find(&conn);
+ if (sessionPair == sessions.end())
+ {
+ conn.close("Internal error");
+ }
+ DbusWebsocketSession& thisSession = sessionPair->second;
+ BMCWEB_LOG_DEBUG("Connection {} received {}", logPtr(&conn), data);
+ nlohmann::json j = nlohmann::json::parse(data, nullptr, false);
+ if (j.is_discarded())
+ {
+ BMCWEB_LOG_ERROR("Unable to parse json data for monitor");
+ conn.close("Unable to parse json request");
+ return;
+ }
+ nlohmann::json::iterator interfaces = j.find("interfaces");
+ if (interfaces != j.end())
+ {
+ thisSession.interfaces.reserve(interfaces->size());
+ for (auto& interface : *interfaces)
{
- thisSession.interfaces.reserve(interfaces->size());
- for (auto& interface : *interfaces)
+ const std::string* str =
+ interface.get_ptr<const std::string*>();
+ if (str != nullptr)
{
- const std::string* str =
- interface.get_ptr<const std::string*>();
- if (str != nullptr)
- {
- thisSession.interfaces.insert(*str);
- }
+ thisSession.interfaces.insert(*str);
}
}
+ }
+
+ nlohmann::json::iterator paths = j.find("paths");
+ if (paths == j.end())
+ {
+ BMCWEB_LOG_ERROR("Unable to find paths in json data");
+ conn.close("Unable to find paths in json data");
+ return;
+ }
- nlohmann::json::iterator paths = j.find("paths");
- if (paths == j.end())
+ size_t interfaceCount = thisSession.interfaces.size();
+ if (interfaceCount == 0)
+ {
+ interfaceCount = 1;
+ }
+ // Reserve our matches upfront. For each path there is 1 for
+ // interfacesAdded, and InterfaceCount number for
+ // PropertiesChanged
+ thisSession.matches.reserve(thisSession.matches.size() +
+ paths->size() * (1U + interfaceCount));
+
+ // These regexes derived on the rules here:
+ // https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
+ static std::regex validPath("^/([A-Za-z0-9_]+/?)*$");
+ static std::regex validInterface(
+ "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)+$");
+
+ for (const auto& thisPath : *paths)
+ {
+ const std::string* thisPathString =
+ thisPath.get_ptr<const std::string*>();
+ if (thisPathString == nullptr)
{
- BMCWEB_LOG_ERROR("Unable to find paths in json data");
- conn.close("Unable to find paths in json data");
+ BMCWEB_LOG_ERROR("subscribe path isn't a string?");
+ conn.close();
return;
}
-
- size_t interfaceCount = thisSession.interfaces.size();
- if (interfaceCount == 0)
+ if (!std::regex_match(*thisPathString, validPath))
{
- interfaceCount = 1;
+ BMCWEB_LOG_ERROR("Invalid path name {}", *thisPathString);
+ conn.close();
+ return;
}
- // Reserve our matches upfront. For each path there is 1 for
- // interfacesAdded, and InterfaceCount number for
- // PropertiesChanged
- thisSession.matches.reserve(thisSession.matches.size() +
- paths->size() * (1U + interfaceCount));
-
- // These regexes derived on the rules here:
- // https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names
- static std::regex validPath("^/([A-Za-z0-9_]+/?)*$");
- static std::regex validInterface(
- "^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)+$");
-
- for (const auto& thisPath : *paths)
+ std::string propertiesMatchString =
+ ("type='signal',"
+ "interface='org.freedesktop.DBus.Properties',"
+ "path_namespace='" +
+ *thisPathString +
+ "',"
+ "member='PropertiesChanged'");
+ // If interfaces weren't specified, add a single match for all
+ // interfaces
+ if (thisSession.interfaces.empty())
{
- const std::string* thisPathString =
- thisPath.get_ptr<const std::string*>();
- if (thisPathString == nullptr)
- {
- BMCWEB_LOG_ERROR("subscribe path isn't a string?");
- conn.close();
- return;
- }
- if (!std::regex_match(*thisPathString, validPath))
- {
- BMCWEB_LOG_ERROR("Invalid path name {}", *thisPathString);
- conn.close();
- return;
- }
- std::string propertiesMatchString =
- ("type='signal',"
- "interface='org.freedesktop.DBus.Properties',"
- "path_namespace='" +
- *thisPathString +
- "',"
- "member='PropertiesChanged'");
- // If interfaces weren't specified, add a single match for all
- // interfaces
- if (thisSession.interfaces.empty())
- {
- BMCWEB_LOG_DEBUG("Creating match {}",
- propertiesMatchString);
+ BMCWEB_LOG_DEBUG("Creating match {}", propertiesMatchString);
- thisSession.matches.emplace_back(
- std::make_unique<sdbusplus::bus::match_t>(
- *crow::connections::systemBus,
- propertiesMatchString, onPropertyUpdate, &conn));
- }
- else
+ thisSession.matches.emplace_back(
+ std::make_unique<sdbusplus::bus::match_t>(
+ *crow::connections::systemBus, propertiesMatchString,
+ onPropertyUpdate, &conn));
+ }
+ else
+ {
+ // If interfaces were specified, add a match for each
+ // interface
+ for (const std::string& interface : thisSession.interfaces)
{
- // If interfaces were specified, add a match for each
- // interface
- for (const std::string& interface : thisSession.interfaces)
+ if (!std::regex_match(interface, validInterface))
{
- if (!std::regex_match(interface, validInterface))
- {
- BMCWEB_LOG_ERROR("Invalid interface name {}",
- interface);
- conn.close();
- return;
- }
- std::string ifaceMatchString = propertiesMatchString;
- ifaceMatchString += ",arg0='";
- ifaceMatchString += interface;
- ifaceMatchString += "'";
- BMCWEB_LOG_DEBUG("Creating match {}", ifaceMatchString);
- thisSession.matches.emplace_back(
- std::make_unique<sdbusplus::bus::match_t>(
- *crow::connections::systemBus, ifaceMatchString,
- onPropertyUpdate, &conn));
+ BMCWEB_LOG_ERROR("Invalid interface name {}",
+ interface);
+ conn.close();
+ return;
}
+ std::string ifaceMatchString = propertiesMatchString;
+ ifaceMatchString += ",arg0='";
+ ifaceMatchString += interface;
+ ifaceMatchString += "'";
+ BMCWEB_LOG_DEBUG("Creating match {}", ifaceMatchString);
+ thisSession.matches.emplace_back(
+ std::make_unique<sdbusplus::bus::match_t>(
+ *crow::connections::systemBus, ifaceMatchString,
+ onPropertyUpdate, &conn));
}
- std::string objectManagerMatchString =
- ("type='signal',"
- "interface='org.freedesktop.DBus.ObjectManager',"
- "path_namespace='" +
- *thisPathString +
- "',"
- "member='InterfacesAdded'");
- BMCWEB_LOG_DEBUG("Creating match {}", objectManagerMatchString);
- thisSession.matches.emplace_back(
- std::make_unique<sdbusplus::bus::match_t>(
- *crow::connections::systemBus, objectManagerMatchString,
- onPropertyUpdate, &conn));
}
- });
+ std::string objectManagerMatchString =
+ ("type='signal',"
+ "interface='org.freedesktop.DBus.ObjectManager',"
+ "path_namespace='" +
+ *thisPathString +
+ "',"
+ "member='InterfacesAdded'");
+ BMCWEB_LOG_DEBUG("Creating match {}", objectManagerMatchString);
+ thisSession.matches.emplace_back(
+ std::make_unique<sdbusplus::bus::match_t>(
+ *crow::connections::systemBus, objectManagerMatchString,
+ onPropertyUpdate, &conn));
+ }
+ });
}
} // namespace dbus_monitor
} // namespace crow
diff --git a/include/dbus_privileges.hpp b/include/dbus_privileges.hpp
index 7fb545a9c1..16aae5e62a 100644
--- a/include/dbus_privileges.hpp
+++ b/include/dbus_privileges.hpp
@@ -181,7 +181,7 @@ void validatePrivilege(Request& req,
const dbus::utility::DBusPropertiesMap& userInfoMap) mutable {
afterGetUserInfo(req, asyncResp, rule,
std::forward<CallbackFn>(callback), ec, userInfoMap);
- },
+ },
"xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
"xyz.openbmc_project.User.Manager", "GetUserInfo", username);
}
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index a8eefd5c1f..933d733f96 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -151,7 +151,7 @@ inline void checkDbusPathExists(const std::string& path, Callback&& callback)
const boost::system::error_code& ec,
const dbus::utility::MapperGetObject& objectNames) {
callback(!ec && !objectNames.empty());
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetObject", path,
@@ -185,7 +185,7 @@ inline void getSubTreePaths(
const boost::system::error_code& ec,
const MapperGetSubTreePathsResponse& subtreePaths) {
callback(ec, subtreePaths);
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetSubTreePaths", path, depth,
@@ -221,7 +221,7 @@ inline void getAssociatedSubTreePaths(
const boost::system::error_code& ec,
const MapperGetSubTreePathsResponse& subtreePaths) {
callback(ec, subtreePaths);
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetAssociatedSubTreePaths",
@@ -238,7 +238,7 @@ inline void
[callback{std::move(callback)}](const boost::system::error_code& ec,
const MapperGetObject& object) {
callback(ec, object);
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetObject", path, interfaces);
@@ -264,7 +264,7 @@ inline void
[callback{std::move(callback)}](const boost::system::error_code& ec,
const ManagedObjectType& objects) {
callback(ec, objects);
- },
+ },
service, path, "org.freedesktop.DBus.ObjectManager",
"GetManagedObjects");
}
diff --git a/include/google/google_service_root.hpp b/include/google/google_service_root.hpp
index bb51490e9d..9dd2405738 100644
--- a/include/google/google_service_root.hpp
+++ b/include/google/google_service_root.hpp
@@ -110,7 +110,7 @@ inline void resolveRoT(const std::string& command,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
hothGetSubtreeCallback(command, asyncResp, rotId, entityHandler, ec,
subtree);
- });
+ });
}
inline void populateRootOfTrustEntity(
@@ -181,7 +181,7 @@ inline void
[asyncResp{asyncResp}](const boost::system::error_code& ec,
const std::vector<uint8_t>& responseBytes) {
invocationCallback(asyncResp, ec, responseBytes);
- },
+ },
resolvedEntity.service, resolvedEntity.object, resolvedEntity.interface,
"SendHostCommand", bytes);
}
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index f1a0d3d2c1..6339a6b414 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -29,7 +29,7 @@ inline void installCertificate(const std::filesystem::path& certPath)
BMCWEB_LOG_INFO("Replace HTTPs Certificate Success, "
"remove temporary certificate file..");
remove(certPath.c_str());
- },
+ },
"xyz.openbmc_project.Certs.Manager.Server.Https",
"/xyz/openbmc_project/certs/server/https/1",
"xyz.openbmc_project.Certs.Replace", "Replace", certPath.string());
diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index 2fd5e14016..4f430aeb8e 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -78,8 +78,8 @@ inline ContentType
}
const auto* knownContentType = std::ranges::find_if(
contentTypes, [encoding](const ContentTypePair& pair) {
- return pair.contentTypeString == encoding;
- });
+ return pair.contentTypeString == encoding;
+ });
if (knownContentType == contentTypes.end())
{
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index b87cb1ee19..fd1e2a5cc8 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -695,7 +695,7 @@ inline void requestRoutes(App& app)
"/ibm/v1/HMC/LockService";
asyncResp->res.jsonValue["BroadcastService"]["@odata.id"] =
"/ibm/v1/HMC/BroadcastService";
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -703,7 +703,7 @@ inline void requestRoutes(App& app)
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
handleConfigFileList(asyncResp);
- });
+ });
BMCWEB_ROUTE(app,
"/ibm/v1/Host/ConfigFiles/Actions/IBMConfigFiles.DeleteAll")
@@ -712,7 +712,7 @@ inline void requestRoutes(App& app)
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
deleteConfigFiles(asyncResp);
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles/<str>")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -729,7 +729,7 @@ inline void requestRoutes(App& app)
return;
}
handleFileUrl(req, asyncResp, fileName);
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -737,7 +737,7 @@ inline void requestRoutes(App& app)
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
getLockServiceData(asyncResp);
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.AcquireLock")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -753,7 +753,7 @@ inline void requestRoutes(App& app)
return;
}
handleAcquireLockAPI(req, asyncResp, body);
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.ReleaseLock")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
.methods(boost::beast::http::verb::post)(
@@ -783,7 +783,7 @@ inline void requestRoutes(App& app)
redfish::messages::propertyValueNotInList(asyncResp->res, type,
"Type");
}
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.GetLockList")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
.methods(boost::beast::http::verb::post)(
@@ -798,7 +798,7 @@ inline void requestRoutes(App& app)
return;
}
handleGetLockListAPI(asyncResp, listSessionIds);
- });
+ });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/BroadcastService")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -806,7 +806,7 @@ inline void requestRoutes(App& app)
[](const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
handleBroadcastService(req, asyncResp);
- });
+ });
}
} // namespace ibm_mc
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index f5c81101c1..ef615cb3b8 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -68,8 +68,8 @@ inline void
m.read(path, interfaces);
if (std::ranges::find_if(interfaces, [](const auto& i) {
- return i.first == "xyz.openbmc_project.Software.Version";
- }) != interfaces.end())
+ return i.first == "xyz.openbmc_project.Software.Version";
+ }) != interfaces.end())
{
timeout.cancel();
std::string leaf = path.filename();
@@ -115,7 +115,7 @@ inline void requestRoutes(App& app)
[](const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
uploadImageHandler(req, asyncResp);
- });
+ });
}
} // namespace image_upload
} // namespace crow
diff --git a/include/kvm_websocket.hpp b/include/kvm_websocket.hpp
index d04c19fd93..0089ae375b 100644
--- a/include/kvm_websocket.hpp
+++ b/include/kvm_websocket.hpp
@@ -24,20 +24,20 @@ class KvmSession : public std::enable_shared_from_this<KvmSession>
boost::asio::ip::make_address("127.0.0.1"), 5900);
hostSocket.async_connect(
endpoint, [this, &connIn](const boost::system::error_code& ec) {
- if (ec)
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR(
+ "conn:{}, Couldn't connect to KVM socket port: {}",
+ logPtr(&conn), ec);
+ if (ec != boost::asio::error::operation_aborted)
{
- BMCWEB_LOG_ERROR(
- "conn:{}, Couldn't connect to KVM socket port: {}",
- logPtr(&conn), ec);
- if (ec != boost::asio::error::operation_aborted)
- {
- connIn.close("Error in connecting to KVM port");
- }
- return;
+ connIn.close("Error in connecting to KVM port");
}
+ return;
+ }
- doRead();
- });
+ doRead();
+ });
}
void onMessage(const std::string& data)
@@ -102,7 +102,7 @@ class KvmSession : public std::enable_shared_from_this<KvmSession>
outputBuffer.consume(bytesRead);
doRead();
- });
+ });
}
void doWrite()
@@ -152,7 +152,7 @@ class KvmSession : public std::enable_shared_from_this<KvmSession>
}
doWrite();
- });
+ });
}
crow::websocket::Connection& conn;
@@ -175,26 +175,26 @@ inline void requestRoutes(App& app)
.privileges({{"ConfigureComponents", "ConfigureManager"}})
.websocket()
.onopen([](crow::websocket::Connection& conn) {
- BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+ BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
- if (sessions.size() == maxSessions)
- {
- conn.close("Max sessions are already connected");
- return;
- }
+ if (sessions.size() == maxSessions)
+ {
+ conn.close("Max sessions are already connected");
+ return;
+ }
- sessions[&conn] = std::make_shared<KvmSession>(conn);
- })
+ sessions[&conn] = std::make_shared<KvmSession>(conn);
+ })
.onclose([](crow::websocket::Connection& conn, const std::string&) {
- sessions.erase(&conn);
- })
+ sessions.erase(&conn);
+ })
.onmessage([](crow::websocket::Connection& conn,
const std::string& data, bool) {
- if (sessions[&conn])
- {
- sessions[&conn]->onMessage(data);
- }
- });
+ if (sessions[&conn])
+ {
+ sessions[&conn]->onMessage(data);
+ }
+ });
}
} // namespace obmc_kvm
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 5540886419..17d57b4c15 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -164,8 +164,8 @@ struct NbdProxyServer : std::enable_shared_from_this<NbdProxyServer>
self2->ux2wsBuf.consume(self2->ux2wsBuf.size());
self2->doRead();
}
- });
});
+ });
}
void doWrite(std::function<void()>&& onDone)
@@ -211,7 +211,7 @@ struct NbdProxyServer : std::enable_shared_from_this<NbdProxyServer>
return;
}
onDone();
- });
+ });
}
// Keeps UNIX socket endpoint file path
@@ -332,7 +332,7 @@ inline void onOpen(crow::websocket::Connection& conn)
[&conn](const boost::system::error_code& ec,
const dbus::utility::ManagedObjectType& objects) {
afterGetManagedObjects(conn, ec, objects);
- });
+ });
// We need to wait for dbus and the websockets to hook up before data is
// sent/received. Tell the core to hold off messages until the sockets are
diff --git a/include/obmc_console.hpp b/include/obmc_console.hpp
index 2dd3edbf51..fb363be275 100644
--- a/include/obmc_console.hpp
+++ b/include/obmc_console.hpp
@@ -71,7 +71,7 @@ class ConsoleHandler : public std::enable_shared_from_this<ConsoleHandler>
return;
}
self->doWrite();
- });
+ });
}
static void afterSendEx(const std::weak_ptr<ConsoleHandler>& weak)
@@ -107,7 +107,7 @@ class ConsoleHandler : public std::enable_shared_from_this<ConsoleHandler>
std::string_view payload(outputBuffer.data(), bytesRead);
self->conn.sendEx(crow::websocket::MessageType::Binary, payload,
std::bind_front(afterSendEx, weak_from_this()));
- });
+ });
}
bool connect(int fd)
@@ -247,7 +247,7 @@ inline void
[&conn](const boost::system::error_code& ec1,
const sdbusplus::message::unix_fd& unixfd) {
connectConsoleSocket(conn, ec1, unixfd);
- },
+ },
consoleService, consoleObjPath, "xyz.openbmc_project.Console.Access",
"Connect");
}
@@ -299,7 +299,7 @@ inline void onOpen(crow::websocket::Connection& conn)
[&conn, consolePath](const boost::system::error_code& ec,
const ::dbus::utility::MapperGetObject& objInfo) {
processConsoleObject(conn, consolePath, ec, objInfo);
- });
+ });
}
inline void onMessage(crow::websocket::Connection& conn,
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 7c47bcc5fc..bade59e11b 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -176,7 +176,7 @@ inline void
node = node->NextSiblingElement("node");
}
}
- },
+ },
processName, objectPath, "org.freedesktop.DBus.Introspectable",
"Introspect");
}
@@ -223,10 +223,10 @@ inline void getPropertiesForEnumerate(
{
propertyJson = val;
}
- },
+ },
value);
}
- });
+ });
}
// Find any results that weren't picked up by ObjectManagers, to be
@@ -347,7 +347,7 @@ inline void getManagedObjectsForEnumerate(
{
propertyJson = val;
}
- },
+ },
property.second);
}
}
@@ -362,7 +362,7 @@ inline void getManagedObjectsForEnumerate(
}
}
}
- });
+ });
}
inline void findObjectManagerPathForEnumerate(
@@ -395,7 +395,7 @@ inline void findObjectManagerPathForEnumerate(
}
}
}
- },
+ },
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",
"xyz.openbmc_project.ObjectMapper", "GetAncestors", objectName,
@@ -469,7 +469,7 @@ inline void getObjectAndEnumerate(
transaction->objectPath, connection.first, transaction);
}
}
- });
+ });
}
// Structure for storing data on an in progress action
@@ -1487,10 +1487,9 @@ inline void findActionOnInterface(
}
crow::connections::systemBus->async_send(
- m,
- [transaction,
- returnType](const boost::system::error_code& ec2,
- sdbusplus::message_t& m2) {
+ m, [transaction, returnType](
+ const boost::system::error_code& ec2,
+ sdbusplus::message_t& m2) {
if (ec2)
{
transaction->methodFailed = true;
@@ -1515,7 +1514,7 @@ inline void findActionOnInterface(
transaction->methodPassed = true;
handleMethodResponse(transaction, m2, returnType);
- });
+ });
break;
}
methodNode = methodNode->NextSiblingElement("method");
@@ -1523,7 +1522,7 @@ inline void findActionOnInterface(
}
interfaceNode = interfaceNode->NextSiblingElement("interface");
}
- },
+ },
connectionName, transaction->path,
"org.freedesktop.DBus.Introspectable", "Introspect");
}
@@ -1596,7 +1595,7 @@ inline void handleAction(const crow::Request& req,
{
findActionOnInterface(transaction, object.first);
}
- });
+ });
}
inline void handleDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1629,7 +1628,7 @@ inline void handleDelete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
findActionOnInterface(transaction, object.first);
}
- });
+ });
}
inline void handleList(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1652,7 +1651,7 @@ inline void handleList(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
asyncResp->res.jsonValue["message"] = "200 OK";
asyncResp->res.jsonValue["data"] = objectPaths;
}
- });
+ });
}
inline void handleEnumerate(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1689,7 +1688,7 @@ inline void handleEnumerate(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
// Add the data for the path passed in to the results
// as if GetSubTree returned it, and continue on enumerating
getObjectAndEnumerate(transaction);
- });
+ });
}
inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -1742,58 +1741,58 @@ inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
m, [asyncResp, response,
propertyName](const boost::system::error_code& ec2,
sdbusplus::message_t& msg) {
- if (ec2)
+ if (ec2)
+ {
+ BMCWEB_LOG_ERROR("Bad dbus request error: {}", ec2);
+ }
+ else
+ {
+ nlohmann::json properties;
+ int r = convertDBusToJSON("a{sv}", msg, properties);
+ if (r < 0)
{
- BMCWEB_LOG_ERROR("Bad dbus request error: {}", ec2);
+ BMCWEB_LOG_ERROR("convertDBusToJSON failed");
}
else
{
- nlohmann::json properties;
- int r = convertDBusToJSON("a{sv}", msg, properties);
- if (r < 0)
- {
- BMCWEB_LOG_ERROR("convertDBusToJSON failed");
- }
- else
+ for (const auto& prop : properties.items())
{
- for (const auto& prop : properties.items())
- {
- // if property name is empty, or
- // matches our search query, add it
- // to the response json
+ // if property name is empty, or
+ // matches our search query, add it
+ // to the response json
- if (propertyName->empty())
- {
- (*response)[prop.key()] =
- std::move(prop.value());
- }
- else if (prop.key() == *propertyName)
- {
- *response = std::move(prop.value());
- }
+ if (propertyName->empty())
+ {
+ (*response)[prop.key()] =
+ std::move(prop.value());
+ }
+ else if (prop.key() == *propertyName)
+ {
+ *response = std::move(prop.value());
}
}
}
- if (response.use_count() == 1)
+ }
+ if (response.use_count() == 1)
+ {
+ if (!propertyName->empty() && response->empty())
{
- if (!propertyName->empty() && response->empty())
- {
- setErrorResponse(
- asyncResp->res,
- boost::beast::http::status::not_found,
- propNotFoundDesc, notFoundMsg);
- }
- else
- {
- asyncResp->res.jsonValue["status"] = "ok";
- asyncResp->res.jsonValue["message"] = "200 OK";
- asyncResp->res.jsonValue["data"] = *response;
- }
+ setErrorResponse(
+ asyncResp->res,
+ boost::beast::http::status::not_found,
+ propNotFoundDesc, notFoundMsg);
}
- });
+ else
+ {
+ asyncResp->res.jsonValue["status"] = "ok";
+ asyncResp->res.jsonValue["message"] = "200 OK";
+ asyncResp->res.jsonValue["data"] = *response;
+ }
+ }
+ });
}
}
- });
+ });
}
struct AsyncPutRequest
@@ -1975,10 +1974,9 @@ inline void handlePut(const crow::Request& req,
return;
}
crow::connections::systemBus->async_send(
- m,
- [transaction](
- const boost::system::error_code& ec,
- sdbusplus::message_t& m2) {
+ m, [transaction](
+ const boost::system::error_code& ec,
+ sdbusplus::message_t& m2) {
BMCWEB_LOG_DEBUG("sent");
if (ec)
{
@@ -2002,18 +2000,18 @@ inline void handlePut(const crow::Request& req,
transaction->asyncResp->res
.jsonValue["data"] = nullptr;
}
- });
+ });
}
}
propNode = propNode->NextSiblingElement("property");
}
ifaceNode = ifaceNode->NextSiblingElement("interface");
}
- },
+ },
connectionName, transaction->objectPath,
"org.freedesktop.DBus.Introspectable", "Introspect");
}
- });
+ });
}
inline void handleDBusUrl(const crow::Request& req,
@@ -2195,7 +2193,7 @@ inline void
interface = interface->NextSiblingElement("interface");
}
- },
+ },
processName, objectPath, "org.freedesktop.DBus.Introspectable",
"Introspect");
}
@@ -2361,17 +2359,17 @@ inline void
m, [&propertyItem,
asyncResp](const boost::system::error_code& ec2,
sdbusplus::message_t& msg) {
- if (ec2)
- {
- return;
- }
+ if (ec2)
+ {
+ return;
+ }
- convertDBusToJSON("v", msg, propertyItem);
- });
+ convertDBusToJSON("v", msg, propertyItem);
+ });
}
property = property->NextSiblingElement("property");
}
- },
+ },
processName, objectPath, "org.freedesktop.DBus.Introspectable",
"Introspect");
}
@@ -2427,7 +2425,7 @@ inline void requestRoutes(App& app)
bus["name"] = "system";
asyncResp->res.jsonValue["busses"] = std::move(buses);
asyncResp->res.jsonValue["status"] = "ok";
- });
+ });
BMCWEB_ROUTE(app, "/bus/system/")
.privileges({{"Login"}})
@@ -2458,7 +2456,7 @@ inline void requestRoutes(App& app)
crow::connections::systemBus->async_method_call(
std::move(myCallback), "org.freedesktop.DBus", "/",
"org.freedesktop.DBus", "ListNames");
- });
+ });
BMCWEB_ROUTE(app, "/list/")
.privileges({{"Login"}})
@@ -2466,7 +2464,7 @@ inline void requestRoutes(App& app)
[](const crow::Request&,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
handleList(asyncResp, "/");
- });
+ });
BMCWEB_ROUTE(app, "/xyz/<path>")
.privileges({{"Login"}})
@@ -2476,7 +2474,7 @@ inline void requestRoutes(App& app)
const std::string& path) {
std::string objectPath = "/xyz/" + path;
handleDBusUrl(req, asyncResp, objectPath);
- });
+ });
BMCWEB_ROUTE(app, "/xyz/<path>")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -2487,7 +2485,7 @@ inline void requestRoutes(App& app)
const std::string& path) {
std::string objectPath = "/xyz/" + path;
handleDBusUrl(req, asyncResp, objectPath);
- });
+ });
BMCWEB_ROUTE(app, "/org/<path>")
.privileges({{"Login"}})
@@ -2497,7 +2495,7 @@ inline void requestRoutes(App& app)
const std::string& path) {
std::string objectPath = "/org/" + path;
handleDBusUrl(req, asyncResp, objectPath);
- });
+ });
BMCWEB_ROUTE(app, "/org/<path>")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
@@ -2508,7 +2506,7 @@ inline void requestRoutes(App& app)
const std::string& path) {
std::string objectPath = "/org/" + path;
handleDBusUrl(req, asyncResp, objectPath);
- });
+ });
BMCWEB_ROUTE(app, "/download/dump/<str>/")
.privileges({{"ConfigureManager"}})
@@ -2572,7 +2570,7 @@ inline void requestRoutes(App& app)
}
asyncResp->res.result(boost::beast::http::status::not_found);
return;
- });
+ });
BMCWEB_ROUTE(app, "/bus/system/<str>/")
.privileges({{"Login"}})
@@ -2582,7 +2580,7 @@ inline void requestRoutes(App& app)
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& connection) {
introspectObjects(connection, "/", asyncResp);
- });
+ });
BMCWEB_ROUTE(app, "/bus/system/<str>/<path>")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
diff --git a/include/vm_websocket.hpp b/include/vm_websocket.hpp
index a8d6a1494c..13bbdc6b23 100644
--- a/include/vm_websocket.hpp
+++ b/include/vm_websocket.hpp
@@ -111,7 +111,7 @@ class Handler : public std::enable_shared_from_this<Handler>
return;
}
doWrite();
- });
+ });
}
void doRead()
@@ -145,7 +145,7 @@ class Handler : public std::enable_shared_from_this<Handler>
outputBuffer->consume(bytesRead);
doRead();
- });
+ });
}
boost::process::async_pipe pipeOut;
@@ -169,57 +169,57 @@ inline void requestRoutes(App& app)
.privileges({{"ConfigureComponents", "ConfigureManager"}})
.websocket()
.onopen([](crow::websocket::Connection& conn) {
- BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
+ BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
- if (session != nullptr)
- {
- conn.close("Session already connected");
- return;
- }
+ if (session != nullptr)
+ {
+ conn.close("Session already connected");
+ return;
+ }
- if (handler != nullptr)
- {
- conn.close("Handler already running");
- return;
- }
+ if (handler != nullptr)
+ {
+ conn.close("Handler already running");
+ return;
+ }
- session = &conn;
+ session = &conn;
- // media is the last digit of the endpoint /vm/0/0. A future
- // enhancement can include supporting different endpoint values.
- const char* media = "0";
- handler = std::make_shared<Handler>(media, conn.getIoContext());
- handler->connect();
- })
+ // media is the last digit of the endpoint /vm/0/0. A future
+ // enhancement can include supporting different endpoint values.
+ const char* media = "0";
+ handler = std::make_shared<Handler>(media, conn.getIoContext());
+ handler->connect();
+ })
.onclose([](crow::websocket::Connection& conn,
const std::string& /*reason*/) {
- if (&conn != session)
- {
- return;
- }
+ if (&conn != session)
+ {
+ return;
+ }
- session = nullptr;
- handler->doClose();
- handler->inputBuffer->clear();
- handler->outputBuffer->clear();
- handler.reset();
- })
+ session = nullptr;
+ handler->doClose();
+ handler->inputBuffer->clear();
+ handler->outputBuffer->clear();
+ handler.reset();
+ })
.onmessage([](crow::websocket::Connection& conn,
const std::string& data, bool) {
- if (data.length() >
- handler->inputBuffer->capacity() - handler->inputBuffer->size())
- {
- BMCWEB_LOG_ERROR("Buffer overrun when writing {} bytes",
- data.length());
- conn.close("Buffer overrun");
- return;
- }
+ if (data.length() >
+ handler->inputBuffer->capacity() - handler->inputBuffer->size())
+ {
+ BMCWEB_LOG_ERROR("Buffer overrun when writing {} bytes",
+ data.length());
+ conn.close("Buffer overrun");
+ return;
+ }
- boost::asio::buffer_copy(handler->inputBuffer->prepare(data.size()),
- boost::asio::buffer(data));
- handler->inputBuffer->commit(data.size());
- handler->doWrite();
- });
+ boost::asio::buffer_copy(handler->inputBuffer->prepare(data.size()),
+ boost::asio::buffer(data));
+ handler->inputBuffer->commit(data.size());
+ handler->doWrite();
+ });
}
} // namespace obmc_vm
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 5ea30df8ee..acdb00ebf5 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -86,8 +86,8 @@ static const Message*
{
std::span<const MessageEntry>::iterator messageIt = std::ranges::find_if(
registry, [&messageKey](const MessageEntry& messageEntry) {
- return messageKey == messageEntry.first;
- });
+ return messageKey == messageEntry.first;
+ });
if (messageIt != registry.end())
{
return &messageIt->second;
@@ -989,7 +989,7 @@ class EventServiceManager
[](const std::pair<std::string, std::shared_ptr<Subscription>>&
entry) {
return (entry.second->subscriptionType == subscriptionTypeSSE);
- });
+ });
return static_cast<size_t>(size);
}
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 5df43a6b36..335c64e694 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -848,7 +848,7 @@ class RedfishAggregator
"No satellite BMCs detected. Redfish Aggregation not enabled");
}
handler(ec, satelliteInfo);
- });
+ });
}
// Processes the response returned by a satellite BMC and loads its
diff --git a/redfish-core/include/snmp_trap_event_clients.hpp b/redfish-core/include/snmp_trap_event_clients.hpp
index de7bf9d95d..5660fbc50c 100644
--- a/redfish-core/include/snmp_trap_event_clients.hpp
+++ b/redfish-core/include/snmp_trap_event_clients.hpp
@@ -83,7 +83,7 @@ inline void
[asyncResp](const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& properties) {
afterGetSnmpTrapClientdata(asyncResp, ec, properties);
- });
+ });
}
inline void
@@ -123,7 +123,7 @@ inline void
messages::resourceNotFound(asyncResp->res, "Subscriptions", id);
EventServiceManager::getInstance().deleteSubscription(id);
- },
+ },
"xyz.openbmc_project.Network.SNMP",
"/xyz/openbmc_project/network/snmp/manager",
"org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
@@ -171,7 +171,7 @@ inline void
[asyncResp](const boost::system::error_code& ec,
const std::string& dbusSNMPid) {
afterSnmpClientCreate(asyncResp, ec, dbusSNMPid);
- },
+ },
"xyz.openbmc_project.Network.SNMP",
"/xyz/openbmc_project/network/snmp/manager",
"xyz.openbmc_project.Network.Client.Create", "Client", host,
@@ -224,7 +224,7 @@ inline void
return;
}
messages::success(asyncResp->res);
- },
+ },
"xyz.openbmc_project.Network.SNMP", static_cast<std::string>(snmpPath),
"xyz.openbmc_project.Object.Delete", "Delete");
}
diff --git a/redfish-core/include/utils/chassis_utils.hpp b/redfish-core/include/utils/chassis_utils.hpp
index c8c203d3d3..6d1f8d1572 100644
--- a/redfish-core/include/utils/chassis_utils.hpp
+++ b/redfish-core/include/utils/chassis_utils.hpp
@@ -59,7 +59,7 @@ void getValidChassisPath(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
}
callback(chassisPath);
- });
+ });
BMCWEB_LOG_DEBUG("checkChassisId exit");
}
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index f4e5385566..82f1fe2b64 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -452,9 +452,9 @@ inline bool readJsonHelper(nlohmann::json& jsonRequest, crow::Response& res,
std::remove_pointer_t<std::decay_t<decltype(val)>>;
return details::unpackValue<ContainedT>(
item.second, unpackSpec.key, res, *val);
- },
+ },
unpackSpec.value) &&
- result;
+ result;
unpackSpec.complete = true;
break;
@@ -476,7 +476,7 @@ inline bool readJsonHelper(nlohmann::json& jsonRequest, crow::Response& res,
using ContainedType =
std::remove_pointer_t<std::decay_t<decltype(val)>>;
return details::IsOptional<ContainedType>::value;
- },
+ },
perUnpack.value);
if (isOptional)
{
diff --git a/redfish-core/include/utils/pcie_util.hpp b/redfish-core/include/utils/pcie_util.hpp
index a889f936ab..1a9d2bbf56 100644
--- a/redfish-core/include/utils/pcie_util.hpp
+++ b/redfish-core/include/utils/pcie_util.hpp
@@ -71,7 +71,7 @@ inline void
pcieDeviceList.emplace_back(std::move(pcieDevice));
}
asyncResp->res.jsonValue[name + "@odata.count"] = pcieDeviceList.size();
- });
+ });
}
inline std::optional<pcie_slots::SlotTypes>
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 4e1e066b3c..8a715e673f 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -223,10 +223,10 @@ inline void populateSoftwareInformation(
asyncResp->res.jsonValue[activeVersionPropName] =
*version;
}
- });
+ });
}
- });
});
+ });
}
/**
@@ -337,7 +337,7 @@ inline void getSwStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
getRedfishSwState(*swInvActivation);
asyncResp->res.jsonValue["Status"]["Health"] =
getRedfishSwHealth(*swInvActivation);
- });
+ });
}
/**
@@ -373,7 +373,7 @@ inline void
asyncResp->res.jsonValue["Updateable"] = true;
return;
}
- });
+ });
}
} // namespace sw_util
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 70a1506806..a6b8c495b8 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -263,14 +263,14 @@ inline void
*crow::connections::systemBus, "xyz.openbmc_project.User.Manager",
dbusObjectPath, "xyz.openbmc_project.User.Attributes", "UserGroups",
updatedUserGroups, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- messages::success(asyncResp->res);
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ messages::success(asyncResp->res);
+ });
}
inline void userErrorMessageHandler(
@@ -383,7 +383,7 @@ inline void handleRoleMapPatch(
}
asyncResp->res.jsonValue[serverType]["RemoteRoleMapping"]
[index] = nullptr;
- },
+ },
ldapDbusService, roleMapObjData[index].first,
"xyz.openbmc_project.Object.Delete", "Delete");
}
@@ -453,7 +453,7 @@ inline void handleRoleMapPatch(
asyncResp->res
.jsonValue[serverType]["RemoteRoleMapping"][index]
["RemoteGroup"] = *remoteGroup;
- });
+ });
}
// If "LocalRole" info is provided
@@ -487,7 +487,7 @@ inline void handleRoleMapPatch(
asyncResp->res
.jsonValue[serverType]["RemoteRoleMapping"][index]
["LocalRole"] = *localRole;
- });
+ });
}
}
// Create a new RoleMapping Object.
@@ -540,7 +540,7 @@ inline void handleRoleMapPatch(
roleMapEntry["LocalRole"] = *localRole;
roleMapEntry["RemoteGroup"] = *remoteGroup;
remoteRoleJson.emplace_back(std::move(roleMapEntry));
- },
+ },
ldapDbusService, dbusObjectPath, ldapPrivMapperInterface,
"Create", *remoteGroup,
getPrivilegeFromRoleId(std::move(*localRole)));
@@ -712,8 +712,8 @@ inline void getLDAPConfigData(const std::string& ldapType,
}
}
callback(true, confData, ldapType);
- });
});
+ });
}
/**
@@ -829,7 +829,7 @@ inline void handleServiceAddressPatch(
serviceAddressList.front());
}
BMCWEB_LOG_DEBUG("Updated the service address");
- });
+ });
}
/**
* @brief updates the LDAP Bind DN and updates the
@@ -977,7 +977,7 @@ inline void
serverTypeJson["LDAPService"]["SearchSettings"];
searchSettingsJson["UsernameAttribute"] = userNameAttribute;
BMCWEB_LOG_DEBUG("Updated the user name attr.");
- });
+ });
}
/**
* @brief updates the LDAP group attribute and updates the
@@ -1011,7 +1011,7 @@ inline void handleGroupNameAttrPatch(
serverTypeJson["LDAPService"]["SearchSettings"];
searchSettingsJson["GroupsAttribute"] = groupsAttribute;
BMCWEB_LOG_DEBUG("Updated the groupname attr");
- });
+ });
}
/**
* @brief updates the LDAP service enable and updates the
@@ -1041,7 +1041,7 @@ inline void handleServiceEnablePatch(
asyncResp->res.jsonValue[ldapServerElementName]["ServiceEnabled"] =
serviceEnabled;
BMCWEB_LOG_DEBUG("Updated Service enable = {}", serviceEnabled);
- });
+ });
}
inline void
@@ -1296,7 +1296,7 @@ inline void handleLDAPPatch(nlohmann::json& input,
handleRoleMapPatch(asyncResp, confData.groupRoleList, serverT,
*remoteRoleMapData);
}
- });
+ });
}
inline void updateUserProperties(
@@ -1314,100 +1314,100 @@ inline void updateUserProperties(
dbusObjectPath, [dbusObjectPath, username, password, roleId, enabled,
locked, accountTypes(std::move(accountTypes)),
userSelf, asyncResp{std::move(asyncResp)}](int rc) {
- if (rc <= 0)
+ if (rc <= 0)
+ {
+ messages::resourceNotFound(asyncResp->res, "ManagerAccount",
+ username);
+ return;
+ }
+
+ if (password)
+ {
+ int retval = pamUpdatePassword(username, *password);
+
+ if (retval == PAM_USER_UNKNOWN)
{
messages::resourceNotFound(asyncResp->res, "ManagerAccount",
username);
+ }
+ else if (retval == PAM_AUTHTOK_ERR)
+ {
+ // If password is invalid
+ messages::propertyValueFormatError(asyncResp->res, nullptr,
+ "Password");
+ BMCWEB_LOG_ERROR("pamUpdatePassword Failed");
+ }
+ else if (retval != PAM_SUCCESS)
+ {
+ messages::internalError(asyncResp->res);
return;
}
-
- if (password)
+ else
{
- int retval = pamUpdatePassword(username, *password);
+ messages::success(asyncResp->res);
+ }
+ }
- if (retval == PAM_USER_UNKNOWN)
- {
- messages::resourceNotFound(asyncResp->res, "ManagerAccount",
- username);
- }
- else if (retval == PAM_AUTHTOK_ERR)
- {
- // If password is invalid
- messages::propertyValueFormatError(asyncResp->res, nullptr,
- "Password");
- BMCWEB_LOG_ERROR("pamUpdatePassword Failed");
- }
- else if (retval != PAM_SUCCESS)
+ if (enabled)
+ {
+ sdbusplus::asio::setProperty(
+ *crow::connections::systemBus,
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
+ "xyz.openbmc_project.User.Attributes", "UserEnabled", *enabled,
+ [asyncResp](const boost::system::error_code& ec) {
+ if (ec)
{
+ BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
messages::internalError(asyncResp->res);
return;
}
- else
- {
- messages::success(asyncResp->res);
- }
- }
+ messages::success(asyncResp->res);
+ });
+ }
- if (enabled)
+ if (roleId)
+ {
+ std::string priv = getPrivilegeFromRoleId(*roleId);
+ if (priv.empty())
{
- sdbusplus::asio::setProperty(
- *crow::connections::systemBus,
- "xyz.openbmc_project.User.Manager", dbusObjectPath,
- "xyz.openbmc_project.User.Attributes", "UserEnabled",
- *enabled, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- messages::success(asyncResp->res);
- });
+ messages::propertyValueNotInList(asyncResp->res, true,
+ "Locked");
+ return;
}
- if (roleId)
- {
- std::string priv = getPrivilegeFromRoleId(*roleId);
- if (priv.empty())
+ sdbusplus::asio::setProperty(
+ *crow::connections::systemBus,
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
+ "xyz.openbmc_project.User.Attributes", "UserPrivilege", priv,
+ [asyncResp](const boost::system::error_code& ec) {
+ if (ec)
{
- messages::propertyValueNotInList(asyncResp->res, true,
- "Locked");
+ BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
+ messages::internalError(asyncResp->res);
return;
}
+ messages::success(asyncResp->res);
+ });
+ }
- sdbusplus::asio::setProperty(
- *crow::connections::systemBus,
- "xyz.openbmc_project.User.Manager", dbusObjectPath,
- "xyz.openbmc_project.User.Attributes", "UserPrivilege",
- priv, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- messages::success(asyncResp->res);
- });
- }
-
- if (locked)
+ if (locked)
+ {
+ // admin can unlock the account which is locked by
+ // successive authentication failures but admin should
+ // not be allowed to lock an account.
+ if (*locked)
{
- // admin can unlock the account which is locked by
- // successive authentication failures but admin should
- // not be allowed to lock an account.
- if (*locked)
- {
- messages::propertyValueNotInList(asyncResp->res, "true",
- "Locked");
- return;
- }
+ messages::propertyValueNotInList(asyncResp->res, "true",
+ "Locked");
+ return;
+ }
- sdbusplus::asio::setProperty(
- *crow::connections::systemBus,
- "xyz.openbmc_project.User.Manager", dbusObjectPath,
- "xyz.openbmc_project.User.Attributes",
- "UserLockedForFailedAttempt", *locked,
- [asyncResp](const boost::system::error_code& ec) {
+ sdbusplus::asio::setProperty(
+ *crow::connections::systemBus,
+ "xyz.openbmc_project.User.Manager", dbusObjectPath,
+ "xyz.openbmc_project.User.Attributes",
+ "UserLockedForFailedAttempt", *locked,
+ [asyncResp](const boost::system::error_code& ec) {
if (ec)
{
BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
@@ -1415,15 +1415,15 @@ inline void updateUserProperties(
return;
}
messages::success(asyncResp->res);
- });
- }
+ });
+ }
- if (accountTypes)
- {
- patchAccountTypes(*accountTypes, asyncResp, dbusObjectPath,
- userSelf);
- }
- });
+ if (accountTypes)
+ {
+ patchAccountTypes(*accountTypes, asyncResp, dbusObjectPath,
+ userSelf);
+ }
+ });
}
inline void handleAccountServiceHead(
@@ -1542,7 +1542,7 @@ inline void
asyncResp->res.jsonValue["AccountLockoutThreshold"] =
*maxLoginAttemptBeforeLockout;
}
- });
+ });
auto callback = [asyncResp](bool success, const LDAPConfigData& confData,
const std::string& ldapType) {
@@ -1597,7 +1597,7 @@ inline void handleAccountServicePatch(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
if (maxPasswordLength)
@@ -1638,13 +1638,13 @@ inline void handleAccountServicePatch(
"/xyz/openbmc_project/user",
"xyz.openbmc_project.User.AccountPolicy", "AccountUnlockTimeout",
*unlockTimeout, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- messages::internalError(asyncResp->res);
- return;
- }
- messages::success(asyncResp->res);
- });
+ if (ec)
+ {
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ messages::success(asyncResp->res);
+ });
}
if (lockoutThreshold)
{
@@ -1660,7 +1660,7 @@ inline void handleAccountServicePatch(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
}
@@ -1757,7 +1757,7 @@ inline void handleAccountCollectionGet(
}
}
asyncResp->res.jsonValue["Members@odata.count"] = memberArray.size();
- });
+ });
}
inline void processAfterCreateUser(
@@ -1792,7 +1792,7 @@ inline void processAfterCreateUser(
// If password is invalid
messages::propertyValueFormatError(asyncResp->res, nullptr,
"Password");
- },
+ },
"xyz.openbmc_project.User.Manager", userPath,
"xyz.openbmc_project.Object.Delete", "Delete");
@@ -1877,7 +1877,7 @@ inline void processAfterGetAllGroups(
[asyncResp, username, password](const boost::system::error_code& ec2,
sdbusplus::message_t& m) {
processAfterCreateUser(asyncResp, username, password, ec2, m);
- },
+ },
"xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
"xyz.openbmc_project.User.Manager", "CreateUser", username, userGroups,
roleId, enabled);
@@ -1938,7 +1938,7 @@ inline void handleAccountCollectionPost(
processAfterGetAllGroups(asyncResp, username, password, roleId, enabled,
accountTypes, allGroupsList);
- });
+ });
}
inline void
@@ -2015,7 +2015,7 @@ inline void
const std::pair<sdbusplus::message::object_path,
dbus::utility::DBusInterfacesMap>& user) {
return accountName == user.first.filename();
- });
+ });
if (userIt == users.end())
{
@@ -2132,7 +2132,7 @@ inline void
"/redfish/v1/AccountService/Accounts/{}", accountName);
asyncResp->res.jsonValue["Id"] = accountName;
asyncResp->res.jsonValue["UserName"] = accountName;
- });
+ });
}
inline void
@@ -2165,7 +2165,7 @@ inline void
}
messages::accountRemoved(asyncResp->res);
- },
+ },
"xyz.openbmc_project.User.Manager", userPath,
"xyz.openbmc_project.Object.Delete", "Delete");
}
@@ -2258,7 +2258,7 @@ inline void
updateUserProperties(asyncResp, newUser, password, enabled, roleId,
locked, accountTypes, userSelf);
- },
+ },
"xyz.openbmc_project.User.Manager", "/xyz/openbmc_project/user",
"xyz.openbmc_project.User.Manager", "RenameUser", username,
*newUserName);
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
index 8cd05d6c15..025f4361c8 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -93,7 +93,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- },
+ },
"org.open_power.Software.Host.Updater", "/xyz/openbmc_project/software",
"xyz.openbmc_project.Common.FactoryReset", "Reset");
}
diff --git a/redfish-core/lib/cable.hpp b/redfish-core/lib/cable.hpp
index a39d00a355..a2d0b53fab 100644
--- a/redfish-core/lib/cable.hpp
+++ b/redfish-core/lib/cable.hpp
@@ -98,7 +98,7 @@ inline void
const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& properties) {
fillCableProperties(asyncResp->res, ec, properties);
- });
+ });
}
else if (interface == "xyz.openbmc_project.Inventory.Item")
{
@@ -123,7 +123,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
}
}
@@ -184,8 +184,8 @@ inline void requestRoutesCable(App& app)
return;
}
messages::resourceNotFound(asyncResp->res, "Cable", cableId);
- });
});
+ });
}
/**
@@ -212,7 +212,7 @@ inline void requestRoutesCableCollection(App& app)
collection_util::getCollectionMembers(
asyncResp, boost::urls::url("/redfish/v1/Cables"), interfaces,
"/xyz/openbmc_project/inventory");
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 10931c4f47..00e509ddb7 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -274,7 +274,7 @@ static void
}
asyncResp->res.jsonValue[countPtr] = links.size();
- });
+ });
}
/**
@@ -373,7 +373,7 @@ static void getCertificateProperties(
asyncResp->res.addHeader(
boost::beast::http::field::location,
std::string_view(certURL.data(), certURL.size()));
- });
+ });
}
static void
@@ -391,7 +391,7 @@ static void
}
BMCWEB_LOG_INFO("Certificate deleted");
asyncResp->res.result(boost::beast::http::status::no_content);
- },
+ },
service, objectPath, certs::objDeleteIntf, "Delete");
}
@@ -572,7 +572,7 @@ inline void handleReplaceCertificateAction(
getCertificateProperties(asyncResp, objectPath, service, id, url, name);
BMCWEB_LOG_DEBUG("HTTPS certificate install file={}",
certFile->getCertFilePath());
- },
+ },
service, objectPath, certs::certReplaceIntf, "Replace",
certFile->getCertFilePath());
}
@@ -614,7 +614,7 @@ static void getCSR(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
asyncResp->res.jsonValue["CSRString"] = csr;
asyncResp->res.jsonValue["CertificateCollection"]["@odata.id"] =
certURI;
- },
+ },
service, csrObjPath, "xyz.openbmc_project.Certs.CSR", "CSR");
}
@@ -833,7 +833,7 @@ inline void
break;
}
}
- });
+ });
crow::connections::systemBus->async_method_call(
[asyncResp](const boost::system::error_code& ec, const std::string&) {
if (ec)
@@ -842,7 +842,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- },
+ },
service, objectPath, "xyz.openbmc_project.Certs.CSR.Create",
"GenerateCSR", *optAlternativeNames, *optChallengePassword, city,
commonName, *optContactPerson, country, *optEmail, *optGivenName,
@@ -944,7 +944,7 @@ inline void handleHTTPSCertificateCollectionPost(
certId, certURL, "HTTPS Certificate");
BMCWEB_LOG_DEBUG("HTTPS certificate install file={}",
certFile->getCertFilePath());
- },
+ },
certs::httpsServiceName, certs::httpsObjectPath, certs::certInstallIntf,
"Install", certFile->getCertFilePath());
}
@@ -1049,7 +1049,7 @@ inline void handleLDAPCertificateCollectionPost(
certId, certURL, "LDAP Certificate");
BMCWEB_LOG_DEBUG("LDAP certificate install file={}",
certFile->getCertFilePath());
- },
+ },
certs::ldapServiceName, certs::ldapObjectPath, certs::certInstallIntf,
"Install", certFile->getCertFilePath());
}
@@ -1171,7 +1171,7 @@ inline void handleTrustStoreCertificateCollectionPost(
"TrustStore Certificate");
BMCWEB_LOG_DEBUG("TrustStore certificate install file={}",
certFile->getCertFilePath());
- },
+ },
certs::authorityServiceName, certs::authorityObjectPath,
certs::certInstallIntf, "Install", certFile->getCertFilePath());
}
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 0d14d4ef1d..469c903bce 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -85,7 +85,7 @@ inline void getStorageLink(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
asyncResp->res.jsonValue["Links"]["Storage@odata.count"] =
storages.size();
asyncResp->res.jsonValue["Links"]["Storage"] = std::move(storages);
- });
+ });
}
/**
@@ -131,7 +131,7 @@ inline void getChassisState(std::shared_ptr<bmcweb::AsyncResp> asyncResp)
asyncResp->res.jsonValue["PowerState"] = "Off";
asyncResp->res.jsonValue["Status"]["State"] = "StandbyOffline";
}
- });
+ });
}
inline void getIntrusionByService(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
@@ -156,7 +156,7 @@ inline void getIntrusionByService(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
asyncResp->res.jsonValue["PhysicalSecurity"]["IntrusionSensorNumber"] =
1;
asyncResp->res.jsonValue["PhysicalSecurity"]["IntrusionSensor"] = value;
- });
+ });
}
/**
@@ -189,7 +189,7 @@ inline void
return;
}
}
- });
+ });
}
inline void handleChassisCollectionGet(
@@ -341,7 +341,7 @@ inline void
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
property;
- });
+ });
}
inline void getChassisUUID(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -360,7 +360,7 @@ inline void getChassisUUID(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
asyncResp->res.jsonValue["UUID"] = chassisUUID;
- });
+ });
}
inline void
@@ -418,7 +418,7 @@ inline void
return; // no sensors = no failures
}
health->inventory = resp;
- });
+ });
health->populate();
}
@@ -459,7 +459,7 @@ inline void
reference["@odata.id"] = boost::urls::format(
"/redfish/v1/Chassis/{}/Drives", chassisId);
asyncResp->res.jsonValue["Drives"] = std::move(reference);
- });
+ });
const std::string& connectionName = connectionNames[0].first;
@@ -491,7 +491,7 @@ inline void
return;
}
asyncResp->res.jsonValue["AssetTag"] = property;
- });
+ });
}
else if (interface == replaceableInterface)
{
@@ -510,7 +510,7 @@ inline void
return;
}
asyncResp->res.jsonValue["HotPluggable"] = property;
- });
+ });
}
}
@@ -620,7 +620,7 @@ inline void
std::move(managedBy);
getChassisState(asyncResp);
getStorageLink(asyncResp, path);
- });
+ });
for (const auto& interface : interfaces2)
{
@@ -640,7 +640,7 @@ inline void
// Couldn't find an object with that name. return an error
messages::resourceNotFound(asyncResp->res, "Chassis", chassisId);
- });
+ });
getPhysicalSecurityData(asyncResp);
}
@@ -765,7 +765,7 @@ inline void
}
messages::resourceNotFound(asyncResp->res, "Chassis", chassisId);
- });
+ });
}
/**
@@ -864,8 +864,8 @@ inline void
}
messages::success(asyncResp->res);
- });
});
+ });
}
inline void handleChassisResetActionInfoPost(
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index bd446771cb..80da49bda9 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -637,7 +637,7 @@ inline void deleteIPAddress(const std::string& ifaceId,
{
messages::internalError(asyncResp->res);
}
- },
+ },
"xyz.openbmc_project.Network",
"/xyz/openbmc_project/network/" + ifaceId + ipHash,
"xyz.openbmc_project.Object.Delete", "Delete");
@@ -652,13 +652,13 @@ inline void updateIPv4DefaultGateway(
"/xyz/openbmc_project/network/" + ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DefaultGateway",
gateway, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- messages::internalError(asyncResp->res);
- return;
- }
- asyncResp->res.result(boost::beast::http::status::no_content);
- });
+ if (ec)
+ {
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ asyncResp->res.result(boost::beast::http::status::no_content);
+ });
}
/**
* @brief Creates a static IPv4 entry
@@ -675,8 +675,8 @@ inline void createIPv4(const std::string& ifaceId, uint8_t prefixLength,
const std::string& gateway, const std::string& address,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- auto createIpHandler =
- [asyncResp, ifaceId, gateway](const boost::system::error_code& ec) {
+ auto createIpHandler = [asyncResp, ifaceId,
+ gateway](const boost::system::error_code& ec) {
if (ec)
{
messages::internalError(asyncResp->res);
@@ -733,12 +733,12 @@ inline void deleteAndCreateIPAddress(
{
messages::internalError(asyncResp->res);
}
- },
+ },
"xyz.openbmc_project.Network",
"/xyz/openbmc_project/network/" + ifaceId,
"xyz.openbmc_project.Network.IP.Create", "IP", protocol, address,
prefixLength, gateway);
- },
+ },
"xyz.openbmc_project.Network",
"/xyz/openbmc_project/network/" + ifaceId + id,
"xyz.openbmc_project.Object.Delete", "Delete");
@@ -758,8 +758,8 @@ inline void createIPv6(const std::string& ifaceId, uint8_t prefixLength,
const std::string& address,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- auto createIpHandler =
- [asyncResp, address](const boost::system::error_code& ec) {
+ auto createIpHandler = [asyncResp,
+ address](const boost::system::error_code& ec) {
if (ec)
{
if (ec == boost::system::errc::io_error)
@@ -834,7 +834,7 @@ void getEthernetIfaceData(const std::string& ethifaceId,
extractIPV6Data(ethifaceId, resp, ipv6Data);
// Finally make a callback with useful data
callback(true, ethData, ipv4Data, ipv6Data);
- });
+ });
}
/**
@@ -889,7 +889,7 @@ void getEthernetIfaceList(CallbackFunc&& callback)
// Finally make a callback with useful data
callback(true, ifaceList);
- });
+ });
}
inline void
@@ -912,7 +912,7 @@ inline void
{
messages::internalError(asyncResp->res);
}
- });
+ });
}
inline void
@@ -929,7 +929,7 @@ inline void
{
messages::internalError(asyncResp->res);
}
- });
+ });
}
inline void
@@ -943,11 +943,11 @@ inline void
"/xyz/openbmc_project/network/" + ifaceId,
"xyz.openbmc_project.Network.EthernetInterface", "DomainName",
vectorDomainname, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- messages::internalError(asyncResp->res);
- }
- });
+ if (ec)
+ {
+ messages::internalError(asyncResp->res);
+ }
+ });
}
inline bool isHostnameValid(const std::string& hostname)
@@ -1039,7 +1039,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
inline void setDHCPEnabled(const std::string& ifaceId,
@@ -1060,7 +1060,7 @@ inline void setDHCPEnabled(const std::string& ifaceId,
return;
}
messages::success(asyncResp->res);
- });
+ });
}
inline void setEthernetInterfaceBoolProperty(
@@ -1078,7 +1078,7 @@ inline void setEthernetInterfaceBoolProperty(
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
inline void setDHCPv4Config(const std::string& propertyName, const bool& value,
@@ -1096,7 +1096,7 @@ inline void setDHCPv4Config(const std::string& propertyName, const bool& value,
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
inline void handleSLAACAutoConfigPatch(
@@ -1117,7 +1117,7 @@ inline void handleSLAACAutoConfigPatch(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
inline void handleDHCPPatch(const std::string& ifaceId,
@@ -1425,7 +1425,7 @@ inline void handleStaticNameServersPatch(
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
inline void handleIPv6StaticAddressesPatch(
@@ -1576,7 +1576,7 @@ inline void
}
health->inventory = resp;
- });
+ });
health->populate();
}
@@ -1830,7 +1830,7 @@ inline void requestEthernetInterfacesRoutes(App& app)
asyncResp->res.jsonValue["@odata.id"] =
"/redfish/v1/Managers/bmc/EthernetInterfaces";
});
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/EthernetInterfaces/")
.privileges(redfish::privileges::postEthernetInterfaceCollection)
@@ -1910,11 +1910,11 @@ inline void requestEthernetInterfacesRoutes(App& app)
const sdbusplus::message_t& m) {
afterVlanCreate(asyncResp, parentInterfaceUri, vlanInterface, ec,
m);
- },
+ },
"xyz.openbmc_project.Network", "/xyz/openbmc_project/network",
"xyz.openbmc_project.Network.VLAN.Create", "VLAN", parentInterface,
vlanId);
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/EthernetInterfaces/<str>/")
.privileges(redfish::privileges::getEthernetInterface)
@@ -1948,8 +1948,8 @@ inline void requestEthernetInterfacesRoutes(App& app)
"Management Network Interface";
parseInterfaceData(asyncResp, ifaceId, ethData, ipv4Data, ipv6Data);
- });
});
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/EthernetInterfaces/<str>/")
.privileges(redfish::privileges::patchEthernetInterface)
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index c1ad0d8022..ee8fc5da1d 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -98,7 +98,7 @@ inline void requestRoutesEventService(App& app)
asyncResp->res.jsonValue["SSEFilterPropertiesSupported"] =
std::move(supportedSSEFilters);
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/EventService/")
.privileges(redfish::privileges::patchEventService)
@@ -162,7 +162,7 @@ inline void requestRoutesEventService(App& app)
EventServiceManager::getInstance().setEventServiceConfig(
eventServiceConfig);
- });
+ });
}
inline void requestRoutesSubmitTestEvent(App& app)
@@ -184,7 +184,7 @@ inline void requestRoutesSubmitTestEvent(App& app)
return;
}
asyncResp->res.result(boost::beast::http::status::no_content);
- });
+ });
}
inline void doSubscriptionCollection(
@@ -255,11 +255,11 @@ inline void requestRoutesEventDestinationCollection(App& app)
[asyncResp](const boost::system::error_code& ec,
const dbus::utility::ManagedObjectType& resp) {
doSubscriptionCollection(ec, asyncResp, resp);
- },
+ },
"xyz.openbmc_project.Network.SNMP",
"/xyz/openbmc_project/network/snmp/manager",
"org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/")
.privileges(redfish::privileges::postEventDestinationCollection)
@@ -559,7 +559,7 @@ inline void requestRoutesEventDestinationCollection(App& app)
[&id](const redfish::registries::MessageEntry&
messageEntry) {
return id == messageEntry.first;
- }))
+ }))
{
validId = true;
break;
@@ -621,7 +621,7 @@ inline void requestRoutesEventDestinationCollection(App& app)
messages::created(asyncResp->res);
asyncResp->res.addHeader(
"Location", "/redfish/v1/EventService/Subscriptions/" + id);
- });
+ });
}
inline void requestRoutesEventDestination(App& app)
@@ -680,7 +680,7 @@ inline void requestRoutesEventDestination(App& app)
mrdJsonArray.emplace_back(std::move(mdr));
}
asyncResp->res.jsonValue["MetricReportDefinitions"] = mrdJsonArray;
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
// The below privilege is wrong, it should be ConfigureManager OR
// ConfigureSelf
@@ -754,7 +754,7 @@ inline void requestRoutesEventDestination(App& app)
}
EventServiceManager::getInstance().updateSubscriptionData();
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
// The below privilege is wrong, it should be ConfigureManager OR
// ConfigureSelf
@@ -783,7 +783,7 @@ inline void requestRoutesEventDestination(App& app)
return;
}
EventServiceManager::getInstance().deleteSubscription(param);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index 317348f760..a8373a107d 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -58,7 +58,7 @@ inline void getFabricAdapterLocation(
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
property;
- });
+ });
}
inline void
@@ -117,7 +117,7 @@ inline void
{
asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
}
- });
+ });
}
inline void
@@ -143,7 +143,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
inline void
@@ -170,7 +170,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["Health"] = "Critical";
}
- });
+ });
}
inline void doAdapterGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -242,7 +242,7 @@ inline void getValidFabricAdapterPath(
}
BMCWEB_LOG_WARNING("Adapter not found");
messages::resourceNotFound(asyncResp->res, "FabricAdapter", adapterId);
- });
+ });
}
inline void
@@ -269,7 +269,7 @@ inline void
const std::string& serviceName) {
doAdapterGet(asyncResp, systemName, adapterId, fabricAdapterPath,
serviceName);
- });
+ });
}
inline void handleFabricAdapterCollectionGet(
diff --git a/redfish-core/lib/fan.hpp b/redfish-core/lib/fan.hpp
index 7e4f8fac6b..8915229e27 100644
--- a/redfish-core/lib/fan.hpp
+++ b/redfish-core/lib/fan.hpp
@@ -76,7 +76,7 @@ inline void getFanPaths(
return;
}
callback(subtreePaths);
- });
+ });
}
inline void doFanCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -127,7 +127,7 @@ inline void
asyncResp->res.addHeader(
boost::beast::http::field::link,
"</redfish/v1/JsonSchemas/FanCollection/FanCollection.json>; rel=describedby");
- });
+ });
}
inline void
@@ -191,7 +191,7 @@ static inline void handleFanPath(
return;
}
callback(fanPath, object.begin()->first);
- });
+ });
return;
}
@@ -210,7 +210,7 @@ inline void getValidFanPath(
[fanId, asyncResp, callback](
const dbus::utility::MapperGetSubTreePathsResponse& fanPaths) {
handleFanPath(fanId, asyncResp, fanPaths, callback);
- });
+ });
}
inline void addFanCommonProperties(crow::Response& resp,
@@ -250,7 +250,7 @@ inline void getFanHealth(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Status"]["Health"] = "Critical";
}
- });
+ });
}
inline void getFanState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -275,7 +275,7 @@ inline void getFanState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
inline void getFanAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -332,7 +332,7 @@ inline void getFanAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
}
- });
+ });
}
inline void getFanLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -356,7 +356,7 @@ inline void getFanLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
property;
- });
+ });
}
inline void
@@ -411,7 +411,7 @@ inline void handleFanHead(App& app, const crow::Request& req,
boost::beast::http::field::link,
"</redfish/v1/JsonSchemas/Fan/Fan.json>; rel=describedby");
});
- });
+ });
}
inline void handleFanGet(App& app, const crow::Request& req,
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 0c35cb5ff7..6e0d3349bd 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -206,7 +206,7 @@ struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
return;
}
self->globalInventoryPath = resp[0];
- });
+ });
}
void getAllStatusAssociations()
@@ -232,7 +232,7 @@ struct HealthPopulate : std::enable_shared_from_this<HealthPopulate>
}
it = self->statuses.erase(it);
}
- });
+ });
}
std::shared_ptr<bmcweb::AsyncResp> asyncResp;
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 0a8936d1d7..0df84b8847 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -90,7 +90,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
/**
@@ -145,7 +145,7 @@ inline void
"/redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset";
reset["@Redfish.ActionInfo"] =
"/redfish/v1/Systems/hypervisor/ResetActionInfo";
- });
+ });
}
inline bool extractHypervisorInterfaceData(
@@ -333,7 +333,7 @@ void getHypervisorIfaceData(const std::string& ethIfaceId,
BMCWEB_LOG_INFO("Hypervisor Interface not found");
}
callback(found, ethData, ipv4Data);
- });
+ });
}
/**
@@ -362,7 +362,7 @@ inline void setHypervisorIPv4Address(
return;
}
BMCWEB_LOG_DEBUG("Hypervisor IPaddress is Set");
- });
+ });
}
/**
@@ -392,7 +392,7 @@ inline void
return;
}
BMCWEB_LOG_DEBUG("SubnetMask is Set");
- });
+ });
}
/**
@@ -416,13 +416,13 @@ inline void setHypervisorIPv4Gateway(
"/xyz/openbmc_project/network/hypervisor",
"xyz.openbmc_project.Network.SystemConfiguration", "DefaultGateway",
gateway, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec);
- return;
- }
- BMCWEB_LOG_DEBUG("Default Gateway is Set");
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec);
+ return;
+ }
+ BMCWEB_LOG_DEBUG("Default Gateway is Set");
+ });
}
/**
@@ -519,7 +519,7 @@ inline void setDHCPEnabled(const std::string& ifaceId, bool ipv4DHCPEnabled,
messages::internalError(asyncResp->res);
return;
}
- });
+ });
// Set the IPv4 address origin to the DHCP / Static as per the new value
// of the DHCPEnabled property
@@ -547,7 +547,7 @@ inline void setDHCPEnabled(const std::string& ifaceId, bool ipv4DHCPEnabled,
return;
}
BMCWEB_LOG_DEBUG("Hypervisor IPaddress Origin is Set");
- });
+ });
}
inline void handleHypervisorIPv4StaticPatch(
@@ -674,7 +674,7 @@ inline void handleHypervisorHostnamePatch(
{
messages::internalError(asyncResp->res);
}
- });
+ });
}
inline void
@@ -690,7 +690,7 @@ inline void
{
messages::internalError(asyncResp->res);
}
- });
+ });
}
inline void handleHypervisorEthernetInterfaceCollectionGet(
@@ -741,7 +741,7 @@ inline void handleHypervisorEthernetInterfaceCollectionGet(
ifaceArray.emplace_back(std::move(ethIface));
}
asyncResp->res.jsonValue["Members@odata.count"] = ifaceArray.size();
- });
+ });
}
inline void handleHypervisorEthernetInterfaceGet(
@@ -756,20 +756,20 @@ inline void handleHypervisorEthernetInterfaceGet(
id, [asyncResp, ifaceId{std::string(id)}](
bool success, const EthernetInterfaceData& ethData,
const std::vector<IPv4AddressData>& ipv4Data) {
- if (!success)
- {
- messages::resourceNotFound(asyncResp->res, "EthernetInterface",
- ifaceId);
- return;
- }
- asyncResp->res.jsonValue["@odata.type"] =
- "#EthernetInterface.v1_9_0.EthernetInterface";
- asyncResp->res.jsonValue["Name"] = "Hypervisor Ethernet Interface";
- asyncResp->res.jsonValue["Description"] =
- "Hypervisor's Virtual Management Ethernet Interface";
- parseInterfaceData(asyncResp->res.jsonValue, ifaceId, ethData,
- ipv4Data);
- });
+ if (!success)
+ {
+ messages::resourceNotFound(asyncResp->res, "EthernetInterface",
+ ifaceId);
+ return;
+ }
+ asyncResp->res.jsonValue["@odata.type"] =
+ "#EthernetInterface.v1_9_0.EthernetInterface";
+ asyncResp->res.jsonValue["Name"] = "Hypervisor Ethernet Interface";
+ asyncResp->res.jsonValue["Description"] =
+ "Hypervisor's Virtual Management Ethernet Interface";
+ parseInterfaceData(asyncResp->res.jsonValue, ifaceId, ethData,
+ ipv4Data);
+ });
}
inline void handleHypervisorSystemGet(
@@ -806,7 +806,7 @@ inline void handleHypervisorSystemGet(
getHypervisorState(asyncResp);
getHypervisorActions(asyncResp);
// TODO: Add "SystemType" : "hypervisor"
- });
+ });
}
inline void handleHypervisorEthernetInterfacePatch(
@@ -848,12 +848,11 @@ inline void handleHypervisorEthernetInterfacePatch(
}
getHypervisorIfaceData(
- ifaceId,
- [asyncResp, ifaceId, hostName = std::move(hostName),
- ipv4StaticAddresses = std::move(ipv4StaticAddresses), ipv4DHCPEnabled,
- dhcpv4 = std::move(dhcpv4)](bool success,
- const EthernetInterfaceData& ethData,
- const std::vector<IPv4AddressData>&) {
+ ifaceId, [asyncResp, ifaceId, hostName = std::move(hostName),
+ ipv4StaticAddresses = std::move(ipv4StaticAddresses),
+ ipv4DHCPEnabled, dhcpv4 = std::move(dhcpv4)](
+ bool success, const EthernetInterfaceData& ethData,
+ const std::vector<IPv4AddressData>&) {
if (!success)
{
messages::resourceNotFound(asyncResp->res, "EthernetInterface",
@@ -911,7 +910,7 @@ inline void handleHypervisorEthernetInterfacePatch(
// to enabled/active by the pldm once the hypervisor
// consumes the updated settings from the user.
setIPv4InterfaceEnabled(ifaceId, false, asyncResp);
- });
+ });
asyncResp->res.result(boost::beast::http::status::accepted);
}
@@ -970,7 +969,7 @@ inline void handleHypervisorResetActionGet(
parameter["AllowableValues"] = std::move(allowed);
parameters.emplace_back(std::move(parameter));
asyncResp->res.jsonValue["Parameters"] = std::move(parameters);
- });
+ });
}
inline void handleHypervisorSystemResetPost(
@@ -1030,7 +1029,7 @@ inline void handleHypervisorSystemResetPost(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
inline void requestRoutesHypervisorSystems(App& app)
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index f36a319677..ff77ddc180 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -86,8 +86,8 @@ inline void
{
asyncResp->res.jsonValue["IndicatorLED"] = "Off";
}
- });
});
+ });
}
/**
@@ -151,8 +151,8 @@ inline void
return;
}
messages::success(asyncResp->res);
- });
});
+ });
}
/**
@@ -209,8 +209,8 @@ inline void getLocationIndicatorActive(
}
asyncResp->res.jsonValue["LocationIndicatorActive"] = ledOn;
- });
});
+ });
}
/**
@@ -248,8 +248,8 @@ inline void setLocationIndicatorActive(
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 2899b011f6..116bc8acb8 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -569,7 +569,7 @@ inline void
}
asyncResp->res.jsonValue["Members@odata.count"] = entriesArray.size();
asyncResp->res.jsonValue["Members"] = std::move(entriesArray);
- });
+ });
}
inline void
@@ -669,15 +669,15 @@ inline void
entryID);
return;
}
- });
+ });
}
inline void deleteDumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& entryID,
const std::string& dumpType)
{
- auto respHandler =
- [asyncResp, entryID](const boost::system::error_code& ec) {
+ auto respHandler = [asyncResp,
+ entryID](const boost::system::error_code& ec) {
BMCWEB_LOG_DEBUG("Dump Entry doDelete callback: Done");
if (ec)
{
@@ -1022,7 +1022,7 @@ inline void createDumpTaskCallback(
createdObjPath.str);
taskData->state = "Completed";
return task::completed;
- },
+ },
"type='signal',interface='org.freedesktop.DBus.Properties',"
"member='PropertiesChanged',path='" +
createdObjPath.str + "'");
@@ -1032,7 +1032,7 @@ inline void createDumpTaskCallback(
task->startTimer(std::chrono::minutes(6));
task->populateResp(asyncResp->res);
task->payload.emplace(payload);
- },
+ },
"xyz.openbmc_project.Dump.Manager", createdObjPath,
"org.freedesktop.DBus.Introspectable", "Introspect");
}
@@ -1166,7 +1166,7 @@ inline void createDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
BMCWEB_LOG_DEBUG("Dump Created. Path: {}", objPath.str);
createDumpTaskCallback(std::move(payload), asyncResp, objPath);
- },
+ },
"xyz.openbmc_project.Dump.Manager",
"/xyz/openbmc_project/dump/" +
std::string(boost::algorithm::to_lower_copy(dumpType)),
@@ -1187,7 +1187,7 @@ inline void clearDump(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
messages::internalError(asyncResp->res);
return;
}
- },
+ },
"xyz.openbmc_project.Dump.Manager",
"/xyz/openbmc_project/dump/" + dumpTypeLowerCopy,
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
@@ -1323,8 +1323,8 @@ inline void requestRoutesSystemLogServiceCollection(App& app)
return;
}
}
- });
});
+ });
}
inline void requestRoutesEventLogService(App& app)
@@ -1367,7 +1367,7 @@ inline void requestRoutesEventLogService(App& app)
{"target",
"/redfish/v1/Systems/system/LogServices/EventLog/Actions/LogService.ClearLog"}};
- });
+ });
}
inline void requestRoutesJournalEventLogClear(App& app)
@@ -1412,11 +1412,11 @@ inline void requestRoutesJournalEventLogClear(App& app)
}
messages::success(asyncResp->res);
- },
+ },
"org.freedesktop.systemd1", "/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager", "ReloadUnit", "rsyslog.service",
"replace");
- });
+ });
}
enum class LogParseError
@@ -1611,7 +1611,7 @@ inline void requestRoutesJournalEventLogEntryCollection(App& app)
"/redfish/v1/Systems/system/LogServices/EventLog/Entries?$skip=" +
std::to_string(skip + top);
}
- });
+ });
}
inline void requestRoutesJournalEventLogEntry(App& app)
@@ -1689,7 +1689,7 @@ inline void requestRoutesJournalEventLogEntry(App& app)
}
// Requested ID was not found
messages::resourceNotFound(asyncResp->res, "LogEntry", targetID);
- });
+ });
}
inline void requestRoutesDBusEventLogEntryCollection(App& app)
@@ -1884,8 +1884,8 @@ inline void requestRoutesDBusEventLogEntryCollection(App& app)
asyncResp->res.jsonValue["Members@odata.count"] =
entriesArray.size();
asyncResp->res.jsonValue["Members"] = std::move(entriesArray);
- });
});
+ });
}
inline void requestRoutesDBusEventLogEntry(App& app)
@@ -2001,8 +2001,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
"/redfish/v1/Systems/system/LogServices/EventLog/Entries/" +
std::to_string(*id) + "/attachment";
}
- });
});
+ });
BMCWEB_ROUTE(
app, "/redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/")
@@ -2048,8 +2048,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
messages::internalError(asyncResp->res);
return;
}
- });
});
+ });
BMCWEB_ROUTE(
app, "/redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/")
@@ -2083,8 +2083,8 @@ inline void requestRoutesDBusEventLogEntry(App& app)
dbus::utility::escapePathForDbus(entryID);
// Process response from Logging service.
- auto respHandler =
- [asyncResp, entryID](const boost::system::error_code& ec) {
+ auto respHandler = [asyncResp,
+ entryID](const boost::system::error_code& ec) {
BMCWEB_LOG_DEBUG("EventLogEntry (DBus) doDelete callback: Done");
if (ec)
{
@@ -2111,7 +2111,7 @@ inline void requestRoutesDBusEventLogEntry(App& app)
respHandler, "xyz.openbmc_project.Logging",
"/xyz/openbmc_project/logging/entry/" + entryID,
"xyz.openbmc_project.Object.Delete", "Delete");
- });
+ });
}
constexpr const char* hostLoggerFolderPath = "/var/log/console";
@@ -2225,7 +2225,7 @@ inline void requestRoutesSystemHostLogger(App& app)
asyncResp->res.jsonValue["Id"] = "HostLogger";
asyncResp->res.jsonValue["Entries"]["@odata.id"] =
"/redfish/v1/Systems/system/LogServices/HostLogger/Entries";
- });
+ });
}
inline void requestRoutesSystemHostLoggerCollection(App& app)
@@ -2315,7 +2315,7 @@ inline void requestRoutesSystemHostLoggerCollection(App& app)
std::to_string(skip + top);
}
}
- });
+ });
}
inline void requestRoutesSystemHostLoggerLogEntry(App& app)
@@ -2387,7 +2387,7 @@ inline void requestRoutesSystemHostLoggerLogEntry(App& app)
// Requested ID was not found
messages::resourceNotFound(asyncResp->res, "LogEntry", param);
- });
+ });
}
inline void handleBMCLogServicesCollectionGet(
@@ -2459,7 +2459,7 @@ inline void handleBMCLogServicesCollectionGet(
asyncResp->res.jsonValue["Members@odata.count"] =
logServiceArrayLocal.size();
- });
+ });
#endif
}
@@ -2499,7 +2499,7 @@ inline void requestRoutesBMCJournalLogService(App& app)
asyncResp->res.jsonValue["Entries"]["@odata.id"] =
"/redfish/v1/Managers/bmc/LogServices/Journal/Entries";
- });
+ });
}
static int
@@ -2646,7 +2646,7 @@ inline void requestRoutesBMCJournalLogEntryCollection(App& app)
"/redfish/v1/Managers/bmc/LogServices/Journal/Entries?$skip=" +
std::to_string(skip + top);
}
- });
+ });
}
inline void requestRoutesBMCJournalLogEntry(App& app)
@@ -2718,7 +2718,7 @@ inline void requestRoutesBMCJournalLogEntry(App& app)
return;
}
asyncResp->res.jsonValue.update(bmcJournalLogEntry);
- });
+ });
}
inline void
@@ -2805,7 +2805,7 @@ inline void
break;
}
}
- });
+ });
}
inline void handleLogServicesDumpServiceGet(
@@ -3251,7 +3251,7 @@ inline void requestRoutesCrashdumpService(App& app)
asyncResp->res.jsonValue["Actions"]["#LogService.CollectDiagnosticData"]
["target"] =
"/redfish/v1/Systems/system/LogServices/Crashdump/Actions/LogService.CollectDiagnosticData";
- });
+ });
}
void inline requestRoutesCrashdumpClear(App& app)
@@ -3292,9 +3292,9 @@ void inline requestRoutesCrashdumpClear(App& app)
return;
}
messages::success(asyncResp->res);
- },
+ },
crashdumpObject, crashdumpPath, deleteAllInterface, "DeleteAll");
- });
+ });
}
static void
@@ -3441,8 +3441,8 @@ inline void requestRoutesCrashdumpEntryCollection(App& app)
logCrashdumpEntry(asyncResp, logID,
asyncResp->res.jsonValue["Members"]);
}
- });
});
+ });
}
inline void requestRoutesCrashdumpEntry(App& app)
@@ -3478,7 +3478,7 @@ inline void requestRoutesCrashdumpEntry(App& app)
}
const std::string& logID = param;
logCrashdumpEntry(asyncResp, logID, asyncResp->res.jsonValue);
- });
+ });
}
inline void requestRoutesCrashdumpFile(App& app)
@@ -3563,7 +3563,7 @@ inline void requestRoutesCrashdumpFile(App& app)
*crow::connections::systemBus, crashdumpObject,
crashdumpPath + std::string("/") + logID, crashdumpInterface,
std::move(getStoredLogCallback));
- });
+ });
}
enum class OEMDiagnosticType
@@ -3705,7 +3705,7 @@ inline void requestRoutesCrashdumpCollect(App& app)
taskData->state = "Completed";
}
return task::completed;
- },
+ },
taskMatchStr);
task->startTimer(std::chrono::minutes(5));
@@ -3716,7 +3716,7 @@ inline void requestRoutesCrashdumpCollect(App& app)
crow::connections::systemBus->async_method_call(
std::move(collectCrashdumpCallback), crashdumpObject, crashdumpPath,
iface, method);
- });
+ });
}
/**
@@ -3777,7 +3777,7 @@ inline void requestRoutesDBusLogServiceActionsClear(App& app)
respHandler, "xyz.openbmc_project.Logging",
"/xyz/openbmc_project/logging",
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
- });
+ });
}
/****************************************************
@@ -3829,7 +3829,7 @@ inline void requestRoutesPostCodesLogService(App& app)
asyncResp->res.jsonValue["Actions"]["#LogService.ClearLog"] = {
{"target",
"/redfish/v1/Systems/system/LogServices/PostCodes/Actions/LogService.ClearLog"}};
- });
+ });
}
inline void requestRoutesPostCodesClear(App& app)
@@ -3877,11 +3877,11 @@ inline void requestRoutesPostCodesClear(App& app)
return;
}
messages::success(asyncResp->res);
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.Collection.DeleteAll", "DeleteAll");
- });
+ });
}
/**
@@ -4094,7 +4094,7 @@ static void
messages::resourceNotFound(asyncResp->res, "LogEntry", entryId);
return;
}
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodesWithTimeStamp",
@@ -4150,7 +4150,7 @@ static void
"/redfish/v1/Systems/system/LogServices/PostCodes/Entries?$skip=" +
std::to_string(skip + top);
}
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodesWithTimeStamp",
@@ -4176,7 +4176,7 @@ static void
return;
}
getPostCodeForBoot(asyncResp, 1, bootCount, entryCount, skip, top);
- });
+ });
}
inline void requestRoutesPostCodesEntryCollection(App& app)
@@ -4224,7 +4224,7 @@ inline void requestRoutesPostCodesEntryCollection(App& app)
size_t skip = delegatedQuery.skip.value_or(0);
size_t top = delegatedQuery.top.value_or(query_param::Query::maxTop);
getCurrentBootNumber(asyncResp, skip, top);
- });
+ });
}
inline void requestRoutesPostCodesEntryAdditionalData(App& app)
@@ -4315,11 +4315,11 @@ inline void requestRoutesPostCodesEntryAdditionalData(App& app)
asyncResp->res.addHeader(
boost::beast::http::field::content_transfer_encoding, "Base64");
asyncResp->res.body() = crow::utility::base64encode(strData);
- },
+ },
"xyz.openbmc_project.State.Boot.PostCode0",
"/xyz/openbmc_project/State/Boot/PostCode0",
"xyz.openbmc_project.State.Boot.PostCode", "GetPostCodes", index);
- });
+ });
}
inline void requestRoutesPostCodesEntry(App& app)
@@ -4350,7 +4350,7 @@ inline void requestRoutesPostCodesEntry(App& app)
}
getPostCodeForEntry(asyncResp, targetID);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 32385de960..314099b5e9 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -75,7 +75,7 @@ inline void
}
messages::success(asyncResp->res);
- });
+ });
}
inline void
@@ -102,7 +102,7 @@ inline void
}
messages::success(asyncResp->res);
- });
+ });
}
/**
@@ -153,7 +153,7 @@ inline void requestRoutesManagerResetAction(App& app)
"ResetType");
return;
- });
+ });
}
/**
@@ -219,11 +219,11 @@ inline void requestRoutesManagerResetToDefaultsAction(App& app)
// Factory Reset doesn't actually happen until a reboot
// Can't erase what the BMC is running on
doBMCGracefulRestart(asyncResp);
- },
+ },
"xyz.openbmc_project.Software.BMC.Updater",
"/xyz/openbmc_project/software",
"xyz.openbmc_project.Common.FactoryReset", "Reset");
- });
+ });
}
/**
@@ -266,7 +266,7 @@ inline void requestRoutesManagerResetActionInfo(App& app)
parameters.emplace_back(std::move(parameter));
asyncResp->res.jsonValue["Parameters"] = std::move(parameters);
- });
+ });
}
static constexpr const char* objectManagerIface =
@@ -686,7 +686,7 @@ inline void
}
}
}
- });
+ });
}
enum class CreatePIDRet
@@ -806,7 +806,7 @@ inline CreatePIDRet createPidInterface(
return;
}
messages::success(response->res);
- },
+ },
"xyz.openbmc_project.EntityManager", path, iface, "Delete");
return CreatePIDRet::del;
}
@@ -1171,7 +1171,7 @@ struct GetPIDValues : std::enable_shared_from_this<GetPIDValues>
return;
}
self->complete.subtree = subtreeLocal;
- });
+ });
// at the same time get the selected profile
constexpr std::array<std::string_view, 1> thermalModeIfaces = {
@@ -1231,8 +1231,8 @@ struct GetPIDValues : std::enable_shared_from_this<GetPIDValues>
}
self->complete.currentProfile = *current;
self->complete.supportedProfiles = *supported;
- });
});
+ });
}
static void
@@ -1381,7 +1381,7 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
}
}
self->managedObj = mObj;
- });
+ });
// at the same time get the profile information
constexpr std::array<std::string_view, 1> thermalModeIfaces = {
@@ -1439,8 +1439,8 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
self->supportedProfiles = *supported;
self->profileConnection = owner;
self->profilePath = path;
- });
});
+ });
}
void pidSetDone()
{
@@ -1468,7 +1468,7 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
BMCWEB_LOG_ERROR("Error patching profile{}", ec);
messages::internalError(response->res);
}
- });
+ });
}
for (auto& containerPair : configuration)
@@ -1492,9 +1492,9 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
auto pathItr = std::ranges::find_if(
managedObj, [&dbusObjName](const auto& obj) {
- return boost::algorithm::ends_with(obj.first.str,
- "/" + dbusObjName);
- });
+ return boost::algorithm::ends_with(obj.first.str,
+ "/" + dbusObjName);
+ });
dbus::utility::DBusPropertiesMap output;
output.reserve(16); // The pid interface length
@@ -1606,7 +1606,7 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
return;
}
messages::success(response->res);
- });
+ });
}
}
else
@@ -1647,7 +1647,7 @@ struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
return;
}
messages::success(response->res);
- },
+ },
"xyz.openbmc_project.EntityManager", chassis,
"xyz.openbmc_project.AddObject", "AddObject", output);
}
@@ -1708,7 +1708,7 @@ inline void getLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
property;
- });
+ });
}
// avoid name collision systems.hpp
inline void
@@ -1735,7 +1735,7 @@ inline void
// Convert to ISO 8601 standard
asyncResp->res.jsonValue["LastResetTime"] =
redfish::time_utils::getDateTimeUint(lastResetTimeStamp);
- });
+ });
}
/**
@@ -1843,8 +1843,8 @@ inline void
return;
}
doBMCGracefulRestart(asyncResp);
- });
});
+ });
}
inline void setDateTime(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
@@ -1875,7 +1875,7 @@ inline void setDateTime(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
return;
}
asyncResp->res.jsonValue["DateTime"] = datetime;
- });
+ });
}
inline void
@@ -1898,7 +1898,7 @@ inline void
}
asyncResp->res.jsonValue["Status"]["Health"] = "OK";
asyncResp->res.jsonValue["Status"]["State"] = "Enabled";
- });
+ });
}
inline void requestRoutesManager(App& app)
@@ -2064,7 +2064,7 @@ inline void requestRoutesManager(App& app)
return;
}
checkForQuiesced(asyncResp);
- });
+ });
constexpr std::array<std::string_view, 1> interfaces = {
"xyz.openbmc_project.Inventory.Item.Bmc"};
@@ -2165,7 +2165,7 @@ inline void requestRoutesManager(App& app)
asyncResp->res.jsonValue["SparePartNumber"] =
*sparePartNumber;
}
- });
+ });
}
else if (interfaceName ==
"xyz.openbmc_project.Inventory.Decorator.LocationCode")
@@ -2173,8 +2173,8 @@ inline void requestRoutesManager(App& app)
getLocation(asyncResp, connectionName, path);
}
}
- });
});
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Managers/bmc/")
.privileges(redfish::privileges::patchManager)
@@ -2251,7 +2251,7 @@ inline void requestRoutesManager(App& app)
{
setDateTime(asyncResp, std::move(*datetime));
}
- });
+ });
}
inline void requestRoutesManagerCollection(App& app)
@@ -2276,6 +2276,6 @@ inline void requestRoutesManagerCollection(App& app)
nlohmann::json& bmc = members.emplace_back();
bmc["@odata.id"] = "/redfish/v1/Managers/bmc";
asyncResp->res.jsonValue["Members"] = std::move(members);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 45a3789f82..58d5178604 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -627,7 +627,7 @@ inline void getDimmDataByService(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
return;
}
assembleDimmProperties(dimmId, asyncResp, properties, ""_json_pointer);
- });
+ });
}
inline void assembleDimmPartitionData(
@@ -702,7 +702,7 @@ inline void getDimmPartitionData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
}
nlohmann::json::json_pointer regionPtr = "/Regions"_json_pointer;
assembleDimmPartitionData(asyncResp, properties, regionPtr);
- }
+ }
);
}
@@ -768,7 +768,7 @@ inline void getDimmData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
asyncResp->res.jsonValue["@odata.id"] =
boost::urls::format("/redfish/v1/Systems/system/Memory/{}", dimmId);
return;
- });
+ });
}
inline void requestRoutesMemoryCollection(App& app)
@@ -811,7 +811,7 @@ inline void requestRoutesMemoryCollection(App& app)
collection_util::getCollectionMembers(
asyncResp, boost::urls::url("/redfish/v1/Systems/system/Memory"),
interfaces, "/xyz/openbmc_project/inventory");
- });
+ });
}
inline void requestRoutesMemory(App& app)
@@ -846,7 +846,7 @@ inline void requestRoutesMemory(App& app)
}
getDimmData(asyncResp, dimmId);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/metric_report.hpp b/redfish-core/lib/metric_report.hpp
index 7543186bc1..3eb692776c 100644
--- a/redfish-core/lib/metric_report.hpp
+++ b/redfish-core/lib/metric_report.hpp
@@ -82,7 +82,7 @@ inline void requestRoutesMetricReportCollection(App& app)
boost::urls::url("/redfish/v1/TelemetryService/MetricReports"),
interfaces,
"/xyz/openbmc_project/Telemetry/Reports/TelemetryService");
- });
+ });
}
inline void requestRoutesMetricReport(App& app)
@@ -126,10 +126,10 @@ inline void requestRoutesMetricReport(App& app)
}
telemetry::fillReport(asyncResp->res.jsonValue, id, ret);
- });
- },
+ });
+ },
telemetry::service, reportPath, telemetry::reportInterface,
"Update");
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index e428161ebd..9812fceb70 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -748,7 +748,7 @@ class AddReport
}
messages::created(asyncResp->res);
- },
+ },
telemetry::service, "/xyz/openbmc_project/Telemetry/Reports",
"xyz.openbmc_project.Telemetry.ReportManager", "AddReport",
"TelemetryService/" + args.id, args.name, args.reportingType,
@@ -855,7 +855,7 @@ class UpdateMetrics
{
return;
}
- },
+ },
"xyz.openbmc_project.Telemetry", getDbusReportPath(id),
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Telemetry.Report", "ReadingParameters",
@@ -900,7 +900,7 @@ inline void
{
return;
}
- },
+ },
"xyz.openbmc_project.Telemetry", getDbusReportPath(id),
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Telemetry.Report", "Enabled",
@@ -917,7 +917,7 @@ inline void setReportTypeAndInterval(
{
return;
}
- },
+ },
"xyz.openbmc_project.Telemetry", getDbusReportPath(id),
"xyz.openbmc_project.Telemetry.Report", "SetReportingProperties",
reportingType, recurrenceInterval);
@@ -933,7 +933,7 @@ inline void
{
return;
}
- },
+ },
"xyz.openbmc_project.Telemetry", getDbusReportPath(id),
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Telemetry.Report", "ReportUpdates",
@@ -951,7 +951,7 @@ inline void
{
return;
}
- },
+ },
"xyz.openbmc_project.Telemetry", getDbusReportPath(id),
"org.freedesktop.DBus.Properties", "Set",
"xyz.openbmc_project.Telemetry.Report", "ReportActions",
@@ -1051,9 +1051,9 @@ inline void
return;
}
updateMetricsReq->insert(uriToDbus);
- });
+ });
}
- });
+ });
}
inline void handleMetricReportDefinitionCollectionHead(
@@ -1218,7 +1218,7 @@ inline void
return;
}
asyncResp->res.result(boost::beast::http::status::no_content);
- },
+ },
service, reportPath, "xyz.openbmc_project.Object.Delete", "Delete");
}
} // namespace telemetry
@@ -1263,7 +1263,7 @@ inline void handleMetricReportDefinitionsPost(
return;
}
addReportReq->insert(uriToDbus);
- });
+ });
}
}
@@ -1305,7 +1305,7 @@ inline void
}
telemetry::fillReportDefinition(asyncResp, id, properties);
- });
+ });
}
inline void handleMetricReportDelete(
@@ -1341,7 +1341,7 @@ inline void handleMetricReportDelete(
}
asyncResp->res.result(boost::beast::http::status::no_content);
- },
+ },
telemetry::service, reportPath, "xyz.openbmc_project.Object.Delete",
"Delete");
}
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 83b6b66664..151f993d61 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -116,7 +116,7 @@ void getEthernetIfaceData(CallbackFunc&& callback)
extractNTPServersAndDomainNamesData(dbusData, ntpServers, domainNames);
callback(true, ntpServers, domainNames);
- });
+ });
}
inline void afterNetworkPortRequest(
@@ -257,11 +257,11 @@ inline void handleNTPProtocolEnabled(
"/xyz/openbmc_project/time/sync_method",
"xyz.openbmc_project.Time.Synchronization", "TimeSyncMethod",
timeSyncMethod, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- messages::internalError(asyncResp->res);
- }
- });
+ if (ec)
+ {
+ messages::internalError(asyncResp->res);
+ }
+ });
}
inline void
@@ -377,11 +377,11 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
}
}
- });
+ });
}
inline void
@@ -417,7 +417,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
sdbusplus::asio::setProperty(
*crow::connections::systemBus, entry.second.begin()->first,
entry.first,
@@ -429,10 +429,10 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
}
- });
+ });
}
inline std::string getHostName()
@@ -471,7 +471,7 @@ inline void
{
asyncResp->res.jsonValue["NTP"]["ProtocolEnabled"] = false;
}
- });
+ });
}
inline std::string encodeServiceObjectPath(std::string_view serviceName)
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 3831e184a6..6bd74f9188 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -67,7 +67,7 @@ static inline void handlePCIeDevicePath(
return;
}
callback(pcieDevicePath, object.begin()->first);
- });
+ });
return;
}
@@ -96,7 +96,7 @@ static inline void getValidPCIeDevicePath(
handlePCIeDevicePath(pcieDeviceId, asyncResp, pcieDevicePaths,
callback);
return;
- });
+ });
}
static inline void handlePCIeDeviceCollectionGet(
@@ -254,7 +254,7 @@ inline void getPCIeDeviceSlotPath(
return;
}
callback(endpoints[0]);
- });
+ });
}
inline void
@@ -277,7 +277,7 @@ inline void
const boost::system::error_code& ec2,
const dbus::utility::DBusPropertiesMap& pcieSlotProperties) {
addPCIeSlotProperties(asyncResp->res, ec2, pcieSlotProperties);
- });
+ });
}
inline void afterGetPCIeDeviceSlotPath(
@@ -290,7 +290,7 @@ inline void afterGetPCIeDeviceSlotPath(
pcieDeviceSlot](const boost::system::error_code& ec,
const dbus::utility::MapperGetObject& object) {
afterGetDbusObject(asyncResp, pcieDeviceSlot, ec, object);
- });
+ });
}
inline void
@@ -317,7 +317,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["Health"] = "Critical";
}
- });
+ });
}
inline void
@@ -343,7 +343,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
inline void
@@ -408,7 +408,7 @@ inline void
{
asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
}
- });
+ });
}
inline void addPCIeDeviceProperties(
@@ -521,7 +521,7 @@ inline void getPCIeDeviceProperties(
return;
}
callback(pcieDevProperties);
- });
+ });
}
inline void addPCIeDeviceCommonProperties(
@@ -669,8 +669,8 @@ inline void handlePCIeFunctionCollectionGet(
const dbus::utility::DBusPropertiesMap& pcieDevProperties) {
addPCIeFunctionList(asyncResp->res, pcieDeviceId,
pcieDevProperties);
- });
});
+ });
}
inline void requestRoutesSystemPCIeFunctionCollection(App& app)
@@ -823,7 +823,7 @@ inline void
pcieFunctionId);
addPCIeFunctionProperties(asyncResp->res, pcieFunctionId,
pcieDevProperties);
- });
+ });
});
}
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index 92ae576c9a..b8e6389275 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -154,7 +154,7 @@ inline void onMapperAssociationDone(
[asyncResp](const boost::system::error_code& ec2,
const dbus::utility::DBusPropertiesMap& propertiesList) {
onPcieSlotGetAllDone(asyncResp, ec2, propertiesList);
- });
+ });
}
inline void
@@ -204,7 +204,7 @@ inline void
const dbus::utility::MapperEndPoints& endpoints) {
onMapperAssociationDone(asyncResp, chassisID, pcieSlotPath,
connectionName, ec2, endpoints);
- });
+ });
}
}
}
@@ -227,7 +227,7 @@ inline void handlePCIeSlotCollectionGet(
chassisID](const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
onMapperSubtreeDone(asyncResp, chassisID, ec, subtree);
- });
+ });
}
inline void requestRoutesPCIeSlots(App& app)
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index e7094ad05e..a39fab795f 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -110,8 +110,8 @@ inline void setPowerCapOverride(
}
sensorsAsyncResp->asyncResp->res.result(
boost::beast::http::status::no_content);
- });
});
+ });
};
redfish::chassis_utils::getValidChassisPath(sensorsAsyncResp->asyncResp,
sensorsAsyncResp->chassisId,
@@ -300,7 +300,7 @@ inline void requestRoutesPower(App& app)
dbus::utility::getSubTreePaths("/xyz/openbmc_project/inventory", 0,
interfaces, std::move(chassisHandler));
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Chassis/<str>/Power/")
.privileges(redfish::privileges::patchPower)
@@ -337,7 +337,7 @@ inline void requestRoutesPower(App& app)
allCollections.emplace("Voltages", *std::move(voltageCollections));
setSensorsOverride(sensorAsyncResp, allCollections);
}
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/power_supply.hpp b/redfish-core/lib/power_supply.hpp
index 0035b118f7..f59ed57d5f 100644
--- a/redfish-core/lib/power_supply.hpp
+++ b/redfish-core/lib/power_supply.hpp
@@ -89,7 +89,7 @@ inline void
}
updatePowerSupplyList(asyncResp, chassisId, subtreePaths);
- });
+ });
}
inline void handlePowerSupplyCollectionHead(
@@ -114,7 +114,7 @@ inline void handlePowerSupplyCollectionHead(
asyncResp->res.addHeader(
boost::beast::http::field::link,
"</redfish/v1/JsonSchemas/PowerSupplyCollection/PowerSupplyCollection.json>; rel=describedby");
- });
+ });
}
inline void handlePowerSupplyCollectionGet(
@@ -198,7 +198,7 @@ inline void getValidPowerSupplyPath(
powerSupplyId);
return;
}
- });
+ });
}
inline void
@@ -224,7 +224,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
inline void
@@ -250,7 +250,7 @@ inline void
{
asyncResp->res.jsonValue["Status"]["Health"] = "Critical";
}
- });
+ });
}
inline void
@@ -315,7 +315,7 @@ inline void
{
asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
}
- });
+ });
}
inline void getPowerSupplyFirmwareVersion(
@@ -338,7 +338,7 @@ inline void getPowerSupplyFirmwareVersion(
return;
}
asyncResp->res.jsonValue["FirmwareVersion"] = value;
- });
+ });
}
inline void
@@ -362,7 +362,7 @@ inline void
}
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
value;
- });
+ });
}
inline void handleGetEfficiencyResponse(
@@ -431,7 +431,7 @@ inline void handlePowerSupplyAttributesSubTreeResponse(
"xyz.openbmc_project.Control.PowerSupplyAttributes", "DeratingFactor",
[asyncResp](const boost::system::error_code& ec1, uint32_t value) {
handleGetEfficiencyResponse(asyncResp, ec1, value);
- });
+ });
}
inline void
@@ -445,7 +445,7 @@ inline void
[asyncResp](const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
handlePowerSupplyAttributesSubTreeResponse(asyncResp, ec, subtree);
- });
+ });
}
inline void
@@ -499,7 +499,7 @@ inline void
powerSupplyPath);
getPowerSupplyLocation(asyncResp, object.begin()->first,
powerSupplyPath);
- });
+ });
getEfficiencyPercent(asyncResp);
});
@@ -533,7 +533,7 @@ inline void
boost::beast::http::field::link,
"</redfish/v1/JsonSchemas/PowerSupply/PowerSupply.json>; rel=describedby");
});
- });
+ });
}
inline void
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 988d5cc256..6ddc901756 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -73,7 +73,7 @@ inline void getProcessorUUID(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
return;
}
asyncResp->res.jsonValue["UUID"] = property;
- });
+ });
}
inline void getCpuDataByInterface(
@@ -291,7 +291,7 @@ inline void getCpuDataByService(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
asyncResp->res.jsonValue["TotalCores"] = totalCores;
}
return;
- });
+ });
}
/**
@@ -385,7 +385,7 @@ inline void
[asyncResp](const boost::system::error_code& ec,
const dbus::utility::DBusPropertiesMap& properties) {
readThrottleProperties(asyncResp, ec, properties);
- });
+ });
}
inline void getCpuAssetData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
@@ -459,7 +459,7 @@ inline void getCpuAssetData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
{
asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber;
}
- });
+ });
}
inline void getCpuRevisionData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
@@ -495,7 +495,7 @@ inline void getCpuRevisionData(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
{
asyncResp->res.jsonValue["Version"] = *version;
}
- });
+ });
}
inline void getAcceleratorDataByService(
@@ -549,7 +549,7 @@ inline void getAcceleratorDataByService(
asyncResp->res.jsonValue["Status"]["State"] = state;
asyncResp->res.jsonValue["Status"]["Health"] = health;
asyncResp->res.jsonValue["ProcessorType"] = "Accelerator";
- });
+ });
}
// OperatingConfig D-Bus Types
@@ -691,7 +691,7 @@ inline void
}
highSpeedCoreIdsHandler(asyncResp, baseSpeedList);
- });
+ });
}
if (baseSpeedPriorityEnabled != nullptr)
@@ -699,7 +699,7 @@ inline void
json["BaseSpeedPriorityState"] =
*baseSpeedPriorityEnabled ? "Enabled" : "Disabled";
}
- });
+ });
}
/**
@@ -729,7 +729,7 @@ inline void getCpuLocationCode(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
asyncResp->res.jsonValue["Location"]["PartLocation"]["ServiceLabel"] =
property;
- });
+ });
}
/**
@@ -759,7 +759,7 @@ inline void getCpuUniqueId(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
asyncResp->res
.jsonValue["ProcessorId"]["ProtectedIdentificationNumber"] = id;
- });
+ });
}
/**
@@ -838,7 +838,7 @@ inline void getProcessorObject(const std::shared_ptr<bmcweb::AsyncResp>& resp,
return;
}
messages::resourceNotFound(resp->res, "Processor", processorId);
- });
+ });
}
inline void
@@ -1001,7 +1001,7 @@ inline void
baseSpeedArray.emplace_back(std::move(speed));
}
}
- });
+ });
}
/**
@@ -1128,7 +1128,7 @@ inline void patchAppliedOperatingConfig(
[resp, appliedConfigUri](const boost::system::error_code& ec,
const sdbusplus::message_t& msg) {
handleAppliedConfigResponse(resp, appliedConfigUri, ec, msg);
- });
+ });
}
inline void
@@ -1224,9 +1224,8 @@ inline void requestRoutesOperatingConfigCollection(App& app)
// Use the common search routine to construct the
// Collection of all Config objects under this CPU.
- constexpr std::array<std::string_view, 1> interface {
- "xyz.openbmc_project.Inventory.Item.Cpu.OperatingConfig"
- };
+ constexpr std::array<std::string_view, 1> interface{
+ "xyz.openbmc_project.Inventory.Item.Cpu.OperatingConfig"};
collection_util::getCollectionMembers(
asyncResp,
boost::urls::format(
@@ -1235,8 +1234,8 @@ inline void requestRoutesOperatingConfigCollection(App& app)
interface, object);
return;
}
- });
});
+ });
}
inline void requestRoutesOperatingConfig(App& app)
@@ -1309,8 +1308,8 @@ inline void requestRoutesOperatingConfig(App& app)
}
messages::resourceNotFound(asyncResp->res, "OperatingConfig",
configName);
- });
});
+ });
}
inline void requestRoutesProcessorCollection(App& app)
@@ -1363,7 +1362,7 @@ inline void requestRoutesProcessorCollection(App& app)
asyncResp,
boost::urls::url("/redfish/v1/Systems/system/Processors"),
processorInterfaces, "/xyz/openbmc_project/inventory");
- });
+ });
}
inline void requestRoutesProcessor(App& app)
@@ -1413,7 +1412,7 @@ inline void requestRoutesProcessor(App& app)
getProcessorObject(
asyncResp, processorId,
std::bind_front(getProcessorData, asyncResp, processorId));
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Systems/<str>/Processors/<str>/")
.privileges(redfish::privileges::patchProcessor)
@@ -1463,7 +1462,7 @@ inline void requestRoutesProcessor(App& app)
asyncResp, processorId,
appliedConfigUri));
}
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index 4806cb46bf..7a96481782 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -94,7 +94,7 @@ void getMainChassisId(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
std::string chassisId = subtree[0].first.substr(idPos + 1);
BMCWEB_LOG_DEBUG("chassisId = {}", chassisId);
callback(chassisId, asyncResp);
- });
+ });
}
template <typename CallbackFunc>
@@ -171,7 +171,7 @@ void getPortStatusAndPath(
socketData,
[&kv](const std::tuple<std::string, std::string, bool>& i) {
return std::get<1>(i) == kv.first;
- });
+ });
if (find != socketData.end())
{
// It only takes one enabled systemd service to consider a
@@ -199,7 +199,7 @@ void getPortStatusAndPath(
}
callback(ec, socketData);
- },
+ },
"org.freedesktop.systemd1", "/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager", "ListUnits");
}
@@ -253,7 +253,7 @@ void getPortNumber(const std::string& socketPath, CallbackFunc&& callback)
BMCWEB_LOG_ERROR("{}", ec3);
}
callback(ec, port);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index 784f716a7f..7cd55b2317 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -97,7 +97,7 @@ inline void requestRoutesRoles(App& app)
asyncResp->res.jsonValue["@odata.id"] =
boost::urls::format("/redfish/v1/AccountService/Roles/{}", roleId);
asyncResp->res.jsonValue["AssignedPrivileges"] = std::move(privArray);
- });
+ });
}
inline void requestRoutesRoleCollection(App& app)
@@ -145,8 +145,8 @@ inline void requestRoutesRoleCollection(App& app)
}
asyncResp->res.jsonValue["Members@odata.count"] =
memberArray.size();
- });
});
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index f1cf96c4aa..aec1ebe22e 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -410,7 +410,7 @@ void getObjectsWithConnection(
BMCWEB_LOG_DEBUG("Found {} connections", connections.size());
callback(std::move(connections), std::move(objectsWithConnection));
BMCWEB_LOG_DEBUG("getObjectsWithConnection resp_handler exit");
- });
+ });
BMCWEB_LOG_DEBUG("getObjectsWithConnection exit");
}
@@ -587,8 +587,8 @@ void getChassis(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
&nodeSensorList, culledSensorList);
BMCWEB_LOG_DEBUG("Finishing with {}", culledSensorList->size());
callback(culledSensorList);
- });
});
+ });
BMCWEB_LOG_DEBUG("getChassis exit");
}
@@ -1019,9 +1019,9 @@ inline void populateFanRedundancy(
}
auto found = std::ranges::find_if(
endpoints, [sensorsAsyncResp](const std::string& entry) {
- return entry.find(sensorsAsyncResp->chassisId) !=
- std::string::npos;
- });
+ return entry.find(sensorsAsyncResp->chassisId) !=
+ std::string::npos;
+ });
if (found == endpoints.end())
{
@@ -1106,8 +1106,8 @@ inline void populateFanRedundancy(
itemName.end(), '_', ' ');*/
auto schemaItem = std::ranges::find_if(
fanRedfish, [itemName](const nlohmann::json& fan) {
- return fan["Name"] == itemName;
- });
+ return fan["Name"] == itemName;
+ });
if (schemaItem != fanRedfish.end())
{
nlohmann::json::object_t collectionId;
@@ -1149,10 +1149,10 @@ inline void populateFanRedundancy(
redundancy["Status"]["State"] = "Enabled";
jResp.emplace_back(std::move(redundancy));
- });
});
+ });
}
- });
+ });
}
inline void
@@ -1486,7 +1486,7 @@ static void getInventoryItemsData(
invConnectionsIndex + 1);
BMCWEB_LOG_DEBUG("getInventoryItemsData respHandler exit");
- });
+ });
}
BMCWEB_LOG_DEBUG("getInventoryItemsData exit");
@@ -1568,7 +1568,7 @@ static void getInventoryItemsConnections(
callback(invConnections);
BMCWEB_LOG_DEBUG("getInventoryItemsConnections respHandler exit");
- });
+ });
BMCWEB_LOG_DEBUG("getInventoryItemsConnections exit");
}
@@ -1712,7 +1712,7 @@ static void getInventoryItemAssociations(
}
callback(inventoryItems);
BMCWEB_LOG_DEBUG("getInventoryItemAssociations respHandler exit");
- });
+ });
BMCWEB_LOG_DEBUG("getInventoryItemAssociations exit");
}
@@ -1902,7 +1902,7 @@ void getInventoryLeds(
getInventoryLedData(sensorsAsyncResp, inventoryItems, ledConnections,
std::move(callback));
BMCWEB_LOG_DEBUG("getInventoryLeds respHandler exit");
- });
+ });
BMCWEB_LOG_DEBUG("getInventoryLeds exit");
}
@@ -1953,10 +1953,10 @@ void getPowerSupplyAttributesData(
const std::string& psAttributesConnection = (*it).second;
// Response handler for Get DeratingFactor property
- auto respHandler =
- [sensorsAsyncResp, inventoryItems,
- callback{std::forward<Callback>(callback)}](
- const boost::system::error_code& ec, const uint32_t value) {
+ auto respHandler = [sensorsAsyncResp, inventoryItems,
+ callback{std::forward<Callback>(callback)}](
+ const boost::system::error_code& ec,
+ const uint32_t value) {
BMCWEB_LOG_DEBUG("getPowerSupplyAttributesData respHandler enter");
if (ec)
{
@@ -2086,7 +2086,7 @@ void getPowerSupplyAttributes(
psAttributesConnections,
std::move(callback));
BMCWEB_LOG_DEBUG("getPowerSupplyAttributes respHandler exit");
- });
+ });
BMCWEB_LOG_DEBUG("getPowerSupplyAttributes exit");
}
@@ -2473,7 +2473,7 @@ inline void getSensorData(
}
}
BMCWEB_LOG_DEBUG("getManagedObjectsCb exit");
- });
+ });
}
BMCWEB_LOG_DEBUG("getSensorData exit");
}
@@ -2717,7 +2717,7 @@ inline void setSensorsOverride(
messages::internalError(
sensorAsyncResp->asyncResp->res);
}
- });
+ });
}
};
// Get object with connection for the given sensor name
@@ -2878,7 +2878,7 @@ inline void
std::string type = path.filename();
objectPropertiesToJson(name, type, sensors::node::sensors, valuesDict,
asyncResp->res.jsonValue, nullptr);
- });
+ });
}
inline void handleSensorGet(App& app, const crow::Request& req,
@@ -2930,7 +2930,7 @@ inline void handleSensorGet(App& app, const crow::Request& req,
}
getSensorFromDbus(asyncResp, sensorPath, subtree);
BMCWEB_LOG_DEBUG("respHandler1 exit");
- });
+ });
}
} // namespace sensors
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 74c88f7bce..9f3512f427 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -64,9 +64,8 @@ inline void handleSystemsStorageCollectionGet(
"/redfish/v1/Systems/system/Storage";
asyncResp->res.jsonValue["Name"] = "Storage Collection";
- constexpr std::array<std::string_view, 1> interface {
- "xyz.openbmc_project.Inventory.Item.Storage"
- };
+ constexpr std::array<std::string_view, 1> interface{
+ "xyz.openbmc_project.Inventory.Item.Storage"};
collection_util::getCollectionMembers(
asyncResp, boost::urls::format("/redfish/v1/Systems/system/Storage"),
interface, "/xyz/openbmc_project/inventory");
@@ -84,9 +83,8 @@ inline void handleStorageCollectionGet(
"#StorageCollection.StorageCollection";
asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Storage";
asyncResp->res.jsonValue["Name"] = "Storage Collection";
- constexpr std::array<std::string_view, 1> interface {
- "xyz.openbmc_project.Inventory.Item.Storage"
- };
+ constexpr std::array<std::string_view, 1> interface{
+ "xyz.openbmc_project.Inventory.Item.Storage"};
collection_util::getCollectionMembers(
asyncResp, boost::urls::format("/redfish/v1/Storage"), interface,
"/xyz/openbmc_project/inventory");
@@ -174,7 +172,7 @@ inline void afterSystemsStorageGetSubtree(
dbus::utility::MapperServiceMap>& object) {
return sdbusplus::message::object_path(object.first).filename() ==
storageId;
- });
+ });
if (storage == subtree.end())
{
messages::resourceNotFound(asyncResp->res, "#Storage.v1_13_0.Storage",
@@ -243,7 +241,7 @@ inline void afterSubtree(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
dbus::utility::MapperServiceMap>& object) {
return sdbusplus::message::object_path(object.first).filename() ==
storageId;
- });
+ });
if (storage == subtree.end())
{
messages::resourceNotFound(asyncResp->res, "#Storage.v1_13_0.Storage",
@@ -352,7 +350,7 @@ inline void getDriveAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Model"] = *model;
}
- });
+ });
}
inline void getDrivePresent(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -375,7 +373,7 @@ inline void getDrivePresent(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
}
inline void getDriveState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -401,7 +399,7 @@ inline void getDriveState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
{
asyncResp->res.jsonValue["Status"]["State"] = "Updating";
}
- });
+ });
}
inline std::optional<drive::MediaType> convertDriveType(std::string_view type)
@@ -612,7 +610,7 @@ inline void
// to the user in unencrypted form."
asyncResp->res.jsonValue["EncryptionStatus"] =
drive::EncryptionStatus::Unlocked;
- });
+ });
}
static void addAllDriveInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -659,7 +657,7 @@ inline void afterGetSubtreeSystemsStorageDrive(
dbus::utility::MapperServiceMap>& object) {
return sdbusplus::message::object_path(object.first).filename() ==
driveId;
- });
+ });
if (drive == subtree.end())
{
@@ -813,9 +811,9 @@ inline void afterChassisDriveCollectionSubtreeGet(
// navigation links will be registered in next patch set
}
asyncResp->res.jsonValue["Members@odata.count"] = resp.size();
- }); // end association lambda
+ }); // end association lambda
- } // end Iterate over all retrieved ObjectPaths
+ } // end Iterate over all retrieved ObjectPaths
}
/**
* Chassis drives, this URL will show all the DriveCollection
@@ -919,7 +917,7 @@ inline void
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
buildDrive(asyncResp, chassisId, driveName, ec, subtree);
- });
+ });
}
}
@@ -974,10 +972,10 @@ inline void
return; // no drives = no failures
}
matchAndFillDrive(asyncResp, chassisId, driveName, resp);
- });
+ });
break;
}
- });
+ });
}
/**
@@ -1066,7 +1064,7 @@ inline void populateStorageController(
{
asyncResp->res.jsonValue["Status"]["State"] = "Absent";
}
- });
+ });
sdbusplus::asio::getAllProperties(
*crow::connections::systemBus, connectionName, path,
@@ -1076,7 +1074,7 @@ inline void populateStorageController(
std::pair<std::string, dbus::utility::DbusVariantType>>&
propertiesList) {
getStorageControllerAsset(asyncResp, ec, propertiesList);
- });
+ });
}
inline void getStorageControllerHandler(
@@ -1183,7 +1181,7 @@ inline void handleSystemsStorageControllerCollectionGet(
const dbus::utility::MapperGetSubTreePathsResponse&
controllerList) {
populateStorageControllerCollection(asyncResp, ec, controllerList);
- });
+ });
}
inline void handleSystemsStorageControllerGet(
@@ -1211,7 +1209,7 @@ inline void handleSystemsStorageControllerGet(
controllerId](const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree) {
getStorageControllerHandler(asyncResp, controllerId, ec, subtree);
- });
+ });
}
inline void requestRoutesStorageControllerCollection(App& app)
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 4502226b8a..d8cf644cb5 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -238,7 +238,7 @@ inline void
return;
}
getProcessorProperties(asyncResp, properties);
- });
+ });
}
/*
@@ -276,7 +276,7 @@ inline void
return;
}
updateDimmProperties(asyncResp, dimmState);
- });
+ });
}
return;
}
@@ -343,7 +343,7 @@ inline void
return;
}
processMemoryProperties(asyncResp, service, path, properties);
- });
+ });
}
/*
@@ -485,7 +485,7 @@ inline void
BMCWEB_LOG_DEBUG("UUID = {}", valueStr);
asyncResp->res.jsonValue["UUID"] = valueStr;
}
- });
+ });
}
else if (interfaceName ==
"xyz.openbmc_project.Inventory.Item.System")
@@ -559,7 +559,7 @@ inline void
sw_util::populateSoftwareInformation(
asyncResp, sw_util::biosPurpose, "BiosVersion",
false);
- });
+ });
sdbusplus::asio::getProperty<std::string>(
*crow::connections::systemBus, connection.first,
@@ -577,12 +577,12 @@ inline void
}
asyncResp->res.jsonValue["AssetTag"] = value;
- });
+ });
}
}
}
}
- });
+ });
}
/**
@@ -652,7 +652,7 @@ inline void getHostState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
asyncResp->res.jsonValue["PowerState"] = "Off";
asyncResp->res.jsonValue["Status"]["State"] = "Disabled";
}
- });
+ });
}
/**
@@ -901,7 +901,7 @@ inline void getBootProgress(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
asyncResp->res.jsonValue["BootProgress"]["LastState"] =
dbusToRfBootProgress(bootProgressStr);
- });
+ });
}
/**
@@ -935,7 +935,7 @@ inline void getBootProgressLastStateTime(
// Convert to ISO 8601 standard
asyncResp->res.jsonValue["BootProgress"]["LastStateTime"] =
redfish::time_utils::getDateTimeUintUs(lastStateTime);
- });
+ });
}
/**
@@ -976,7 +976,7 @@ inline void
}
asyncResp->res.jsonValue["Boot"]["BootSourceOverrideMode"] = rfType;
- });
+ });
}
/**
@@ -1020,7 +1020,7 @@ inline void
rfMode;
}
}
- });
+ });
}
/**
@@ -1063,7 +1063,7 @@ inline void
// Get BootMode as BootSourceOverrideTarget is constructed
// from both BootSource and BootMode
getBootOverrideMode(asyncResp);
- });
+ });
}
/**
@@ -1111,7 +1111,7 @@ inline void processBootOverrideEnable(
asyncResp->res.jsonValue["Boot"]["BootSourceOverrideEnabled"] =
"Continuous";
}
- });
+ });
}
/**
@@ -1143,7 +1143,7 @@ inline void
}
processBootOverrideEnable(asyncResp, bootOverrideEnable);
- });
+ });
}
/**
@@ -1199,7 +1199,7 @@ inline void
// Convert to ISO 8601 standard
asyncResp->res.jsonValue["LastResetTime"] =
redfish::time_utils::getDateTimeUint(lastResetTimeStamp);
- });
+ });
}
/**
@@ -1261,7 +1261,7 @@ inline void getAutomaticRebootAttempts(
asyncResp->res.jsonValue["Boot"]["AutomaticRetryAttempts"] =
*retryAttempts;
}
- });
+ });
}
/**
@@ -1311,7 +1311,7 @@ inline void
asyncResp->res
.jsonValue["Boot"]["AutomaticRetryConfig@Redfish.AllowableValues"] =
{"Disabled", "RetryAttempts"};
- });
+ });
}
/**
@@ -1333,14 +1333,14 @@ inline void setAutomaticRetryAttempts(
"/xyz/openbmc_project/state/host0",
"xyz.openbmc_project.Control.Boot.RebootAttempts", "RetryAttempts",
retryAttempts, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR(
- "DBUS response error: Set setAutomaticRetryAttempts{}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR(
+ "DBUS response error: Set setAutomaticRetryAttempts{}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ });
}
inline computer_system::PowerRestorePolicyTypes
@@ -1399,7 +1399,7 @@ inline void
}
asyncResp->res.jsonValue["PowerRestorePolicy"] = restore;
- });
+ });
}
/**
@@ -1437,7 +1437,7 @@ inline void
{
asyncResp->res.jsonValue["Boot"]["StopBootOnFault"] = "Never";
}
- });
+ });
}
/**
@@ -1522,8 +1522,8 @@ inline void getTrustedModuleRequiredToBoot(
.jsonValue["Boot"]["TrustedModuleRequiredToBoot"] =
"Disabled";
}
- });
});
+ });
}
/**
@@ -1604,8 +1604,8 @@ inline void setTrustedModuleRequiredToBoot(
return;
}
BMCWEB_LOG_DEBUG("Set TrustedModuleRequiredToBoot done.");
- });
});
+ });
}
/**
@@ -1666,7 +1666,7 @@ inline void setBootType(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
BMCWEB_LOG_DEBUG("Boot type update done.");
- });
+ });
}
/**
@@ -1729,7 +1729,7 @@ inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
BMCWEB_LOG_DEBUG("Boot override enable update done.");
- });
+ });
if (!bootOverrideEnable)
{
@@ -1753,7 +1753,7 @@ inline void setBootEnable(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
return;
}
BMCWEB_LOG_DEBUG("Boot one_time update done.");
- });
+ });
}
/**
@@ -1806,7 +1806,7 @@ inline void
return;
}
BMCWEB_LOG_DEBUG("Boot source update done.");
- });
+ });
sdbusplus::asio::setProperty(
*crow::connections::systemBus, "xyz.openbmc_project.Settings",
@@ -1820,7 +1820,7 @@ inline void
return;
}
BMCWEB_LOG_DEBUG("Boot mode update done.");
- });
+ });
}
/**
@@ -1906,15 +1906,15 @@ inline void setAssetTag(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
*crow::connections::systemBus, service, path,
"xyz.openbmc_project.Inventory.Decorator.AssetTag", "AssetTag",
assetTag, [asyncResp](const boost::system::error_code& ec2) {
- if (ec2)
- {
- BMCWEB_LOG_ERROR("D-Bus response error on AssetTag Set {}",
- ec2);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec2)
+ {
+ BMCWEB_LOG_ERROR("D-Bus response error on AssetTag Set {}",
+ ec2);
+ messages::internalError(asyncResp->res);
+ return;
+ }
});
+ });
}
/**
@@ -1971,16 +1971,16 @@ inline void
"/xyz/openbmc_project/logging/settings",
"xyz.openbmc_project.Logging.Settings", "QuiesceOnHwError",
*stopBootEnabled, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
+ if (ec)
+ {
+ if (ec.value() != EBADR)
{
- if (ec.value() != EBADR)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec);
- messages::internalError(asyncResp->res);
- }
- return;
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec);
+ messages::internalError(asyncResp->res);
}
- });
+ return;
+ }
+ });
}
/**
@@ -2022,13 +2022,13 @@ inline void
"/xyz/openbmc_project/control/host0/auto_reboot",
"xyz.openbmc_project.Control.Boot.RebootPolicy", "AutoReboot",
autoRebootEnabled, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ });
}
inline std::string dbusPowerRestorePolicyFromRedfish(std::string_view policy)
@@ -2076,13 +2076,13 @@ inline void
"/xyz/openbmc_project/control/host0/power_restore_policy",
"xyz.openbmc_project.Control.Power.RestorePolicy", "PowerRestorePolicy",
powerRestorePolicy, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ });
}
#ifdef BMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE
@@ -2150,7 +2150,7 @@ inline void getProvisioningStatus(std::shared_ptr<bmcweb::AsyncResp> asyncResp)
{
oemPFR["ProvisioningStatus"] = "NotProvisioned";
}
- });
+ });
}
#endif
@@ -2269,8 +2269,8 @@ inline void getPowerMode(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
BMCWEB_LOG_DEBUG("Current power mode: {}", pmode);
translatePowerMode(asyncResp, pmode);
- });
});
+ });
}
/**
@@ -2389,8 +2389,8 @@ inline void setPowerMode(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
messages::internalError(asyncResp->res);
return;
}
- });
});
+ });
}
/**
@@ -2514,7 +2514,7 @@ inline void
}
hostWatchdogTimer["TimeoutAction"] = action;
}
- });
+ });
}
/**
@@ -2552,13 +2552,13 @@ inline void
"/xyz/openbmc_project/watchdog/host0",
"xyz.openbmc_project.State.Watchdog", "ExpireAction",
wdtTimeOutActStr, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ });
}
if (wdtEnable)
@@ -2574,7 +2574,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
}
@@ -2721,8 +2721,8 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
});
+ });
BMCWEB_LOG_DEBUG("EXIT: Get idle power saver parameters");
}
@@ -2809,13 +2809,13 @@ inline void
*crow::connections::systemBus, service, path,
"xyz.openbmc_project.Control.Power.IdlePowerSaver", "Enabled",
*ipsEnable, [asyncResp](const boost::system::error_code& ec2) {
- if (ec2)
- {
- BMCWEB_LOG_ERROR("DBUS response error {}", ec2);
- messages::internalError(asyncResp->res);
- return;
- }
- });
+ if (ec2)
+ {
+ BMCWEB_LOG_ERROR("DBUS response error {}", ec2);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ });
}
if (ipsEnterUtil)
{
@@ -2830,7 +2830,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
if (ipsEnterTime)
{
@@ -2847,7 +2847,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
if (ipsExitUtil)
{
@@ -2862,7 +2862,7 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
if (ipsExitTime)
{
@@ -2879,9 +2879,9 @@ inline void
messages::internalError(asyncResp->res);
return;
}
- });
+ });
}
- });
+ });
BMCWEB_LOG_DEBUG("EXIT: Set idle power saver parameters");
}
@@ -2956,7 +2956,7 @@ inline void handleComputerSystemCollectionGet(
nlohmann::json::object_t hypervisor;
hypervisor["@odata.id"] = "/redfish/v1/Systems/hypervisor";
ifaceArray2.emplace_back(std::move(hypervisor));
- });
+ });
}
/**
@@ -2979,7 +2979,7 @@ inline void doNMI(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
return;
}
messages::success(asyncResp->res);
- },
+ },
serviceName, objectPath, interfaceName, method);
}
@@ -3113,7 +3113,7 @@ inline void handleComputerSystemResetActionPost(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
else
{
@@ -3131,7 +3131,7 @@ inline void handleComputerSystemResetActionPost(
return;
}
messages::success(asyncResp->res);
- });
+ });
}
}
@@ -3307,7 +3307,7 @@ inline void
}
health->inventory = resp;
- });
+ });
health->populate();
}
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 40e1a51531..136412c369 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -298,7 +298,7 @@ struct TaskData : std::enable_shared_from_this<TaskData>
[self] { self->match.reset(); });
return;
}
- });
+ });
extendTimer(timeout);
messages.emplace_back(messages::taskStarted(std::to_string(index)));
@@ -348,7 +348,7 @@ inline void requestRoutesTaskMonitor(App& app)
// we compare against the string version as on failure
// strtoul returns 0
return std::to_string(task->index) == strParam;
- });
+ });
if (find == task::tasks.end())
{
@@ -363,7 +363,7 @@ inline void requestRoutesTaskMonitor(App& app)
return;
}
ptr->populateResp(asyncResp->res);
- });
+ });
}
inline void requestRoutesTask(App& app)
@@ -389,7 +389,7 @@ inline void requestRoutesTask(App& app)
// we compare against the string version as on failure
// strtoul returns 0
return std::to_string(task->index) == strParam;
- });
+ });
if (find == task::tasks.end())
{
@@ -433,7 +433,7 @@ inline void requestRoutesTask(App& app)
2, ' ', true, nlohmann::json::error_handler_t::replace);
}
asyncResp->res.jsonValue["PercentComplete"] = ptr->percentComplete;
- });
+ });
}
inline void requestRoutesTaskCollection(App& app)
@@ -467,7 +467,7 @@ inline void requestRoutesTaskCollection(App& app)
std::to_string(task->index));
members.emplace_back(std::move(member));
}
- });
+ });
}
inline void requestRoutesTaskService(App& app)
@@ -501,7 +501,7 @@ inline void requestRoutesTaskService(App& app)
asyncResp->res.jsonValue["ServiceEnabled"] = true;
asyncResp->res.jsonValue["Tasks"]["@odata.id"] =
"/redfish/v1/TaskService/Tasks";
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/telemetry_service.hpp b/redfish-core/lib/telemetry_service.hpp
index 42e66c9a0e..724e8aad27 100644
--- a/redfish-core/lib/telemetry_service.hpp
+++ b/redfish-core/lib/telemetry_service.hpp
@@ -87,7 +87,7 @@ inline void handleTelemetryServiceGet(
asyncResp->res.jsonValue["SupportedCollectionFunctions"] =
std::move(supportedCollectionFunctions);
- });
+ });
}
inline void requestRoutesTelemetryService(App& app)
diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
index cc548e17d0..9d057f2cb8 100644
--- a/redfish-core/lib/thermal.hpp
+++ b/redfish-core/lib/thermal.hpp
@@ -42,7 +42,7 @@ inline void requestRoutesThermal(App& app)
// TODO Need to get Chassis Redundancy information.
getChassisData(sensorAsyncResp);
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/Chassis/<str>/Thermal/")
.privileges(redfish::privileges::patchThermal)
@@ -86,7 +86,7 @@ inline void requestRoutesThermal(App& app)
allCollections.emplace("Fans", *std::move(fanCollections));
}
setSensorsOverride(sensorsAsyncResp, allCollections);
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
index 3388580cdc..a6d2254310 100644
--- a/redfish-core/lib/trigger.hpp
+++ b/redfish-core/lib/trigger.hpp
@@ -942,7 +942,7 @@ inline void handleTriggerCollectionPost(
[asyncResp, id = ctx.id](const boost::system::error_code& ec,
const std::string& dbusPath) {
afterCreateTrigger(ec, dbusPath, asyncResp, id);
- },
+ },
service, "/xyz/openbmc_project/Telemetry/Triggers",
"xyz.openbmc_project.Telemetry.TriggerManager", "AddTrigger",
"TelemetryService/" + ctx.id, ctx.name, ctx.actions, ctx.sensors,
@@ -974,7 +974,7 @@ inline void requestRoutesTriggerCollection(App& app)
boost::urls::url("/redfish/v1/TelemetryService/Triggers"),
interfaces,
"/xyz/openbmc_project/Telemetry/Triggers/TelemetryService");
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/Triggers/")
.privileges(redfish::privileges::postTriggersCollection)
@@ -1018,8 +1018,8 @@ inline void requestRoutesTrigger(App& app)
{
messages::internalError(asyncResp->res);
}
- });
});
+ });
BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/Triggers/<str>/")
.privileges(redfish::privileges::deleteTriggers)
@@ -1049,10 +1049,10 @@ inline void requestRoutesTrigger(App& app)
}
asyncResp->res.result(boost::beast::http::status::no_content);
- },
+ },
telemetry::service, triggerPath,
"xyz.openbmc_project.Object.Delete", "Delete");
- });
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index caaa694436..2f0cc47021 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -74,7 +74,7 @@ inline static void activateImage(const std::string& objPath,
BMCWEB_LOG_DEBUG("error_code = {}", ec);
BMCWEB_LOG_DEBUG("error msg = {}", ec.message());
}
- });
+ });
}
// Note that asyncResp can be either a valid pointer or nullptr. If nullptr
@@ -248,7 +248,7 @@ static void
// unless it is an error
return !task::completed;
- },
+ },
"type='signal',interface='org.freedesktop.DBus.Properties',"
"member='PropertiesChanged',path='" +
objPath.str + "'");
@@ -257,7 +257,7 @@ static void
task->payload.emplace(std::move(payload));
}
fwUpdateInProgress = false;
- });
+ });
break;
}
@@ -549,13 +549,13 @@ inline void requestRoutesUpdateServiceActionsSimpleUpdate(App& app)
{
BMCWEB_LOG_DEBUG("Call to DownloaViaTFTP Success");
}
- },
+ },
"xyz.openbmc_project.Software.Download",
"/xyz/openbmc_project/software", "xyz.openbmc_project.Common.TFTP",
"DownloadViaTFTP", fwFile, tftpServer);
BMCWEB_LOG_DEBUG("Exit UpdateService.SimpleUpdate doPost");
- });
+ });
}
inline void uploadImageFile(crow::Response& res, std::string_view body)
@@ -607,14 +607,14 @@ inline void setApplyTime(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
"/xyz/openbmc_project/software/apply_time",
"xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime",
applyTimeNewVal, [asyncResp](const boost::system::error_code& ec) {
- if (ec)
- {
- BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
- messages::internalError(asyncResp->res);
- return;
- }
- messages::success(asyncResp->res);
- });
+ if (ec)
+ {
+ BMCWEB_LOG_ERROR("D-Bus responses error: {}", ec);
+ messages::internalError(asyncResp->res);
+ return;
+ }
+ messages::success(asyncResp->res);
+ });
}
inline void
@@ -816,8 +816,8 @@ inline void requestRoutesUpdateService(App& app)
["HttpPushUriApplyTime"]["ApplyTime"] =
"OnReset";
}
- });
});
+ });
BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/")
.privileges(redfish::privileges::patchUpdateService)
.methods(boost::beast::http::verb::patch)(
@@ -860,7 +860,7 @@ inline void requestRoutesUpdateService(App& app)
}
}
}
- });
+ });
BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/update/")
.privileges(redfish::privileges::postUpdateService)
@@ -891,7 +891,7 @@ inline void requestRoutesSoftwareInventoryCollection(App& app)
asyncResp,
boost::urls::url("/redfish/v1/UpdateService/FirmwareInventory"),
iface, "/xyz/openbmc_project/software");
- });
+ });
}
/* Fill related item links (i.e. bmc, bios) in for inventory */
inline static void
@@ -991,7 +991,7 @@ inline void
std::string formatDesc = swInvPurpose->substr(endDesc);
asyncResp->res.jsonValue["Description"] = formatDesc + " image";
getRelatedItems(asyncResp, *swInvPurpose);
- });
+ });
}
inline void requestRoutesSoftwareInventory(App& app)
@@ -1065,8 +1065,8 @@ inline void requestRoutesSoftwareInventory(App& app)
asyncResp->res.jsonValue["Updateable"] = false;
sw_util::getSwUpdatableStatus(asyncResp, swId);
- });
});
+ });
}
} // namespace redfish
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 95cbdf146f..9784d37724 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -120,7 +120,7 @@ inline void
BMCWEB_LOG_DEBUG("Parent item not found");
asyncResp->res.result(boost::beast::http::status::not_found);
- });
+ });
}
/**
@@ -303,7 +303,7 @@ inline void getVmResourceList(std::shared_ptr<bmcweb::AsyncResp> asyncResp,
members.emplace_back(std::move(item));
}
asyncResp->res.jsonValue["Members@odata.count"] = members.size();
- });
+ });
}
inline void
@@ -481,7 +481,7 @@ inline void doMountVmLegacy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
BMCWEB_LOG_ERROR("Failed to pass secret: {}", ec);
messages::internalError(asyncResp->res);
}
- });
+ });
}
dbus::utility::DbusVariantType unixFd(
@@ -504,7 +504,7 @@ inline void doMountVmLegacy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
BMCWEB_LOG_ERROR("Service responded with error");
messages::internalError(asyncResp->res);
}
- },
+ },
service, path.str, "xyz.openbmc_project.VirtualMedia.Legacy", "Mount",
imageUrl, rw, unixFd);
}
@@ -669,7 +669,7 @@ inline void doEjectAction(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
messages::internalError(asyncResp->res);
return;
}
- },
+ },
service, "/xyz/openbmc_project/VirtualMedia/Legacy/" + name,
"xyz.openbmc_project.VirtualMedia.Legacy", "Unmount");
}
@@ -684,7 +684,7 @@ inline void doEjectAction(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
messages::internalError(asyncResp->res);
return;
}
- },
+ },
service, "/xyz/openbmc_project/VirtualMedia/Proxy/" + name,
"xyz.openbmc_project.VirtualMedia.Proxy", "Unmount");
}
@@ -765,8 +765,8 @@ inline void handleManagersVirtualMediaActionInsertPost(
}
BMCWEB_LOG_DEBUG("Parent item not found");
messages::resourceNotFound(asyncResp->res, "VirtualMedia", resName);
- });
});
+ });
}
inline void handleManagersVirtualMediaActionEject(
@@ -828,8 +828,8 @@ inline void handleManagersVirtualMediaActionEject(
}
BMCWEB_LOG_DEBUG("Parent item not found");
messages::resourceNotFound(asyncResp->res, "VirtualMedia", resName);
- });
});
+ });
}
inline void handleManagersVirtualMediaCollectionGet(
@@ -869,7 +869,7 @@ inline void handleManagersVirtualMediaCollectionGet(
BMCWEB_LOG_DEBUG("GetObjectType: {}", service);
getVmResourceList(asyncResp, service, name);
- });
+ });
}
inline void
@@ -904,7 +904,7 @@ inline void
BMCWEB_LOG_DEBUG("GetObjectType: {}", service);
getVmData(asyncResp, service, name, resName);
- });
+ });
}
inline void requestNBDVirtualMediaRoutes(App& app)
diff --git a/redfish-core/src/registries.cpp b/redfish-core/src/registries.cpp
index e465b1584c..c727d1c771 100644
--- a/redfish-core/src/registries.cpp
+++ b/redfish-core/src/registries.cpp
@@ -16,8 +16,8 @@ const Message* getMessageFromRegistry(const std::string& messageKey,
{
std::span<const MessageEntry>::iterator messageIt = std::ranges::find_if(
registry, [&messageKey](const MessageEntry& messageEntry) {
- return std::strcmp(messageEntry.first, messageKey.c_str()) == 0;
- });
+ return std::strcmp(messageEntry.first, messageKey.c_str()) == 0;
+ });
if (messageIt != registry.end())
{
return &messageIt->second;