1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 /****************************************************************
5 * READ THIS WARNING FIRST
6 * This is an auto-generated header which contains definitions
7 * for Redfish DMTF defined messages.
8 * DO NOT modify this registry outside of running the
9 * parse_registries.py script. The definitions contained within
10 * this file are owned by DMTF. Any modifications to these files
11 * should be first pushed to the relevant registry in the DMTF
12 * github organization.
13 ***************************************************************/
14 #include "registries.hpp"
15
16 #include <array>
17
18 // clang-format off
19
20 namespace redfish::registries
21 {
22 struct Update
23 {
24 static constexpr Header header = {
25 "Copyright 2014-2023 DMTF. All rights reserved.",
26 "#MessageRegistry.v1_6_2.MessageRegistry",
27 1,
28 0,
29 2,
30 "Update Message Registry",
31 "en",
32 "This registry defines the update status and error messages.",
33 "Update",
34 "DMTF",
35 };
36
37 static constexpr const char* url =
38 "https://redfish.dmtf.org/registries/Update.1.0.2.json";
39
40 static constexpr std::array registry =
41 {
42 MessageEntry{
43 "ActivateFailed",
44 {
45 "Indicates that the component failed to activate the image.",
46 "Activation of image '%1' on '%2' failed.",
47 "Critical",
48 2,
49 {
50 "string",
51 "string",
52 },
53 "None.",
54 }},
55 MessageEntry{
56 "AllTargetsDetermined",
57 {
58 "Indicates that all target resources or devices for an update operation were determined by the service.",
59 "All the target devices to be updated were determined.",
60 "OK",
61 0,
62 {},
63 "None.",
64 }},
65 MessageEntry{
66 "ApplyFailed",
67 {
68 "Indicates that the component failed to apply an image.",
69 "Installation of image '%1' to '%2' failed.",
70 "Critical",
71 2,
72 {
73 "string",
74 "string",
75 },
76 "None.",
77 }},
78 MessageEntry{
79 "ApplyingOnComponent",
80 {
81 "Indicates that a component is applying an image.",
82 "Image '%1' is being applied on '%2'.",
83 "OK",
84 2,
85 {
86 "string",
87 "string",
88 },
89 "None.",
90 }},
91 MessageEntry{
92 "AwaitToActivate",
93 {
94 "Indicates that the resource or device is waiting for an action to proceed with activating an image.",
95 "Awaiting for an action to proceed with activating image '%1' on '%2'.",
96 "OK",
97 2,
98 {
99 "string",
100 "string",
101 },
102 "Perform the requested action to advance the update operation.",
103 }},
104 MessageEntry{
105 "AwaitToUpdate",
106 {
107 "Indicates that the resource or device is waiting for an action to proceed with installing an image.",
108 "Awaiting for an action to proceed with installing image '%1' on '%2'.",
109 "OK",
110 2,
111 {
112 "string",
113 "string",
114 },
115 "Perform the requested action to advance the update operation.",
116 }},
117 MessageEntry{
118 "InstallingOnComponent",
119 {
120 "Indicates that a component is installing an image.",
121 "Image '%1' is being installed on '%2'.",
122 "OK",
123 2,
124 {
125 "string",
126 "string",
127 },
128 "None.",
129 }},
130 MessageEntry{
131 "OperationTransitionedToJob",
132 {
133 "Indicates that the update operation transitioned to a job for managing the progress of the operation.",
134 "The update operation has transitioned to the job at URI '%1'.",
135 "OK",
136 1,
137 {
138 "string",
139 },
140 "Follow the referenced job and monitor the job for further updates.",
141 }},
142 MessageEntry{
143 "TargetDetermined",
144 {
145 "Indicates that a target resource or device for an image was determined for update.",
146 "The target device '%1' will be updated with image '%2'.",
147 "OK",
148 2,
149 {
150 "string",
151 "string",
152 },
153 "None.",
154 }},
155 MessageEntry{
156 "TransferFailed",
157 {
158 "Indicates that the service failed to transfer an image to a component.",
159 "Transfer of image '%1' to '%2' failed.",
160 "Critical",
161 2,
162 {
163 "string",
164 "string",
165 },
166 "None.",
167 }},
168 MessageEntry{
169 "TransferringToComponent",
170 {
171 "Indicates that the service is transferring an image to a component.",
172 "Image '%1' is being transferred to '%2'.",
173 "OK",
174 2,
175 {
176 "string",
177 "string",
178 },
179 "None.",
180 }},
181 MessageEntry{
182 "UpdateInProgress",
183 {
184 "Indicates that an update is in progress.",
185 "An update is in progress.",
186 "OK",
187 0,
188 {},
189 "None.",
190 }},
191 MessageEntry{
192 "UpdateSuccessful",
193 {
194 "Indicates that a resource or device was updated.",
195 "Device '%1' successfully updated with image '%2'.",
196 "OK",
197 2,
198 {
199 "string",
200 "string",
201 },
202 "None.",
203 }},
204 MessageEntry{
205 "VerificationFailed",
206 {
207 "Indicates that the component failed to verify an image.",
208 "Verification of image '%1' at '%2' failed.",
209 "Critical",
210 2,
211 {
212 "string",
213 "string",
214 },
215 "None.",
216 }},
217 MessageEntry{
218 "VerifyingAtComponent",
219 {
220 "Indicates that a component is verifying an image.",
221 "Image '%1' is being verified at '%2'.",
222 "OK",
223 2,
224 {
225 "string",
226 "string",
227 },
228 "None.",
229 }},
230
231 };
232
233 enum class Index
234 {
235 activateFailed = 0,
236 allTargetsDetermined = 1,
237 applyFailed = 2,
238 applyingOnComponent = 3,
239 awaitToActivate = 4,
240 awaitToUpdate = 5,
241 installingOnComponent = 6,
242 operationTransitionedToJob = 7,
243 targetDetermined = 8,
244 transferFailed = 9,
245 transferringToComponent = 10,
246 updateInProgress = 11,
247 updateSuccessful = 12,
248 verificationFailed = 13,
249 verifyingAtComponent = 14,
250 };
251 }; // struct update
252
registerUpdate()253 [[gnu::constructor]] inline void registerUpdate()
254 { registerRegistry<Update>(); }
255
256 } // namespace redfish::registries
257