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