Order by order in DMTF registry
The DMTF registry has a defined order. Previously these were randomly
ordered dependent on the hash function used when they were generated
years ago.
Functionally the only change here is to parse_registries.py, to remove
the sorting, then to regenerate the files.
Tested: On last patch in series.
Change-Id: I7432c26ec4a1b18acf63ece85500df370f4758d3
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index c7aeb86..7dfe62d 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -19,7 +19,6 @@
#include <source_location>
#include <string>
#include <string_view>
-#include <utility>
// IWYU pragma: no_forward_declare crow::Response
@@ -38,137 +37,47 @@
void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
/**
- * @brief Formats ResourceInUse message into JSON
- * Message body: "The change to the requested resource failed because the
- * resource is in use or in transition."
+ * @brief Formats Success message into JSON
+ * Message body: "The request completed successfully."
*
*
- * @returns Message ResourceInUse formatted to JSON */
-nlohmann::json resourceInUse();
+ * @returns Message Success formatted to JSON */
+nlohmann::json success();
-void resourceInUse(crow::Response& res);
+void success(crow::Response& res);
/**
- * @brief Formats MalformedJSON message into JSON
- * Message body: "The request body submitted was malformed JSON and could not be
- * parsed by the receiving service."
+ * @brief Formats GeneralError message into JSON
+ * Message body: "A general error has occurred. See Resolution for information
+ * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not
+ * provided."
*
*
- * @returns Message MalformedJSON formatted to JSON */
-nlohmann::json malformedJSON();
+ * @returns Message GeneralError formatted to JSON */
+nlohmann::json generalError();
-void malformedJSON(crow::Response& res);
+void generalError(crow::Response& res);
/**
- * @brief Formats ResourceMissingAtURI message into JSON
- * Message body: "The resource at the URI <arg1> was not found."
+ * @brief Formats Created message into JSON
+ * Message body: "The resource was created successfully."
*
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message ResourceMissingAtURI formatted to JSON */
-nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1);
+ * @returns Message Created formatted to JSON */
+nlohmann::json created();
-void resourceMissingAtURI(crow::Response& res,
- const boost::urls::url_view_base& arg1);
+void created(crow::Response& res);
/**
- * @brief Formats ActionParameterValueFormatError message into JSON
- * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
- * is not a format that the parameter can accept."
+ * @brief Formats NoOperation message into JSON
+ * Message body: "The request body submitted contain no data to act upon and no
+ * changes to the resource took place."
*
- * @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
*
- * @returns Message ActionParameterValueFormatError formatted to JSON */
-nlohmann::json actionParameterValueFormatError(
- const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
+ * @returns Message NoOperation formatted to JSON */
+nlohmann::json noOperation();
-void actionParameterValueFormatError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
- std::string_view arg3);
-
-/**
- * @brief Formats ActionParameterValueNotInList message into JSON
- * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
- * is not in the list of acceptable values."
- *
- * @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
- *
- * @returns Message ActionParameterValueNotInList formatted to JSON */
-nlohmann::json actionParameterValueNotInList(
- std::string_view arg1, std::string_view arg2, std::string_view arg3);
-
-void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
- std::string_view arg2,
- std::string_view arg3);
-
-/**
- * @brief Formats InternalError message into JSON
- * Message body: "The request failed due to an internal service error. The
- * service is still operational."
- *
- *
- * @returns Message InternalError formatted to JSON */
-nlohmann::json internalError();
-
-void internalError(crow::Response& res, std::source_location location =
- std::source_location::current());
-
-/**
- * @brief Formats UnrecognizedRequestBody message into JSON
- * Message body: "The service detected a malformed request body that it was
- * unable to interpret."
- *
- *
- * @returns Message UnrecognizedRequestBody formatted to JSON */
-nlohmann::json unrecognizedRequestBody();
-
-void unrecognizedRequestBody(crow::Response& res);
-
-/**
- * @brief Formats ResourceAtUriUnauthorized message into JSON
- * Message body: "While accessing the resource at <arg1>, the service received
- * an authorization error <arg2>."
- *
- * @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 ResourceAtUriUnauthorized formatted to JSON */
-nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
- std::string_view arg2);
-
-void resourceAtUriUnauthorized(crow::Response& res,
- const boost::urls::url_view_base& arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats ActionParameterUnknown message into JSON
- * Message body: "The action <arg1> was submitted with the invalid parameter
- * <arg2>."
- *
- * @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 ActionParameterUnknown formatted to JSON */
-nlohmann::json actionParameterUnknown(std::string_view arg1,
- std::string_view arg2);
-
-void actionParameterUnknown(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats ResourceCannotBeDeleted message into JSON
- * Message body: "The delete request failed because the resource requested
- * cannot be deleted."
- *
- *
- * @returns Message ResourceCannotBeDeleted formatted to JSON */
-nlohmann::json resourceCannotBeDeleted();
-
-void resourceCannotBeDeleted(crow::Response& res);
+void noOperation(crow::Response& res);
/**
* @brief Formats PropertyDuplicate message into JSON
@@ -182,56 +91,31 @@
void propertyDuplicate(crow::Response& res, std::string_view arg1);
/**
- * @brief Formats ServiceTemporarilyUnavailable message into JSON
- * Message body: "The service is temporarily unavailable. Retry in <arg1>
- * seconds."
+ * @brief Formats PropertyUnknown message into JSON
+ * Message body: "The property <arg1> is not in the list of valid properties for
+ * the resource."
*
* @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
-nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
+ * @returns Message PropertyUnknown formatted to JSON */
+nlohmann::json propertyUnknown(std::string_view arg1);
-void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
+void propertyUnknown(crow::Response& res, std::string_view arg1);
/**
- * @brief Formats ResourceAlreadyExists message into JSON
- * Message body: "The requested resource of type <arg1> with the property <arg2>
- * with the value <arg3> already exists."
+ * @brief Formats PropertyValueTypeError message into JSON
+ * Message body: "The value <arg1> for the property <arg2> is not a type that
+ * the property can accept."
*
* @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
*
- * @returns Message ResourceAlreadyExists formatted to JSON */
-nlohmann::json resourceAlreadyExists(
- std::string_view arg1, std::string_view arg2, std::string_view arg3);
+ * @returns Message PropertyValueTypeError formatted to JSON */
+nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
+ std::string_view arg2);
-void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
- std::string_view arg2, std::string_view arg3);
-
-/**
- * @brief Formats AccountForSessionNoLongerExists message into JSON
- * Message body: "The account for the current session was removed, and so the
- * current session was removed as well."
- *
- *
- * @returns Message AccountForSessionNoLongerExists formatted to JSON */
-nlohmann::json accountForSessionNoLongerExists();
-
-void accountForSessionNoLongerExists(crow::Response& res);
-
-/**
- * @brief Formats CreateFailedMissingReqProperties message into JSON
- * Message body: "The create operation failed because the required property
- * <arg1> was missing from the request."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message CreateFailedMissingReqProperties formatted to JSON */
-nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
-
-void createFailedMissingReqProperties(crow::Response& res,
- std::string_view arg1);
+void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
+ std::string_view arg2);
/**
* @brief Formats PropertyValueFormatError message into JSON
@@ -279,52 +163,96 @@
std::string_view arg2);
/**
- * @brief Formats ResourceAtUriInUnknownFormat message into JSON
- * Message body: "The resource at <arg1> is in a format not recognized by the
- * service."
+ * @brief Formats PropertyValueError message into JSON
+ * Message body: "The value provided for the property <arg1> is not valid."
*
* @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
-nlohmann::json
- resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1);
+ * @returns Message PropertyValueError formatted to JSON */
+nlohmann::json propertyValueError(std::string_view arg1);
-void resourceAtUriInUnknownFormat(crow::Response& res,
- const boost::urls::url_view_base& arg1);
+void propertyValueError(crow::Response& res, std::string_view arg1);
/**
- * @brief Formats ServiceDisabled message into JSON
- * Message body: "The operation failed because the service at <arg1> is disabled
- * and cannot accept requests."
+ * @brief Formats PropertyNotWritable message into JSON
+ * Message body: "The property <arg1> is a read-only property and cannot be
+ * assigned a value."
*
* @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message ServiceDisabled formatted to JSON */
-nlohmann::json serviceDisabled(std::string_view arg1);
+ * @returns Message PropertyNotWritable formatted to JSON */
+nlohmann::json propertyNotWritable(std::string_view arg1);
-void serviceDisabled(crow::Response& res, std::string_view arg1);
+void propertyNotWritable(crow::Response& res, std::string_view arg1);
/**
- * @brief Formats ServiceInUnknownState message into JSON
- * Message body: "The operation failed because the service is in an unknown
- * state and can no longer take incoming requests."
+ * @brief Formats PropertyNotUpdated message into JSON
+ * Message body: "The property <arg1> was not updated due to an internal service
+ * error. The service is still operational."
*
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message ServiceInUnknownState formatted to JSON */
-nlohmann::json serviceInUnknownState();
+ * @returns Message PropertyNotUpdated formatted to JSON */
+nlohmann::json propertyNotUpdated(std::string_view arg1);
-void serviceInUnknownState(crow::Response& res);
+void propertyNotUpdated(crow::Response& res, std::string_view arg1);
/**
- * @brief Formats EventSubscriptionLimitExceeded message into JSON
- * Message body: "The event subscription failed due to the number of
- * simultaneous subscriptions exceeding the limit of the implementation."
+ * @brief Formats PropertyMissing message into JSON
+ * Message body: "The property <arg1> is a required property and must be
+ * included in the request."
*
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
*
- * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
-nlohmann::json eventSubscriptionLimitExceeded();
+ * @returns Message PropertyMissing formatted to JSON */
+nlohmann::json propertyMissing(std::string_view arg1);
-void eventSubscriptionLimitExceeded(crow::Response& res);
+void propertyMissing(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats MalformedJSON message into JSON
+ * Message body: "The request body submitted was malformed JSON and could not be
+ * parsed by the receiving service."
+ *
+ *
+ * @returns Message MalformedJSON formatted to JSON */
+nlohmann::json malformedJSON();
+
+void malformedJSON(crow::Response& res);
+
+/**
+ * @brief Formats InvalidJSON message into JSON
+ * Message body: "The request body submitted is invalid JSON starting at line
+ * <arg1> and could not be parsed by the receiving service."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message InvalidJSON formatted to JSON */
+nlohmann::json invalidJSON(std::string_view arg1);
+
+void invalidJSON(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats EmptyJSON message into JSON
+ * Message body: "The request body submitted contained an empty JSON object and
+ * the service is unable to process it."
+ *
+ *
+ * @returns Message EmptyJSON formatted to JSON */
+nlohmann::json emptyJSON();
+
+void emptyJSON(crow::Response& res);
+
+/**
+ * @brief Formats ActionNotSupported message into JSON
+ * Message body: "The action <arg1> is not supported by the resource."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ActionNotSupported formatted to JSON */
+nlohmann::json actionNotSupported(std::string_view arg1);
+
+void actionNotSupported(crow::Response& res, std::string_view arg1);
/**
* @brief Formats ActionParameterMissing message into JSON
@@ -342,6 +270,678 @@
std::string_view arg2);
/**
+ * @brief Formats ActionParameterDuplicate message into JSON
+ * Message body: "The action <arg1> was submitted with more than one value for
+ * the parameter <arg2>."
+ *
+ * @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 ActionParameterDuplicate formatted to JSON */
+nlohmann::json actionParameterDuplicate(std::string_view arg1,
+ std::string_view arg2);
+
+void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats ActionParameterUnknown message into JSON
+ * Message body: "The action <arg1> was submitted with the invalid parameter
+ * <arg2>."
+ *
+ * @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 ActionParameterUnknown formatted to JSON */
+nlohmann::json actionParameterUnknown(std::string_view arg1,
+ std::string_view arg2);
+
+void actionParameterUnknown(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats ActionParameterValueTypeError message into JSON
+ * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
+ * is not a type that the parameter can accept."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message ActionParameterValueTypeError formatted to JSON */
+nlohmann::json actionParameterValueTypeError(
+ const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
+
+void actionParameterValueTypeError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
+ std::string_view arg3);
+
+/**
+ * @brief Formats ActionParameterValueFormatError message into JSON
+ * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
+ * is not a format that the parameter can accept."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message ActionParameterValueFormatError formatted to JSON */
+nlohmann::json actionParameterValueFormatError(
+ const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
+
+void actionParameterValueFormatError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
+ std::string_view arg3);
+
+/**
+ * @brief Formats ActionParameterValueNotInList message into JSON
+ * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
+ * is not in the list of acceptable values."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message ActionParameterValueNotInList formatted to JSON */
+nlohmann::json actionParameterValueNotInList(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3);
+
+void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
+ std::string_view arg2,
+ std::string_view arg3);
+
+/**
+ * @brief Formats ActionParameterValueOutOfRange message into JSON
+ * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
+ * is not in the supported range of acceptable values."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message ActionParameterValueOutOfRange formatted to JSON */
+nlohmann::json actionParameterValueOutOfRange(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3);
+
+void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
+ std::string_view arg2,
+ std::string_view arg3);
+
+/**
+ * @brief Formats ActionParameterValueError message into JSON
+ * Message body: "The value for the parameter <arg1> in the action <arg2> is
+ * invalid."
+ *
+ * @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 ActionParameterValueError formatted to JSON */
+nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
+ std::string_view arg2);
+
+void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats ActionParameterNotSupported message into JSON
+ * Message body: "The parameter <arg1> for the action <arg2> is not supported on
+ * the target resource."
+ *
+ * @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 ActionParameterNotSupported formatted to JSON */
+nlohmann::json actionParameterNotSupported(std::string_view arg1,
+ std::string_view arg2);
+
+void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats ArraySizeTooLong message into JSON
+ * Message body: "The array provided for property <arg1> exceeds the size limit
+ * <arg2>."
+ *
+ * @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 ArraySizeTooLong formatted to JSON */
+nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2);
+
+void arraySizeTooLong(crow::Response& res, std::string_view arg1,
+ uint64_t arg2);
+
+/**
+ * @brief Formats ArraySizeTooShort message into JSON
+ * Message body: "The array provided for property <arg1> is under the minimum
+ * size limit <arg2>."
+ *
+ * @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 ArraySizeTooShort formatted to JSON */
+nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2);
+
+void arraySizeTooShort(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats QueryParameterValueTypeError message into JSON
+ * Message body: "The value <arg1> for the query parameter <arg2> is not a type
+ * that the parameter can accept."
+ *
+ * @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 QueryParameterValueTypeError formatted to JSON */
+nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
+ std::string_view arg2);
+
+void queryParameterValueTypeError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
+
+/**
+ * @brief Formats QueryParameterValueFormatError message into JSON
+ * Message body: "The value <arg1> for the parameter <arg2> is not a format that
+ * the parameter can accept."
+ *
+ * @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 QueryParameterValueFormatError formatted to JSON */
+nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
+ std::string_view arg2);
+
+void queryParameterValueFormatError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
+
+/**
+ * @brief Formats QueryParameterValueError message into JSON
+ * Message body: "The value for the parameter <arg1> is invalid."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message QueryParameterValueError formatted to JSON */
+nlohmann::json queryParameterValueError(std::string_view arg1);
+
+void queryParameterValueError(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats QueryParameterOutOfRange message into JSON
+ * Message body: "The value <arg1> for the query parameter <arg2> is out of
+ * range <arg3>."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message QueryParameterOutOfRange formatted to JSON */
+nlohmann::json queryParameterOutOfRange(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3);
+
+void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
+ std::string_view arg2, std::string_view arg3);
+
+/**
+ * @brief Formats QueryNotSupportedOnResource message into JSON
+ * Message body: "Querying is not supported on the requested resource."
+ *
+ *
+ * @returns Message QueryNotSupportedOnResource formatted to JSON */
+nlohmann::json queryNotSupportedOnResource();
+
+void queryNotSupportedOnResource(crow::Response& res);
+
+/**
+ * @brief Formats QueryNotSupportedOnOperation message into JSON
+ * Message body: "Querying is not supported with the requested operation."
+ *
+ *
+ * @returns Message QueryNotSupportedOnOperation formatted to JSON */
+nlohmann::json queryNotSupportedOnOperation();
+
+void queryNotSupportedOnOperation(crow::Response& res);
+
+/**
+ * @brief Formats QueryNotSupported message into JSON
+ * Message body: "Querying is not supported by the implementation."
+ *
+ *
+ * @returns Message QueryNotSupported formatted to JSON */
+nlohmann::json queryNotSupported();
+
+void queryNotSupported(crow::Response& res);
+
+/**
+ * @brief Formats QueryCombinationInvalid message into JSON
+ * Message body: "Two or more query parameters in the request cannot be used
+ * together."
+ *
+ *
+ * @returns Message QueryCombinationInvalid formatted to JSON */
+nlohmann::json queryCombinationInvalid();
+
+void queryCombinationInvalid(crow::Response& res);
+
+/**
+ * @brief Formats QueryParameterUnsupported message into JSON
+ * Message body: "Query parameter <arg1> is not supported."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message QueryParameterUnsupported formatted to JSON */
+nlohmann::json queryParameterUnsupported(std::string_view arg1);
+
+void queryParameterUnsupported(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats SessionLimitExceeded message into JSON
+ * Message body: "The session establishment failed due to the number of
+ * simultaneous sessions exceeding the limit of the implementation."
+ *
+ *
+ * @returns Message SessionLimitExceeded formatted to JSON */
+nlohmann::json sessionLimitExceeded();
+
+void sessionLimitExceeded(crow::Response& res);
+
+/**
+ * @brief Formats EventSubscriptionLimitExceeded message into JSON
+ * Message body: "The event subscription failed due to the number of
+ * simultaneous subscriptions exceeding the limit of the implementation."
+ *
+ *
+ * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
+nlohmann::json eventSubscriptionLimitExceeded();
+
+void eventSubscriptionLimitExceeded(crow::Response& res);
+
+/**
+ * @brief Formats ResourceCannotBeDeleted message into JSON
+ * Message body: "The delete request failed because the resource requested
+ * cannot be deleted."
+ *
+ *
+ * @returns Message ResourceCannotBeDeleted formatted to JSON */
+nlohmann::json resourceCannotBeDeleted();
+
+void resourceCannotBeDeleted(crow::Response& res);
+
+/**
+ * @brief Formats ResourceInUse message into JSON
+ * Message body: "The change to the requested resource failed because the
+ * resource is in use or in transition."
+ *
+ *
+ * @returns Message ResourceInUse formatted to JSON */
+nlohmann::json resourceInUse();
+
+void resourceInUse(crow::Response& res);
+
+/**
+ * @brief Formats ResourceAlreadyExists message into JSON
+ * Message body: "The requested resource of type <arg1> with the property <arg2>
+ * with the value <arg3> already exists."
+ *
+ * @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.
+ * @param[in] arg3 Parameter of message that will replace %3 in its body.
+ *
+ * @returns Message ResourceAlreadyExists formatted to JSON */
+nlohmann::json resourceAlreadyExists(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3);
+
+void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
+ std::string_view arg2, std::string_view arg3);
+
+/**
+ * @brief Formats ResourceNotFound message into JSON
+ * Message body: "The requested resource of type <arg1> named <arg2> was not
+ * found."
+ *
+ * @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 ResourceNotFound formatted to JSON */
+nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
+
+void resourceNotFound(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats PayloadTooLarge message into JSON
+ * Message body: "The supplied payload exceeds the maximum size supported by the
+ * service."
+ *
+ *
+ * @returns Message PayloadTooLarge formatted to JSON */
+nlohmann::json payloadTooLarge();
+
+void payloadTooLarge(crow::Response& res);
+
+/**
+ * @brief Formats InsufficientStorage message into JSON
+ * Message body: "Insufficient storage or memory available to complete the
+ * request."
+ *
+ *
+ * @returns Message InsufficientStorage formatted to JSON */
+nlohmann::json insufficientStorage();
+
+void insufficientStorage(crow::Response& res);
+
+/**
+ * @brief Formats MissingOrMalformedPart message into JSON
+ * Message body: "The multipart request contains malformed parts or is missing
+ * required parts."
+ *
+ *
+ * @returns Message MissingOrMalformedPart formatted to JSON */
+nlohmann::json missingOrMalformedPart();
+
+void missingOrMalformedPart(crow::Response& res);
+
+/**
+ * @brief Formats InvalidURI message into JSON
+ * Message body: "The URI <arg1> was not found."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message InvalidURI formatted to JSON */
+nlohmann::json invalidURI(std::string_view arg1);
+
+void invalidURI(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats CreateFailedMissingReqProperties message into JSON
+ * Message body: "The create operation failed because the required property
+ * <arg1> was missing from the request."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message CreateFailedMissingReqProperties formatted to JSON */
+nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
+
+void createFailedMissingReqProperties(crow::Response& res,
+ std::string_view arg1);
+
+/**
+ * @brief Formats CreateLimitReachedForResource message into JSON
+ * Message body: "The create operation failed because the resource has reached
+ * the limit of possible resources."
+ *
+ *
+ * @returns Message CreateLimitReachedForResource formatted to JSON */
+nlohmann::json createLimitReachedForResource();
+
+void createLimitReachedForResource(crow::Response& res);
+
+/**
+ * @brief Formats ServiceShuttingDown message into JSON
+ * Message body: "The operation failed because the service is shutting down and
+ * can no longer take incoming requests."
+ *
+ *
+ * @returns Message ServiceShuttingDown formatted to JSON */
+nlohmann::json serviceShuttingDown();
+
+void serviceShuttingDown(crow::Response& res);
+
+/**
+ * @brief Formats ServiceInUnknownState message into JSON
+ * Message body: "The operation failed because the service is in an unknown
+ * state and can no longer take incoming requests."
+ *
+ *
+ * @returns Message ServiceInUnknownState formatted to JSON */
+nlohmann::json serviceInUnknownState();
+
+void serviceInUnknownState(crow::Response& res);
+
+/**
+ * @brief Formats NoValidSession message into JSON
+ * Message body: "There is no valid session established with the
+ * implementation."
+ *
+ *
+ * @returns Message NoValidSession formatted to JSON */
+nlohmann::json noValidSession();
+
+void noValidSession(crow::Response& res);
+
+/**
+ * @brief Formats InsufficientPrivilege message into JSON
+ * Message body: "There are insufficient privileges for the account or
+ * credentials associated with the current session to perform the requested
+ * operation."
+ *
+ *
+ * @returns Message InsufficientPrivilege formatted to JSON */
+nlohmann::json insufficientPrivilege();
+
+void insufficientPrivilege(crow::Response& res);
+
+/**
+ * @brief Formats AccountModified message into JSON
+ * Message body: "The account was successfully modified."
+ *
+ *
+ * @returns Message AccountModified formatted to JSON */
+nlohmann::json accountModified();
+
+void accountModified(crow::Response& res);
+
+/**
+ * @brief Formats AccountNotModified message into JSON
+ * Message body: "The account modification request failed."
+ *
+ *
+ * @returns Message AccountNotModified formatted to JSON */
+nlohmann::json accountNotModified();
+
+void accountNotModified(crow::Response& res);
+
+/**
+ * @brief Formats AccountRemoved message into JSON
+ * Message body: "The account was successfully removed."
+ *
+ *
+ * @returns Message AccountRemoved formatted to JSON */
+nlohmann::json accountRemoved();
+
+void accountRemoved(crow::Response& res);
+
+/**
+ * @brief Formats AccountForSessionNoLongerExists message into JSON
+ * Message body: "The account for the current session was removed, and so the
+ * current session was removed as well."
+ *
+ *
+ * @returns Message AccountForSessionNoLongerExists formatted to JSON */
+nlohmann::json accountForSessionNoLongerExists();
+
+void accountForSessionNoLongerExists(crow::Response& res);
+
+/**
+ * @brief Formats InvalidObject message into JSON
+ * Message body: "The object at <arg1> is invalid."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message InvalidObject formatted to JSON */
+nlohmann::json invalidObject(const boost::urls::url_view_base& arg1);
+
+void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1);
+
+/**
+ * @brief Formats InternalError message into JSON
+ * Message body: "The request failed due to an internal service error. The
+ * service is still operational."
+ *
+ *
+ * @returns Message InternalError formatted to JSON */
+nlohmann::json internalError();
+
+void internalError(crow::Response& res, std::source_location location =
+ std::source_location::current());
+
+/**
+ * @brief Formats UnrecognizedRequestBody message into JSON
+ * Message body: "The service detected a malformed request body that it was
+ * unable to interpret."
+ *
+ *
+ * @returns Message UnrecognizedRequestBody formatted to JSON */
+nlohmann::json unrecognizedRequestBody();
+
+void unrecognizedRequestBody(crow::Response& res);
+
+/**
+ * @brief Formats ResourceMissingAtURI message into JSON
+ * Message body: "The resource at the URI <arg1> was not found."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ResourceMissingAtURI formatted to JSON */
+nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1);
+
+void resourceMissingAtURI(crow::Response& res,
+ const boost::urls::url_view_base& arg1);
+
+/**
+ * @brief Formats ResourceAtUriInUnknownFormat message into JSON
+ * Message body: "The resource at <arg1> is in a format not recognized by the
+ * service."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
+nlohmann::json
+ resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1);
+
+void resourceAtUriInUnknownFormat(crow::Response& res,
+ const boost::urls::url_view_base& arg1);
+
+/**
+ * @brief Formats ResourceAtUriUnauthorized message into JSON
+ * Message body: "While accessing the resource at <arg1>, the service received
+ * an authorization error <arg2>."
+ *
+ * @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 ResourceAtUriUnauthorized formatted to JSON */
+nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
+ std::string_view arg2);
+
+void resourceAtUriUnauthorized(crow::Response& res,
+ const boost::urls::url_view_base& arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats CouldNotEstablishConnection message into JSON
+ * Message body: "The service failed to establish a connection with the URI
+ * <arg1>."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message CouldNotEstablishConnection formatted to JSON */
+nlohmann::json
+ couldNotEstablishConnection(const boost::urls::url_view_base& arg1);
+
+void couldNotEstablishConnection(crow::Response& res,
+ const boost::urls::url_view_base& arg1);
+
+/**
+ * @brief Formats SourceDoesNotSupportProtocol message into JSON
+ * Message body: "The other end of the connection at <arg1> does not support the
+ * specified protocol <arg2>."
+ *
+ * @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 SourceDoesNotSupportProtocol formatted to JSON */
+nlohmann::json sourceDoesNotSupportProtocol(
+ const boost::urls::url_view_base& arg1, std::string_view arg2);
+
+void sourceDoesNotSupportProtocol(crow::Response& res,
+ const boost::urls::url_view_base& arg1,
+ std::string_view arg2);
+
+/**
+ * @brief Formats AccessDenied message into JSON
+ * Message body: "While attempting to establish a connection to <arg1>, the
+ * service denied access."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message AccessDenied formatted to JSON */
+nlohmann::json accessDenied(const boost::urls::url_view_base& arg1);
+
+void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1);
+
+/**
+ * @brief Formats ServiceTemporarilyUnavailable message into JSON
+ * Message body: "The service is temporarily unavailable. Retry in <arg1>
+ * seconds."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
+nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
+
+void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats InvalidIndex message into JSON
+ * Message body: "The index <arg1> is not a valid offset into the array."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message InvalidIndex formatted to JSON */
+nlohmann::json invalidIndex(int64_t arg1);
+
+void invalidIndex(crow::Response& res, int64_t arg1);
+
+/**
+ * @brief Formats PropertyValueModified message into JSON
+ * Message body: "The property <arg1> was assigned the value <arg2> due to
+ * modification by the service."
+ *
+ * @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 PropertyValueModified formatted to JSON */
+nlohmann::json propertyValueModified(std::string_view arg1,
+ const nlohmann::json& arg2);
+
+void propertyValueModified(crow::Response& res, std::string_view arg1,
+ const nlohmann::json& arg2);
+
+/**
+ * @brief Formats ResourceInStandby message into JSON
+ * Message body: "The request could not be performed because the resource is in
+ * standby."
+ *
+ *
+ * @returns Message ResourceInStandby formatted to JSON */
+nlohmann::json resourceInStandby();
+
+void resourceInStandby(crow::Response& res);
+
+/**
+ * @brief Formats ResourceExhaustion message into JSON
+ * Message body: "The resource <arg1> was unable to satisfy the request due to
+ * unavailability of resources."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ResourceExhaustion formatted to JSON */
+nlohmann::json resourceExhaustion(std::string_view arg1);
+
+void resourceExhaustion(crow::Response& res, std::string_view arg1);
+
+/**
* @brief Formats StringValueTooLong message into JSON
* Message body: "The string <arg1> exceeds the length limit <arg2>."
*
@@ -354,6 +954,21 @@
void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2);
/**
+ * @brief Formats StringValueTooShort message into JSON
+ * Message body: "The string <arg1> was under the minimum required length
+ * <arg2>."
+ *
+ * @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 StringValueTooShort formatted to JSON */
+nlohmann::json stringValueTooShort(std::string_view arg1,
+ std::string_view arg2);
+
+void stringValueTooShort(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
* @brief Formats SessionTerminated message into JSON
* Message body: "The session was successfully terminated."
*
@@ -389,6 +1004,20 @@
std::string_view arg2);
/**
+ * @brief Formats PasswordChangeRequired message into JSON
+ * Message body: "The password provided for this account must be changed before
+ * access is granted. PATCH the Password property for this account located at
+ * the target URI <arg1> to complete this process."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message PasswordChangeRequired formatted to JSON */
+nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1);
+
+void passwordChangeRequired(crow::Response& res,
+ const boost::urls::url_view_base& arg1);
+
+/**
* @brief Formats ResetRequired message into JSON
* Message body: "In order to apply changes, recover from errors, or complete
* the operation, a component reset is required with the Reset action URI <arg1>
@@ -405,6 +1034,20 @@
std::string_view arg2);
/**
+ * @brief Formats ResetRecommended message into JSON
+ * Message body: "In order to recover from errors, a component reset is
+ * recommended with the Reset action URI <arg1> and ResetType <arg2>."
+ *
+ * @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 ResetRecommended formatted to JSON */
+nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2);
+
+void resetRecommended(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
* @brief Formats ChassisPowerStateOnRequired message into JSON
* Message body: "The chassis with Id <arg1> is required to be powered on to
* perform this request."
@@ -508,6 +1151,21 @@
const boost::urls::url_view_base& arg1);
/**
+ * @brief Formats ActionParameterValueConflict message into JSON
+ * Message body: "The parameter <arg1> with the requested value of <arg2> does
+ * not meet the constraints of the implementation."
+ *
+ * @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 ActionParameterValueConflict formatted to JSON */
+nlohmann::json
+ actionParameterValueConflict(std::string_view arg1, std::string_view arg2);
+
+void actionParameterValueConflict(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
* @brief Formats MaximumErrorsExceeded message into JSON
* Message body: "Too many errors have occurred to report them all."
*
@@ -540,6 +1198,28 @@
void preconditionRequired(crow::Response& res);
/**
+ * @brief Formats HeaderMissing message into JSON
+ * Message body: "Required header <arg1> is missing in the request."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message HeaderMissing formatted to JSON */
+nlohmann::json headerMissing(std::string_view arg1);
+
+void headerMissing(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats HeaderInvalid message into JSON
+ * Message body: "Header <arg1> is invalid."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message HeaderInvalid formatted to JSON */
+nlohmann::json headerInvalid(std::string_view arg1);
+
+void headerInvalid(crow::Response& res, std::string_view arg1);
+
+/**
* @brief Formats OperationFailed message into JSON
* Message body: "An error occurred internal to the service as part of the
* overall request. Partial results may have been returned."
@@ -562,533 +1242,6 @@
void operationTimeout(crow::Response& res);
/**
- * @brief Formats PropertyValueTypeError message into JSON
- * Message body: "The value <arg1> for the property <arg2> is not a type that
- * the property can accept."
- *
- * @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 PropertyValueTypeError formatted to JSON */
-nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
- std::string_view arg2);
-
-void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats PropertyValueError message into JSON
- * Message body: "The value provided for the property <arg1> is not valid."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PropertyValueError formatted to JSON */
-nlohmann::json propertyValueError(std::string_view arg1);
-
-void propertyValueError(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats ResourceNotFound message into JSON
- * Message body: "The requested resource of type <arg1> named <arg2> was not
- * found."
- *
- * @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 ResourceNotFound formatted to JSON */
-nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
-
-void resourceNotFound(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats CouldNotEstablishConnection message into JSON
- * Message body: "The service failed to establish a connection with the URI
- * <arg1>."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message CouldNotEstablishConnection formatted to JSON */
-nlohmann::json
- couldNotEstablishConnection(const boost::urls::url_view_base& arg1);
-
-void couldNotEstablishConnection(crow::Response& res,
- const boost::urls::url_view_base& arg1);
-
-/**
- * @brief Formats PropertyNotWritable message into JSON
- * Message body: "The property <arg1> is a read-only property and cannot be
- * assigned a value."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PropertyNotWritable formatted to JSON */
-nlohmann::json propertyNotWritable(std::string_view arg1);
-
-void propertyNotWritable(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats QueryParameterValueTypeError message into JSON
- * Message body: "The value <arg1> for the query parameter <arg2> is not a type
- * that the parameter can accept."
- *
- * @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 QueryParameterValueTypeError formatted to JSON */
-nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
- std::string_view arg2);
-
-void queryParameterValueTypeError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
-
-/**
- * @brief Formats ServiceShuttingDown message into JSON
- * Message body: "The operation failed because the service is shutting down and
- * can no longer take incoming requests."
- *
- *
- * @returns Message ServiceShuttingDown formatted to JSON */
-nlohmann::json serviceShuttingDown();
-
-void serviceShuttingDown(crow::Response& res);
-
-/**
- * @brief Formats ActionParameterDuplicate message into JSON
- * Message body: "The action <arg1> was submitted with more than one value for
- * the parameter <arg2>."
- *
- * @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 ActionParameterDuplicate formatted to JSON */
-nlohmann::json actionParameterDuplicate(std::string_view arg1,
- std::string_view arg2);
-
-void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats ActionParameterNotSupported message into JSON
- * Message body: "The parameter <arg1> for the action <arg2> is not supported on
- * the target resource."
- *
- * @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 ActionParameterNotSupported formatted to JSON */
-nlohmann::json actionParameterNotSupported(std::string_view arg1,
- std::string_view arg2);
-
-void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats SourceDoesNotSupportProtocol message into JSON
- * Message body: "The other end of the connection at <arg1> does not support the
- * specified protocol <arg2>."
- *
- * @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 SourceDoesNotSupportProtocol formatted to JSON */
-nlohmann::json sourceDoesNotSupportProtocol(
- const boost::urls::url_view_base& arg1, std::string_view arg2);
-
-void sourceDoesNotSupportProtocol(crow::Response& res,
- const boost::urls::url_view_base& arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats StrictAccountTypes message into JSON
- * Message body: "The request could not be fulfilled with the account types
- * included in property <arg1> because the property StrictAccountTypes is set to
- * true."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message StrictAccountTypes formatted to JSON */
-nlohmann::json strictAccountTypes(std::string_view arg1);
-
-void strictAccountTypes(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats AccountRemoved message into JSON
- * Message body: "The account was successfully removed."
- *
- *
- * @returns Message AccountRemoved formatted to JSON */
-nlohmann::json accountRemoved();
-
-void accountRemoved(crow::Response& res);
-
-/**
- * @brief Formats AccessDenied message into JSON
- * Message body: "While attempting to establish a connection to <arg1>, the
- * service denied access."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message AccessDenied formatted to JSON */
-nlohmann::json accessDenied(const boost::urls::url_view_base& arg1);
-
-void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1);
-
-/**
- * @brief Formats QueryNotSupported message into JSON
- * Message body: "Querying is not supported by the implementation."
- *
- *
- * @returns Message QueryNotSupported formatted to JSON */
-nlohmann::json queryNotSupported();
-
-void queryNotSupported(crow::Response& res);
-
-/**
- * @brief Formats CreateLimitReachedForResource message into JSON
- * Message body: "The create operation failed because the resource has reached
- * the limit of possible resources."
- *
- *
- * @returns Message CreateLimitReachedForResource formatted to JSON */
-nlohmann::json createLimitReachedForResource();
-
-void createLimitReachedForResource(crow::Response& res);
-
-/**
- * @brief Formats GeneralError message into JSON
- * Message body: "A general error has occurred. See Resolution for information
- * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not
- * provided."
- *
- *
- * @returns Message GeneralError formatted to JSON */
-nlohmann::json generalError();
-
-void generalError(crow::Response& res);
-
-/**
- * @brief Formats Success message into JSON
- * Message body: "The request completed successfully."
- *
- *
- * @returns Message Success formatted to JSON */
-nlohmann::json success();
-
-void success(crow::Response& res);
-
-/**
- * @brief Formats Created message into JSON
- * Message body: "The resource was created successfully."
- *
- *
- * @returns Message Created formatted to JSON */
-nlohmann::json created();
-
-void created(crow::Response& res);
-
-/**
- * @brief Formats NoOperation message into JSON
- * Message body: "The request body submitted contain no data to act upon and no
- * changes to the resource took place."
- *
- *
- * @returns Message NoOperation formatted to JSON */
-nlohmann::json noOperation();
-
-void noOperation(crow::Response& res);
-
-/**
- * @brief Formats PropertyUnknown message into JSON
- * Message body: "The property <arg1> is not in the list of valid properties for
- * the resource."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PropertyUnknown formatted to JSON */
-nlohmann::json propertyUnknown(std::string_view arg1);
-
-void propertyUnknown(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats NoValidSession message into JSON
- * Message body: "There is no valid session established with the
- * implementation."
- *
- *
- * @returns Message NoValidSession formatted to JSON */
-nlohmann::json noValidSession();
-
-void noValidSession(crow::Response& res);
-
-/**
- * @brief Formats InvalidObject message into JSON
- * Message body: "The object at <arg1> is invalid."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message InvalidObject formatted to JSON */
-nlohmann::json invalidObject(const boost::urls::url_view_base& arg1);
-
-void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1);
-
-/**
- * @brief Formats ResourceInStandby message into JSON
- * Message body: "The request could not be performed because the resource is in
- * standby."
- *
- *
- * @returns Message ResourceInStandby formatted to JSON */
-nlohmann::json resourceInStandby();
-
-void resourceInStandby(crow::Response& res);
-
-/**
- * @brief Formats ActionParameterValueTypeError message into JSON
- * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
- * is not a type that the parameter can accept."
- *
- * @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
- *
- * @returns Message ActionParameterValueTypeError formatted to JSON */
-nlohmann::json actionParameterValueTypeError(
- const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3);
-
-void actionParameterValueTypeError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
- std::string_view arg3);
-
-/**
- * @brief Formats ActionParameterValueError message into JSON
- * Message body: "The value for the parameter <arg1> in the action <arg2> is
- * invalid."
- *
- * @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 ActionParameterValueError formatted to JSON */
-nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
- std::string_view arg2);
-
-void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats SessionLimitExceeded message into JSON
- * Message body: "The session establishment failed due to the number of
- * simultaneous sessions exceeding the limit of the implementation."
- *
- *
- * @returns Message SessionLimitExceeded formatted to JSON */
-nlohmann::json sessionLimitExceeded();
-
-void sessionLimitExceeded(crow::Response& res);
-
-/**
- * @brief Formats ActionNotSupported message into JSON
- * Message body: "The action <arg1> is not supported by the resource."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message ActionNotSupported formatted to JSON */
-nlohmann::json actionNotSupported(std::string_view arg1);
-
-void actionNotSupported(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats InvalidIndex message into JSON
- * Message body: "The index <arg1> is not a valid offset into the array."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message InvalidIndex formatted to JSON */
-nlohmann::json invalidIndex(int64_t arg1);
-
-void invalidIndex(crow::Response& res, int64_t arg1);
-
-/**
- * @brief Formats EmptyJSON message into JSON
- * Message body: "The request body submitted contained an empty JSON object and
- * the service is unable to process it."
- *
- *
- * @returns Message EmptyJSON formatted to JSON */
-nlohmann::json emptyJSON();
-
-void emptyJSON(crow::Response& res);
-
-/**
- * @brief Formats QueryNotSupportedOnResource message into JSON
- * Message body: "Querying is not supported on the requested resource."
- *
- *
- * @returns Message QueryNotSupportedOnResource formatted to JSON */
-nlohmann::json queryNotSupportedOnResource();
-
-void queryNotSupportedOnResource(crow::Response& res);
-
-/**
- * @brief Formats QueryNotSupportedOnOperation message into JSON
- * Message body: "Querying is not supported with the requested operation."
- *
- *
- * @returns Message QueryNotSupportedOnOperation formatted to JSON */
-nlohmann::json queryNotSupportedOnOperation();
-
-void queryNotSupportedOnOperation(crow::Response& res);
-
-/**
- * @brief Formats QueryCombinationInvalid message into JSON
- * Message body: "Two or more query parameters in the request cannot be used
- * together."
- *
- *
- * @returns Message QueryCombinationInvalid formatted to JSON */
-nlohmann::json queryCombinationInvalid();
-
-void queryCombinationInvalid(crow::Response& res);
-
-/**
- * @brief Formats EventBufferExceeded message into JSON
- * Message body: "Undelivered events may have been lost due to exceeding the
- * event buffer."
- *
- *
- * @returns Message EventBufferExceeded formatted to JSON */
-nlohmann::json eventBufferExceeded();
-
-void eventBufferExceeded(crow::Response& res);
-
-/**
- * @brief Formats InsufficientPrivilege message into JSON
- * Message body: "There are insufficient privileges for the account or
- * credentials associated with the current session to perform the requested
- * operation."
- *
- *
- * @returns Message InsufficientPrivilege formatted to JSON */
-nlohmann::json insufficientPrivilege();
-
-void insufficientPrivilege(crow::Response& res);
-
-/**
- * @brief Formats PropertyValueModified message into JSON
- * Message body: "The property <arg1> was assigned the value <arg2> due to
- * modification by the service."
- *
- * @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 PropertyValueModified formatted to JSON */
-nlohmann::json propertyValueModified(std::string_view arg1,
- const nlohmann::json& arg2);
-
-void propertyValueModified(crow::Response& res, std::string_view arg1,
- const nlohmann::json& arg2);
-
-/**
- * @brief Formats AccountNotModified message into JSON
- * Message body: "The account modification request failed."
- *
- *
- * @returns Message AccountNotModified formatted to JSON */
-nlohmann::json accountNotModified();
-
-void accountNotModified(crow::Response& res);
-
-/**
- * @brief Formats QueryParameterValueFormatError message into JSON
- * Message body: "The value <arg1> for the parameter <arg2> is not a format that
- * the parameter can accept."
- *
- * @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 QueryParameterValueFormatError formatted to JSON */
-nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
- std::string_view arg2);
-
-void queryParameterValueFormatError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2);
-
-/**
- * @brief Formats PropertyMissing message into JSON
- * Message body: "The property <arg1> is a required property and must be
- * included in the request."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PropertyMissing formatted to JSON */
-nlohmann::json propertyMissing(std::string_view arg1);
-
-void propertyMissing(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats ResourceExhaustion message into JSON
- * Message body: "The resource <arg1> was unable to satisfy the request due to
- * unavailability of resources."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message ResourceExhaustion formatted to JSON */
-nlohmann::json resourceExhaustion(std::string_view arg1);
-
-void resourceExhaustion(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats AccountModified message into JSON
- * Message body: "The account was successfully modified."
- *
- *
- * @returns Message AccountModified formatted to JSON */
-nlohmann::json accountModified();
-
-void accountModified(crow::Response& res);
-
-/**
- * @brief Formats QueryParameterOutOfRange message into JSON
- * Message body: "The value <arg1> for the query parameter <arg2> is out of
- * range <arg3>."
- *
- * @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
- *
- * @returns Message QueryParameterOutOfRange formatted to JSON */
-nlohmann::json queryParameterOutOfRange(
- std::string_view arg1, std::string_view arg2, std::string_view arg3);
-
-void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
- std::string_view arg2, std::string_view arg3);
-
-/**
- * @brief Formats PasswordChangeRequired message into JSON
- * Message body: "The password provided for this account must be changed before
- * access is granted. PATCH the Password property for this account located at
- * the target URI <arg1> to complete this process."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PasswordChangeRequired formatted to JSON */
-nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1);
-
-void passwordChangeRequired(crow::Response& res,
- const boost::urls::url_view_base& arg1);
-
-/**
- * @brief Formats InsufficientStorage message into JSON
- * Message body: "Insufficient storage or memory available to complete the
- * request."
- *
- *
- * @returns Message InsufficientStorage formatted to JSON */
-nlohmann::json insufficientStorage();
-
-void insufficientStorage(crow::Response& res);
-
-/**
* @brief Formats OperationNotAllowed message into JSON
* Message body: "The HTTP method is not allowed on this resource."
*
@@ -1099,212 +1252,6 @@
void operationNotAllowed(crow::Response& res);
/**
- * @brief Formats ArraySizeTooLong message into JSON
- * Message body: "The array provided for property <arg1> exceeds the size limit
- * <arg2>."
- *
- * @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 ArraySizeTooLong formatted to JSON */
-nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2);
-
-void arraySizeTooLong(crow::Response& res, std::string_view arg1,
- uint64_t arg2);
-
-/**
- * @brief Formats GenerateSecretKeyRequired message into JSON
- * Message body: "The Time-based One-Time Password (TOTP) secret key for this
- * account must be generated before access is granted. Perform the
- * GenerateSecretKey action at URI <arg1> and retain the secret key from the
- * response."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message GenerateSecretKeyRequired formatted to JSON */
-nlohmann::json
- generateSecretKeyRequired(const boost::urls::url_view_base& arg1);
-
-void generateSecretKeyRequired(crow::Response& res,
- const boost::urls::url_view_base& arg1);
-
-/**
- * @brief Formats PropertyNotUpdated message into JSON
- * Message body: "The property <arg1> was not updated due to an internal service
- * error. The service is still operational."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message PropertyNotUpdated formatted to JSON */
-nlohmann::json propertyNotUpdated(std::string_view arg1);
-
-void propertyNotUpdated(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats InvalidJSON message into JSON
- * Message body: "The request body submitted is invalid JSON starting at line
- * <arg1> and could not be parsed by the receiving service."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message InvalidJSON formatted to JSON */
-nlohmann::json invalidJSON(std::string_view arg1);
-
-void invalidJSON(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats ActionParameterValueOutOfRange message into JSON
- * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
- * is not in the supported range of acceptable values."
- *
- * @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.
- * @param[in] arg3 Parameter of message that will replace %3 in its body.
- *
- * @returns Message ActionParameterValueOutOfRange formatted to JSON */
-nlohmann::json actionParameterValueOutOfRange(
- std::string_view arg1, std::string_view arg2, std::string_view arg3);
-
-void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
- std::string_view arg2,
- std::string_view arg3);
-
-/**
- * @brief Formats ArraySizeTooShort message into JSON
- * Message body: "The array provided for property <arg1> is under the minimum
- * size limit <arg2>."
- *
- * @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 ArraySizeTooShort formatted to JSON */
-nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2);
-
-void arraySizeTooShort(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats QueryParameterValueError message into JSON
- * Message body: "The value for the parameter <arg1> is invalid."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message QueryParameterValueError formatted to JSON */
-nlohmann::json queryParameterValueError(std::string_view arg1);
-
-void queryParameterValueError(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats QueryParameterUnsupported message into JSON
- * Message body: "Query parameter <arg1> is not supported."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message QueryParameterUnsupported formatted to JSON */
-nlohmann::json queryParameterUnsupported(std::string_view arg1);
-
-void queryParameterUnsupported(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats PayloadTooLarge message into JSON
- * Message body: "The supplied payload exceeds the maximum size supported by the
- * service."
- *
- *
- * @returns Message PayloadTooLarge formatted to JSON */
-nlohmann::json payloadTooLarge();
-
-void payloadTooLarge(crow::Response& res);
-
-/**
- * @brief Formats MissingOrMalformedPart message into JSON
- * Message body: "The multipart request contains malformed parts or is missing
- * required parts."
- *
- *
- * @returns Message MissingOrMalformedPart formatted to JSON */
-nlohmann::json missingOrMalformedPart();
-
-void missingOrMalformedPart(crow::Response& res);
-
-/**
- * @brief Formats InvalidURI message into JSON
- * Message body: "The URI <arg1> was not found."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message InvalidURI formatted to JSON */
-nlohmann::json invalidURI(std::string_view arg1);
-
-void invalidURI(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats StringValueTooShort message into JSON
- * Message body: "The string <arg1> was under the minimum required length
- * <arg2>."
- *
- * @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 StringValueTooShort formatted to JSON */
-nlohmann::json stringValueTooShort(std::string_view arg1,
- std::string_view arg2);
-
-void stringValueTooShort(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats ResetRecommended message into JSON
- * Message body: "In order to recover from errors, a component reset is
- * recommended with the Reset action URI <arg1> and ResetType <arg2>."
- *
- * @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 ResetRecommended formatted to JSON */
-nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2);
-
-void resetRecommended(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats ActionParameterValueConflict message into JSON
- * Message body: "The parameter <arg1> with the requested value of <arg2> does
- * not meet the constraints of the implementation."
- *
- * @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 ActionParameterValueConflict formatted to JSON */
-nlohmann::json
- actionParameterValueConflict(std::string_view arg1, std::string_view arg2);
-
-void actionParameterValueConflict(crow::Response& res, std::string_view arg1,
- std::string_view arg2);
-
-/**
- * @brief Formats HeaderMissing message into JSON
- * Message body: "Required header <arg1> is missing in the request."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message HeaderMissing formatted to JSON */
-nlohmann::json headerMissing(std::string_view arg1);
-
-void headerMissing(crow::Response& res, std::string_view arg1);
-
-/**
- * @brief Formats HeaderInvalid message into JSON
- * Message body: "Header <arg1> is invalid."
- *
- * @param[in] arg1 Parameter of message that will replace %1 in its body.
- *
- * @returns Message HeaderInvalid formatted to JSON */
-nlohmann::json headerInvalid(std::string_view arg1);
-
-void headerInvalid(crow::Response& res, std::string_view arg1);
-
-/**
* @brief Formats UndeterminedFault message into JSON
* Message body: "An undetermined fault condition was reported by <arg1>."
*
@@ -1351,6 +1298,19 @@
void restrictedPrivilege(crow::Response& res, std::string_view arg1);
/**
+ * @brief Formats StrictAccountTypes message into JSON
+ * Message body: "The request could not be fulfilled with the account types
+ * included in property <arg1> because the property StrictAccountTypes is set to
+ * true."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message StrictAccountTypes formatted to JSON */
+nlohmann::json strictAccountTypes(std::string_view arg1);
+
+void strictAccountTypes(crow::Response& res, std::string_view arg1);
+
+/**
* @brief Formats PropertyDeprecated message into JSON
* Message body: "The deprecated property <arg1> was included in the request
* body."
@@ -1420,6 +1380,29 @@
void networkNameResolutionNotSupported(crow::Response& res);
/**
+ * @brief Formats ServiceDisabled message into JSON
+ * Message body: "The operation failed because the service at <arg1> is disabled
+ * and cannot accept requests."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message ServiceDisabled formatted to JSON */
+nlohmann::json serviceDisabled(std::string_view arg1);
+
+void serviceDisabled(crow::Response& res, std::string_view arg1);
+
+/**
+ * @brief Formats EventBufferExceeded message into JSON
+ * Message body: "Undelivered events may have been lost due to exceeding the
+ * event buffer."
+ *
+ *
+ * @returns Message EventBufferExceeded formatted to JSON */
+nlohmann::json eventBufferExceeded();
+
+void eventBufferExceeded(crow::Response& res);
+
+/**
* @brief Formats AuthenticationTokenRequired message into JSON
* Message body: "The request could not be performed because an authentication
* token was not provided."
@@ -1463,5 +1446,21 @@
void propertyModified(crow::Response& res);
+/**
+ * @brief Formats GenerateSecretKeyRequired message into JSON
+ * Message body: "The Time-based One-Time Password (TOTP) secret key for this
+ * account must be generated before access is granted. Perform the
+ * GenerateSecretKey action at URI <arg1> and retain the secret key from the
+ * response."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ *
+ * @returns Message GenerateSecretKeyRequired formatted to JSON */
+nlohmann::json
+ generateSecretKeyRequired(const boost::urls::url_view_base& arg1);
+
+void generateSecretKeyRequired(crow::Response& res,
+ const boost::urls::url_view_base& arg1);
+
} // namespace messages
} // namespace redfish
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index dffa2ca..328cae7 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -162,209 +162,73 @@
/**
* @internal
- * @brief Formats ResourceInUse message into JSON
+ * @brief Formats Success message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json resourceInUse()
+nlohmann::json success()
{
- return getLog(redfish::registries::base::Index::resourceInUse, {});
+ return getLog(redfish::registries::base::Index::success, {});
}
-void resourceInUse(crow::Response& res)
+void success(crow::Response& res)
{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, resourceInUse());
+ addMessageToJsonRoot(res.jsonValue, success());
}
/**
* @internal
- * @brief Formats MalformedJSON message into JSON
+ * @brief Formats GeneralError message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json malformedJSON()
+nlohmann::json generalError()
{
- return getLog(redfish::registries::base::Index::malformedJSON, {});
+ return getLog(redfish::registries::base::Index::generalError, {});
}
-void malformedJSON(crow::Response& res)
+void generalError(crow::Response& res)
{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, malformedJSON());
-}
-
-/**
- * @internal
- * @brief Formats ResourceMissingAtURI message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::resourceMissingAtURI,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void resourceMissingAtURI(crow::Response& res,
- const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, resourceMissingAtURI(arg1));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueFormatError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterValueFormatError(
- const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(
- redfish::registries::base::Index::actionParameterValueFormatError,
- std::to_array<std::string_view>({arg1Str, arg2, arg3}));
-}
-
-void actionParameterValueFormatError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
- std::string_view arg3)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterValueFormatError(arg1, arg2, arg3));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueNotInList message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterValueNotInList(
- std::string_view arg1, std::string_view arg2, std::string_view arg3)
-{
- return getLog(
- redfish::registries::base::Index::actionParameterValueNotInList,
- std::to_array({arg1, arg2, arg3}));
-}
-
-void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
- std::string_view arg2, std::string_view arg3)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterValueNotInList(arg1, arg2, arg3));
-}
-
-/**
- * @internal
- * @brief Formats InternalError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json internalError()
-{
- return getLog(redfish::registries::base::Index::internalError, {});
-}
-
-void internalError(crow::Response& res, const std::source_location location)
-{
- BMCWEB_LOG_CRITICAL("Internal Error {}({}:{}) `{}`: ", location.file_name(),
- location.line(), location.column(),
- location.function_name());
res.result(boost::beast::http::status::internal_server_error);
- addMessageToErrorJson(res.jsonValue, internalError());
+ addMessageToErrorJson(res.jsonValue, generalError());
}
/**
* @internal
- * @brief Formats UnrecognizedRequestBody message into JSON
+ * @brief Formats Created message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json unrecognizedRequestBody()
+nlohmann::json created()
{
- return getLog(redfish::registries::base::Index::unrecognizedRequestBody,
- {});
+ return getLog(redfish::registries::base::Index::created, {});
}
-void unrecognizedRequestBody(crow::Response& res)
+void created(crow::Response& res)
+{
+ res.result(boost::beast::http::status::created);
+ addMessageToJsonRoot(res.jsonValue, created());
+}
+
+/**
+ * @internal
+ * @brief Formats NoOperation message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json noOperation()
+{
+ return getLog(redfish::registries::base::Index::noOperation, {});
+}
+
+void noOperation(crow::Response& res)
{
res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, unrecognizedRequestBody());
-}
-
-/**
- * @internal
- * @brief Formats ResourceAtUriUnauthorized message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
- std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::resourceAtUriUnauthorized,
- std::to_array<std::string_view>({arg1.buffer(), arg2}));
-}
-
-void resourceAtUriUnauthorized(crow::Response& res,
- const boost::urls::url_view_base& arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::unauthorized);
- addMessageToErrorJson(res.jsonValue, resourceAtUriUnauthorized(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterUnknown message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterUnknown(std::string_view arg1,
- std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::actionParameterUnknown,
- std::to_array({arg1, arg2}));
-}
-
-void actionParameterUnknown(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, actionParameterUnknown(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ResourceCannotBeDeleted message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceCannotBeDeleted()
-{
- return getLog(redfish::registries::base::Index::resourceCannotBeDeleted,
- {});
-}
-
-void resourceCannotBeDeleted(crow::Response& res)
-{
- res.result(boost::beast::http::status::method_not_allowed);
- addMessageToErrorJson(res.jsonValue, resourceCannotBeDeleted());
+ addMessageToErrorJson(res.jsonValue, noOperation());
}
/**
@@ -388,86 +252,44 @@
/**
* @internal
- * @brief Formats ServiceTemporarilyUnavailable message into JSON
+ * @brief Formats PropertyUnknown message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1)
+nlohmann::json propertyUnknown(std::string_view arg1)
{
- return getLog(
- redfish::registries::base::Index::serviceTemporarilyUnavailable,
- std::to_array({arg1}));
+ return getLog(redfish::registries::base::Index::propertyUnknown,
+ std::to_array({arg1}));
}
-void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1)
-{
- res.addHeader(boost::beast::http::field::retry_after, arg1);
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, serviceTemporarilyUnavailable(arg1));
-}
-
-/**
- * @internal
- * @brief Formats ResourceAlreadyExists message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceAlreadyExists(
- std::string_view arg1, std::string_view arg2, std::string_view arg3)
-{
- return getLog(redfish::registries::base::Index::resourceAlreadyExists,
- std::to_array({arg1, arg2, arg3}));
-}
-
-void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
- std::string_view arg2, std::string_view arg3)
+void propertyUnknown(crow::Response& res, std::string_view arg1)
{
res.result(boost::beast::http::status::bad_request);
- addMessageToJson(res.jsonValue, resourceAlreadyExists(arg1, arg2, arg3),
- arg2);
+ addMessageToErrorJson(res.jsonValue, propertyUnknown(arg1));
}
/**
* @internal
- * @brief Formats AccountForSessionNoLongerExists message into JSON
+ * @brief Formats PropertyValueTypeError message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json accountForSessionNoLongerExists()
+nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
+ std::string_view arg2)
{
- return getLog(
- redfish::registries::base::Index::accountForSessionNoLongerExists, {});
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(redfish::registries::base::Index::propertyValueTypeError,
+ std::to_array<std::string_view>({arg1Str, arg2}));
}
-void accountForSessionNoLongerExists(crow::Response& res)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToErrorJson(res.jsonValue, accountForSessionNoLongerExists());
-}
-
-/**
- * @internal
- * @brief Formats CreateFailedMissingReqProperties message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json createFailedMissingReqProperties(std::string_view arg1)
-{
- return getLog(
- redfish::registries::base::Index::createFailedMissingReqProperties,
- std::to_array({arg1}));
-}
-
-void createFailedMissingReqProperties(crow::Response& res,
- std::string_view arg1)
+void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
+ std::string_view arg2)
{
res.result(boost::beast::http::status::bad_request);
- addMessageToJson(res.jsonValue, createFailedMissingReqProperties(arg1),
- arg1);
+ addMessageToJson(res.jsonValue, propertyValueTypeError(arg1, arg2), arg2);
}
/**
@@ -541,80 +363,152 @@
/**
* @internal
- * @brief Formats ResourceAtUriInUnknownFormat message into JSON
+ * @brief Formats PropertyValueError message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1)
+nlohmann::json propertyValueError(std::string_view arg1)
{
- return getLog(
- redfish::registries::base::Index::resourceAtUriInUnknownFormat,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void resourceAtUriInUnknownFormat(crow::Response& res,
- const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, resourceAtUriInUnknownFormat(arg1));
-}
-
-/**
- * @internal
- * @brief Formats ServiceDisabled message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json serviceDisabled(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::serviceDisabled,
+ return getLog(redfish::registries::base::Index::propertyValueError,
std::to_array({arg1}));
}
-void serviceDisabled(crow::Response& res, std::string_view arg1)
+void propertyValueError(crow::Response& res, std::string_view arg1)
{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, serviceDisabled(arg1));
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToJson(res.jsonValue, propertyValueError(arg1), arg1);
}
/**
* @internal
- * @brief Formats ServiceInUnknownState message into JSON
+ * @brief Formats PropertyNotWritable message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json serviceInUnknownState()
+nlohmann::json propertyNotWritable(std::string_view arg1)
{
- return getLog(redfish::registries::base::Index::serviceInUnknownState, {});
+ return getLog(redfish::registries::base::Index::propertyNotWritable,
+ std::to_array({arg1}));
}
-void serviceInUnknownState(crow::Response& res)
+void propertyNotWritable(crow::Response& res, std::string_view arg1)
{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, serviceInUnknownState());
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToJson(res.jsonValue, propertyNotWritable(arg1), arg1);
}
/**
* @internal
- * @brief Formats EventSubscriptionLimitExceeded message into JSON
+ * @brief Formats PropertyNotUpdated message into JSON
*
* See header file for more information
* @endinternal
*/
-nlohmann::json eventSubscriptionLimitExceeded()
+nlohmann::json propertyNotUpdated(std::string_view arg1)
{
- return getLog(
- redfish::registries::base::Index::eventSubscriptionLimitExceeded, {});
+ return getLog(redfish::registries::base::Index::propertyNotUpdated,
+ std::to_array({arg1}));
}
-void eventSubscriptionLimitExceeded(crow::Response& res)
+void propertyNotUpdated(crow::Response& res, std::string_view arg1)
{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, eventSubscriptionLimitExceeded());
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, propertyNotUpdated(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats PropertyMissing message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json propertyMissing(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::propertyMissing,
+ std::to_array({arg1}));
+}
+
+void propertyMissing(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToJson(res.jsonValue, propertyMissing(arg1), arg1);
+}
+
+/**
+ * @internal
+ * @brief Formats MalformedJSON message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json malformedJSON()
+{
+ return getLog(redfish::registries::base::Index::malformedJSON, {});
+}
+
+void malformedJSON(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, malformedJSON());
+}
+
+/**
+ * @internal
+ * @brief Formats InvalidJSON message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json invalidJSON(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::invalidJSON,
+ std::to_array({arg1}));
+}
+
+void invalidJSON(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, invalidJSON(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats EmptyJSON message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json emptyJSON()
+{
+ return getLog(redfish::registries::base::Index::emptyJSON, {});
+}
+
+void emptyJSON(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, emptyJSON());
+}
+
+/**
+ * @internal
+ * @brief Formats ActionNotSupported message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionNotSupported(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::actionNotSupported,
+ std::to_array({arg1}));
+}
+
+void actionNotSupported(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, actionNotSupported(arg1));
}
/**
@@ -640,6 +534,1080 @@
/**
* @internal
+ * @brief Formats ActionParameterDuplicate message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterDuplicate(std::string_view arg1,
+ std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::actionParameterDuplicate,
+ std::to_array({arg1, arg2}));
+}
+
+void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, actionParameterDuplicate(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterUnknown message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterUnknown(std::string_view arg1,
+ std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::actionParameterUnknown,
+ std::to_array({arg1, arg2}));
+}
+
+void actionParameterUnknown(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, actionParameterUnknown(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterValueTypeError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueTypeError(
+ const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
+{
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(
+ redfish::registries::base::Index::actionParameterValueTypeError,
+ std::to_array<std::string_view>({arg1Str, arg2, arg3}));
+}
+
+void actionParameterValueTypeError(crow::Response& res,
+ const nlohmann::json& arg1,
+ std::string_view arg2, std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterValueTypeError(arg1, arg2, arg3));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterValueFormatError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueFormatError(
+ const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
+{
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(
+ redfish::registries::base::Index::actionParameterValueFormatError,
+ std::to_array<std::string_view>({arg1Str, arg2, arg3}));
+}
+
+void actionParameterValueFormatError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2,
+ std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterValueFormatError(arg1, arg2, arg3));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterValueNotInList message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueNotInList(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3)
+{
+ return getLog(
+ redfish::registries::base::Index::actionParameterValueNotInList,
+ std::to_array({arg1, arg2, arg3}));
+}
+
+void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
+ std::string_view arg2, std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterValueNotInList(arg1, arg2, arg3));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterValueOutOfRange message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueOutOfRange(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3)
+{
+ return getLog(
+ redfish::registries::base::Index::actionParameterValueOutOfRange,
+ std::to_array({arg1, arg2, arg3}));
+}
+
+void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
+ std::string_view arg2,
+ std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterValueOutOfRange(arg1, arg2, arg3));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterValueError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(redfish::registries::base::Index::actionParameterValueError,
+ std::to_array<std::string_view>({arg1Str, arg2}));
+}
+
+void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, actionParameterValueError(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats ActionParameterNotSupported message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterNotSupported(std::string_view arg1,
+ std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::actionParameterNotSupported,
+ std::to_array({arg1, arg2}));
+}
+
+void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterNotSupported(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats ArraySizeTooLong message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2)
+{
+ std::string arg2Str = std::to_string(arg2);
+ return getLog(redfish::registries::base::Index::arraySizeTooLong,
+ std::to_array<std::string_view>({arg1, arg2Str}));
+}
+
+void arraySizeTooLong(crow::Response& res, std::string_view arg1, uint64_t arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, arraySizeTooLong(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats ArraySizeTooShort message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::arraySizeTooShort,
+ std::to_array({arg1, arg2}));
+}
+
+void arraySizeTooShort(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, arraySizeTooShort(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats QueryParameterValueTypeError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(
+ redfish::registries::base::Index::queryParameterValueTypeError,
+ std::to_array<std::string_view>({arg1Str, arg2}));
+}
+
+void queryParameterValueTypeError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ queryParameterValueTypeError(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats QueryParameterValueFormatError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ std::string arg1Str =
+ arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(
+ redfish::registries::base::Index::queryParameterValueFormatError,
+ std::to_array<std::string_view>({arg1Str, arg2}));
+}
+
+void queryParameterValueFormatError(
+ crow::Response& res, const nlohmann::json& arg1, std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ queryParameterValueFormatError(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats QueryParameterValueError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryParameterValueError(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::queryParameterValueError,
+ std::to_array({arg1}));
+}
+
+void queryParameterValueError(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryParameterValueError(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats QueryParameterOutOfRange message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryParameterOutOfRange(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3)
+{
+ return getLog(redfish::registries::base::Index::queryParameterOutOfRange,
+ std::to_array({arg1, arg2, arg3}));
+}
+
+void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
+ std::string_view arg2, std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ queryParameterOutOfRange(arg1, arg2, arg3));
+}
+
+/**
+ * @internal
+ * @brief Formats QueryNotSupportedOnResource message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryNotSupportedOnResource()
+{
+ return getLog(redfish::registries::base::Index::queryNotSupportedOnResource,
+ {});
+}
+
+void queryNotSupportedOnResource(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryNotSupportedOnResource());
+}
+
+/**
+ * @internal
+ * @brief Formats QueryNotSupportedOnOperation message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryNotSupportedOnOperation()
+{
+ return getLog(
+ redfish::registries::base::Index::queryNotSupportedOnOperation, {});
+}
+
+void queryNotSupportedOnOperation(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryNotSupportedOnOperation());
+}
+
+/**
+ * @internal
+ * @brief Formats QueryNotSupported message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryNotSupported()
+{
+ return getLog(redfish::registries::base::Index::queryNotSupported, {});
+}
+
+void queryNotSupported(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryNotSupported());
+}
+
+/**
+ * @internal
+ * @brief Formats QueryCombinationInvalid message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryCombinationInvalid()
+{
+ return getLog(redfish::registries::base::Index::queryCombinationInvalid,
+ {});
+}
+
+void queryCombinationInvalid(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryCombinationInvalid());
+}
+
+/**
+ * @internal
+ * @brief Formats QueryParameterUnsupported message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json queryParameterUnsupported(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::queryParameterUnsupported,
+ std::to_array({arg1}));
+}
+
+void queryParameterUnsupported(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, queryParameterUnsupported(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats SessionLimitExceeded message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json sessionLimitExceeded()
+{
+ return getLog(redfish::registries::base::Index::sessionLimitExceeded, {});
+}
+
+void sessionLimitExceeded(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, sessionLimitExceeded());
+}
+
+/**
+ * @internal
+ * @brief Formats EventSubscriptionLimitExceeded message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json eventSubscriptionLimitExceeded()
+{
+ return getLog(
+ redfish::registries::base::Index::eventSubscriptionLimitExceeded, {});
+}
+
+void eventSubscriptionLimitExceeded(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, eventSubscriptionLimitExceeded());
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceCannotBeDeleted message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceCannotBeDeleted()
+{
+ return getLog(redfish::registries::base::Index::resourceCannotBeDeleted,
+ {});
+}
+
+void resourceCannotBeDeleted(crow::Response& res)
+{
+ res.result(boost::beast::http::status::method_not_allowed);
+ addMessageToErrorJson(res.jsonValue, resourceCannotBeDeleted());
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceInUse message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceInUse()
+{
+ return getLog(redfish::registries::base::Index::resourceInUse, {});
+}
+
+void resourceInUse(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, resourceInUse());
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceAlreadyExists message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceAlreadyExists(
+ std::string_view arg1, std::string_view arg2, std::string_view arg3)
+{
+ return getLog(redfish::registries::base::Index::resourceAlreadyExists,
+ std::to_array({arg1, arg2, arg3}));
+}
+
+void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
+ std::string_view arg2, std::string_view arg3)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToJson(res.jsonValue, resourceAlreadyExists(arg1, arg2, arg3),
+ arg2);
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceNotFound message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::resourceNotFound,
+ std::to_array({arg1, arg2}));
+}
+
+void resourceNotFound(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::not_found);
+ addMessageToErrorJson(res.jsonValue, resourceNotFound(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats PayloadTooLarge message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json payloadTooLarge()
+{
+ return getLog(redfish::registries::base::Index::payloadTooLarge, {});
+}
+
+void payloadTooLarge(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, payloadTooLarge());
+}
+
+/**
+ * @internal
+ * @brief Formats InsufficientStorage message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json insufficientStorage()
+{
+ return getLog(redfish::registries::base::Index::insufficientStorage, {});
+}
+
+void insufficientStorage(crow::Response& res)
+{
+ res.result(boost::beast::http::status::insufficient_storage);
+ addMessageToErrorJson(res.jsonValue, insufficientStorage());
+}
+
+/**
+ * @internal
+ * @brief Formats MissingOrMalformedPart message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json missingOrMalformedPart()
+{
+ return getLog(redfish::registries::base::Index::missingOrMalformedPart, {});
+}
+
+void missingOrMalformedPart(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, missingOrMalformedPart());
+}
+
+/**
+ * @internal
+ * @brief Formats InvalidURI message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json invalidURI(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::invalidURI,
+ std::to_array({arg1}));
+}
+
+void invalidURI(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, invalidURI(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats CreateFailedMissingReqProperties message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json createFailedMissingReqProperties(std::string_view arg1)
+{
+ return getLog(
+ redfish::registries::base::Index::createFailedMissingReqProperties,
+ std::to_array({arg1}));
+}
+
+void createFailedMissingReqProperties(crow::Response& res,
+ std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToJson(res.jsonValue, createFailedMissingReqProperties(arg1),
+ arg1);
+}
+
+/**
+ * @internal
+ * @brief Formats CreateLimitReachedForResource message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json createLimitReachedForResource()
+{
+ return getLog(
+ redfish::registries::base::Index::createLimitReachedForResource, {});
+}
+
+void createLimitReachedForResource(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, createLimitReachedForResource());
+}
+
+/**
+ * @internal
+ * @brief Formats ServiceShuttingDown message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json serviceShuttingDown()
+{
+ return getLog(redfish::registries::base::Index::serviceShuttingDown, {});
+}
+
+void serviceShuttingDown(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, serviceShuttingDown());
+}
+
+/**
+ * @internal
+ * @brief Formats ServiceInUnknownState message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json serviceInUnknownState()
+{
+ return getLog(redfish::registries::base::Index::serviceInUnknownState, {});
+}
+
+void serviceInUnknownState(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, serviceInUnknownState());
+}
+
+/**
+ * @internal
+ * @brief Formats NoValidSession message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json noValidSession()
+{
+ return getLog(redfish::registries::base::Index::noValidSession, {});
+}
+
+void noValidSession(crow::Response& res)
+{
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToErrorJson(res.jsonValue, noValidSession());
+}
+
+/**
+ * @internal
+ * @brief Formats InsufficientPrivilege message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json insufficientPrivilege()
+{
+ return getLog(redfish::registries::base::Index::insufficientPrivilege, {});
+}
+
+void insufficientPrivilege(crow::Response& res)
+{
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToErrorJson(res.jsonValue, insufficientPrivilege());
+}
+
+/**
+ * @internal
+ * @brief Formats AccountModified message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json accountModified()
+{
+ return getLog(redfish::registries::base::Index::accountModified, {});
+}
+
+void accountModified(crow::Response& res)
+{
+ res.result(boost::beast::http::status::ok);
+ addMessageToErrorJson(res.jsonValue, accountModified());
+}
+
+/**
+ * @internal
+ * @brief Formats AccountNotModified message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json accountNotModified()
+{
+ return getLog(redfish::registries::base::Index::accountNotModified, {});
+}
+
+void accountNotModified(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, accountNotModified());
+}
+
+/**
+ * @internal
+ * @brief Formats AccountRemoved message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json accountRemoved()
+{
+ return getLog(redfish::registries::base::Index::accountRemoved, {});
+}
+
+void accountRemoved(crow::Response& res)
+{
+ res.result(boost::beast::http::status::ok);
+ addMessageToJsonRoot(res.jsonValue, accountRemoved());
+}
+
+/**
+ * @internal
+ * @brief Formats AccountForSessionNoLongerExists message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json accountForSessionNoLongerExists()
+{
+ return getLog(
+ redfish::registries::base::Index::accountForSessionNoLongerExists, {});
+}
+
+void accountForSessionNoLongerExists(crow::Response& res)
+{
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToErrorJson(res.jsonValue, accountForSessionNoLongerExists());
+}
+
+/**
+ * @internal
+ * @brief Formats InvalidObject message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json invalidObject(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::invalidObject,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, invalidObject(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats InternalError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json internalError()
+{
+ return getLog(redfish::registries::base::Index::internalError, {});
+}
+
+void internalError(crow::Response& res, const std::source_location location)
+{
+ BMCWEB_LOG_CRITICAL("Internal Error {}({}:{}) `{}`: ", location.file_name(),
+ location.line(), location.column(),
+ location.function_name());
+ res.result(boost::beast::http::status::internal_server_error);
+ addMessageToErrorJson(res.jsonValue, internalError());
+}
+
+/**
+ * @internal
+ * @brief Formats UnrecognizedRequestBody message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json unrecognizedRequestBody()
+{
+ return getLog(redfish::registries::base::Index::unrecognizedRequestBody,
+ {});
+}
+
+void unrecognizedRequestBody(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, unrecognizedRequestBody());
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceMissingAtURI message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::resourceMissingAtURI,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void resourceMissingAtURI(crow::Response& res,
+ const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, resourceMissingAtURI(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceAtUriInUnknownFormat message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json
+ resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1)
+{
+ return getLog(
+ redfish::registries::base::Index::resourceAtUriInUnknownFormat,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void resourceAtUriInUnknownFormat(crow::Response& res,
+ const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, resourceAtUriInUnknownFormat(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceAtUriUnauthorized message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
+ std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::resourceAtUriUnauthorized,
+ std::to_array<std::string_view>({arg1.buffer(), arg2}));
+}
+
+void resourceAtUriUnauthorized(crow::Response& res,
+ const boost::urls::url_view_base& arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::unauthorized);
+ addMessageToErrorJson(res.jsonValue, resourceAtUriUnauthorized(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats CouldNotEstablishConnection message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json
+ couldNotEstablishConnection(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::couldNotEstablishConnection,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void couldNotEstablishConnection(crow::Response& res,
+ const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::not_found);
+ addMessageToErrorJson(res.jsonValue, couldNotEstablishConnection(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats SourceDoesNotSupportProtocol message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json sourceDoesNotSupportProtocol(
+ const boost::urls::url_view_base& arg1, std::string_view arg2)
+{
+ return getLog(
+ redfish::registries::base::Index::sourceDoesNotSupportProtocol,
+ std::to_array<std::string_view>({arg1.buffer(), arg2}));
+}
+
+void sourceDoesNotSupportProtocol(crow::Response& res,
+ const boost::urls::url_view_base& arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ sourceDoesNotSupportProtocol(arg1, arg2));
+}
+
+/**
+ * @internal
+ * @brief Formats AccessDenied message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json accessDenied(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::accessDenied,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToErrorJson(res.jsonValue, accessDenied(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats ServiceTemporarilyUnavailable message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1)
+{
+ return getLog(
+ redfish::registries::base::Index::serviceTemporarilyUnavailable,
+ std::to_array({arg1}));
+}
+
+void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1)
+{
+ res.addHeader(boost::beast::http::field::retry_after, arg1);
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, serviceTemporarilyUnavailable(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats InvalidIndex message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json invalidIndex(int64_t arg1)
+{
+ std::string arg1Str = std::to_string(arg1);
+ return getLog(redfish::registries::base::Index::invalidIndex,
+ std::to_array<std::string_view>({arg1Str}));
+}
+
+void invalidIndex(crow::Response& res, int64_t arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, invalidIndex(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats PropertyValueModified message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json propertyValueModified(std::string_view arg1,
+ const nlohmann::json& arg2)
+{
+ std::string arg2Str =
+ arg2.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
+ return getLog(redfish::registries::base::Index::propertyValueModified,
+ std::to_array<std::string_view>({arg1, arg2Str}));
+}
+
+void propertyValueModified(crow::Response& res, std::string_view arg1,
+ const nlohmann::json& arg2)
+{
+ res.result(boost::beast::http::status::ok);
+ addMessageToJson(res.jsonValue, propertyValueModified(arg1, arg2), arg1);
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceInStandby message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceInStandby()
+{
+ return getLog(redfish::registries::base::Index::resourceInStandby, {});
+}
+
+void resourceInStandby(crow::Response& res)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, resourceInStandby());
+}
+
+/**
+ * @internal
+ * @brief Formats ResourceExhaustion message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resourceExhaustion(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::resourceExhaustion,
+ std::to_array({arg1}));
+}
+
+void resourceExhaustion(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, resourceExhaustion(arg1));
+}
+
+/**
+ * @internal
* @brief Formats StringValueTooLong message into JSON
*
* See header file for more information
@@ -660,6 +1628,26 @@
/**
* @internal
+ * @brief Formats StringValueTooShort message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json stringValueTooShort(std::string_view arg1, std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::stringValueTooShort,
+ std::to_array({arg1, arg2}));
+}
+
+void stringValueTooShort(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, stringValueTooShort(arg1, arg2));
+}
+
+/**
+ * @internal
* @brief Formats SessionTerminated message into JSON
*
* See header file for more information
@@ -717,6 +1705,25 @@
/**
* @internal
+ * @brief Formats PasswordChangeRequired message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::passwordChangeRequired,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void passwordChangeRequired(crow::Response& res,
+ const boost::urls::url_view_base& arg1)
+{
+ addMessageToJsonRoot(res.jsonValue, passwordChangeRequired(arg1));
+}
+
+/**
+ * @internal
* @brief Formats ResetRequired message into JSON
*
* See header file for more information
@@ -738,6 +1745,26 @@
/**
* @internal
+ * @brief Formats ResetRecommended message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2)
+{
+ return getLog(redfish::registries::base::Index::resetRecommended,
+ std::to_array({arg1, arg2}));
+}
+
+void resetRecommended(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, resetRecommended(arg1, arg2));
+}
+
+/**
+ * @internal
* @brief Formats ChassisPowerStateOnRequired message into JSON
*
* See header file for more information
@@ -893,6 +1920,29 @@
/**
* @internal
+ * @brief Formats ActionParameterValueConflict message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json
+ actionParameterValueConflict(std::string_view arg1, std::string_view arg2)
+{
+ return getLog(
+ redfish::registries::base::Index::actionParameterValueConflict,
+ std::to_array({arg1, arg2}));
+}
+
+void actionParameterValueConflict(crow::Response& res, std::string_view arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue,
+ actionParameterValueConflict(arg1, arg2));
+}
+
+/**
+ * @internal
* @brief Formats MaximumErrorsExceeded message into JSON
*
* See header file for more information
@@ -947,6 +1997,44 @@
/**
* @internal
+ * @brief Formats HeaderMissing message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json headerMissing(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::headerMissing,
+ std::to_array({arg1}));
+}
+
+void headerMissing(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, headerMissing(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats HeaderInvalid message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json headerInvalid(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::headerInvalid,
+ std::to_array({arg1}));
+}
+
+void headerInvalid(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, headerInvalid(arg1));
+}
+
+/**
+ * @internal
* @brief Formats OperationFailed message into JSON
*
* See header file for more information
@@ -983,854 +2071,6 @@
/**
* @internal
- * @brief Formats PropertyValueTypeError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
- std::string_view arg2)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(redfish::registries::base::Index::propertyValueTypeError,
- std::to_array<std::string_view>({arg1Str, arg2}));
-}
-
-void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToJson(res.jsonValue, propertyValueTypeError(arg1, arg2), arg2);
-}
-
-/**
- * @internal
- * @brief Formats PropertyValueError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyValueError(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::propertyValueError,
- std::to_array({arg1}));
-}
-
-void propertyValueError(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToJson(res.jsonValue, propertyValueError(arg1), arg1);
-}
-
-/**
- * @internal
- * @brief Formats ResourceNotFound message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::resourceNotFound,
- std::to_array({arg1, arg2}));
-}
-
-void resourceNotFound(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::not_found);
- addMessageToErrorJson(res.jsonValue, resourceNotFound(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats CouldNotEstablishConnection message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json
- couldNotEstablishConnection(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::couldNotEstablishConnection,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void couldNotEstablishConnection(crow::Response& res,
- const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::not_found);
- addMessageToErrorJson(res.jsonValue, couldNotEstablishConnection(arg1));
-}
-
-/**
- * @internal
- * @brief Formats PropertyNotWritable message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyNotWritable(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::propertyNotWritable,
- std::to_array({arg1}));
-}
-
-void propertyNotWritable(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToJson(res.jsonValue, propertyNotWritable(arg1), arg1);
-}
-
-/**
- * @internal
- * @brief Formats QueryParameterValueTypeError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
- std::string_view arg2)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(
- redfish::registries::base::Index::queryParameterValueTypeError,
- std::to_array<std::string_view>({arg1Str, arg2}));
-}
-
-void queryParameterValueTypeError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- queryParameterValueTypeError(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ServiceShuttingDown message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json serviceShuttingDown()
-{
- return getLog(redfish::registries::base::Index::serviceShuttingDown, {});
-}
-
-void serviceShuttingDown(crow::Response& res)
-{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, serviceShuttingDown());
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterDuplicate message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterDuplicate(std::string_view arg1,
- std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::actionParameterDuplicate,
- std::to_array({arg1, arg2}));
-}
-
-void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, actionParameterDuplicate(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterNotSupported message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterNotSupported(std::string_view arg1,
- std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::actionParameterNotSupported,
- std::to_array({arg1, arg2}));
-}
-
-void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterNotSupported(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats SourceDoesNotSupportProtocol message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json sourceDoesNotSupportProtocol(
- const boost::urls::url_view_base& arg1, std::string_view arg2)
-{
- return getLog(
- redfish::registries::base::Index::sourceDoesNotSupportProtocol,
- std::to_array<std::string_view>({arg1.buffer(), arg2}));
-}
-
-void sourceDoesNotSupportProtocol(crow::Response& res,
- const boost::urls::url_view_base& arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- sourceDoesNotSupportProtocol(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats StrictAccountTypes message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json strictAccountTypes(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::strictAccountTypes,
- std::to_array({arg1}));
-}
-
-void strictAccountTypes(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, strictAccountTypes(arg1));
-}
-
-/**
- * @internal
- * @brief Formats AccountRemoved message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json accountRemoved()
-{
- return getLog(redfish::registries::base::Index::accountRemoved, {});
-}
-
-void accountRemoved(crow::Response& res)
-{
- res.result(boost::beast::http::status::ok);
- addMessageToJsonRoot(res.jsonValue, accountRemoved());
-}
-
-/**
- * @internal
- * @brief Formats AccessDenied message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json accessDenied(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::accessDenied,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToErrorJson(res.jsonValue, accessDenied(arg1));
-}
-
-/**
- * @internal
- * @brief Formats QueryNotSupported message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryNotSupported()
-{
- return getLog(redfish::registries::base::Index::queryNotSupported, {});
-}
-
-void queryNotSupported(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryNotSupported());
-}
-
-/**
- * @internal
- * @brief Formats CreateLimitReachedForResource message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json createLimitReachedForResource()
-{
- return getLog(
- redfish::registries::base::Index::createLimitReachedForResource, {});
-}
-
-void createLimitReachedForResource(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, createLimitReachedForResource());
-}
-
-/**
- * @internal
- * @brief Formats GeneralError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json generalError()
-{
- return getLog(redfish::registries::base::Index::generalError, {});
-}
-
-void generalError(crow::Response& res)
-{
- res.result(boost::beast::http::status::internal_server_error);
- addMessageToErrorJson(res.jsonValue, generalError());
-}
-
-/**
- * @internal
- * @brief Formats Success message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json success()
-{
- return getLog(redfish::registries::base::Index::success, {});
-}
-
-void success(crow::Response& res)
-{
- addMessageToJsonRoot(res.jsonValue, success());
-}
-
-/**
- * @internal
- * @brief Formats Created message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json created()
-{
- return getLog(redfish::registries::base::Index::created, {});
-}
-
-void created(crow::Response& res)
-{
- res.result(boost::beast::http::status::created);
- addMessageToJsonRoot(res.jsonValue, created());
-}
-
-/**
- * @internal
- * @brief Formats NoOperation message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json noOperation()
-{
- return getLog(redfish::registries::base::Index::noOperation, {});
-}
-
-void noOperation(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, noOperation());
-}
-
-/**
- * @internal
- * @brief Formats PropertyUnknown message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyUnknown(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::propertyUnknown,
- std::to_array({arg1}));
-}
-
-void propertyUnknown(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, propertyUnknown(arg1));
-}
-
-/**
- * @internal
- * @brief Formats NoValidSession message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json noValidSession()
-{
- return getLog(redfish::registries::base::Index::noValidSession, {});
-}
-
-void noValidSession(crow::Response& res)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToErrorJson(res.jsonValue, noValidSession());
-}
-
-/**
- * @internal
- * @brief Formats InvalidObject message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json invalidObject(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::invalidObject,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, invalidObject(arg1));
-}
-
-/**
- * @internal
- * @brief Formats ResourceInStandby message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceInStandby()
-{
- return getLog(redfish::registries::base::Index::resourceInStandby, {});
-}
-
-void resourceInStandby(crow::Response& res)
-{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, resourceInStandby());
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueTypeError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterValueTypeError(
- const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(
- redfish::registries::base::Index::actionParameterValueTypeError,
- std::to_array<std::string_view>({arg1Str, arg2, arg3}));
-}
-
-void actionParameterValueTypeError(crow::Response& res,
- const nlohmann::json& arg1,
- std::string_view arg2, std::string_view arg3)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterValueTypeError(arg1, arg2, arg3));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
- std::string_view arg2)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(redfish::registries::base::Index::actionParameterValueError,
- std::to_array<std::string_view>({arg1Str, arg2}));
-}
-
-void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, actionParameterValueError(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats SessionLimitExceeded message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json sessionLimitExceeded()
-{
- return getLog(redfish::registries::base::Index::sessionLimitExceeded, {});
-}
-
-void sessionLimitExceeded(crow::Response& res)
-{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, sessionLimitExceeded());
-}
-
-/**
- * @internal
- * @brief Formats ActionNotSupported message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionNotSupported(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::actionNotSupported,
- std::to_array({arg1}));
-}
-
-void actionNotSupported(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, actionNotSupported(arg1));
-}
-
-/**
- * @internal
- * @brief Formats InvalidIndex message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json invalidIndex(int64_t arg1)
-{
- std::string arg1Str = std::to_string(arg1);
- return getLog(redfish::registries::base::Index::invalidIndex,
- std::to_array<std::string_view>({arg1Str}));
-}
-
-void invalidIndex(crow::Response& res, int64_t arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, invalidIndex(arg1));
-}
-
-/**
- * @internal
- * @brief Formats EmptyJSON message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json emptyJSON()
-{
- return getLog(redfish::registries::base::Index::emptyJSON, {});
-}
-
-void emptyJSON(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, emptyJSON());
-}
-
-/**
- * @internal
- * @brief Formats QueryNotSupportedOnResource message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryNotSupportedOnResource()
-{
- return getLog(redfish::registries::base::Index::queryNotSupportedOnResource,
- {});
-}
-
-void queryNotSupportedOnResource(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryNotSupportedOnResource());
-}
-
-/**
- * @internal
- * @brief Formats QueryNotSupportedOnOperation message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryNotSupportedOnOperation()
-{
- return getLog(
- redfish::registries::base::Index::queryNotSupportedOnOperation, {});
-}
-
-void queryNotSupportedOnOperation(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryNotSupportedOnOperation());
-}
-
-/**
- * @internal
- * @brief Formats QueryCombinationInvalid message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryCombinationInvalid()
-{
- return getLog(redfish::registries::base::Index::queryCombinationInvalid,
- {});
-}
-
-void queryCombinationInvalid(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryCombinationInvalid());
-}
-
-/**
- * @internal
- * @brief Formats EventBufferExceeded message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json eventBufferExceeded()
-{
- return getLog(redfish::registries::base::Index::eventBufferExceeded, {});
-}
-
-void eventBufferExceeded(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, eventBufferExceeded());
-}
-
-/**
- * @internal
- * @brief Formats InsufficientPrivilege message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json insufficientPrivilege()
-{
- return getLog(redfish::registries::base::Index::insufficientPrivilege, {});
-}
-
-void insufficientPrivilege(crow::Response& res)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToErrorJson(res.jsonValue, insufficientPrivilege());
-}
-
-/**
- * @internal
- * @brief Formats PropertyValueModified message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyValueModified(std::string_view arg1,
- const nlohmann::json& arg2)
-{
- std::string arg2Str =
- arg2.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(redfish::registries::base::Index::propertyValueModified,
- std::to_array<std::string_view>({arg1, arg2Str}));
-}
-
-void propertyValueModified(crow::Response& res, std::string_view arg1,
- const nlohmann::json& arg2)
-{
- res.result(boost::beast::http::status::ok);
- addMessageToJson(res.jsonValue, propertyValueModified(arg1, arg2), arg1);
-}
-
-/**
- * @internal
- * @brief Formats AccountNotModified message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json accountNotModified()
-{
- return getLog(redfish::registries::base::Index::accountNotModified, {});
-}
-
-void accountNotModified(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, accountNotModified());
-}
-
-/**
- * @internal
- * @brief Formats QueryParameterValueFormatError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
- std::string_view arg2)
-{
- std::string arg1Str =
- arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
- return getLog(
- redfish::registries::base::Index::queryParameterValueFormatError,
- std::to_array<std::string_view>({arg1Str, arg2}));
-}
-
-void queryParameterValueFormatError(
- crow::Response& res, const nlohmann::json& arg1, std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- queryParameterValueFormatError(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats PropertyMissing message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyMissing(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::propertyMissing,
- std::to_array({arg1}));
-}
-
-void propertyMissing(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToJson(res.jsonValue, propertyMissing(arg1), arg1);
-}
-
-/**
- * @internal
- * @brief Formats ResourceExhaustion message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resourceExhaustion(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::resourceExhaustion,
- std::to_array({arg1}));
-}
-
-void resourceExhaustion(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::service_unavailable);
- addMessageToErrorJson(res.jsonValue, resourceExhaustion(arg1));
-}
-
-/**
- * @internal
- * @brief Formats AccountModified message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json accountModified()
-{
- return getLog(redfish::registries::base::Index::accountModified, {});
-}
-
-void accountModified(crow::Response& res)
-{
- res.result(boost::beast::http::status::ok);
- addMessageToErrorJson(res.jsonValue, accountModified());
-}
-
-/**
- * @internal
- * @brief Formats QueryParameterOutOfRange message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryParameterOutOfRange(
- std::string_view arg1, std::string_view arg2, std::string_view arg3)
-{
- return getLog(redfish::registries::base::Index::queryParameterOutOfRange,
- std::to_array({arg1, arg2, arg3}));
-}
-
-void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
- std::string_view arg2, std::string_view arg3)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- queryParameterOutOfRange(arg1, arg2, arg3));
-}
-
-/**
- * @internal
- * @brief Formats PasswordChangeRequired message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::passwordChangeRequired,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void passwordChangeRequired(crow::Response& res,
- const boost::urls::url_view_base& arg1)
-{
- addMessageToJsonRoot(res.jsonValue, passwordChangeRequired(arg1));
-}
-
-/**
- * @internal
- * @brief Formats InsufficientStorage message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json insufficientStorage()
-{
- return getLog(redfish::registries::base::Index::insufficientStorage, {});
-}
-
-void insufficientStorage(crow::Response& res)
-{
- res.result(boost::beast::http::status::insufficient_storage);
- addMessageToErrorJson(res.jsonValue, insufficientStorage());
-}
-
-/**
- * @internal
* @brief Formats OperationNotAllowed message into JSON
*
* See header file for more information
@@ -1849,322 +2089,6 @@
/**
* @internal
- * @brief Formats ArraySizeTooLong message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2)
-{
- std::string arg2Str = std::to_string(arg2);
- return getLog(redfish::registries::base::Index::arraySizeTooLong,
- std::to_array<std::string_view>({arg1, arg2Str}));
-}
-
-void arraySizeTooLong(crow::Response& res, std::string_view arg1, uint64_t arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, arraySizeTooLong(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats GenerateSecretKeyRequired message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json generateSecretKeyRequired(const boost::urls::url_view_base& arg1)
-{
- return getLog(redfish::registries::base::Index::generateSecretKeyRequired,
- std::to_array<std::string_view>({arg1.buffer()}));
-}
-
-void generateSecretKeyRequired(crow::Response& res,
- const boost::urls::url_view_base& arg1)
-{
- res.result(boost::beast::http::status::forbidden);
- addMessageToErrorJson(res.jsonValue, generateSecretKeyRequired(arg1));
-}
-
-/**
- * @internal
- * @brief Formats PropertyNotUpdated message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json propertyNotUpdated(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::propertyNotUpdated,
- std::to_array({arg1}));
-}
-
-void propertyNotUpdated(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, propertyNotUpdated(arg1));
-}
-
-/**
- * @internal
- * @brief Formats InvalidJSON message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json invalidJSON(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::invalidJSON,
- std::to_array({arg1}));
-}
-
-void invalidJSON(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, invalidJSON(arg1));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueOutOfRange message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json actionParameterValueOutOfRange(
- std::string_view arg1, std::string_view arg2, std::string_view arg3)
-{
- return getLog(
- redfish::registries::base::Index::actionParameterValueOutOfRange,
- std::to_array({arg1, arg2, arg3}));
-}
-
-void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1,
- std::string_view arg2,
- std::string_view arg3)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterValueOutOfRange(arg1, arg2, arg3));
-}
-
-/**
- * @internal
- * @brief Formats ArraySizeTooShort message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::arraySizeTooShort,
- std::to_array({arg1, arg2}));
-}
-
-void arraySizeTooShort(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, arraySizeTooShort(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats QueryParameterValueError message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryParameterValueError(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::queryParameterValueError,
- std::to_array({arg1}));
-}
-
-void queryParameterValueError(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryParameterValueError(arg1));
-}
-
-/**
- * @internal
- * @brief Formats QueryParameterUnsupported message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json queryParameterUnsupported(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::queryParameterUnsupported,
- std::to_array({arg1}));
-}
-
-void queryParameterUnsupported(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, queryParameterUnsupported(arg1));
-}
-
-/**
- * @internal
- * @brief Formats PayloadTooLarge message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json payloadTooLarge()
-{
- return getLog(redfish::registries::base::Index::payloadTooLarge, {});
-}
-
-void payloadTooLarge(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, payloadTooLarge());
-}
-
-/**
- * @internal
- * @brief Formats MissingOrMalformedPart message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json missingOrMalformedPart()
-{
- return getLog(redfish::registries::base::Index::missingOrMalformedPart, {});
-}
-
-void missingOrMalformedPart(crow::Response& res)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, missingOrMalformedPart());
-}
-
-/**
- * @internal
- * @brief Formats InvalidURI message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json invalidURI(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::invalidURI,
- std::to_array({arg1}));
-}
-
-void invalidURI(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, invalidURI(arg1));
-}
-
-/**
- * @internal
- * @brief Formats StringValueTooShort message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json stringValueTooShort(std::string_view arg1, std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::stringValueTooShort,
- std::to_array({arg1, arg2}));
-}
-
-void stringValueTooShort(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, stringValueTooShort(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ResetRecommended message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2)
-{
- return getLog(redfish::registries::base::Index::resetRecommended,
- std::to_array({arg1, arg2}));
-}
-
-void resetRecommended(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, resetRecommended(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats ActionParameterValueConflict message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json
- actionParameterValueConflict(std::string_view arg1, std::string_view arg2)
-{
- return getLog(
- redfish::registries::base::Index::actionParameterValueConflict,
- std::to_array({arg1, arg2}));
-}
-
-void actionParameterValueConflict(crow::Response& res, std::string_view arg1,
- std::string_view arg2)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue,
- actionParameterValueConflict(arg1, arg2));
-}
-
-/**
- * @internal
- * @brief Formats HeaderMissing message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json headerMissing(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::headerMissing,
- std::to_array({arg1}));
-}
-
-void headerMissing(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, headerMissing(arg1));
-}
-
-/**
- * @internal
- * @brief Formats HeaderInvalid message into JSON
- *
- * See header file for more information
- * @endinternal
- */
-nlohmann::json headerInvalid(std::string_view arg1)
-{
- return getLog(redfish::registries::base::Index::headerInvalid,
- std::to_array({arg1}));
-}
-
-void headerInvalid(crow::Response& res, std::string_view arg1)
-{
- res.result(boost::beast::http::status::bad_request);
- addMessageToErrorJson(res.jsonValue, headerInvalid(arg1));
-}
-
-/**
- * @internal
* @brief Formats UndeterminedFault message into JSON
*
* See header file for more information
@@ -2241,6 +2165,25 @@
/**
* @internal
+ * @brief Formats StrictAccountTypes message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json strictAccountTypes(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::strictAccountTypes,
+ std::to_array({arg1}));
+}
+
+void strictAccountTypes(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, strictAccountTypes(arg1));
+}
+
+/**
+ * @internal
* @brief Formats PropertyDeprecated message into JSON
*
* See header file for more information
@@ -2359,6 +2302,43 @@
/**
* @internal
+ * @brief Formats ServiceDisabled message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json serviceDisabled(std::string_view arg1)
+{
+ return getLog(redfish::registries::base::Index::serviceDisabled,
+ std::to_array({arg1}));
+}
+
+void serviceDisabled(crow::Response& res, std::string_view arg1)
+{
+ res.result(boost::beast::http::status::service_unavailable);
+ addMessageToErrorJson(res.jsonValue, serviceDisabled(arg1));
+}
+
+/**
+ * @internal
+ * @brief Formats EventBufferExceeded message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json eventBufferExceeded()
+{
+ return getLog(redfish::registries::base::Index::eventBufferExceeded, {});
+}
+
+void eventBufferExceeded(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, eventBufferExceeded());
+}
+
+/**
+ * @internal
* @brief Formats AuthenticationTokenRequired message into JSON
*
* See header file for more information
@@ -2432,5 +2412,25 @@
addMessageToErrorJson(res.jsonValue, propertyModified());
}
+/**
+ * @internal
+ * @brief Formats GenerateSecretKeyRequired message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json generateSecretKeyRequired(const boost::urls::url_view_base& arg1)
+{
+ return getLog(redfish::registries::base::Index::generateSecretKeyRequired,
+ std::to_array<std::string_view>({arg1.buffer()}));
+}
+
+void generateSecretKeyRequired(crow::Response& res,
+ const boost::urls::url_view_base& arg1)
+{
+ res.result(boost::beast::http::status::forbidden);
+ addMessageToErrorJson(res.jsonValue, generateSecretKeyRequired(arg1));
+}
+
} // namespace messages
} // namespace redfish
diff --git a/scripts/parse_registries.py b/scripts/parse_registries.py
index 573f8a7..a7eb5bf 100755
--- a/scripts/parse_registries.py
+++ b/scripts/parse_registries.py
@@ -236,103 +236,6 @@
return "bad_request"
-def get_old_index(entry):
- old_order = [
- "ResourceInUse",
- "MalformedJSON",
- "ResourceMissingAtURI",
- "ActionParameterValueFormatError",
- "ActionParameterValueNotInList",
- "InternalError",
- "UnrecognizedRequestBody",
- "ResourceAtUriUnauthorized",
- "ActionParameterUnknown",
- "ResourceCannotBeDeleted",
- "PropertyDuplicate",
- "ServiceTemporarilyUnavailable",
- "ResourceAlreadyExists",
- "AccountForSessionNoLongerExists",
- "CreateFailedMissingReqProperties",
- "PropertyValueFormatError",
- "PropertyValueNotInList",
- "PropertyValueOutOfRange",
- "ResourceAtUriInUnknownFormat",
- "ServiceDisabled",
- "ServiceInUnknownState",
- "EventSubscriptionLimitExceeded",
- "ActionParameterMissing",
- "StringValueTooLong",
- "SessionTerminated",
- "SubscriptionTerminated",
- "ResourceTypeIncompatible",
- "ResetRequired",
- "ChassisPowerStateOnRequired",
- "ChassisPowerStateOffRequired",
- "PropertyValueConflict",
- "PropertyValueResourceConflict",
- "PropertyValueExternalConflict",
- "PropertyValueIncorrect",
- "ResourceCreationConflict",
- "MaximumErrorsExceeded",
- "PreconditionFailed",
- "PreconditionRequired",
- "OperationFailed",
- "OperationTimeout",
- "PropertyValueTypeError",
- "PropertyValueError",
- "ResourceNotFound",
- "CouldNotEstablishConnection",
- "PropertyNotWritable",
- "QueryParameterValueTypeError",
- "ServiceShuttingDown",
- "ActionParameterDuplicate",
- "ActionParameterNotSupported",
- "SourceDoesNotSupportProtocol",
- "StrictAccountTypes",
- "AccountRemoved",
- "AccessDenied",
- "QueryNotSupported",
- "CreateLimitReachedForResource",
- "GeneralError",
- "Success",
- "Created",
- "NoOperation",
- "PropertyUnknown",
- "NoValidSession",
- "InvalidObject",
- "ResourceInStandby",
- "ActionParameterValueTypeError",
- "ActionParameterValueError",
- "SessionLimitExceeded",
- "ActionNotSupported",
- "InvalidIndex",
- "EmptyJSON",
- "QueryNotSupportedOnResource",
- "QueryNotSupportedOnOperation",
- "QueryCombinationInvalid",
- "EventBufferExceeded",
- "InsufficientPrivilege",
- "PropertyValueModified",
- "AccountNotModified",
- "QueryParameterValueFormatError",
- "PropertyMissing",
- "ResourceExhaustion",
- "AccountModified",
- "QueryParameterOutOfRange",
- "PasswordChangeRequired",
- "InsufficientStorage",
- "OperationNotAllowed",
- "ArraySizeTooLong",
- "Invalid File",
- "GenerateSecretKeyRequired",
- ]
-
- if entry[0] in old_order:
- return old_order.index(entry[0])
- else:
- return 999999
-
-
def make_error_function(entry_id, entry, is_header):
arg_as_url = {
@@ -501,12 +404,11 @@
def create_error_registry(entry):
file, json_dict, namespace, url = entry
- messages = OrderedDict(
- sorted(json_dict["Messages"].items(), key=get_old_index)
- )
error_messages_hpp = os.path.join(
SCRIPT_DIR, "..", "redfish-core", "include", "error_messages.hpp"
)
+ messages = json_dict["Messages"]
+
with open(
error_messages_hpp,
"w",
@@ -525,7 +427,6 @@
#include <source_location>
#include <string>
#include <string_view>
-#include <utility>
// IWYU pragma: no_forward_declare crow::Response