summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redfish-core/include/error_messages.hpp16
-rw-r--r--redfish-core/src/error_messages.cpp23
2 files changed, 39 insertions, 0 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index 9b35e6dac6..ed00447ef6 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -425,6 +425,22 @@ void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
const boost::urls::url_view& arg3);
/**
+ * @brief Formats PropertyValueExternalConflict message into JSON
+ * Message body: "The property '%1' with the requested value of '%2' could not
+ * be written because the value is not available due to a configuration
+ * conflict."
+ *
+ * @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 PropertyValueExternalConflict formatted to JSON */
+nlohmann::json propertyValueExternalConflict(std::string_view arg1,
+ std::string_view arg2);
+
+void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
* @brief Formats PropertyValueIncorrect message into JSON
* Message body: "The property '<arg1>' with the requested value of '<arg2>'
* could not be written because the value does not meet the constraints of the
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 8f8b00bf5d..5c4fb3110b 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -756,6 +756,29 @@ void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
/**
* @internal
+ * @brief Formats PropertyValueExternalConflict message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json propertyValueExternalConflict(std::string_view arg1,
+ std::string_view arg2)
+{
+ return getLog(
+ redfish::registries::base::Index::propertyValueExternalConflict,
+ std::to_array({arg1, arg2}));
+}
+
+void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::conflict);
+ addMessageToErrorJson(res.jsonValue,
+ propertyValueExternalConflict(arg1, arg2));
+}
+
+/**
+ * @internal
* @brief Formats PropertyValueIncorrect message into JSON
*
* See header file for more information