summaryrefslogtreecommitdiff
path: root/redfish-core/include/registries/update_message_registry.hpp
blob: 5f4043ec3a58f73115871e73b912fb774cc55b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#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.
 ***************************************************************/
#include "registries.hpp"

#include <array>

// clang-format off

namespace redfish::registries
{
struct Update
{
static constexpr Header header = {
    "Copyright 2014-2025 DMTF. All rights reserved.",
    "#MessageRegistry.v1_6_2.MessageRegistry",
    1,
    2,
    0,
    "Update Message Registry",
    "en",
    "This registry defines the update status and error messages.",
    "Update",
    "DMTF",
};

static constexpr const char* url =
    "https://redfish.dmtf.org/registries/Update.1.2.0.json";

static constexpr std::array registry =
{
    MessageEntry{
        "ActivateFailed",
        {
            "Indicates that the component failed to activate the image.",
            "Activation of image '%1' on '%2' failed.",
            "Critical",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "AllTargetsDetermined",
        {
            "Indicates that all target resources or devices for an update operation were determined by the service.",
            "All the target devices to be updated were determined.",
            "OK",
            0,
            {},
            "None.",
        }},
    MessageEntry{
        "ApplyFailed",
        {
            "Indicates that the component failed to apply an image.",
            "Installation of image '%1' to '%2' failed.",
            "Critical",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "ApplyingOnComponent",
        {
            "Indicates that a component is applying an image.",
            "Image '%1' is being applied on '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "AwaitToActivate",
        {
            "Indicates that the resource or device is waiting for an action to proceed with activating an image.",
            "Awaiting for an action to proceed with activating image '%1' on '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "Perform the requested action to advance the update operation.",
        }},
    MessageEntry{
        "AwaitToUpdate",
        {
            "Indicates that the resource or device is waiting for an action to proceed with installing an image.",
            "Awaiting for an action to proceed with installing image '%1' on '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "Perform the requested action to advance the update operation.",
        }},
    MessageEntry{
        "InstallingOnComponent",
        {
            "Indicates that a component is installing an image.",
            "Image '%1' is being installed on '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "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.",
            "The update operation has transitioned to the job at URI '%1'.",
            "OK",
            1,
            {
                "string",
            },
            "Follow the referenced job and monitor the job for further updates.",
        }},
    MessageEntry{
        "TargetDetermined",
        {
            "Indicates that a target resource or device for an image was determined for update.",
            "The target device '%1' will be updated with image '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "TransferFailed",
        {
            "Indicates that the service failed to transfer an image to a component.",
            "Transfer of image '%1' to '%2' failed.",
            "Critical",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "TransferringToComponent",
        {
            "Indicates that the service is transferring an image to a component.",
            "Image '%1' is being transferred to '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "UpdateInProgress",
        {
            "Indicates that an update is in progress.",
            "An update is in progress.",
            "OK",
            0,
            {},
            "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.",
            "Device '%1' successfully updated with image '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "VerificationFailed",
        {
            "Indicates that the service or component failed to verify an image.",
            "Verification of image '%1' at '%2' failed.",
            "Critical",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "VerifyingAtComponent",
        {
            "Indicates that a component is verifying an image.",
            "Image '%1' is being verified at '%2'.",
            "OK",
            2,
            {
                "string",
                "string",
            },
            "None.",
        }},

};

enum class Index
{
    activateFailed = 0,
    allTargetsDetermined = 1,
    applyFailed = 2,
    applyingOnComponent = 3,
    awaitToActivate = 4,
    awaitToUpdate = 5,
    installingOnComponent = 6,
    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

[[gnu::constructor]] inline void registerUpdate()
{ registerRegistry<Update>(); }

} // namespace redfish::registries