Generate update registry
Generate the update registry, needed to return correct error messages
from update service.
Change-Id: Ifaa699cad8531070aea47d2476c1834df7c61e08
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/redfish-core/include/registries/update_message_registry.hpp b/redfish-core/include/registries/update_message_registry.hpp
index 578b77a..5f4043e 100644
--- a/redfish-core/include/registries/update_message_registry.hpp
+++ b/redfish-core/include/registries/update_message_registry.hpp
@@ -22,11 +22,11 @@
struct Update
{
static constexpr Header header = {
- "Copyright 2014-2023 DMTF. All rights reserved.",
+ "Copyright 2014-2025 DMTF. All rights reserved.",
"#MessageRegistry.v1_6_2.MessageRegistry",
1,
- 0,
2,
+ 0,
"Update Message Registry",
"en",
"This registry defines the update status and error messages.",
@@ -35,7 +35,7 @@
};
static constexpr const char* url =
- "https://redfish.dmtf.org/registries/Update.1.0.2.json";
+ "https://redfish.dmtf.org/registries/Update.1.2.0.json";
static constexpr std::array registry =
{
@@ -128,6 +128,18 @@
"None.",
}},
MessageEntry{
+ "NoTargetsDetermined",
+ {
+ "Indicates that no target resource or device for an image was determined for update.",
+ "No target device will be updated with image '%1'.",
+ "OK",
+ 1,
+ {
+ "string",
+ },
+ "None.",
+ }},
+ MessageEntry{
"OperationTransitionedToJob",
{
"Indicates that the update operation transitioned to a job for managing the progress of the operation.",
@@ -189,6 +201,45 @@
"None.",
}},
MessageEntry{
+ "UpdateNotApplicable",
+ {
+ "Indicates that the update was not applicable to the resource or device.",
+ "Image '%1' was not applicable to device '%2'.",
+ "Warning",
+ 2,
+ {
+ "string",
+ "string",
+ },
+ "None.",
+ }},
+ MessageEntry{
+ "UpdateSkipped",
+ {
+ "Indicates that an image was applicable to a resource or device, but the update was skipped due to policies in the service.",
+ "Device '%1' skipped the update with image '%2'.",
+ "OK",
+ 2,
+ {
+ "string",
+ "string",
+ },
+ "None.",
+ }},
+ MessageEntry{
+ "UpdateSkippedSameVersion",
+ {
+ "Indicates that a resource or device update was skipped because the same version is already installed.",
+ "Device '%1' skipped the update with image '%2' because the same version is already installed.",
+ "OK",
+ 2,
+ {
+ "string",
+ "string",
+ },
+ "None.",
+ }},
+ MessageEntry{
"UpdateSuccessful",
{
"Indicates that a resource or device was updated.",
@@ -204,7 +255,7 @@
MessageEntry{
"VerificationFailed",
{
- "Indicates that the component failed to verify an image.",
+ "Indicates that the service or component failed to verify an image.",
"Verification of image '%1' at '%2' failed.",
"Critical",
2,
@@ -239,14 +290,18 @@
awaitToActivate = 4,
awaitToUpdate = 5,
installingOnComponent = 6,
- operationTransitionedToJob = 7,
- targetDetermined = 8,
- transferFailed = 9,
- transferringToComponent = 10,
- updateInProgress = 11,
- updateSuccessful = 12,
- verificationFailed = 13,
- verifyingAtComponent = 14,
+ noTargetsDetermined = 7,
+ operationTransitionedToJob = 8,
+ targetDetermined = 9,
+ transferFailed = 10,
+ transferringToComponent = 11,
+ updateInProgress = 12,
+ updateNotApplicable = 13,
+ updateSkipped = 14,
+ updateSkippedSameVersion = 15,
+ updateSuccessful = 16,
+ verificationFailed = 17,
+ verifyingAtComponent = 18,
};
}; // struct update
diff --git a/redfish-core/include/update_messages.hpp b/redfish-core/include/update_messages.hpp
new file mode 100644
index 0000000..c79a208
--- /dev/null
+++ b/redfish-core/include/update_messages.hpp
@@ -0,0 +1,84 @@
+#pragma once
+/****************************************************************
+ * READ THIS WARNING FIRST
+ * This is an auto-generated header which contains definitions
+ * for Redfish DMTF defined messages.
+ * DO NOT modify this registry outside of running the
+ * parse_registries.py script. The definitions contained within
+ * this file are owned by DMTF. Any modifications to these files
+ * should be first pushed to the relevant registry in the DMTF
+ * github organization.
+ ***************************************************************/
+// These generated headers are a superset of what is needed.
+// clang sees them as an error, so ignore
+// NOLINTBEGIN(misc-include-cleaner)
+#include "http_response.hpp"
+
+#include <boost/url/url_view_base.hpp>
+#include <nlohmann/json.hpp>
+
+#include <cstdint>
+#include <source_location>
+#include <string_view>
+// NOLINTEND(misc-include-cleaner)
+
+namespace redfish
+{
+
+namespace messages
+{
+nlohmann::json::object_t targetDetermined(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t allTargetsDetermined();
+
+nlohmann::json::object_t noTargetsDetermined(std::string_view arg1);
+
+nlohmann::json::object_t updateInProgress();
+
+nlohmann::json::object_t transferringToComponent(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t verifyingAtComponent(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t installingOnComponent(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t applyingOnComponent(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t transferFailed(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t verificationFailed(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t applyFailed(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t activateFailed(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t awaitToUpdate(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t awaitToActivate(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t updateSuccessful(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t operationTransitionedToJob(std::string_view arg1);
+
+nlohmann::json::object_t updateSkipped(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t updateSkippedSameVersion(std::string_view arg1,
+ std::string_view arg2);
+
+nlohmann::json::object_t updateNotApplicable(std::string_view arg1,
+ std::string_view arg2);
+
+} // namespace messages
+} // namespace redfish