summaryrefslogtreecommitdiff
path: root/redfish-core/include/error_messages.hpp
diff options
context:
space:
mode:
authorAppaRao Puli <apparao.puli@linux.intel.com>2020-09-07 23:23:21 +0300
committerAppaRao Puli <apparao.puli@linux.intel.com>2020-09-09 05:18:54 +0300
commitdd28ba829972906cbe2d372cf4ec00fdf82fbb83 (patch)
tree155f77b8c23b4bedc3a326cd01a765c286ad907b /redfish-core/include/error_messages.hpp
parent029cc1f4106968f7e871d17a8bcb71a303a12ffa (diff)
downloadbmcweb-dd28ba829972906cbe2d372cf4ec00fdf82fbb83.tar.xz
Add MutualExclusiveProperties registry
Add MutualExclusiveProperties message registry entry and error message. As per redfish specification, "RegistryPrefixes" and "MessageIds" are mutually exclusive. So add check for same in EventService and return MutualExclusiveProperties error message. Tested: - Create subscription failed with error(bad request) when the request body contain both "RegistryPrefixes" and "MessageIds". Change-Id: I4c14f946977bce2ced8a7f96eb85855117fde9a8 Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Diffstat (limited to 'redfish-core/include/error_messages.hpp')
-rw-r--r--redfish-core/include/error_messages.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index 0243be9ed5..9a2d1ca481 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -787,6 +787,20 @@ nlohmann::json invalidUpload(const std::string& arg1, const std::string& arg2);
void invalidUpload(crow::Response& res, const std::string& arg1,
const std::string& arg2);
+/**
+ * @brief Formats MutualExclusiveProperties message into JSON
+ * Message body: "The properties <arg1> and <arg2> are mutually exclusive."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ * @param[in] arg2 Parameter of message that will replace %2 in its body.
+ *
+ * @returns Message MutualExclusiveProperties formatted to JSON */
+nlohmann::json mutualExclusiveProperties(const std::string& arg1,
+ const std::string& arg2);
+
+void mutualExclusiveProperties(crow::Response& res, const std::string& arg1,
+ const std::string& arg2);
+
} // namespace messages
} // namespace redfish