summaryrefslogtreecommitdiff
path: root/include/ibm
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-07-25 07:45:05 +0300
committerEd Tanous <ed@tanous.net>2020-08-17 23:54:37 +0300
commit23a21a1cbed23ace4174664950e595df961e9e69 (patch)
tree12e7cc9d9301642fc1e48332a0e0834c54e8c8af /include/ibm
parent52cc112d962920b035c870127784bcbd98948fad (diff)
downloadbmcweb-23a21a1cbed23ace4174664950e595df961e9e69.tar.xz
Enable clang warnings
This commit enables clang warnings, and fixes all warnings that were found. Most of these fall into a couple categories: Variable shadow issues were fixed by renaming variables unused parameter warnings were resolved by either checking error codes that had been ignored, or removing the name of the variable from the scope. Other various warnings were fixed in the best way I was able to come up with. Note, the redfish Node class is especially insidious, as it causes all imlementers to have variables for parameters, regardless of whether or not they are used. Deprecating the Node class is on my list of things to do, as it adds extra overhead, and in general isn't a useful abstraction. For now, I have simply fixed all the handlers. Tested: Added the current meta-clang meta layer into bblayers.conf, and added TOOLCHAIN_pn-bmcweb = "clang" to my local.conf Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
Diffstat (limited to 'include/ibm')
-rw-r--r--include/ibm/management_console_rest.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 7cb744e4b7..db1e9f32b6 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -579,7 +579,7 @@ void requestRoutes(App& app)
// allowed only for admin
BMCWEB_ROUTE(app, "/ibm/v1/")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
[](const crow::Request& req, crow::Response& res) {
res.jsonValue["@odata.type"] =
@@ -597,7 +597,7 @@ void requestRoutes(App& app)
});
BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
[](const crow::Request& req, crow::Response& res) {
handleConfigFileList(res);
@@ -605,28 +605,28 @@ void requestRoutes(App& app)
BMCWEB_ROUTE(app,
"/ibm/v1/Host/ConfigFiles/Actions/IBMConfigFiles.DeleteAll")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)(
[](const crow::Request& req, crow::Response& res) {
deleteConfigFiles(res);
});
BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles/<path>")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::put, boost::beast::http::verb::get,
boost::beast::http::verb::delete_)(
[](const crow::Request& req, crow::Response& res,
const std::string& path) { handleFileUrl(req, res, path); });
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
[](const crow::Request& req, crow::Response& res) {
getLockServiceData(res);
});
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.AcquireLock")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)(
[](const crow::Request& req, crow::Response& res) {
std::vector<nlohmann::json> body;
@@ -640,7 +640,7 @@ void requestRoutes(App& app)
handleAcquireLockAPI(req, res, body);
});
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.ReleaseLock")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)([](const crow::Request& req,
crow::Response& res) {
std::string type;
@@ -670,7 +670,7 @@ void requestRoutes(App& app)
}
});
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService/Actions/LockService.GetLockList")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)(
[](const crow::Request& req, crow::Response& res) {
ListOfSessionIds listSessionIds;
@@ -686,7 +686,7 @@ void requestRoutes(App& app)
});
BMCWEB_ROUTE(app, "/ibm/v1/HMC/BroadcastService")
- .requires({"ConfigureComponents", "ConfigureManager"})
+ .privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)(
[](const crow::Request& req, crow::Response& res) {
handleBroadcastService(req, res);