Format readjson
clang-format may potentially reformat the readJson calls if they may
have more keys or key names are longer. This makes formatting in a way
that's readable by forcing to break a line for each key using an
empty-comment (`//`) each line.
It also allows trivially alphabetizing the list such that new additions
are less likely to have merge conflicts.
Tested:
- Check whitespace only.
- Code compiles.
- Redfish Service Validator with the same results before this
Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index d9a8d17..5265436 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -3199,32 +3199,31 @@
std::optional<uint8_t> ipsExitUtil;
std::optional<uint64_t> ipsExitTime;
- // clang-format off
- if (!json_util::readJsonPatch(
- req, asyncResp->res,
- "IndicatorLED", indicatorLed,
- "LocationIndicatorActive", locationIndicatorActive,
- "AssetTag", assetTag,
- "PowerRestorePolicy", powerRestorePolicy,
- "PowerMode", powerMode,
- "HostWatchdogTimer/FunctionEnabled", wdtEnable,
- "HostWatchdogTimer/TimeoutAction", wdtTimeOutAction,
- "Boot/BootSourceOverrideTarget", bootSource,
- "Boot/BootSourceOverrideMode", bootType,
- "Boot/BootSourceOverrideEnabled", bootEnable,
- "Boot/AutomaticRetryConfig", bootAutomaticRetry,
- "Boot/AutomaticRetryAttempts", bootAutomaticRetryAttempts,
- "Boot/TrustedModuleRequiredToBoot", bootTrustedModuleRequired,
- "Boot/StopBootOnFault", stopBootOnFault,
- "IdlePowerSaver/Enabled", ipsEnable,
- "IdlePowerSaver/EnterUtilizationPercent", ipsEnterUtil,
- "IdlePowerSaver/EnterDwellTimeSeconds", ipsEnterTime,
- "IdlePowerSaver/ExitUtilizationPercent", ipsExitUtil,
- "IdlePowerSaver/ExitDwellTimeSeconds", 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, //
+ "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 //
+ ))
{
return;
}
- // clang-format on
asyncResp->res.result(boost::beast::http::status::no_content);