1 #pragma once
2 /****************************************************************
3  *                 READ THIS WARNING FIRST
4  * This is an auto-generated header which contains definitions
5  * for Redfish DMTF defined messages.
6  * DO NOT modify this registry outside of running the
7  * parse_registries.py script.  The definitions contained within
8  * this file are owned by DMTF.  Any modifications to these files
9  * should be first pushed to the relevant registry in the DMTF
10  * github organization.
11  ***************************************************************/
12 #include "registries.hpp"
13 
14 #include <array>
15 
16 // clang-format off
17 
18 namespace redfish::registries::storage_device
19 {
20 const Header header = {
21     "Copyright 2020-2023 DMTF. All rights reserved.",
22     "#MessageRegistry.v1_6_2.MessageRegistry",
23     "StorageDevice.1.2.1",
24     "Storage Device Message Registry",
25     "en",
26     "This registry defines the messages for storage devices.",
27     "StorageDevice",
28     "1.2.1",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/StorageDevice.1.2.1.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "BatteryCharging",
38         {
39             "A battery charging condition was detected.",
40             "A charging condition for the battery located in '%1' was detected.",
41             "Warning",
42             1,
43             {
44                 "string",
45             },
46             "None.  There may be reduced performance and features while the battery is charging.",
47         }},
48     MessageEntry{
49         "BatteryFailure",
50         {
51             "A battery failure condition was detected.",
52             "A failure condition for the battery located in '%1' was detected.",
53             "Critical",
54             1,
55             {
56                 "string",
57             },
58             "Ensure all cables are properly and securely connected.  Replace the failed battery.",
59         }},
60     MessageEntry{
61         "BatteryMissing",
62         {
63             "A battery missing condition was detected.",
64             "The battery located in '%1' is missing.",
65             "Critical",
66             1,
67             {
68                 "string",
69             },
70             "Attach the battery.  Ensure all cables are properly and securely connected.",
71         }},
72     MessageEntry{
73         "BatteryOK",
74         {
75             "The health of a battery has changed to OK.",
76             "The health of the battery located in '%1' has changed to OK.",
77             "OK",
78             1,
79             {
80                 "string",
81             },
82             "None.",
83         }},
84     MessageEntry{
85         "ControllerDegraded",
86         {
87             "A storage controller degraded condition was detected.",
88             "A degraded condition for the storage controller located in '%1' was detected due to reason '%2'.",
89             "Warning",
90             2,
91             {
92                 "string",
93                 "string",
94             },
95             "Reseat the storage controller in the PCI slot.  Update the controller to the latest firmware version.  If the issue persists, replace the controller.",
96         }},
97     MessageEntry{
98         "ControllerFailure",
99         {
100             "A storage controller failure was detected.",
101             "A failure condition for the storage controller located in '%1' was detected.",
102             "Critical",
103             1,
104             {
105                 "string",
106             },
107             "Reseat the storage controller in the PCI slot.  Update the controller to the latest firmware version.  If the issue persists, replace the controller.",
108         }},
109     MessageEntry{
110         "ControllerOK",
111         {
112             "The storage controller health has changed to OK.",
113             "The health of the storage controller located in '%1' has changed to OK.",
114             "OK",
115             1,
116             {
117                 "string",
118             },
119             "None.",
120         }},
121     MessageEntry{
122         "ControllerPasswordAccepted",
123         {
124             "The storage controller password was entered.",
125             "A password was entered for the storage controller located in '%1'.",
126             "OK",
127             1,
128             {
129                 "string",
130             },
131             "None.",
132         }},
133     MessageEntry{
134         "ControllerPasswordRequired",
135         {
136             "The storage controller requires a password.",
137             "The storage controller located in '%1' requires a password.",
138             "Critical",
139             1,
140             {
141                 "string",
142             },
143             "Enter the controller password.",
144         }},
145     MessageEntry{
146         "ControllerPortDegraded",
147         {
148             "A controller port degraded condition was detected.",
149             "A degraded condition for the controller port located in '%1' was detected due to reason '%2'.",
150             "Warning",
151             2,
152             {
153                 "string",
154                 "string",
155             },
156             "Ensure all cables are properly and securely connected.  Replace faulty cables.",
157         }},
158     MessageEntry{
159         "ControllerPortFailure",
160         {
161             "A controller port failure condition was detected.",
162             "A failure condition for the controller port located in '%1' was detected.",
163             "Critical",
164             1,
165             {
166                 "string",
167             },
168             "Ensure all cables are properly and securely connected.  Replace faulty cables.",
169         }},
170     MessageEntry{
171         "ControllerPortOK",
172         {
173             "The health of a controller port has changed to OK.",
174             "The health of the controller port located in '%1' has changed to OK.",
175             "OK",
176             1,
177             {
178                 "string",
179             },
180             "None.",
181         }},
182     MessageEntry{
183         "ControllerPreviousError",
184         {
185             "A storage controller error was detected prior to reboot.",
186             "A previous error condition for the storage controller located in '%1' was detected due to '%2'.",
187             "Warning",
188             2,
189             {
190                 "string",
191                 "string",
192             },
193             "Update the controller to the latest firmware version.  If the issue persists, replace the controller.",
194         }},
195     MessageEntry{
196         "DriveFailure",
197         {
198             "A drive failure condition was detected.",
199             "A failure condition for the drive located in '%1' was detected.",
200             "Critical",
201             1,
202             {
203                 "string",
204             },
205             "Ensure all cables are properly and securely connected.  Ensure all drives are fully seated.  Replace the defective cables, drive, or both.",
206         }},
207     MessageEntry{
208         "DriveFailureCleared",
209         {
210             "A previously detected failure condition on a drive was cleared.",
211             "A failure condition for the drive located in '%1' was cleared.",
212             "OK",
213             1,
214             {
215                 "string",
216             },
217             "None.",
218         }},
219     MessageEntry{
220         "DriveInserted",
221         {
222             "A drive was inserted.",
223             "The drive located in '%1' was inserted.",
224             "OK",
225             1,
226             {
227                 "string",
228             },
229             "If the drive is not properly displayed, attempt to refresh the cached data.",
230         }},
231     MessageEntry{
232         "DriveMissing",
233         {
234             "A drive missing condition was detected.",
235             "A missing condition for the drive located in '%1' was detected.",
236             "Critical",
237             1,
238             {
239                 "string",
240             },
241             "Ensure all cables are properly and securely connected.  Ensure all drives are fully seated.  Replace the defective cables, drive, or both.  Delete the volume if it is no longer needed.",
242         }},
243     MessageEntry{
244         "DriveMissingCleared",
245         {
246             "A previous drive missing condition was cleared.",
247             "A missing condition for the drive located in '%1' was cleared.",
248             "OK",
249             1,
250             {
251                 "string",
252             },
253             "None.",
254         }},
255     MessageEntry{
256         "DriveOK",
257         {
258             "The health of a drive has changed to OK.",
259             "The health of the drive located in '%1' has changed to OK.",
260             "OK",
261             1,
262             {
263                 "string",
264             },
265             "None.",
266         }},
267     MessageEntry{
268         "DriveOffline",
269         {
270             "A drive offline condition was detected.",
271             "An offline condition for the drive located in '%1' was detected.",
272             "Critical",
273             1,
274             {
275                 "string",
276             },
277             "If the drive is unconfigured or needs an import, configure the drive.  If the drive operation is in progress, wait for the operation to complete.  If the drive is not supported, replace it.",
278         }},
279     MessageEntry{
280         "DriveOfflineCleared",
281         {
282             "A drive offline condition was cleared.",
283             "An offline condition for the drive located in '%1' was cleared.",
284             "OK",
285             1,
286             {
287                 "string",
288             },
289             "None.",
290         }},
291     MessageEntry{
292         "DrivePredictiveFailure",
293         {
294             "A predictive drive failure condition was detected.",
295             "A predictive failure condition for the drive located in '%1' was detected.",
296             "Warning",
297             1,
298             {
299                 "string",
300             },
301             "If this drive is not part of a fault-tolerant volume, first back up all data, then replace the drive and restore all data afterward.  If this drive is part of a fault-tolerant volume, replace this drive as soon as possible as long as the volume health is OK.",
302         }},
303     MessageEntry{
304         "DrivePredictiveFailureCleared",
305         {
306             "A previously detected predictive failure condition on a drive was cleared.",
307             "A predictive failure condition for the drive located in '%1' was cleared.",
308             "OK",
309             1,
310             {
311                 "string",
312             },
313             "None.",
314         }},
315     MessageEntry{
316         "DriveRemoved",
317         {
318             "A drive was removed.",
319             "The drive located in '%1' was removed.",
320             "Critical",
321             1,
322             {
323                 "string",
324             },
325             "If the drive is still displayed, attempt to refresh the cached data.",
326         }},
327     MessageEntry{
328         "VolumeDegraded",
329         {
330             "The storage controller has detected a degraded volume condition.",
331             "The volume '%1' attached to the storage controller located in '%2' is degraded.",
332             "Warning",
333             2,
334             {
335                 "string",
336                 "string",
337             },
338             "Ensure all cables are properly and securely connected.  Replace failed drives.",
339         }},
340     MessageEntry{
341         "VolumeFailure",
342         {
343             "The storage controller has detected a failed volume condition.",
344             "The volume '%1' attached to the storage controller located in '%2' has failed.",
345             "Critical",
346             2,
347             {
348                 "string",
349                 "string",
350             },
351             "Ensure all cables are properly and securely connected.  Ensure all drives are fully seated and operational.",
352         }},
353     MessageEntry{
354         "VolumeOK",
355         {
356             "A volume health has changed to OK.",
357             "The health of volume '%1' that is attached to the storage controller located in '%2' has changed to OK.",
358             "OK",
359             2,
360             {
361                 "string",
362                 "string",
363             },
364             "None.",
365         }},
366     MessageEntry{
367         "VolumeOffine",
368         {
369             "The storage controller has detected an offline volume condition.",
370             "The volume '%1' attached to the storage controller located in '%2' is offline.",
371             "Critical",
372             2,
373             {
374                 "string",
375                 "string",
376             },
377             "Use storage software to enable, repair, or import the volume.  You may also delete or move volume back to the original controller.",
378         }},
379     MessageEntry{
380         "VolumeOffline",
381         {
382             "The storage controller has detected an offline volume condition.",
383             "The volume '%1' attached to the storage controller located in '%2' is offline.",
384             "Critical",
385             2,
386             {
387                 "string",
388                 "string",
389             },
390             "Use storage software to enable, repair, or import the volume.  You may also delete or move volume back to the original controller.",
391         }},
392     MessageEntry{
393         "VolumeOfflineCleared",
394         {
395             "The storage controller has detected an online volume condition.",
396             "The volume '%1' attached to the storage controller located in '%2' is online.",
397             "OK",
398             2,
399             {
400                 "string",
401                 "string",
402             },
403             "None.",
404         }},
405     MessageEntry{
406         "WriteCacheDataLoss",
407         {
408             "The write cache is reporting loss of data in posted-writes memory.",
409             "The write cache on the storage controller located in '%1' has data loss.",
410             "Critical",
411             1,
412             {
413                 "string",
414             },
415             "Check the controller resource properties to determine the cause of the write cache data loss.",
416         }},
417     MessageEntry{
418         "WriteCacheDegraded",
419         {
420             "The write cache state is degraded.",
421             "The write cache state on the storage controller located in '%1' is degraded.",
422             "Critical",
423             1,
424             {
425                 "string",
426             },
427             "Check the controller to determine the cause of write cache degraded state, such as a missing battery or hardware failure.",
428         }},
429     MessageEntry{
430         "WriteCacheProtected",
431         {
432             "A storage controller write cache state is in protected mode.",
433             "The write cache state on the storage controller located in '%1' is in protected mode.",
434             "OK",
435             1,
436             {
437                 "string",
438             },
439             "None.",
440         }},
441     MessageEntry{
442         "WriteCacheTemporarilyDegraded",
443         {
444             "The write cache state is temporarily degraded.",
445             "The write cache state on the storage controller located in '%1' is temporarily degraded.",
446             "Warning",
447             1,
448             {
449                 "string",
450             },
451             "Check the controller to determine the cause of write cache temporarily degraded state, such as a battery is charging or a data recovery rebuild operation is pending.",
452         }},
453 
454 };
455 
456 enum class Index
457 {
458     batteryCharging = 0,
459     batteryFailure = 1,
460     batteryMissing = 2,
461     batteryOK = 3,
462     controllerDegraded = 4,
463     controllerFailure = 5,
464     controllerOK = 6,
465     controllerPasswordAccepted = 7,
466     controllerPasswordRequired = 8,
467     controllerPortDegraded = 9,
468     controllerPortFailure = 10,
469     controllerPortOK = 11,
470     controllerPreviousError = 12,
471     driveFailure = 13,
472     driveFailureCleared = 14,
473     driveInserted = 15,
474     driveMissing = 16,
475     driveMissingCleared = 17,
476     driveOK = 18,
477     driveOffline = 19,
478     driveOfflineCleared = 20,
479     drivePredictiveFailure = 21,
480     drivePredictiveFailureCleared = 22,
481     driveRemoved = 23,
482     volumeDegraded = 24,
483     volumeFailure = 25,
484     volumeOK = 26,
485     volumeOffine = 27,
486     volumeOffline = 28,
487     volumeOfflineCleared = 29,
488     writeCacheDataLoss = 30,
489     writeCacheDegraded = 31,
490     writeCacheProtected = 32,
491     writeCacheTemporarilyDegraded = 33,
492 };
493 } // namespace redfish::registries::storage_device
494