Lines Matching +full:entry +full:- +full:method
8 * http://www.apache.org/licenses/LICENSE-2.0
21 #include <phosphor-logging/lg2.hpp>
32 // String key must be in all lowercase for method lookup
43 if (!jsonObj.contains("method") || !jsonObj["method"].contains("name"))
45 // Log error on missing profile method
46 lg2::error("Missing required profile method", "JSON", jsonObj.dump());
47 throw std::runtime_error("Missing required profile method");
49 // The method to use in determining if the profile is active
50 auto method = jsonObj["method"]["name"].get<std::string>();
51 std::transform(method.begin(), method.end(), method.begin(), tolower);
52 auto handler = _methods.find(method);
55 // Call method for determining profile's active state
56 _active = handler->second(jsonObj["method"]);
63 _methods.begin()->first, [](auto list, auto method) {
64 return std::move(list) + ", " + method.first;
67 "Configured method not available. Available methods are {METHODS_AVAILABLE}",
68 "METHODS_AVAILABLE", methods, "JSON", jsonObj["method"].dump());
72 bool Profile::allOf(const json& method)
74 if (!method.contains("properties"))
76 lg2::error("Missing required all_of method properties list", "JSON",
77 method.dump());
79 "Missing required all_of method properties list");
83 method["properties"].begin(), method["properties"].end(),
88 lg2::error("Missing required all_of method property parameters",
91 "Missing required all_of method parameters");