clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index c021ee2..e16751b 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -251,10 +251,10 @@
* @param[in] dbusObjectPath D-Bus Object Path
* @param[in] userSelf true if User is updating OWN Account Types
*/
-inline void
- patchAccountTypes(const std::vector<std::string>& accountTypes,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& dbusObjectPath, bool userSelf)
+inline void patchAccountTypes(
+ const std::vector<std::string>& accountTypes,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& dbusObjectPath, bool userSelf)
{
// Check if User is disabling own Redfish Account Type
if (userSelf &&
@@ -428,9 +428,9 @@
std::optional<std::string> remoteGroup;
std::optional<std::string> localRole;
- if (!json_util::readJsonObject( //
- *obj, asyncResp->res, //
- "LocalRole", localRole, //
+ if (!json_util::readJsonObject( //
+ *obj, asyncResp->res, //
+ "LocalRole", localRole, //
"RemoteGroup", remoteGroup //
))
{
@@ -536,8 +536,8 @@
* into JSON
*/
template <typename CallbackFunc>
-inline void
- getLDAPConfigData(const std::string& ldapType, CallbackFunc&& callback)
+inline void getLDAPConfigData(const std::string& ldapType,
+ CallbackFunc&& callback)
{
constexpr std::array<std::string_view, 2> interfaces = {
ldapEnableInterface, ldapConfigInterface};
@@ -736,11 +736,11 @@
server(openLDAP/ActiveDirectory)
*/
-inline void
- handleUserNamePatch(const std::string& username,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& ldapServerElementName,
- const std::string& ldapConfigObject)
+inline void handleUserNamePatch(
+ const std::string& username,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& ldapServerElementName,
+ const std::string& ldapConfigObject)
{
setDbusProperty(asyncResp,
ldapServerElementName + "/Authentication/Username",
@@ -756,11 +756,11 @@
* server(openLDAP/ActiveDirectory)
*/
-inline void
- handlePasswordPatch(const std::string& password,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& ldapServerElementName,
- const std::string& ldapConfigObject)
+inline void handlePasswordPatch(
+ const std::string& password,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& ldapServerElementName,
+ const std::string& ldapConfigObject)
{
setDbusProperty(asyncResp,
ldapServerElementName + "/Authentication/Password",
@@ -777,11 +777,11 @@
server(openLDAP/ActiveDirectory)
*/
-inline void
- handleBaseDNPatch(const std::vector<std::string>& baseDNList,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& ldapServerElementName,
- const std::string& ldapConfigObject)
+inline void handleBaseDNPatch(
+ const std::vector<std::string>& baseDNList,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& ldapServerElementName,
+ const std::string& ldapConfigObject)
{
setDbusProperty(asyncResp,
ldapServerElementName +
@@ -859,9 +859,9 @@
std::optional<bool> tls;
};
-inline void
- handleAuthMethodsPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const AuthMethods& auth)
+inline void handleAuthMethodsPatch(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const AuthMethods& auth)
{
persistent_data::AuthConfigMethods& authMethodsConfig =
persistent_data::SessionStore::getInstance().getAuthMethodsConfig();
@@ -1115,9 +1115,9 @@
std::string dbusObjectPath;
};
-inline void
- afterVerifyUserExists(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const UserUpdateParams& params, int rc)
+inline void afterVerifyUserExists(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const UserUpdateParams& params, int rc)
{
if (rc <= 0)
{
@@ -1237,9 +1237,9 @@
"</redfish/v1/JsonSchemas/AccountService/AccountService.json>; rel=describedby");
}
-inline void
- getClientCertificates(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const nlohmann::json::json_pointer& keyLocation)
+inline void getClientCertificates(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const nlohmann::json::json_pointer& keyLocation)
{
boost::urls::url url(
"/redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates");
@@ -1313,8 +1313,8 @@
using account_service::CertificateMappingAttribute;
using persistent_data::MTLSCommonNameParseMode;
-inline CertificateMappingAttribute
- getCertificateMapping(MTLSCommonNameParseMode parse)
+inline CertificateMappingAttribute getCertificateMapping(
+ MTLSCommonNameParseMode parse)
{
switch (parse)
{
@@ -1350,9 +1350,9 @@
}
}
-inline void
- handleAccountServiceGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleAccountServiceGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -1574,52 +1574,52 @@
AuthMethods auth;
std::optional<std::string> httpBasicAuth;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "AccountLockoutDuration", unlockTimeout, //
- "AccountLockoutThreshold", lockoutThreshold, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "AccountLockoutDuration", unlockTimeout, //
+ "AccountLockoutThreshold", lockoutThreshold, //
"ActiveDirectory/Authentication/AuthenticationType",
- activeDirectoryObject.authType, //
+ activeDirectoryObject.authType, //
"ActiveDirectory/Authentication/Password",
- activeDirectoryObject.password, //
+ activeDirectoryObject.password, //
"ActiveDirectory/Authentication/Username",
- activeDirectoryObject.userName, //
+ activeDirectoryObject.userName, //
"ActiveDirectory/LDAPService/SearchSettings/BaseDistinguishedNames",
- activeDirectoryObject.baseDNList, //
+ activeDirectoryObject.baseDNList, //
"ActiveDirectory/LDAPService/SearchSettings/GroupsAttribute",
- activeDirectoryObject.groupsAttribute, //
+ activeDirectoryObject.groupsAttribute, //
"ActiveDirectory/LDAPService/SearchSettings/UsernameAttribute",
- activeDirectoryObject.userNameAttribute, //
+ activeDirectoryObject.userNameAttribute, //
"ActiveDirectory/RemoteRoleMapping",
- activeDirectoryObject.remoteRoleMapData, //
+ activeDirectoryObject.remoteRoleMapData, //
"ActiveDirectory/ServiceAddresses",
- activeDirectoryObject.serviceAddressList, //
+ activeDirectoryObject.serviceAddressList, //
"ActiveDirectory/ServiceEnabled",
- activeDirectoryObject.serviceEnabled, //
- "HTTPBasicAuth", httpBasicAuth, //
+ activeDirectoryObject.serviceEnabled, //
+ "HTTPBasicAuth", httpBasicAuth, //
"LDAP/Authentication/AuthenticationType", ldapObject.authType, //
- "LDAP/Authentication/Password", ldapObject.password, //
- "LDAP/Authentication/Username", ldapObject.userName, //
+ "LDAP/Authentication/Password", ldapObject.password, //
+ "LDAP/Authentication/Username", ldapObject.userName, //
"LDAP/LDAPService/SearchSettings/BaseDistinguishedNames",
- ldapObject.baseDNList, //
+ ldapObject.baseDNList, //
"LDAP/LDAPService/SearchSettings/GroupsAttribute",
- ldapObject.groupsAttribute, //
+ ldapObject.groupsAttribute, //
"LDAP/LDAPService/SearchSettings/UsernameAttribute",
- ldapObject.userNameAttribute, //
- "LDAP/RemoteRoleMapping", ldapObject.remoteRoleMapData, //
- "LDAP/ServiceAddresses", ldapObject.serviceAddressList, //
- "LDAP/ServiceEnabled", ldapObject.serviceEnabled, //
- "MaxPasswordLength", maxPasswordLength, //
- "MinPasswordLength", minPasswordLength, //
+ ldapObject.userNameAttribute, //
+ "LDAP/RemoteRoleMapping", ldapObject.remoteRoleMapData, //
+ "LDAP/ServiceAddresses", ldapObject.serviceAddressList, //
+ "LDAP/ServiceEnabled", ldapObject.serviceEnabled, //
+ "MaxPasswordLength", maxPasswordLength, //
+ "MinPasswordLength", minPasswordLength, //
"MultiFactorAuth/ClientCertificate/CertificateMappingAttribute",
- certificateMappingAttribute, //
+ certificateMappingAttribute, //
"MultiFactorAuth/ClientCertificate/RespondToUnauthenticatedClients",
- respondToUnauthenticatedClients, //
- "Oem/OpenBMC/AuthMethods/BasicAuth", auth.basicAuth, //
- "Oem/OpenBMC/AuthMethods/Cookie", auth.cookie, //
- "Oem/OpenBMC/AuthMethods/SessionToken", auth.sessionToken, //
- "Oem/OpenBMC/AuthMethods/TLS", auth.tls, //
- "Oem/OpenBMC/AuthMethods/XToken", auth.xToken //
+ respondToUnauthenticatedClients, //
+ "Oem/OpenBMC/AuthMethods/BasicAuth", auth.basicAuth, //
+ "Oem/OpenBMC/AuthMethods/Cookie", auth.cookie, //
+ "Oem/OpenBMC/AuthMethods/SessionToken", auth.sessionToken, //
+ "Oem/OpenBMC/AuthMethods/TLS", auth.tls, //
+ "Oem/OpenBMC/AuthMethods/XToken", auth.xToken //
))
{
return;
@@ -1928,13 +1928,13 @@
std::optional<std::string> roleIdJson;
std::optional<bool> enabledJson;
std::optional<std::vector<std::string>> accountTypes;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
"AccountTypes", accountTypes, //
- "Enabled", enabledJson, //
- "Password", password, //
- "RoleId", roleIdJson, //
- "UserName", username //
+ "Enabled", enabledJson, //
+ "Password", password, //
+ "RoleId", roleIdJson, //
+ "UserName", username //
))
{
return;
@@ -1976,10 +1976,10 @@
});
}
-inline void
- handleAccountHead(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& /*accountName*/)
+inline void handleAccountHead(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& /*accountName*/)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -1990,10 +1990,10 @@
"</redfish/v1/JsonSchemas/ManagerAccount/ManagerAccount.json>; rel=describedby");
}
-inline void
- handleAccountGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& accountName)
+inline void handleAccountGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& accountName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -2164,10 +2164,10 @@
});
}
-inline void
- handleAccountDelete(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& username)
+inline void handleAccountDelete(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& username)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -2199,10 +2199,10 @@
"xyz.openbmc_project.Object.Delete", "Delete");
}
-inline void
- handleAccountPatch(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& username)
+inline void handleAccountPatch(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& username)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -2237,14 +2237,14 @@
if (userHasConfigureUsers)
{
// Users with ConfigureUsers can modify for all users
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
"AccountTypes", accountTypes, //
- "Enabled", enabled, //
- "Locked", locked, //
- "Password", password, //
- "RoleId", roleId, //
- "UserName", newUserName //
+ "Enabled", enabled, //
+ "Locked", locked, //
+ "Password", password, //
+ "RoleId", roleId, //
+ "UserName", newUserName //
))
{
return;
diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp
index f4026fd..99635b2 100644
--- a/redfish-core/lib/bios.hpp
+++ b/redfish-core/lib/bios.hpp
@@ -26,10 +26,10 @@
/**
* BiosService class supports handle get method for bios.
*/
-inline void
- handleBiosServiceGet(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& systemName)
+inline void handleBiosServiceGet(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& systemName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -78,10 +78,10 @@
* Function handles POST method request.
* Analyzes POST body message before sends Reset request data to D-Bus.
*/
-inline void
- handleBiosResetPost(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& systemName)
+inline void handleBiosResetPost(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& systemName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
diff --git a/redfish-core/lib/cable.hpp b/redfish-core/lib/cable.hpp
index 13ec64a..a44ac1a 100644
--- a/redfish-core/lib/cable.hpp
+++ b/redfish-core/lib/cable.hpp
@@ -93,10 +93,10 @@
* @param[in] serviceMap A map to hold Service and corresponding
* interface list for the given cable id.
*/
-inline void
- getCableProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& cableObjectPath,
- const dbus::utility::MapperServiceMap& serviceMap)
+inline void getCableProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& cableObjectPath,
+ const dbus::utility::MapperServiceMap& serviceMap)
{
BMCWEB_LOG_DEBUG("Get Properties for cable {}", cableObjectPath);
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index fdc283b..9dd6874 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -101,9 +101,9 @@
std::string certificate;
std::optional<std::string> certificateType = "PEM";
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "CertificateString", certificate, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "CertificateString", certificate, //
"CertificateType", certificateType //
))
{
@@ -417,10 +417,10 @@
});
}
-inline void
- deleteCertificate(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service,
- const sdbusplus::message::object_path& objectPath)
+inline void deleteCertificate(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service,
+ const sdbusplus::message::object_path& objectPath)
{
crow::connections::systemBus->async_method_call(
[asyncResp,
@@ -535,9 +535,9 @@
std::string certURI;
std::optional<std::string> certificateType = "PEM";
- if (!json_util::readJsonAction( //
- req, asyncResp->res, //
- "CertificateString", certificate, //
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "CertificateString", certificate, //
"CertificateType", certificateType, //
"CertificateUri/@odata.id", certURI //
))
@@ -677,9 +677,9 @@
service, csrObjPath, "xyz.openbmc_project.Certs.CSR", "CSR");
}
-inline void
- handleGenerateCSRAction(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleGenerateCSRAction(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -711,27 +711,27 @@
std::vector<std::string>();
std::optional<std::string> optSurname = "";
std::optional<std::string> optUnstructuredName = "";
- if (!json_util::readJsonAction( //
- req, asyncResp->res, //
- "AlternativeNames", optAlternativeNames, //
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "AlternativeNames", optAlternativeNames, //
"CertificateCollection/@odata.id", certURI, //
- "ChallengePassword", optChallengePassword, //
- "City", city, //
- "CommonName", commonName, //
- "ContactPerson", optContactPerson, //
- "Country", country, //
- "Email", optEmail, //
- "GivenName", optGivenName, //
- "Initials", optInitials, //
- "KeyBitLength", optKeyBitLength, //
- "KeyCurveId", optKeyCurveId, //
- "KeyPairAlgorithm", optKeyPairAlgorithm, //
- "KeyUsage", optKeyUsage, //
- "Organization", organization, //
- "OrganizationalUnit", organizationalUnit, //
- "State", state, //
- "Surname", optSurname, //
- "UnstructuredName", optUnstructuredName //
+ "ChallengePassword", optChallengePassword, //
+ "City", city, //
+ "CommonName", commonName, //
+ "ContactPerson", optContactPerson, //
+ "Country", country, //
+ "Email", optEmail, //
+ "GivenName", optGivenName, //
+ "Initials", optInitials, //
+ "KeyBitLength", optKeyBitLength, //
+ "KeyCurveId", optKeyCurveId, //
+ "KeyPairAlgorithm", optKeyPairAlgorithm, //
+ "KeyUsage", optKeyUsage, //
+ "Organization", organization, //
+ "OrganizationalUnit", organizationalUnit, //
+ "State", state, //
+ "Surname", optSurname, //
+ "UnstructuredName", optUnstructuredName //
))
{
return;
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 53f3e40..86442af 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -49,8 +49,8 @@
namespace redfish
{
-inline chassis::ChassisType
- translateChassisTypeToRedfish(const std::string_view& chassisType)
+inline chassis::ChassisType translateChassisTypeToRedfish(
+ const std::string_view& chassisType)
{
if (chassisType ==
"xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.Blade")
@@ -723,10 +723,10 @@
messages::resourceNotFound(asyncResp->res, "Chassis", chassisId);
}
-inline void
- handleChassisGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId)
+inline void handleChassisGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -748,10 +748,10 @@
std::bind_front(handlePhysicalSecurityGetSubTree, asyncResp));
}
-inline void
- handleChassisPatch(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& param)
+inline void handleChassisPatch(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& param)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -765,9 +765,9 @@
return;
}
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "IndicatorLED", indicatorLed, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "IndicatorLED", indicatorLed, //
"LocationIndicatorActive", locationIndicatorActive //
))
{
@@ -893,8 +893,8 @@
std::bind_front(handleChassisPatch, std::ref(app)));
}
-inline void
- doChassisPowerCycle(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void doChassisPowerCycle(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
constexpr std::array<std::string_view, 1> interfaces = {
"xyz.openbmc_project.State.Chassis"};
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 8d43820..1e547e4 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -934,9 +934,9 @@
*
* @return None
*/
-inline void
- deleteIPv6Gateway(std::string_view ifaceId, std::string_view gatewayId,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void deleteIPv6Gateway(
+ std::string_view ifaceId, std::string_view gatewayId,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
sdbusplus::message::object_path path("/xyz/openbmc_project/network");
path /= ifaceId;
@@ -1220,9 +1220,9 @@
});
}
-inline void
- handleHostnamePatch(const std::string& hostname,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleHostnamePatch(
+ const std::string& hostname,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
// SHOULD handle host names of up to 255 characters(RFC 1123)
if (hostname.length() > 255)
@@ -1238,9 +1238,9 @@
hostname);
}
-inline void
- handleMTUSizePatch(const std::string& ifaceId, const size_t mtuSize,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleMTUSizePatch(
+ const std::string& ifaceId, const size_t mtuSize,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
sdbusplus::message::object_path objPath("/xyz/openbmc_project/network");
objPath /= ifaceId;
@@ -1553,10 +1553,10 @@
std::optional<std::string> subnetMask;
if (!obj->empty())
{
- if (!json_util::readJsonObject( //
- *obj, res, //
- "Address", address, //
- "Gateway", gateway, //
+ if (!json_util::readJsonObject( //
+ *obj, res, //
+ "Address", address, //
+ "Gateway", gateway, //
"SubnetMask", subnetMask //
))
{
@@ -1781,10 +1781,10 @@
std::optional<std::string> address;
std::optional<uint8_t> prefixLength;
nlohmann::json::object_t thisJsonCopy = *obj;
- if (!json_util::readJsonObject( //
+ if (!json_util::readJsonObject( //
thisJsonCopy, asyncResp->res, //
- "Address", address, //
- "PrefixLength", prefixLength //
+ "Address", address, //
+ "PrefixLength", prefixLength //
))
{
messages::propertyValueFormatError(asyncResp->res, thisJsonCopy,
@@ -2187,11 +2187,11 @@
uint32_t vlanId = 0;
std::vector<nlohmann::json::object_t> relatedInterfaces;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
"Links/RelatedInterfaces", relatedInterfaces, //
- "VLAN/VLANEnable", vlanEnable, //
- "VLAN/VLANId", vlanId //
+ "VLAN/VLANEnable", vlanEnable, //
+ "VLAN/VLANId", vlanId //
))
{
return;
@@ -2346,31 +2346,31 @@
DHCPParameters v4dhcpParms;
DHCPParameters v6dhcpParms;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "DHCPv4/DHCPEnabled", v4dhcpParms.dhcpv4Enabled, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "DHCPv4/DHCPEnabled", v4dhcpParms.dhcpv4Enabled, //
"DHCPv4/UseDNSServers", v4dhcpParms.useDnsServers, //
"DHCPv4/UseDomainName", v4dhcpParms.useDomainName, //
"DHCPv4/UseNTPServers", v4dhcpParms.useNtpServers, //
"DHCPv6/OperatingMode",
- v6dhcpParms.dhcpv6OperatingMode, //
+ v6dhcpParms.dhcpv6OperatingMode, //
"DHCPv6/UseDNSServers", v6dhcpParms.useDnsServers, //
"DHCPv6/UseDomainName", v6dhcpParms.useDomainName, //
"DHCPv6/UseNTPServers", v6dhcpParms.useNtpServers, //
- "FQDN", fqdn, //
- "HostName", hostname, //
- "InterfaceEnabled", interfaceEnabled, //
- "IPv4StaticAddresses", ipv4StaticAddresses, //
- "IPv6DefaultGateway", ipv6DefaultGateway, //
- "IPv6StaticAddresses", ipv6StaticAddresses, //
+ "FQDN", fqdn, //
+ "HostName", hostname, //
+ "InterfaceEnabled", interfaceEnabled, //
+ "IPv4StaticAddresses", ipv4StaticAddresses, //
+ "IPv6DefaultGateway", ipv6DefaultGateway, //
+ "IPv6StaticAddresses", ipv6StaticAddresses, //
"IPv6StaticDefaultGateways",
- ipv6StaticDefaultGateways, //
- "InterfaceEnabled", interfaceEnabled, //
- "MACAddress", macAddress, //
- "MTUSize", mtuSize, //
+ ipv6StaticDefaultGateways, //
+ "InterfaceEnabled", interfaceEnabled, //
+ "MACAddress", macAddress, //
+ "MTUSize", mtuSize, //
"StatelessAddressAutoConfig/IPv6AutoConfigEnabled",
- ipv6AutoConfigEnabled, //
- "StaticNameServers", staticNameServers //
+ ipv6AutoConfigEnabled, //
+ "StaticNameServers", staticNameServers //
))
{
return;
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index fcde1a8..ea968af 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -129,11 +129,11 @@
std::optional<bool> serviceEnabled;
std::optional<uint32_t> retryAttemps;
std::optional<uint32_t> retryInterval;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "DeliveryRetryAttempts", retryAttemps, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "DeliveryRetryAttempts", retryAttemps, //
"DeliveryRetryIntervalSeconds", retryInterval, //
- "ServiceEnabled", serviceEnabled //
+ "ServiceEnabled", serviceEnabled //
))
{
return;
@@ -336,23 +336,23 @@
std::optional<std::vector<nlohmann::json::object_t>> headers;
std::optional<std::vector<nlohmann::json::object_t>> mrdJsonArray;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "Context", context, //
- "DeliveryRetryPolicy", retryPolicy, //
- "Destination", destUrl, //
- "EventFormatType", eventFormatType2, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "Context", context, //
+ "DeliveryRetryPolicy", retryPolicy, //
+ "Destination", destUrl, //
+ "EventFormatType", eventFormatType2, //
"HeartbeatIntervalMinutes", hbIntervalMinutes, //
- "HttpHeaders", headers, //
- "MessageIds", msgIds, //
- "MetricReportDefinitions", mrdJsonArray, //
- "OriginResources", originResources, //
- "Protocol", protocol, //
- "RegistryPrefixes", regPrefixes, //
- "ResourceTypes", resTypes, //
- "SendHeartbeat", sendHeartbeat, //
- "SubscriptionType", subscriptionType, //
- "VerifyCertificate", verifyCertificate //
+ "HttpHeaders", headers, //
+ "MessageIds", msgIds, //
+ "MetricReportDefinitions", mrdJsonArray, //
+ "OriginResources", originResources, //
+ "Protocol", protocol, //
+ "RegistryPrefixes", regPrefixes, //
+ "ResourceTypes", resTypes, //
+ "SendHeartbeat", sendHeartbeat, //
+ "SubscriptionType", subscriptionType, //
+ "VerifyCertificate", verifyCertificate //
))
{
return;
@@ -838,14 +838,14 @@
std::optional<bool> verifyCertificate;
std::optional<std::vector<nlohmann::json::object_t>> headers;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "Context", context, //
- "DeliveryRetryPolicy", retryPolicy, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "Context", context, //
+ "DeliveryRetryPolicy", retryPolicy, //
"HeartbeatIntervalMinutes", hbIntervalMinutes, //
- "HttpHeaders", headers, //
- "SendHeartbeat", sendHeartbeat, //
- "VerifyCertificate", verifyCertificate //
+ "HttpHeaders", headers, //
+ "SendHeartbeat", sendHeartbeat, //
+ "VerifyCertificate", verifyCertificate //
))
{
return;
diff --git a/redfish-core/lib/fan.hpp b/redfish-core/lib/fan.hpp
index d426709..06dc187 100644
--- a/redfish-core/lib/fan.hpp
+++ b/redfish-core/lib/fan.hpp
@@ -35,10 +35,10 @@
constexpr std::array<std::string_view, 1> fanInterface = {
"xyz.openbmc_project.Inventory.Item.Fan"};
-inline void
- updateFanList(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId,
- const dbus::utility::MapperGetSubTreePathsResponse& fanPaths)
+inline void updateFanList(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId,
+ const dbus::utility::MapperGetSubTreePathsResponse& fanPaths)
{
nlohmann::json& fanList = asyncResp->res.jsonValue["Members"];
for (const std::string& fanPath : fanPaths)
@@ -117,10 +117,10 @@
std::bind_front(updateFanList, asyncResp, chassisId));
}
-inline void
- handleFanCollectionHead(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId)
+inline void handleFanCollectionHead(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -143,10 +143,10 @@
});
}
-inline void
- handleFanCollectionGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId)
+inline void handleFanCollectionGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -374,10 +374,10 @@
});
}
-inline void
- afterGetValidFanPath(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId, const std::string& fanId,
- const std::string& fanPath, const std::string& service)
+inline void afterGetValidFanPath(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId, const std::string& fanId,
+ const std::string& fanPath, const std::string& service)
{
addFanCommonProperties(asyncResp->res, chassisId, fanId);
getFanState(asyncResp, fanPath, service);
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index b5e2f2d..03b1f12 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -50,8 +50,8 @@
*
* @return None.
*/
-inline void
- getHypervisorState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getHypervisorState(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get hypervisor state information.");
dbus::utility::getProperty<std::string>(
@@ -135,8 +135,8 @@
*
* @return None.
*/
-inline void
- getHypervisorActions(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getHypervisorActions(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get hypervisor actions.");
constexpr std::array<std::string_view, 1> interfaces = {
@@ -385,9 +385,9 @@
*
* @return None.
*/
-inline void
- setHypervisorIPv4Subnet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& ethIfaceId, const uint8_t subnet)
+inline void setHypervisorIPv4Subnet(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& ethIfaceId, const uint8_t subnet)
{
BMCWEB_LOG_DEBUG("Setting the Hypervisor subnet : {} on Iface: {}", subnet,
ethIfaceId);
@@ -434,10 +434,10 @@
*
* @return None
*/
-inline void
- createHypervisorIPv4(const std::string& ifaceId, uint8_t prefixLength,
- const std::string& gateway, const std::string& address,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void createHypervisorIPv4(
+ const std::string& ifaceId, uint8_t prefixLength,
+ const std::string& gateway, const std::string& address,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
setHypervisorIPv4Address(asyncResp, ifaceId, address);
setHypervisorIPv4Gateway(asyncResp, gateway);
@@ -452,9 +452,9 @@
*
* @return None
*/
-inline void
- deleteHypervisorIPv4(const std::string& ifaceId,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void deleteHypervisorIPv4(
+ const std::string& ifaceId,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
std::string address = "0.0.0.0";
std::string gateway = "0.0.0.0";
@@ -559,10 +559,10 @@
std::string address;
std::string subnetMask;
std::string gateway;
- if (!json_util::readJsonObject( //
- *obj, asyncResp->res, //
- "Address", address, //
- "Gateway", gateway, //
+ if (!json_util::readJsonObject( //
+ *obj, asyncResp->res, //
+ "Address", address, //
+ "Gateway", gateway, //
"SubnetMask", subnetMask //
))
{
@@ -617,9 +617,9 @@
"HostName", hostName);
}
-inline void
- setIPv4InterfaceEnabled(const std::string& ifaceId, bool isActive,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void setIPv4InterfaceEnabled(
+ const std::string& ifaceId, bool isActive,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
setDbusProperty(
asyncResp, "InterfaceEnabled", "xyz.openbmc_project.Settings",
@@ -747,12 +747,12 @@
std::optional<std::vector<nlohmann::json::object_t>> ipv4Addresses;
std::optional<bool> ipv4DHCPEnabled;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "DHCPv4/DHCPEnabled", ipv4DHCPEnabled, //
- "IPv4Addresses", ipv4Addresses, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "DHCPv4/DHCPEnabled", ipv4DHCPEnabled, //
+ "IPv4Addresses", ipv4Addresses, //
"IPv4StaticAddresses", ipv4StaticAddresses, //
- "HostName", hostName //
+ "HostName", hostName //
))
{
return;
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index ed4c188..2bb2cc8 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -26,8 +26,8 @@
* @return None.
*/
// TODO (Gunnar): Remove IndicatorLED after enough time has passed
-inline void
- getIndicatorLedState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getIndicatorLedState(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get led groups");
dbus::utility::getProperty<bool>(
@@ -95,9 +95,9 @@
* @return None.
*/
// TODO (Gunnar): Remove IndicatorLED after enough time has passed
-inline void
- setIndicatorLedState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& ledState)
+inline void setIndicatorLedState(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& ledState)
{
BMCWEB_LOG_DEBUG("Set led groups");
bool ledOn = false;
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index c47e45f..fd76da5 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -175,8 +175,8 @@
return true;
}
-inline bool
- getRedfishLogFiles(std::vector<std::filesystem::path>& redfishLogFiles)
+inline bool getRedfishLogFiles(
+ std::vector<std::filesystem::path>& redfishLogFiles)
{
static const std::filesystem::path redfishLogDir = "/var/log";
static const std::string redfishLogFilename = "redfish";
@@ -200,8 +200,8 @@
return !redfishLogFiles.empty();
}
-inline log_entry::OriginatorTypes
- mapDbusOriginatorTypeToRedfish(const std::string& originatorType)
+inline log_entry::OriginatorTypes mapDbusOriginatorTypeToRedfish(
+ const std::string& originatorType)
{
if (originatorType ==
"xyz.openbmc_project.Common.OriginatedBy.OriginatorTypes.Client")
@@ -353,9 +353,9 @@
return entriesPath;
}
-inline void
- getDumpEntryCollection(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& dumpType)
+inline void getDumpEntryCollection(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& dumpType)
{
std::string entriesPath = getDumpEntriesPath(dumpType);
if (entriesPath.empty())
@@ -469,9 +469,9 @@
});
}
-inline void
- getDumpEntryById(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& entryID, const std::string& dumpType)
+inline void getDumpEntryById(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& entryID, const std::string& dumpType)
{
std::string entriesPath = getDumpEntriesPath(dumpType);
if (entriesPath.empty())
@@ -685,9 +685,9 @@
"application/octet-stream");
}
-inline void
- downloadDumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& entryID, const std::string& dumpType)
+inline void downloadDumpEntry(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& entryID, const std::string& dumpType)
{
if (dumpType != "BMC")
{
@@ -746,8 +746,8 @@
entryPath, "xyz.openbmc_project.Logging.Entry", "GetEntry");
}
-inline DumpCreationProgress
- mapDbusStatusToDumpProgress(const std::string& status)
+inline DumpCreationProgress mapDbusStatusToDumpProgress(
+ const std::string& status)
{
if (status ==
"xyz.openbmc_project.Common.Progress.OperationStatus.Failed" ||
@@ -763,8 +763,8 @@
return DumpCreationProgress::DUMP_CREATE_INPROGRESS;
}
-inline DumpCreationProgress
- getDumpCompletionStatus(const dbus::utility::DBusPropertiesMap& values)
+inline DumpCreationProgress getDumpCompletionStatus(
+ const dbus::utility::DBusPropertiesMap& values)
{
for (const auto& [key, val] : values)
{
@@ -951,9 +951,9 @@
std::optional<std::string> diagnosticDataType;
std::optional<std::string> oemDiagnosticDataType;
- if (!redfish::json_util::readJsonAction( //
- req, asyncResp->res, //
- "DiagnosticDataType", diagnosticDataType, //
+ if (!redfish::json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "DiagnosticDataType", diagnosticDataType, //
"OEMDiagnosticDataType", oemDiagnosticDataType //
))
{
@@ -1800,10 +1800,10 @@
});
}
-inline void
- dBusEventLogEntryPatch(const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& entryId)
+inline void dBusEventLogEntryPatch(
+ const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& entryId)
{
std::optional<bool> resolved;
@@ -2038,9 +2038,9 @@
std::bind_front(handleBMCLogServicesCollectionGet, std::ref(app)));
}
-inline void
- getDumpServiceInfo(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& dumpType)
+inline void getDumpServiceInfo(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& dumpType)
{
std::string dumpPath;
log_service::OverWritePolicy overWritePolicy =
@@ -2671,9 +2671,9 @@
});
}
-inline void
- logCrashdumpEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& logID, nlohmann::json& logEntryJson)
+inline void logCrashdumpEntry(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& logID, nlohmann::json& logEntryJson)
{
auto getStoredLogCallback =
[asyncResp, logID,
@@ -3006,9 +3006,9 @@
std::string diagnosticDataType;
std::string oemDiagnosticDataType;
- if (!redfish::json_util::readJsonAction( //
- req, asyncResp->res, //
- "DiagnosticDataType", diagnosticDataType, //
+ if (!redfish::json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "DiagnosticDataType", diagnosticDataType, //
"OEMDiagnosticDataType", oemDiagnosticDataType //
))
{
diff --git a/redfish-core/lib/manager_diagnostic_data.hpp b/redfish-core/lib/manager_diagnostic_data.hpp
index fb3a040..c712fd5 100644
--- a/redfish-core/lib/manager_diagnostic_data.hpp
+++ b/redfish-core/lib/manager_diagnostic_data.hpp
@@ -61,10 +61,10 @@
return false;
}
-inline void
- setBytesProperty(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const nlohmann::json::json_pointer& jPtr,
- const boost::system::error_code& ec, double bytes)
+inline void setBytesProperty(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const nlohmann::json::json_pointer& jPtr,
+ const boost::system::error_code& ec, double bytes)
{
if (checkErrors(asyncResp, ec))
{
@@ -100,10 +100,10 @@
nlohmann::json::json_pointer("/FreeStorageSpaceKiB")));
}
-inline void
- setPercentProperty(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const nlohmann::json::json_pointer& jPtr,
- const boost::system::error_code& ec, double userCPU)
+inline void setPercentProperty(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const nlohmann::json::json_pointer& jPtr,
+ const boost::system::error_code& ec, double userCPU)
{
if (checkErrors(asyncResp, ec))
{
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 33c992c..cbe3081 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -83,8 +83,8 @@
*
* @param[in] asyncResp - Shared pointer for completing asynchronous calls
*/
-inline void
- doBMCGracefulRestart(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void doBMCGracefulRestart(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
const char* processName = "xyz.openbmc_project.State.BMC";
const char* objectPath = "/xyz/openbmc_project/state/bmc0";
@@ -110,8 +110,8 @@
});
}
-inline void
- doBMCForceRestart(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void doBMCForceRestart(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
const char* processName = "xyz.openbmc_project.State.BMC";
const char* objectPath = "/xyz/openbmc_project/state/bmc0";
@@ -241,10 +241,10 @@
std::optional<std::string> resetType;
std::optional<std::string> resetToDefaultsType;
- if (!json_util::readJsonAction( //
- req, asyncResp->res, //
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
"ResetToDefaultsType", resetToDefaultsType, //
- "ResetType", resetType //
+ "ResetType", resetType //
))
{
BMCWEB_LOG_DEBUG("Missing property ResetType.");
@@ -351,11 +351,11 @@
static constexpr const char* thermalModeIface =
"xyz.openbmc_project.Control.ThermalMode";
-inline void
- asyncPopulatePid(const std::string& connection, const std::string& path,
- const std::string& currentProfile,
- const std::vector<std::string>& supportedProfiles,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void asyncPopulatePid(
+ const std::string& connection, const std::string& path,
+ const std::string& currentProfile,
+ const std::vector<std::string>& supportedProfiles,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
sdbusplus::message::object_path objPath(path);
dbus::utility::getManagedObjects(
@@ -790,10 +790,10 @@
patch
};
-inline bool
- getZonesFromJsonReq(const std::shared_ptr<bmcweb::AsyncResp>& response,
- std::vector<nlohmann::json::object_t>& config,
- std::vector<std::string>& zones)
+inline bool getZonesFromJsonReq(
+ const std::shared_ptr<bmcweb::AsyncResp>& response,
+ std::vector<nlohmann::json::object_t>& config,
+ std::vector<std::string>& zones)
{
if (config.empty())
{
@@ -827,9 +827,9 @@
return true;
}
-inline const dbus::utility::ManagedObjectType::value_type*
- findChassis(const dbus::utility::ManagedObjectType& managedObj,
- std::string_view value, std::string& chassis)
+inline const dbus::utility::ManagedObjectType::value_type* findChassis(
+ const dbus::utility::ManagedObjectType& managedObj, std::string_view value,
+ std::string& chassis)
{
BMCWEB_LOG_DEBUG("Find Chassis: {}", value);
@@ -997,25 +997,25 @@
std::optional<std::vector<std::string>> outputs;
std::map<std::string, std::optional<double>> doubles;
std::optional<std::string> setpointOffset;
- if (!redfish::json_util::readJson( //
- jsonValue, response->res, //
- "FFGainCoefficient", doubles["FFGainCoefficient"], //
- "FFOffCoefficient", doubles["FFOffCoefficient"], //
- "ICoefficient", doubles["ICoefficient"], //
- "ILimitMax", doubles["ILimitMax"], //
- "ILimitMin", doubles["ILimitMin"], //
- "Inputs", inputs, //
+ if (!redfish::json_util::readJson( //
+ jsonValue, response->res, //
+ "FFGainCoefficient", doubles["FFGainCoefficient"], //
+ "FFOffCoefficient", doubles["FFOffCoefficient"], //
+ "ICoefficient", doubles["ICoefficient"], //
+ "ILimitMax", doubles["ILimitMax"], //
+ "ILimitMin", doubles["ILimitMin"], //
+ "Inputs", inputs, //
"NegativeHysteresis", doubles["NegativeHysteresis"], //
- "OutLimitMax", doubles["OutLimitMax"], //
- "OutLimitMin", doubles["OutLimitMin"], //
- "Outputs", outputs, //
- "PCoefficient", doubles["PCoefficient"], //
+ "OutLimitMax", doubles["OutLimitMax"], //
+ "OutLimitMin", doubles["OutLimitMin"], //
+ "Outputs", outputs, //
+ "PCoefficient", doubles["PCoefficient"], //
"PositiveHysteresis", doubles["PositiveHysteresis"], //
- "SetPoint", doubles["SetPoint"], //
- "SetPointOffset", setpointOffset, //
- "SlewNeg", doubles["SlewNeg"], //
- "SlewPos", doubles["SlewPos"], //
- "Zones", zones //
+ "SetPoint", doubles["SetPoint"], //
+ "SetPointOffset", setpointOffset, //
+ "SlewNeg", doubles["SlewNeg"], //
+ "SlewPos", doubles["SlewPos"], //
+ "Zones", zones //
))
{
return CreatePIDRet::fail;
@@ -1106,9 +1106,9 @@
std::optional<std::string> chassisId;
std::optional<double> failSafePercent;
std::optional<double> minThermalOutput;
- if (!redfish::json_util::readJson( //
- jsonValue, response->res, //
- "Chassis/@odata.id", chassisId, //
+ if (!redfish::json_util::readJson( //
+ jsonValue, response->res, //
+ "Chassis/@odata.id", chassisId, //
"FailSafePercent", failSafePercent, //
"MinThermalOutput", minThermalOutput))
{
@@ -1146,14 +1146,14 @@
std::optional<double> positiveHysteresis;
std::optional<double> negativeHysteresis;
std::optional<std::string> direction; // upper clipping curve vs lower
- if (!redfish::json_util::readJson( //
- jsonValue, response->res, //
- "Direction", direction, //
- "Inputs", inputs, //
+ if (!redfish::json_util::readJson( //
+ jsonValue, response->res, //
+ "Direction", direction, //
+ "Inputs", inputs, //
"NegativeHysteresis", negativeHysteresis, //
"PositiveHysteresis", positiveHysteresis, //
- "Steps", steps, //
- "Zones", zones //
+ "Steps", steps, //
+ "Zones", zones //
))
{
return CreatePIDRet::fail;
@@ -1188,9 +1188,9 @@
double out = 0.0;
if (!redfish::json_util::readJsonObject( //
- step, response->res, //
- "Output", out, //
- "Target", target //
+ step, response->res, //
+ "Output", out, //
+ "Target", target //
))
{
return CreatePIDRet::fail;
@@ -1341,9 +1341,9 @@
});
}
- static void
- processingComplete(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const CompletionValues& completion)
+ static void processingComplete(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const CompletionValues& completion)
{
if (asyncResp->res.result() != boost::beast::http::status::ok)
{
@@ -1806,8 +1806,8 @@
});
}
// avoid name collision systems.hpp
-inline void
- managerGetLastResetTime(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void managerGetLastResetTime(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Getting Manager Last Reset Time");
@@ -1840,9 +1840,9 @@
*
* @return void
*/
-inline void
- setActiveFirmwareImage(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& runningFirmwareTarget)
+inline void setActiveFirmwareImage(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& runningFirmwareTarget)
{
// Get the Id from /redfish/v1/UpdateService/FirmwareInventory/<Id>
std::string::size_type idPos = runningFirmwareTarget.rfind('/');
@@ -1994,8 +1994,8 @@
interactive);
}
-inline void
- checkForQuiesced(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void checkForQuiesced(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<std::string>(
"org.freedesktop.systemd1",
@@ -2358,17 +2358,17 @@
std::optional<nlohmann::json::object_t> stepwiseControllers;
std::optional<std::string> profile;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "DateTime", datetime, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "DateTime", datetime, //
"Links/ActiveSoftwareImage/@odata.id",
- activeSoftwareImageOdataId, //
+ activeSoftwareImageOdataId, //
"Oem/OpenBmc/Fan/FanControllers", fanControllers, //
- "Oem/OpenBmc/Fan/FanZones", fanZones, //
+ "Oem/OpenBmc/Fan/FanZones", fanZones, //
"Oem/OpenBmc/Fan/PidControllers", pidControllers, //
- "Oem/OpenBmc/Fan/Profile", profile, //
+ "Oem/OpenBmc/Fan/Profile", profile, //
"Oem/OpenBmc/Fan/StepwiseControllers",
- stepwiseControllers //
+ stepwiseControllers //
))
{
return;
diff --git a/redfish-core/lib/metadata.hpp b/redfish-core/lib/metadata.hpp
index 55a9c91..df02ad6 100644
--- a/redfish-core/lib/metadata.hpp
+++ b/redfish-core/lib/metadata.hpp
@@ -24,8 +24,8 @@
namespace redfish
{
-inline std::string
- getMetadataPieceForFile(const std::filesystem::path& filename)
+inline std::string getMetadataPieceForFile(
+ const std::filesystem::path& filename)
{
std::string xml;
tinyxml2::XMLDocument doc;
@@ -71,9 +71,9 @@
return xml;
}
-inline void
- handleMetadataGet(App& /*app*/, const crow::Request& /*req*/,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleMetadataGet(
+ App& /*app*/, const crow::Request& /*req*/,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
std::filesystem::path schema("/usr/share/www/redfish/v1/schema");
std::error_code ec;
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index d6c7541..4215b23 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -96,8 +96,8 @@
return true;
}
-inline metric_report_definition::ReportActionsEnum
- toRedfishReportAction(std::string_view dbusValue)
+inline metric_report_definition::ReportActionsEnum toRedfishReportAction(
+ std::string_view dbusValue)
{
if (dbusValue ==
"xyz.openbmc_project.Telemetry.Report.ReportActions.EmitsReadingsUpdate")
@@ -202,8 +202,8 @@
return "";
}
-inline metric_report_definition::ReportUpdatesEnum
- toRedfishReportUpdates(std::string_view dbusValue)
+inline metric_report_definition::ReportUpdatesEnum toRedfishReportUpdates(
+ std::string_view dbusValue)
{
if (dbusValue ==
"xyz.openbmc_project.Telemetry.Report.ReportUpdates.Overwrite")
@@ -462,12 +462,12 @@
std::optional<std::string> collectionFunction;
std::optional<std::string> collectionTimeScopeStr;
- if (!json_util::readJsonObject( //
- metric, res, //
- "CollectionDuration", collectionDurationStr, //
- "CollectionFunction", collectionFunction, //
+ if (!json_util::readJsonObject( //
+ metric, res, //
+ "CollectionDuration", collectionDurationStr, //
+ "CollectionFunction", collectionFunction, //
"CollectionTimeScope", collectionTimeScopeStr, //
- "MetricProperties", uris //
+ "MetricProperties", uris //
))
{
return false;
@@ -557,17 +557,17 @@
std::optional<std::vector<std::string>> reportActionsStr;
std::optional<std::string> scheduleDurationStr;
- if (!json_util::readJsonPatch( //
- req, res, //
- "AppendLimit", appendLimit, //
- "Id", id, //
+ if (!json_util::readJsonPatch( //
+ req, res, //
+ "AppendLimit", appendLimit, //
+ "Id", id, //
"MetricReportDefinitionEnabled", metricReportDefinitionEnabled, //
- "MetricReportDefinitionType", reportingTypeStr, //
- "Metrics", metrics, //
- "Name", name, //
- "ReportActions", reportActionsStr, //
- "ReportUpdates", reportUpdatesStr, //
- "Schedule/RecurrenceInterval", scheduleDurationStr //
+ "MetricReportDefinitionType", reportingTypeStr, //
+ "Metrics", metrics, //
+ "Name", name, //
+ "ReportActions", reportActionsStr, //
+ "ReportUpdates", reportUpdatesStr, //
+ "Schedule/RecurrenceInterval", scheduleDurationStr //
))
{
return false;
@@ -1021,9 +1021,9 @@
ReadingParameters readingParams;
};
-inline void
- setReportEnabled(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- std::string_view id, bool enabled)
+inline void setReportEnabled(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, std::string_view id,
+ bool enabled)
{
crow::connections::systemBus->async_method_call(
[asyncResp, id = std::string(id)](const boost::system::error_code& ec) {
@@ -1142,9 +1142,9 @@
}
}
-inline void
- setReportUpdates(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- std::string_view id, const std::string& reportUpdates)
+inline void setReportUpdates(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, std::string_view id,
+ const std::string& reportUpdates)
{
std::string dbusReportUpdates = toDbusReportUpdates(reportUpdates);
if (dbusReportUpdates.empty())
@@ -1376,14 +1376,14 @@
std::optional<std::vector<std::string>> reportActionsStr;
std::optional<std::string> scheduleDurationStr;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
"MetricReportDefinitionEnabled", metricReportDefinitionEnabled, //
- "MetricReportDefinitionType", reportingTypeStr, //
- "Metrics", metrics, //
- "ReportActions", reportActionsStr, //
- "ReportUpdates", reportUpdatesStr, //
- "Schedule/RecurrenceInterval", scheduleDurationStr //
+ "MetricReportDefinitionType", reportingTypeStr, //
+ "Metrics", metrics, //
+ "ReportActions", reportActionsStr, //
+ "ReportUpdates", reportUpdatesStr, //
+ "Schedule/RecurrenceInterval", scheduleDurationStr //
))
{
return;
@@ -1489,10 +1489,10 @@
}
}
-inline void
- handleMetricReportHead(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& /*id*/)
+inline void handleMetricReportHead(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& /*id*/)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 637bdb5..da49b25 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -299,10 +299,10 @@
using IpAddress =
std::variant<std::string, nlohmann::json::object_t, std::nullptr_t>;
-inline void
- handleNTPServersPatch(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::vector<IpAddress>& ntpServerObjects,
- std::vector<std::string> currentNtpServers)
+inline void handleNTPServersPatch(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::vector<IpAddress>& ntpServerObjects,
+ std::vector<std::string> currentNtpServers)
{
std::vector<std::string>::iterator currentNtpServer =
currentNtpServers.begin();
@@ -403,10 +403,10 @@
});
}
-inline void
- handleProtocolEnabled(const bool protocolEnabled,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& netBasePath)
+inline void handleProtocolEnabled(
+ const bool protocolEnabled,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& netBasePath)
{
constexpr std::array<std::string_view, 1> interfaces = {
"xyz.openbmc_project.Control.Service.Attributes"};
@@ -452,8 +452,8 @@
return hostName;
}
-inline void
- getNTPProtocolEnabled(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getNTPProtocolEnabled(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<bool>(
"org.freedesktop.timedate1", "/org/freedesktop/timedate1",
@@ -515,12 +515,12 @@
std::optional<bool> sshEnabled;
if (!json_util::readJsonPatch(
- req, asyncResp->res, //
- "HostName", newHostName, //
- "NTP/NTPServers", ntpServerObjects, //
- "NTP/ProtocolEnabled", ntpEnabled, //
+ req, asyncResp->res, //
+ "HostName", newHostName, //
+ "NTP/NTPServers", ntpServerObjects, //
+ "NTP/ProtocolEnabled", ntpEnabled, //
"IPMI/ProtocolEnabled", ipmiEnabled, //
- "SSH/ProtocolEnabled", sshEnabled //
+ "SSH/ProtocolEnabled", sshEnabled //
))
{
return;
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index ba036b1..e658e3c 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -36,10 +36,10 @@
namespace redfish
{
-inline void
- onPcieSlotGetAllDone(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const boost::system::error_code& ec,
- const dbus::utility::DBusPropertiesMap& propertiesList)
+inline void onPcieSlotGetAllDone(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const boost::system::error_code& ec,
+ const dbus::utility::DBusPropertiesMap& propertiesList)
{
if (ec)
{
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 68acd1a..50e466c 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -93,9 +93,9 @@
auto& item = powerControlCollections[0];
std::optional<uint32_t> value;
- if (!json_util::readJsonObject( //
+ if (!json_util::readJsonObject( //
item, sensorsAsyncResp->asyncResp->res, //
- "PowerLimit/LimitInWatts", value //
+ "PowerLimit/LimitInWatts", value //
))
{
return;
@@ -263,10 +263,10 @@
) { afterPowerCapSettingGet(sensorAsyncResp, ec, properties); });
}
-inline void
- handleChassisPowerGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisName)
+inline void handleChassisPowerGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -295,10 +295,10 @@
std::bind_front(afterGetChassis, sensorAsyncResp));
}
-inline void
- handleChassisPowerPatch(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisName)
+inline void handleChassisPowerPatch(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -312,10 +312,10 @@
std::optional<std::vector<nlohmann::json::object_t>> voltageCollections;
std::optional<std::vector<nlohmann::json::object_t>> powerCtlCollections;
- if (!json_util::readJsonPatch( //
+ if (!json_util::readJsonPatch( //
req, sensorAsyncResp->asyncResp->res, //
- "PowerControl", powerCtlCollections, //
- "Voltages", voltageCollections //
+ "PowerControl", powerCtlCollections, //
+ "Voltages", voltageCollections //
))
{
return;
diff --git a/redfish-core/lib/power_supply.hpp b/redfish-core/lib/power_supply.hpp
index 75c58eb..9d2d3ce 100644
--- a/redfish-core/lib/power_supply.hpp
+++ b/redfish-core/lib/power_supply.hpp
@@ -210,9 +210,9 @@
});
}
-inline void
- getPowerSupplyState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getPowerSupplyState(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
dbus::utility::getProperty<bool>(
service, path, "xyz.openbmc_project.Inventory.Item", "Present",
@@ -236,9 +236,9 @@
});
}
-inline void
- getPowerSupplyHealth(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getPowerSupplyHealth(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
dbus::utility::getProperty<bool>(
service, path, "xyz.openbmc_project.State.Decorator.OperationalStatus",
@@ -263,9 +263,9 @@
});
}
-inline void
- getPowerSupplyAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getPowerSupplyAsset(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
dbus::utility::getAllProperties(
service, path, "xyz.openbmc_project.Inventory.Decorator.Asset",
@@ -357,9 +357,9 @@
});
}
-inline void
- getPowerSupplyLocation(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getPowerSupplyLocation(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
dbus::utility::getProperty<std::string>(
service, path, "xyz.openbmc_project.Inventory.Decorator.LocationCode",
@@ -450,8 +450,8 @@
});
}
-inline void
- getEfficiencyPercent(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getEfficiencyPercent(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
constexpr std::array<std::string_view, 1> efficiencyIntf = {
"xyz.openbmc_project.Control.PowerSupplyAttributes"};
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index b07f86c..d4afd3d 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -266,8 +266,8 @@
* @return Returns as a string, the throttle cause in Redfish terms. If
* translation cannot be done, returns "Unknown" throttle reason.
*/
-inline processor::ThrottleCause
- dbusToRfThrottleCause(const std::string& dbusSource)
+inline processor::ThrottleCause dbusToRfThrottleCause(
+ const std::string& dbusSource)
{
if (dbusSource ==
"xyz.openbmc_project.Control.Power.Throttle.ThrottleReasons.ClockLimit")
@@ -297,10 +297,10 @@
return processor::ThrottleCause::Invalid;
}
-inline void
- readThrottleProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const boost::system::error_code& ec,
- const dbus::utility::DBusPropertiesMap& properties)
+inline void readThrottleProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const boost::system::error_code& ec,
+ const dbus::utility::DBusPropertiesMap& properties)
{
if (ec)
{
@@ -570,10 +570,10 @@
* @param[in] service D-Bus service to query.
* @param[in] objPath D-Bus object to query.
*/
-inline void
- getCpuConfigData(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& cpuId, const std::string& service,
- const std::string& objPath)
+inline void getCpuConfigData(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& cpuId, const std::string& service,
+ const std::string& objPath)
{
BMCWEB_LOG_INFO("Getting CPU operating configs for {}", cpuId);
@@ -1360,7 +1360,7 @@
std::optional<std::string> appliedConfigUri;
if (!json_util::readJsonPatch(
- req, asyncResp->res, //
+ req, asyncResp->res, //
"AppliedOperatingConfig/@odata.id", appliedConfigUri //
))
{
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 40b946f..881c21a 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -57,10 +57,10 @@
}
}
-inline void
- handleSessionHead(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& /*sessionId*/)
+inline void handleSessionHead(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& /*sessionId*/)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -71,10 +71,10 @@
"</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby");
}
-inline void
- handleSessionGet(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& sessionId)
+inline void handleSessionGet(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& sessionId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -97,10 +97,10 @@
fillSessionObject(asyncResp->res, *session);
}
-inline void
- handleSessionDelete(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& sessionId)
+inline void handleSessionDelete(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& sessionId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -251,11 +251,11 @@
std::optional<std::string> clientId;
std::optional<std::string> token;
if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "Context", clientId, //
- "Password", password, //
- "Token", token, //
- "UserName", username //
+ req, asyncResp->res, //
+ "Context", clientId, //
+ "Password", password, //
+ "Token", token, //
+ "UserName", username //
))
{
return;
@@ -310,9 +310,9 @@
boost::beast::http::field::link,
"</redfish/v1/JsonSchemas/SessionService/SessionService.json>; rel=describedby");
}
-inline void
- handleSessionServiceGet(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleSessionServiceGet(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
@@ -346,8 +346,8 @@
return;
}
std::optional<int64_t> sessionTimeout;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
"SessionTimeout", sessionTimeout //
))
{
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 44d4331..de205f0 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -86,9 +86,9 @@
}
}
-inline void
- jsonSchemaIndexGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void jsonSchemaIndexGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -191,10 +191,10 @@
messages::resourceNotFound(asyncResp->res, "JsonSchemaFile", schema);
}
-inline void
- jsonSchemaGetFile(const crow::Request& /*req*/,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& schema, const std::string& schemaFile)
+inline void jsonSchemaGetFile(
+ const crow::Request& /*req*/,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& schema, const std::string& schemaFile)
{
// Sanity check the filename
if (schemaFile.find_first_not_of(
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index 65b5242..c1a0c58 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -41,8 +41,8 @@
return "";
}
-inline std::optional<nlohmann::json::array_t>
- getAssignedPrivFromRole(std::string_view role)
+inline std::optional<nlohmann::json::array_t> getAssignedPrivFromRole(
+ std::string_view role)
{
nlohmann::json::array_t privArray;
if (role == "Administrator")
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 6fe08df..2804b86 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -705,8 +705,8 @@
});
}
-inline void
- sortJSONResponse(const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp)
+inline void sortJSONResponse(
+ const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp)
{
nlohmann::json& response = sensorsAsyncResp->asyncResp->res.jsonValue;
std::array<std::string, 2> sensorHeaders{"Temperatures", "Fans"};
@@ -1681,10 +1681,10 @@
* @param callback Callback to invoke when inventory items have been obtained.
*/
template <typename Callback>
-inline void
- getInventoryItems(const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
- const std::shared_ptr<std::set<std::string>>& sensorNames,
- Callback&& callback)
+inline void getInventoryItems(
+ const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
+ const std::shared_ptr<std::set<std::string>>& sensorNames,
+ Callback&& callback)
{
BMCWEB_LOG_DEBUG("getInventoryItems enter");
auto getInventoryItemAssociationsCb =
@@ -2069,9 +2069,9 @@
BMCWEB_LOG_DEBUG("getSensorData exit");
}
-inline void
- processSensorList(const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
- const std::shared_ptr<std::set<std::string>>& sensorNames)
+inline void processSensorList(
+ const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp,
+ const std::shared_ptr<std::set<std::string>>& sensorNames)
{
auto getConnectionCb = [sensorsAsyncResp, sensorNames](
const std::set<std::string>& connections) {
@@ -2103,8 +2103,8 @@
* chassis.
* @param SensorsAsyncResp Pointer to object holding response data
*/
-inline void
- getChassisData(const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp)
+inline void getChassisData(
+ const std::shared_ptr<SensorsAsyncResp>& sensorsAsyncResp)
{
BMCWEB_LOG_DEBUG("getChassisData enter");
auto getChassisCb =
@@ -2192,10 +2192,10 @@
}
for (auto& item : collectionItems.second)
{
- if (!json_util::readJsonObject( //
+ if (!json_util::readJsonObject( //
item, sensorAsyncResp->asyncResp->res, //
- "MemberId", memberId, //
- propertyValueName, value //
+ "MemberId", memberId, //
+ propertyValueName, value //
))
{
return;
@@ -2399,10 +2399,10 @@
chassisId, sensors::sensorsNodeStr));
}
-inline void
- getSensorFromDbus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& sensorPath,
- const ::dbus::utility::MapperGetObject& mapperResponse)
+inline void getSensorFromDbus(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& sensorPath,
+ const ::dbus::utility::MapperGetObject& mapperResponse)
{
if (mapperResponse.size() != 1)
{
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index 2923c54..34f0e31 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -24,9 +24,9 @@
namespace redfish
{
-inline void
- handleServiceRootHead(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleServiceRootHead(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -109,9 +109,9 @@
protocolFeatures["DeepOperations"]["DeepPOST"] = false;
protocolFeatures["DeepOperations"]["DeepPATCH"] = false;
}
-inline void
- handleServiceRootGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleServiceRootGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 27db3aa..6fafcce 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -259,10 +259,10 @@
asyncResp->res.jsonValue["Links"]["StorageServices@odata.count"] = 1;
}
-inline void
- handleStorageGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& storageId)
+inline void handleStorageGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& storageId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -411,8 +411,8 @@
return drive::MediaType::Invalid;
}
-inline std::optional<protocol::Protocol>
- convertDriveProtocol(std::string_view proto)
+inline std::optional<protocol::Protocol> convertDriveProtocol(
+ std::string_view proto)
{
if (proto == "xyz.openbmc_project.Inventory.Item.Drive.DriveProtocol.SAS")
{
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 129c59a..45400dd 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -192,9 +192,9 @@
*
* @return None.
*/
-inline void
- getProcessorSummary(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getProcessorSummary(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
auto getCpuPresenceState = [asyncResp](const boost::system::error_code& ec3,
const bool cpuPresenceCheck) {
@@ -234,9 +234,9 @@
*
* @return None.
*/
-inline void
- processMemoryProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const dbus::utility::DBusPropertiesMap& properties)
+inline void processMemoryProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const dbus::utility::DBusPropertiesMap& properties)
{
BMCWEB_LOG_DEBUG("Got {} Dimm properties.", properties.size());
@@ -285,9 +285,9 @@
*
* @return None.
*/
-inline void
- getMemorySummary(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path)
+inline void getMemorySummary(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path)
{
dbus::utility::getAllProperties(
service, path, "xyz.openbmc_project.Inventory.Item.Dimm",
@@ -342,10 +342,10 @@
}
}
-inline void
- afterGetInventory(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const boost::system::error_code& ec,
- const dbus::utility::DBusPropertiesMap& propertiesList)
+inline void afterGetInventory(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const boost::system::error_code& ec,
+ const dbus::utility::DBusPropertiesMap& propertiesList)
{
if (ec)
{
@@ -505,8 +505,8 @@
*
* @return None.
*/
-inline void
- getComputerSystem(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getComputerSystem(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get available system components.");
constexpr std::array<std::string_view, 5> interfaces = {
@@ -891,8 +891,8 @@
* @return None.
*/
-inline void
- getBootOverrideType(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getBootOverrideType(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<std::string>(
"xyz.openbmc_project.Settings",
@@ -932,8 +932,8 @@
* @return None.
*/
-inline void
- getBootOverrideMode(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getBootOverrideMode(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<std::string>(
"xyz.openbmc_project.Settings",
@@ -984,8 +984,8 @@
* @return None.
*/
-inline void
- getBootOverrideSource(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getBootOverrideSource(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<std::string>(
"xyz.openbmc_project.Settings",
@@ -1075,8 +1075,8 @@
* @return None.
*/
-inline void
- getBootOverrideEnable(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getBootOverrideEnable(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
dbus::utility::getProperty<bool>(
"xyz.openbmc_project.Settings",
@@ -1106,8 +1106,8 @@
*
* @return None.
*/
-inline void
- getBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getBootProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get boot information.");
@@ -1128,8 +1128,8 @@
*
* @return None.
*/
-inline void
- getLastResetTime(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getLastResetTime(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Getting System Last Reset Time");
@@ -1223,8 +1223,8 @@
*
* @return None.
*/
-inline void
- getAutomaticRetryPolicy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getAutomaticRetryPolicy(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get Automatic Retry policy");
@@ -1323,8 +1323,8 @@
*
* @return None.
*/
-inline void
- getPowerRestorePolicy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getPowerRestorePolicy(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get power restore policy");
@@ -1358,8 +1358,8 @@
*
* @return None.
*/
-inline void
- getStopBootOnFault(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getStopBootOnFault(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get Stop Boot On Fault");
@@ -1678,9 +1678,9 @@
*
* @return Integer error code.
*/
-inline void
- setBootModeOrSource(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::optional<std::string>& bootSource)
+inline void setBootModeOrSource(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::optional<std::string>& bootSource)
{
std::string bootSourceStr;
std::string bootModeStr;
@@ -1733,11 +1733,11 @@
* @return Integer error code.
*/
-inline void
- setBootProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::optional<std::string>& bootSource,
- const std::optional<std::string>& bootType,
- const std::optional<std::string>& bootEnable)
+inline void setBootProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::optional<std::string>& bootSource,
+ const std::optional<std::string>& bootType,
+ const std::optional<std::string>& bootEnable)
{
BMCWEB_LOG_DEBUG("Set boot information.");
@@ -1816,8 +1816,8 @@
*
* @return stopBootOnFault value or empty if incoming value is not valid
*/
-inline std::optional<bool>
- validstopBootOnFault(const std::string& stopBootOnFaultString)
+inline std::optional<bool> validstopBootOnFault(
+ const std::string& stopBootOnFaultString)
{
if (stopBootOnFaultString == "AnyFault")
{
@@ -1840,9 +1840,9 @@
*
* @return None.
*/
-inline void
- setStopBootOnFault(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& stopBootOnFault)
+inline void setStopBootOnFault(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& stopBootOnFault)
{
BMCWEB_LOG_DEBUG("Set Stop Boot On Fault.");
@@ -1872,9 +1872,9 @@
*
* @return None.
*/
-inline void
- setAutomaticRetry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& automaticRetryConfig)
+inline void setAutomaticRetry(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& automaticRetryConfig)
{
BMCWEB_LOG_DEBUG("Set Automatic Retry.");
@@ -1931,9 +1931,9 @@
*
* @return None.
*/
-inline void
- setPowerRestorePolicy(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- std::string_view policy)
+inline void setPowerRestorePolicy(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ std::string_view policy)
{
BMCWEB_LOG_DEBUG("Set power restore policy.");
@@ -1962,8 +1962,8 @@
*
* @return None.
*/
-inline void
- getProvisioningStatus(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getProvisioningStatus(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get OEM information.");
dbus::utility::getAllProperties(
@@ -2036,8 +2036,8 @@
*
* @return PowerMode enum
*/
-inline computer_system::PowerMode
- translatePowerModeString(const std::string& modeString)
+inline computer_system::PowerMode translatePowerModeString(
+ const std::string& modeString)
{
using PowerMode = computer_system::PowerMode;
@@ -2079,10 +2079,10 @@
return PowerMode::Invalid;
}
-inline void
- afterGetPowerMode(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const boost::system::error_code& ec,
- const dbus::utility::DBusPropertiesMap& properties)
+inline void afterGetPowerMode(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const boost::system::error_code& ec,
+ const dbus::utility::DBusPropertiesMap& properties)
{
if (ec)
{
@@ -2214,9 +2214,9 @@
*
* @return PowerMode value or empty string if mode is not valid
*/
-inline std::string
- validatePowerMode(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const nlohmann::json& modeValue)
+inline std::string validatePowerMode(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const nlohmann::json& modeValue)
{
using PowerMode = computer_system::PowerMode;
std::string mode;
@@ -2401,8 +2401,8 @@
*
* @return None.
*/
-inline void
- getHostWatchdogTimer(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getHostWatchdogTimer(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get host watchodg");
dbus::utility::getAllProperties(
@@ -2466,10 +2466,10 @@
*
* @return None.
*/
-inline void
- setWDTProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::optional<bool> wdtEnable,
- const std::optional<std::string>& wdtTimeOutAction)
+inline void setWDTProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::optional<bool> wdtEnable,
+ const std::optional<std::string>& wdtTimeOutAction)
{
BMCWEB_LOG_DEBUG("Set host watchdog");
@@ -2513,9 +2513,9 @@
*
* @return true if successful
*/
-inline bool
- parseIpsProperties(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const dbus::utility::DBusPropertiesMap& properties)
+inline bool parseIpsProperties(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const dbus::utility::DBusPropertiesMap& properties)
{
const bool* enabled = nullptr;
const uint8_t* enterUtilizationPercent = nullptr;
@@ -2577,8 +2577,8 @@
*
* @return None.
*/
-inline void
- getIdlePowerSaver(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void getIdlePowerSaver(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
BMCWEB_LOG_DEBUG("Get idle power saver parameters");
@@ -3009,10 +3009,10 @@
}
}
-inline void
- handleComputerSystemGet(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& systemName)
+inline void handleComputerSystemGet(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& systemName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -3192,27 +3192,27 @@
std::optional<uint8_t> ipsExitUtil;
std::optional<uint64_t> ipsExitTime;
- if (!json_util::readJsonPatch( //
- req, asyncResp->res, //
- "AssetTag", assetTag, //
- "Boot/AutomaticRetryAttempts", bootAutomaticRetryAttempts, //
- "Boot/AutomaticRetryConfig", bootAutomaticRetry, //
- "Boot/BootSourceOverrideEnabled", bootEnable, //
- "Boot/BootSourceOverrideMode", bootType, //
- "Boot/BootSourceOverrideTarget", bootSource, //
- "Boot/StopBootOnFault", stopBootOnFault, //
+ if (!json_util::readJsonPatch( //
+ req, asyncResp->res, //
+ "AssetTag", assetTag, //
+ "Boot/AutomaticRetryAttempts", bootAutomaticRetryAttempts, //
+ "Boot/AutomaticRetryConfig", bootAutomaticRetry, //
+ "Boot/BootSourceOverrideEnabled", bootEnable, //
+ "Boot/BootSourceOverrideMode", bootType, //
+ "Boot/BootSourceOverrideTarget", bootSource, //
+ "Boot/StopBootOnFault", stopBootOnFault, //
"Boot/TrustedModuleRequiredToBoot", bootTrustedModuleRequired, //
- "HostWatchdogTimer/FunctionEnabled", wdtEnable, //
- "HostWatchdogTimer/TimeoutAction", wdtTimeOutAction, //
- "IdlePowerSaver/Enabled", ipsEnable, //
- "IdlePowerSaver/EnterDwellTimeSeconds", ipsEnterTime, //
- "IdlePowerSaver/EnterUtilizationPercent", ipsEnterUtil, //
- "IdlePowerSaver/ExitDwellTimeSeconds", ipsExitTime, //
- "IdlePowerSaver/ExitUtilizationPercent", ipsExitUtil, //
- "IndicatorLED", indicatorLed, //
- "LocationIndicatorActive", locationIndicatorActive, //
- "PowerMode", powerMode, //
- "PowerRestorePolicy", powerRestorePolicy //
+ "HostWatchdogTimer/FunctionEnabled", wdtEnable, //
+ "HostWatchdogTimer/TimeoutAction", wdtTimeOutAction, //
+ "IdlePowerSaver/Enabled", ipsEnable, //
+ "IdlePowerSaver/EnterDwellTimeSeconds", ipsEnterTime, //
+ "IdlePowerSaver/EnterUtilizationPercent", ipsEnterUtil, //
+ "IdlePowerSaver/ExitDwellTimeSeconds", ipsExitTime, //
+ "IdlePowerSaver/ExitUtilizationPercent", ipsExitUtil, //
+ "IndicatorLED", indicatorLed, //
+ "LocationIndicatorActive", locationIndicatorActive, //
+ "PowerMode", powerMode, //
+ "PowerRestorePolicy", powerRestorePolicy //
))
{
return;
@@ -3311,9 +3311,9 @@
* allowableValues. If translation not possible, does nothing to
* allowableValues.
*/
-inline void
- dbusToRfAllowedHostTransitions(const std::string& dbusAllowedHostTran,
- nlohmann::json::array_t& allowableValues)
+inline void dbusToRfAllowedHostTransitions(
+ const std::string& dbusAllowedHostTran,
+ nlohmann::json::array_t& allowableValues)
{
if (dbusAllowedHostTran == "xyz.openbmc_project.State.Host.Transition.On")
{
diff --git a/redfish-core/lib/systems_logservices_hostlogger.hpp b/redfish-core/lib/systems_logservices_hostlogger.hpp
index 701695d..aae0195 100644
--- a/redfish-core/lib/systems_logservices_hostlogger.hpp
+++ b/redfish-core/lib/systems_logservices_hostlogger.hpp
@@ -38,9 +38,9 @@
{
constexpr const char* hostLoggerFolderPath = "/var/log/console";
-inline bool
- getHostLoggerFiles(const std::string& hostLoggerFilePath,
- std::vector<std::filesystem::path>& hostLoggerFiles)
+inline bool getHostLoggerFiles(
+ const std::string& hostLoggerFilePath,
+ std::vector<std::filesystem::path>& hostLoggerFiles)
{
std::error_code ec;
std::filesystem::directory_iterator logPath(hostLoggerFilePath, ec);
diff --git a/redfish-core/lib/systems_logservices_postcodes.hpp b/redfish-core/lib/systems_logservices_postcodes.hpp
index 84bd112..2285ab1 100644
--- a/redfish-core/lib/systems_logservices_postcodes.hpp
+++ b/redfish-core/lib/systems_logservices_postcodes.hpp
@@ -321,9 +321,9 @@
return false;
}
-inline void
- getPostCodeForEntry(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& entryId)
+inline void getPostCodeForEntry(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& entryId)
{
uint16_t bootIndex = 0;
uint64_t codeIndex = 0;
@@ -372,10 +372,10 @@
bootIndex);
}
-inline void
- getPostCodeForBoot(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const uint16_t bootIndex, const uint16_t bootCount,
- const uint64_t entryCount, size_t skip, size_t top)
+inline void getPostCodeForBoot(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const uint16_t bootIndex, const uint16_t bootCount,
+ const uint64_t entryCount, size_t skip, size_t top)
{
crow::connections::systemBus->async_method_call(
[asyncResp, bootIndex, bootCount, entryCount, skip,
@@ -431,9 +431,9 @@
bootIndex);
}
-inline void
- getCurrentBootNumber(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- size_t skip, size_t top)
+inline void getCurrentBootNumber(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, size_t skip,
+ size_t top)
{
uint64_t entryCount = 0;
dbus::utility::getProperty<uint16_t>(
diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
index 8417dba..1b2a413 100644
--- a/redfish-core/lib/thermal.hpp
+++ b/redfish-core/lib/thermal.hpp
@@ -71,9 +71,9 @@
sensor_utils::chassisSubNodeToString(
sensor_utils::ChassisSubNode::thermalNode));
- if (!json_util::readJsonPatch( //
+ if (!json_util::readJsonPatch( //
req, sensorsAsyncResp->asyncResp->res, //
- "Fans", fanCollections, //
+ "Fans", fanCollections, //
"Temperatures", temperatureCollections //
))
{
diff --git a/redfish-core/lib/thermal_metrics.hpp b/redfish-core/lib/thermal_metrics.hpp
index b2ddec7..c844525 100644
--- a/redfish-core/lib/thermal_metrics.hpp
+++ b/redfish-core/lib/thermal_metrics.hpp
@@ -126,10 +126,10 @@
chassisId));
}
-inline void
- doThermalMetrics(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId,
- const std::optional<std::string>& validChassisPath)
+inline void doThermalMetrics(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId,
+ const std::optional<std::string>& validChassisPath)
{
if (!validChassisPath)
{
@@ -176,10 +176,10 @@
});
}
-inline void
- handleThermalMetricsGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& chassisId)
+inline void handleThermalMetricsGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& chassisId)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
index c15520e..7f4a614 100644
--- a/redfish-core/lib/trigger.hpp
+++ b/redfish-core/lib/trigger.hpp
@@ -66,8 +66,8 @@
using TriggerSensorsParams =
std::vector<std::pair<sdbusplus::message::object_path, std::string>>;
-inline triggers::TriggerActionEnum
- toRedfishTriggerAction(std::string_view dbusValue)
+inline triggers::TriggerActionEnum toRedfishTriggerAction(
+ std::string_view dbusValue)
{
if (dbusValue ==
"xyz.openbmc_project.Telemetry.Trigger.TriggerAction.UpdateReport")
@@ -183,8 +183,8 @@
return "";
}
-inline triggers::ThresholdActivation
- toRedfishActivation(std::string_view dbusValue)
+inline triggers::ThresholdActivation toRedfishActivation(
+ std::string_view dbusValue)
{
if (dbusValue == "xyz.openbmc_project.Telemetry.Trigger.Direction.Either")
{
@@ -270,8 +270,8 @@
return std::nullopt;
}
-inline std::optional<DiscreteCondition>
- getDiscreteCondition(const std::string& discreteTriggerCondition)
+inline std::optional<DiscreteCondition> getDiscreteCondition(
+ const std::string& discreteTriggerCondition)
{
if (discreteTriggerCondition == "Specified")
{
@@ -293,11 +293,11 @@
std::string activation;
std::string dwellTimeStr;
- if (!json_util::readJsonObject( //
- threshold, res, //
- "Activation", activation, //
+ if (!json_util::readJsonObject( //
+ threshold, res, //
+ "Activation", activation, //
"DwellTime", dwellTimeStr, //
- "Reading", reading //
+ "Reading", reading //
))
{
return false;
@@ -407,12 +407,12 @@
std::string dwellTimeStr;
std::string severity;
- if (!json_util::readJsonObject( //
- thresholdInfo, res, //
+ if (!json_util::readJsonObject( //
+ thresholdInfo, res, //
"DwellTime", dwellTimeStr, //
- "Name", name, //
- "Severity", severity, //
- "Value", value //
+ "Name", name, //
+ "Severity", severity, //
+ "Value", value //
))
{
return false;
@@ -616,20 +616,20 @@
std::optional<std::vector<std::string>> metricReportDefinitions;
NumericThresholds thresholds;
- if (!json_util::readJsonPatch( //
- req, res, //
- "Id", id, //
- "DiscreteTriggerCondition", discreteTriggerCondition, //
- "DiscreteTriggers", discreteTriggers, //
- "Links/MetricReportDefinitions", metricReportDefinitions, //
- "MetricProperties", ctx.metricProperties, //
- "MetricType", metricType, //
- "Name", name, //
+ if (!json_util::readJsonPatch( //
+ req, res, //
+ "Id", id, //
+ "DiscreteTriggerCondition", discreteTriggerCondition, //
+ "DiscreteTriggers", discreteTriggers, //
+ "Links/MetricReportDefinitions", metricReportDefinitions, //
+ "MetricProperties", ctx.metricProperties, //
+ "MetricType", metricType, //
+ "Name", name, //
"NumericThresholds/LowerCritical", thresholds.lowerCritical, //
- "NumericThresholds/LowerWarning", thresholds.lowerWarning, //
+ "NumericThresholds/LowerWarning", thresholds.lowerWarning, //
"NumericThresholds/UpperCritical", thresholds.upperCritical, //
- "NumericThresholds/UpperWarning", thresholds.upperWarning, //
- "TriggerActions", triggerActions //
+ "NumericThresholds/UpperWarning", thresholds.upperWarning, //
+ "TriggerActions", triggerActions //
))
{
return false;
@@ -732,8 +732,8 @@
asyncResp->res.addHeader("Location", locationUrl.buffer());
}
-inline std::optional<nlohmann::json::array_t>
- getTriggerActions(const std::vector<std::string>& dbusActions)
+inline std::optional<nlohmann::json::array_t> getTriggerActions(
+ const std::vector<std::string>& dbusActions)
{
nlohmann::json::array_t triggerActions;
for (const std::string& dbusAction : dbusActions)
@@ -826,8 +826,8 @@
return {std::move(reports)};
}
-inline std::vector<std::string>
- getMetricProperties(const TriggerSensorsParams& sensors)
+inline std::vector<std::string> getMetricProperties(
+ const TriggerSensorsParams& sensors)
{
std::vector<std::string> metricProperties;
metricProperties.reserve(sensors.size());
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index a5bbf9a..6efcab5 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -258,9 +258,9 @@
// Note that asyncResp can be either a valid pointer or nullptr. If nullptr
// then no asyncResp updates will occur
-inline void
- softwareInterfaceAdded(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- sdbusplus::message_t& m, task::Payload&& payload)
+inline void softwareInterfaceAdded(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ sdbusplus::message_t& m, task::Payload&& payload)
{
dbus::utility::DBusInterfacesMap interfacesProperties;
@@ -349,9 +349,9 @@
}
}
-inline void
- handleUpdateErrorType(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& url, const std::string& type)
+inline void handleUpdateErrorType(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& url,
+ const std::string& type)
{
// NOLINTBEGIN(bugprone-branch-clone)
if (type == "xyz.openbmc_project.Software.Image.Error.UnTarFailure")
@@ -408,9 +408,9 @@
fwAvailableTimer = nullptr;
}
-inline void
- afterUpdateErrorMatcher(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& url, sdbusplus::message_t& m)
+inline void afterUpdateErrorMatcher(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& url,
+ sdbusplus::message_t& m)
{
dbus::utility::DBusInterfacesMap interfacesProperties;
sdbusplus::message::object_path objPath;
@@ -598,9 +598,9 @@
// 1) TransferProtocol:TFTP ImageURI:1.1.1.1/myfile.bin
// 2) ImageURI:tftp://1.1.1.1/myfile.bin
- if (!json_util::readJsonAction( //
- req, asyncResp->res, //
- "ImageURI", imageURI, //
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "ImageURI", imageURI, //
"TransferProtocol", transferProtocol //
))
{
@@ -696,8 +696,8 @@
std::vector<std::string> targets;
};
-inline std::optional<std::string>
- processUrl(boost::system::result<boost::urls::url_view>& url)
+inline std::optional<std::string> processUrl(
+ boost::system::result<boost::urls::url_view>& url)
{
if (!url)
{
@@ -773,10 +773,10 @@
return std::nullopt;
}
- if (!json_util::readJsonObject( //
- *obj, asyncResp->res, //
+ if (!json_util::readJsonObject( //
+ *obj, asyncResp->res, //
"@Redfish.OperationApplyTime", multiRet.applyTime, //
- "Targets", tempTargets //
+ "Targets", tempTargets //
))
{
return std::nullopt;
@@ -979,9 +979,9 @@
}
}
-inline void
- updateMultipartContext(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const crow::Request& req, MultipartParser&& parser)
+inline void updateMultipartContext(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const crow::Request& req, MultipartParser&& parser)
{
std::optional<MultiPartUpdateParameters> multipart =
extractMultipartUpdateParameters(asyncResp, std::move(parser));
@@ -1047,9 +1047,9 @@
}
}
-inline void
- handleUpdateServicePost(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleUpdateServicePost(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -1088,9 +1088,9 @@
}
}
-inline void
- handleUpdateServiceGet(App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void handleUpdateServiceGet(
+ App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
@@ -1187,10 +1187,10 @@
}
}
-inline void
- getSoftwareVersion(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& service, const std::string& path,
- const std::string& swId)
+inline void getSoftwareVersion(
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& service, const std::string& path,
+ const std::string& swId)
{
dbus::utility::getAllProperties(
service, path, "xyz.openbmc_project.Software.Version",
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index fbdcb94..fca6bba 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -92,10 +92,10 @@
const std::pair<sdbusplus::message::object_path,
dbus::utility::DBusInterfacesMap>&)>;
-inline void
- findAndParseObject(const std::string& service, const std::string& resName,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- CheckItemHandler&& handler)
+inline void findAndParseObject(
+ const std::string& service, const std::string& resName,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ CheckItemHandler&& handler)
{
sdbusplus::message::object_path path("/xyz/openbmc_project/VirtualMedia");
dbus::utility::getManagedObjects(
@@ -152,9 +152,9 @@
/**
* @brief Read all known properties from VM object interfaces
*/
-inline void
- vmParseInterfaceObject(const dbus::utility::DBusInterfacesMap& interfaces,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
+inline void vmParseInterfaceObject(
+ const dbus::utility::DBusInterfacesMap& interfaces,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
for (const auto& [interface, values] : interfaces)
{
@@ -308,12 +308,12 @@
});
}
-inline void
- afterGetVmData(const std::string& name, const std::string& /*service*/,
- const std::string& resName,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::pair<sdbusplus::message::object_path,
- dbus::utility::DBusInterfacesMap>& item)
+inline void afterGetVmData(
+ const std::string& name, const std::string& /*service*/,
+ const std::string& resName,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::pair<sdbusplus::message::object_path,
+ dbus::utility::DBusInterfacesMap>& item)
{
VmMode mode = parseObjectPathAndGetMode(item.first, resName);
if (mode == VmMode::Invalid)
@@ -368,8 +368,8 @@
* @brief Function extracts transfer protocol type from URI.
*
*/
-inline std::optional<TransferProtocol>
- getTransferProtocolFromUri(const boost::urls::url_view_base& imageUri)
+inline std::optional<TransferProtocol> getTransferProtocolFromUri(
+ const boost::urls::url_view_base& imageUri)
{
std::string_view scheme = imageUri.scheme();
if (scheme == "smb")
@@ -711,15 +711,15 @@
InsertMediaActionParams actionParams;
// Read obligatory parameters (url of image)
- if (!json_util::readJsonAction( //
- req, asyncResp->res, //
- "Image", actionParams.imageUrl, //
- "Inserted", actionParams.inserted, //
- "Password", actionParams.password, //
- "TransferMethod", actionParams.transferMethod, //
+ if (!json_util::readJsonAction( //
+ req, asyncResp->res, //
+ "Image", actionParams.imageUrl, //
+ "Inserted", actionParams.inserted, //
+ "Password", actionParams.password, //
+ "TransferMethod", actionParams.transferMethod, //
"TransferProtocolType", actionParams.transferProtocolType, //
- "UserName", actionParams.userName, //
- "WriteProtected", actionParams.writeProtected //
+ "UserName", actionParams.userName, //
+ "WriteProtected", actionParams.writeProtected //
))
{
return;
@@ -884,10 +884,10 @@
});
}
-inline void
- handleVirtualMediaGet(crow::App& app, const crow::Request& req,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- const std::string& name, const std::string& resName)
+inline void handleVirtualMediaGet(
+ crow::App& app, const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ const std::string& name, const std::string& resName)
{
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{