xref: /openbmc/bmcweb/redfish-core/include/registries/update_message_registry.hpp (revision d3616d13fbd236204477312ddf2e9913a7001010)
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-2025 DMTF. All rights reserved.",
26     "#MessageRegistry.v1_6_2.MessageRegistry",
27     1,
28     2,
29     0,
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.2.0.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         "NoTargetsDetermined",
132         {
133             "Indicates that no target resource or device for an image was determined for update.",
134             "No target device will be updated with image '%1'.",
135             "OK",
136             1,
137             {
138                 "string",
139             },
140             "None.",
141         }},
142     MessageEntry{
143         "OperationTransitionedToJob",
144         {
145             "Indicates that the update operation transitioned to a job for managing the progress of the operation.",
146             "The update operation has transitioned to the job at URI '%1'.",
147             "OK",
148             1,
149             {
150                 "string",
151             },
152             "Follow the referenced job and monitor the job for further updates.",
153         }},
154     MessageEntry{
155         "TargetDetermined",
156         {
157             "Indicates that a target resource or device for an image was determined for update.",
158             "The target device '%1' will be updated with image '%2'.",
159             "OK",
160             2,
161             {
162                 "string",
163                 "string",
164             },
165             "None.",
166         }},
167     MessageEntry{
168         "TransferFailed",
169         {
170             "Indicates that the service failed to transfer an image to a component.",
171             "Transfer of image '%1' to '%2' failed.",
172             "Critical",
173             2,
174             {
175                 "string",
176                 "string",
177             },
178             "None.",
179         }},
180     MessageEntry{
181         "TransferringToComponent",
182         {
183             "Indicates that the service is transferring an image to a component.",
184             "Image '%1' is being transferred to '%2'.",
185             "OK",
186             2,
187             {
188                 "string",
189                 "string",
190             },
191             "None.",
192         }},
193     MessageEntry{
194         "UpdateInProgress",
195         {
196             "Indicates that an update is in progress.",
197             "An update is in progress.",
198             "OK",
199             0,
200             {},
201             "None.",
202         }},
203     MessageEntry{
204         "UpdateNotApplicable",
205         {
206             "Indicates that the update was not applicable to the resource or device.",
207             "Image '%1' was not applicable to device '%2'.",
208             "Warning",
209             2,
210             {
211                 "string",
212                 "string",
213             },
214             "None.",
215         }},
216     MessageEntry{
217         "UpdateSkipped",
218         {
219             "Indicates that an image was applicable to a resource or device, but the update was skipped due to policies in the service.",
220             "Device '%1' skipped the update with image '%2'.",
221             "OK",
222             2,
223             {
224                 "string",
225                 "string",
226             },
227             "None.",
228         }},
229     MessageEntry{
230         "UpdateSkippedSameVersion",
231         {
232             "Indicates that a resource or device update was skipped because the same version is already installed.",
233             "Device '%1' skipped the update with image '%2' because the same version is already installed.",
234             "OK",
235             2,
236             {
237                 "string",
238                 "string",
239             },
240             "None.",
241         }},
242     MessageEntry{
243         "UpdateSuccessful",
244         {
245             "Indicates that a resource or device was updated.",
246             "Device '%1' successfully updated with image '%2'.",
247             "OK",
248             2,
249             {
250                 "string",
251                 "string",
252             },
253             "None.",
254         }},
255     MessageEntry{
256         "VerificationFailed",
257         {
258             "Indicates that the service or component failed to verify an image.",
259             "Verification of image '%1' at '%2' failed.",
260             "Critical",
261             2,
262             {
263                 "string",
264                 "string",
265             },
266             "None.",
267         }},
268     MessageEntry{
269         "VerifyingAtComponent",
270         {
271             "Indicates that a component is verifying an image.",
272             "Image '%1' is being verified at '%2'.",
273             "OK",
274             2,
275             {
276                 "string",
277                 "string",
278             },
279             "None.",
280         }},
281 
282 };
283 
284 enum class Index
285 {
286     activateFailed = 0,
287     allTargetsDetermined = 1,
288     applyFailed = 2,
289     applyingOnComponent = 3,
290     awaitToActivate = 4,
291     awaitToUpdate = 5,
292     installingOnComponent = 6,
293     noTargetsDetermined = 7,
294     operationTransitionedToJob = 8,
295     targetDetermined = 9,
296     transferFailed = 10,
297     transferringToComponent = 11,
298     updateInProgress = 12,
299     updateNotApplicable = 13,
300     updateSkipped = 14,
301     updateSkippedSameVersion = 15,
302     updateSuccessful = 16,
303     verificationFailed = 17,
304     verifyingAtComponent = 18,
305 };
306 }; // struct update
307 
registerUpdate()308 [[gnu::constructor]] inline void registerUpdate()
309 { registerRegistry<Update>(); }
310 
311 } // namespace redfish::registries
312