xref: /openbmc/bmcweb/redfish-core/include/registries/resource_event_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::resource_event
21 {
22 const Header header = {
23     "Copyright 2014-2023 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.",
24     "#MessageRegistry.v1_6_0.MessageRegistry",
25     1,
26     3,
27     0,
28     "Resource Event Message Registry",
29     "en",
30     "This registry defines the messages to use for resource events.",
31     "ResourceEvent",
32     "DMTF",
33 };
34 constexpr const char* url =
35     "https://redfish.dmtf.org/registries/ResourceEvent.1.3.0.json";
36 
37 constexpr std::array registry =
38 {
39     MessageEntry{
40         "AggregationSourceDiscovered",
41         {
42             "Indicates that a new aggregation source has been discovered.",
43             "A aggregation source of connection method `%1` located at `%2` has been discovered.",
44             "OK",
45             2,
46             {
47                 "string",
48                 "string",
49             },
50             "The aggregation source is available to the service and can be identified using the identified connection method.",
51         }},
52     MessageEntry{
53         "LicenseAdded",
54         {
55             "Indicates that a license has been added.",
56             "A license for '%1' has been added.  The following message was returned: '%2'.",
57             "OK",
58             2,
59             {
60                 "string",
61                 "string",
62             },
63             "See vendor specific instructions for specific actions.",
64         }},
65     MessageEntry{
66         "LicenseChanged",
67         {
68             "Indicates that a license has changed.",
69             "A license for '%1' has changed.  The following message was returned: '%2'.",
70             "Warning",
71             2,
72             {
73                 "string",
74                 "string",
75             },
76             "See vendor specific instructions for specific actions.",
77         }},
78     MessageEntry{
79         "LicenseExpired",
80         {
81             "Indicates that a license has expired.",
82             "A license for '%1' has expired.  The following message was returned: '%2'.",
83             "Warning",
84             2,
85             {
86                 "string",
87                 "string",
88             },
89             "See vendor specific instructions for specific actions.",
90         }},
91     MessageEntry{
92         "ResourceChanged",
93         {
94             "Indicates that one or more resource properties have changed.  This is not used whenever there is another event message for that specific change, such as only the state has changed.",
95             "One or more resource properties have changed.",
96             "OK",
97             0,
98             {},
99             "None.",
100         }},
101     MessageEntry{
102         "ResourceCreated",
103         {
104             "Indicates that all conditions of a successful creation operation have been met.",
105             "The resource has been created successfully.",
106             "OK",
107             0,
108             {},
109             "None",
110         }},
111     MessageEntry{
112         "ResourceErrorThresholdCleared",
113         {
114             "Indicates that a specified resource property has cleared its error threshold.  Examples would be drive I/O errors, or network link errors.",
115             "The resource property %1 has cleared the error threshold of value %2.",
116             "OK",
117             2,
118             {
119                 "string",
120                 "number",
121             },
122             "None.",
123         }},
124     MessageEntry{
125         "ResourceErrorThresholdExceeded",
126         {
127             "Indicates that a specified resource property has exceeded its error threshold.  Examples would be drive I/O errors, or network link errors.",
128             "The resource property %1 has exceeded error threshold of value %2.",
129             "Critical",
130             2,
131             {
132                 "string",
133                 "number",
134             },
135             "None.",
136         }},
137     MessageEntry{
138         "ResourceErrorsCorrected",
139         {
140             "Indicates that a specified resource property has corrected errors.  Examples would be drive I/O errors, or network link errors.",
141             "The resource property %1 has corrected errors of type '%2'.",
142             "OK",
143             2,
144             {
145                 "string",
146                 "string",
147             },
148             "None.",
149         }},
150     MessageEntry{
151         "ResourceErrorsDetected",
152         {
153             "Indicates that a specified resource property has detected errors.  Examples would be drive I/O errors, or network link errors.",
154             "The resource property %1 has detected errors of type '%2'.",
155             "Warning",
156             2,
157             {
158                 "string",
159                 "string",
160             },
161             "Resolution dependent upon error type.",
162         }},
163     MessageEntry{
164         "ResourcePaused",
165         {
166             "Indicates that the power state of a resource has changed to paused.",
167             "The resource `%1` has been paused.",
168             "OK",
169             1,
170             {
171                 "string",
172             },
173             "None.",
174         }},
175     MessageEntry{
176         "ResourcePoweredOff",
177         {
178             "Indicates that the power state of a resource has changed to powered off.",
179             "The resource `%1` has powered off.",
180             "OK",
181             1,
182             {
183                 "string",
184             },
185             "None.",
186         }},
187     MessageEntry{
188         "ResourcePoweredOn",
189         {
190             "Indicates that the power state of a resource has changed to powered on.",
191             "The resource `%1` has powered on.",
192             "OK",
193             1,
194             {
195                 "string",
196             },
197             "None.",
198         }},
199     MessageEntry{
200         "ResourcePoweringOff",
201         {
202             "Indicates that the power state of a resource has changed to powering off.",
203             "The resource `%1` is powering off.",
204             "OK",
205             1,
206             {
207                 "string",
208             },
209             "None.",
210         }},
211     MessageEntry{
212         "ResourcePoweringOn",
213         {
214             "Indicates that the power state of a resource has changed to powering on.",
215             "The resource `%1` is powering on.",
216             "OK",
217             1,
218             {
219                 "string",
220             },
221             "None.",
222         }},
223     MessageEntry{
224         "ResourceRemoved",
225         {
226             "Indicates that all conditions of a successful remove operation have been met.",
227             "The resource has been removed successfully.",
228             "OK",
229             0,
230             {},
231             "None",
232         }},
233     MessageEntry{
234         "ResourceSelfTestCompleted",
235         {
236             "Indicates that a self-test has completed.",
237             "A self-test has completed.",
238             "OK",
239             0,
240             {},
241             "None.",
242         }},
243     MessageEntry{
244         "ResourceSelfTestFailed",
245         {
246             "Indicates that a self-test has failed.  Suggested resolution may be provided as OEM data.",
247             "A self-test has failed.  The following message was returned: '%1'.",
248             "Critical",
249             1,
250             {
251                 "string",
252             },
253             "See vendor specific instructions for specific actions.",
254         }},
255     MessageEntry{
256         "ResourceStateChanged",
257         {
258             "Indicates that the state of a resource has changed.",
259             "The state of resource `%1` has changed to %2.",
260             "OK",
261             2,
262             {
263                 "string",
264                 "string",
265             },
266             "None.",
267         }},
268     MessageEntry{
269         "ResourceStatusChangedCritical",
270         {
271             "Indicates that the health of a resource has changed to Critical.",
272             "The health of resource `%1` has changed to %2.",
273             "Critical",
274             2,
275             {
276                 "string",
277                 "string",
278             },
279             "None.",
280         }},
281     MessageEntry{
282         "ResourceStatusChangedOK",
283         {
284             "Indicates that the health of a resource has changed to OK.",
285             "The health of resource '%1' has changed to %2.",
286             "OK",
287             2,
288             {
289                 "string",
290                 "string",
291             },
292             "None.",
293         }},
294     MessageEntry{
295         "ResourceStatusChangedWarning",
296         {
297             "Indicates that the health of a resource has changed to Warning.",
298             "The health of resource `%1` has changed to %2.",
299             "Warning",
300             2,
301             {
302                 "string",
303                 "string",
304             },
305             "None.",
306         }},
307     MessageEntry{
308         "ResourceVersionIncompatible",
309         {
310             "Indicates that an incompatible version of software has been detected.  Examples may be after a component or system level software update.",
311             "An incompatible version of software '%1' has been detected.",
312             "Warning",
313             1,
314             {
315                 "string",
316             },
317             "Compare the version of the resource with the compatible version of the software.",
318         }},
319     MessageEntry{
320         "ResourceWarningThresholdCleared",
321         {
322             "Indicates that a specified resource property has cleared its warning threshold.  Examples would be drive I/O errors, or network link errors.  Suggested resolution may be provided as OEM data.",
323             "The resource property %1 has cleared the warning threshold of value %2.",
324             "OK",
325             2,
326             {
327                 "string",
328                 "number",
329             },
330             "None.",
331         }},
332     MessageEntry{
333         "ResourceWarningThresholdExceeded",
334         {
335             "Indicates that a specified resource property has exceeded its warning threshold.  Examples would be drive I/O errors, or network link errors.  Suggested resolution may be provided as OEM data.",
336             "The resource property %1 has exceeded its warning threshold of value %2.",
337             "Warning",
338             2,
339             {
340                 "string",
341                 "number",
342             },
343             "None.",
344         }},
345     MessageEntry{
346         "TestMessage",
347         {
348             "A test message used to validate event delivery mechanisms.",
349             "Test message.",
350             "OK",
351             0,
352             {},
353             "None.",
354         }},
355     MessageEntry{
356         "URIForResourceChanged",
357         {
358             "Indicates that the URI for a resource has changed.  Examples for this would be physical component replacement or redistribution.",
359             "The URI for the resource has changed.",
360             "OK",
361             0,
362             {},
363             "None.",
364         }},
365 
366 };
367 
368 enum class Index
369 {
370     aggregationSourceDiscovered = 0,
371     licenseAdded = 1,
372     licenseChanged = 2,
373     licenseExpired = 3,
374     resourceChanged = 4,
375     resourceCreated = 5,
376     resourceErrorThresholdCleared = 6,
377     resourceErrorThresholdExceeded = 7,
378     resourceErrorsCorrected = 8,
379     resourceErrorsDetected = 9,
380     resourcePaused = 10,
381     resourcePoweredOff = 11,
382     resourcePoweredOn = 12,
383     resourcePoweringOff = 13,
384     resourcePoweringOn = 14,
385     resourceRemoved = 15,
386     resourceSelfTestCompleted = 16,
387     resourceSelfTestFailed = 17,
388     resourceStateChanged = 18,
389     resourceStatusChangedCritical = 19,
390     resourceStatusChangedOK = 20,
391     resourceStatusChangedWarning = 21,
392     resourceVersionIncompatible = 22,
393     resourceWarningThresholdCleared = 23,
394     resourceWarningThresholdExceeded = 24,
395     testMessage = 25,
396     uRIForResourceChanged = 26,
397 };
398 } // namespace redfish::registries::resource_event
399