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