Move over to upstream c++ style
This patchset moves bmcweb over to the upstream style naming
conventions for variables, classes, and functions, as well as imposes
the latest clang-format file.
This changeset was mostly built automatically by the included
.clang-tidy file, which has the ability to autoformat and auto rename
variables. At some point in the future I would like to see this in
greater use, but for now, we will impose it on bmcweb, and see how it
goes.
Tested: Code still compiles, and appears to run, although other issues
are possible and likely.
Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/redfish-core/lib/roles.hpp b/redfish-core/lib/roles.hpp
index f538c83..72d7948 100644
--- a/redfish-core/lib/roles.hpp
+++ b/redfish-core/lib/roles.hpp
@@ -34,18 +34,19 @@
"ConfigureUsers", "ConfigureSelf",
"ConfigureComponents"};
Node::json["OemPrivileges"] = nlohmann::json::array();
- entityPrivileges = {{boost::beast::http::verb::get, {{"Login"}}},
- {boost::beast::http::verb::head, {{"Login"}}},
- {boost::beast::http::verb::patch, {{"ConfigureManager"}}},
- {boost::beast::http::verb::put, {{"ConfigureManager"}}},
- {boost::beast::http::verb::delete_, {{"ConfigureManager"}}},
- {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
+ entityPrivileges = {
+ {boost::beast::http::verb::get, {{"Login"}}},
+ {boost::beast::http::verb::head, {{"Login"}}},
+ {boost::beast::http::verb::patch, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::put, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::delete_, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
}
private:
- void doGet(crow::response& res, const crow::request& req,
+ void doGet(crow::Response& res, const crow::Request& req,
const std::vector<std::string>& params) override {
- res.json_value = Node::json;
+ res.jsonValue = Node::json;
res.end();
}
};
@@ -64,23 +65,24 @@
Node::json["Members"] = {
{{"@odata.id", "/redfish/v1/AccountService/Roles/Administrator"}}};
- entityPrivileges = {{boost::beast::http::verb::get, {{"Login"}}},
- {boost::beast::http::verb::head, {{"Login"}}},
- {boost::beast::http::verb::patch, {{"ConfigureManager"}}},
- {boost::beast::http::verb::put, {{"ConfigureManager"}}},
- {boost::beast::http::verb::delete_, {{"ConfigureManager"}}},
- {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
+ entityPrivileges = {
+ {boost::beast::http::verb::get, {{"Login"}}},
+ {boost::beast::http::verb::head, {{"Login"}}},
+ {boost::beast::http::verb::patch, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::put, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::delete_, {{"ConfigureManager"}}},
+ {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
}
private:
- void doGet(crow::response& res, const crow::request& req,
+ void doGet(crow::Response& res, const crow::Request& req,
const std::vector<std::string>& params) override {
- res.json_value = Node::json;
+ res.jsonValue = Node::json;
// This is a short term solution to work around a bug. GetSubroutes
// accidentally recognizes the Roles/Administrator route as a subroute
// (because it's hardcoded to a single entity). Remove this line when that
// is resolved
- res.json_value.erase("Administrator");
+ res.jsonValue.erase("Administrator");
res.end();
}
};