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::fabric
19 {
20 const Header header = {
21     "Copyright 2014-2023 DMTF. All rights reserved.",
22     "#MessageRegistry.v1_6_2.MessageRegistry",
23     "Fabric.1.0.2",
24     "Fabric Message Registry",
25     "en",
26     "This registry defines messages for generic fabrics.",
27     "Fabric",
28     "1.0.2",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/Fabric.1.0.2.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "AddressPoolCreated",
38         {
39             "Indicates that an address pool was created.",
40             "Address pool '%1' was created in fabric '%2'.",
41             "OK",
42             2,
43             {
44                 "string",
45                 "string",
46             },
47             "None.",
48         }},
49     MessageEntry{
50         "AddressPoolModified",
51         {
52             "Indicates that an address pool was modified.",
53             "Address pool '%1' in fabric '%2' was modified.",
54             "OK",
55             2,
56             {
57                 "string",
58                 "string",
59             },
60             "None.",
61         }},
62     MessageEntry{
63         "AddressPoolRemoved",
64         {
65             "Indicates that an address pool was removed.",
66             "Address pool '%1' was removed from fabric '%2'.",
67             "OK",
68             2,
69             {
70                 "string",
71                 "string",
72             },
73             "None.",
74         }},
75     MessageEntry{
76         "CableFailed",
77         {
78             "Indicates that a cable has failed.",
79             "The cable in switch '%1' port '%2' has failed.",
80             "Warning",
81             2,
82             {
83                 "string",
84                 "string",
85             },
86             "Contact the network administrator for problem resolution.",
87         }},
88     MessageEntry{
89         "CableInserted",
90         {
91             "Indicates that a cable was inserted into a switch's port.",
92             "A cable was inserted into switch '%1' port '%2'.",
93             "OK",
94             2,
95             {
96                 "string",
97                 "string",
98             },
99             "None.",
100         }},
101     MessageEntry{
102         "CableOK",
103         {
104             "Indicates that a cable has returned to working condition.",
105             "The cable in switch '%1' port '%2' has returned to working condition.",
106             "OK",
107             2,
108             {
109                 "string",
110                 "string",
111             },
112             "None.",
113         }},
114     MessageEntry{
115         "CableRemoved",
116         {
117             "Indicates that a cable was removed from a switch's port.",
118             "A cable was removed from switch '%1' port '%2'.",
119             "Warning",
120             2,
121             {
122                 "string",
123                 "string",
124             },
125             "None.",
126         }},
127     MessageEntry{
128         "ConnectionCreated",
129         {
130             "Indicates that a connection was created.",
131             "Connection '%1' was created in fabric '%2'.",
132             "OK",
133             2,
134             {
135                 "string",
136                 "string",
137             },
138             "None.",
139         }},
140     MessageEntry{
141         "ConnectionModified",
142         {
143             "Indicates that a connection was modified.",
144             "Connection '%1' in fabric '%2' was modified.",
145             "OK",
146             2,
147             {
148                 "string",
149                 "string",
150             },
151             "None.",
152         }},
153     MessageEntry{
154         "ConnectionRemoved",
155         {
156             "Indicates that a connection was removed.",
157             "Connection '%1' was removed from fabric '%2'.",
158             "OK",
159             2,
160             {
161                 "string",
162                 "string",
163             },
164             "None.",
165         }},
166     MessageEntry{
167         "DegradedDownstreamLinkEstablished",
168         {
169             "Indicates that a switch's downstream connection is established but is in a degraded state.",
170             "Switch '%1' downstream link is established on port '%2', but is running in a degraded state.",
171             "Warning",
172             2,
173             {
174                 "string",
175                 "string",
176             },
177             "Contact the network administrator for problem resolution.",
178         }},
179     MessageEntry{
180         "DegradedInterswitchLinkEstablished",
181         {
182             "Indicates that a switch's interswitch connection is established but is in a degraded state.",
183             "Switch '%1' interswitch link is established on port '%2', but is running in a degraded state.",
184             "Warning",
185             2,
186             {
187                 "string",
188                 "string",
189             },
190             "Contact the network administrator for problem resolution.",
191         }},
192     MessageEntry{
193         "DegradedUpstreamLinkEstablished",
194         {
195             "Indicates that a switch's upstream connection is established but is in a degraded state.",
196             "Switch '%1' upstream link is established on port '%2', but is running in a degraded state.",
197             "Warning",
198             2,
199             {
200                 "string",
201                 "string",
202             },
203             "Contact the network administrator for problem resolution.",
204         }},
205     MessageEntry{
206         "DownstreamLinkDropped",
207         {
208             "Indicates that a switch's downstream connection has gone down.",
209             "Switch '%1' downstream link has gone down on port '%2'.",
210             "Warning",
211             2,
212             {
213                 "string",
214                 "string",
215             },
216             "Contact the network administrator for problem resolution.",
217         }},
218     MessageEntry{
219         "DownstreamLinkEstablished",
220         {
221             "Indicates that a switch's downstream connection is established.",
222             "Switch '%1' downstream link is established on port '%2'.",
223             "OK",
224             2,
225             {
226                 "string",
227                 "string",
228             },
229             "None.",
230         }},
231     MessageEntry{
232         "DownstreamLinkFlapDetected",
233         {
234             "Indicates that a switch's downstream connection is highly unstable.",
235             "Switch '%1' downstream link on port '%2' was established and dropped %3 times in the last %4 minutes.",
236             "Warning",
237             4,
238             {
239                 "string",
240                 "string",
241                 "number",
242                 "number",
243             },
244             "Contact the network administrator for problem resolution.",
245         }},
246     MessageEntry{
247         "EndpointCreated",
248         {
249             "Indicates that an endpoint was created or discovered.",
250             "Endpoint '%1' was created in fabric '%2'.",
251             "OK",
252             2,
253             {
254                 "string",
255                 "string",
256             },
257             "None.",
258         }},
259     MessageEntry{
260         "EndpointModified",
261         {
262             "Indicates that an endpoint was modified.",
263             "Endpoint '%1' in fabric '%2' was modified.",
264             "OK",
265             2,
266             {
267                 "string",
268                 "string",
269             },
270             "None.",
271         }},
272     MessageEntry{
273         "EndpointRemoved",
274         {
275             "Indicates that an endpoint was removed.",
276             "Endpoint '%1' was removed from fabric '%2'.",
277             "OK",
278             2,
279             {
280                 "string",
281                 "string",
282             },
283             "None.",
284         }},
285     MessageEntry{
286         "InterswitchLinkDropped",
287         {
288             "Indicates that a switch's interswitch connection has gone down.",
289             "Switch '%1' interswitch link has gone down on port '%2'.",
290             "Warning",
291             2,
292             {
293                 "string",
294                 "string",
295             },
296             "Contact the network administrator for problem resolution.",
297         }},
298     MessageEntry{
299         "InterswitchLinkEstablished",
300         {
301             "Indicates that a switch's interswitch connection is established.",
302             "Switch '%1' interswitch link is established on port '%2'.",
303             "OK",
304             2,
305             {
306                 "string",
307                 "string",
308             },
309             "None.",
310         }},
311     MessageEntry{
312         "InterswitchLinkFlapDetected",
313         {
314             "Indicates that a switch's interswitch connection is highly unstable.",
315             "Switch '%1' interswitch link on port '%2' was established and dropped %3 times in the last %4 minutes.",
316             "Warning",
317             4,
318             {
319                 "string",
320                 "string",
321                 "number",
322                 "number",
323             },
324             "Contact the network administrator for problem resolution.",
325         }},
326     MessageEntry{
327         "MaxFrameSizeExceeded",
328         {
329             "Indicates that the maximum transmission unit (MTU) for the link was exceeded.",
330             "MTU size on switch '%1' port '%2' is set to %3.  One or more packets with a larger size were dropped.",
331             "Warning",
332             3,
333             {
334                 "string",
335                 "string",
336                 "number",
337             },
338             "Ensure that path MTU discovery is enabled and functioning correctly.",
339         }},
340     MessageEntry{
341         "MediaControllerAdded",
342         {
343             "Indicates that a media controller was added.",
344             "Media controller '%1' was added to chassis '%2'.",
345             "OK",
346             2,
347             {
348                 "string",
349                 "string",
350             },
351             "None.",
352         }},
353     MessageEntry{
354         "MediaControllerModified",
355         {
356             "Indicates that a media controller was modified.",
357             "Media controller '%1' in chassis '%2' was modified.",
358             "OK",
359             2,
360             {
361                 "string",
362                 "string",
363             },
364             "None.",
365         }},
366     MessageEntry{
367         "MediaControllerRemoved",
368         {
369             "Indicates that a media controller was removed.",
370             "Media controller '%1' was removed from chassis '%2'.",
371             "OK",
372             2,
373             {
374                 "string",
375                 "string",
376             },
377             "None.",
378         }},
379     MessageEntry{
380         "PortAutomaticallyDisabled",
381         {
382             "Indicates that a switch's port was automatically disabled.",
383             "Switch '%1' port '%2' was automatically disabled.",
384             "OK",
385             2,
386             {
387                 "string",
388                 "string",
389             },
390             "None.",
391         }},
392     MessageEntry{
393         "PortAutomaticallyEnabled",
394         {
395             "Indicates that a switch's port was automatically enabled.",
396             "Switch '%1' port '%2' was automatically enabled.",
397             "OK",
398             2,
399             {
400                 "string",
401                 "string",
402             },
403             "None.",
404         }},
405     MessageEntry{
406         "PortDegraded",
407         {
408             "Indicates that a switch's port is in a degraded state.",
409             "Switch '%1' port '%2' is in a degraded state.",
410             "Warning",
411             2,
412             {
413                 "string",
414                 "string",
415             },
416             "Contact the network administrator for problem resolution.",
417         }},
418     MessageEntry{
419         "PortFailed",
420         {
421             "Indicates that a switch's port has become inoperative.",
422             "Switch '%1' port '%2' has failed and is inoperative.",
423             "Critical",
424             2,
425             {
426                 "string",
427                 "string",
428             },
429             "Contact the network administrator for problem resolution.",
430         }},
431     MessageEntry{
432         "PortManuallyDisabled",
433         {
434             "Indicates that a switch's port was manually disabled.",
435             "Switch '%1' port '%2' was manually disabled.",
436             "OK",
437             2,
438             {
439                 "string",
440                 "string",
441             },
442             "None.",
443         }},
444     MessageEntry{
445         "PortManuallyEnabled",
446         {
447             "Indicates that a switch's port was manually enabled.",
448             "Switch '%1' port '%2' was manually enabled.",
449             "OK",
450             2,
451             {
452                 "string",
453                 "string",
454             },
455             "None.",
456         }},
457     MessageEntry{
458         "PortOK",
459         {
460             "Indicates that a switch's port has returned to a functional state.",
461             "Switch '%1' port '%2' has returned to a functional state.",
462             "OK",
463             2,
464             {
465                 "string",
466                 "string",
467             },
468             "None.",
469         }},
470     MessageEntry{
471         "SwitchDegraded",
472         {
473             "Indicates that a switch is in a degraded state.",
474             "Switch '%1' is in a degraded state.",
475             "Warning",
476             1,
477             {
478                 "string",
479             },
480             "Contact the network administrator for problem resolution.",
481         }},
482     MessageEntry{
483         "SwitchFailed",
484         {
485             "Indicates that a switch has become inoperative.",
486             "Switch '%1' has failed and is inoperative.",
487             "Critical",
488             1,
489             {
490                 "string",
491             },
492             "Contact the network administrator for problem resolution.",
493         }},
494     MessageEntry{
495         "SwitchOK",
496         {
497             "Indicates that a switch has returned to a functional state.",
498             "Switch '%1' has returned to a functional state.",
499             "OK",
500             1,
501             {
502                 "string",
503             },
504             "None.",
505         }},
506     MessageEntry{
507         "UpstreamLinkDropped",
508         {
509             "Indicates that a switch's upstream connection has gone down.",
510             "Switch '%1' upstream link has gone down on port '%2'.",
511             "Warning",
512             2,
513             {
514                 "string",
515                 "string",
516             },
517             "Contact the network administrator for problem resolution.",
518         }},
519     MessageEntry{
520         "UpstreamLinkEstablished",
521         {
522             "Indicates that a switch's upstream connection is established.",
523             "Switch '%1' upstream link is established on port '%2'.",
524             "OK",
525             2,
526             {
527                 "string",
528                 "string",
529             },
530             "None.",
531         }},
532     MessageEntry{
533         "UpstreamLinkFlapDetected",
534         {
535             "Indicates that a switch's upstream connection is highly unstable.",
536             "Switch '%1' upstream link on port '%2' was established and dropped %3 times in the last %4 minutes.",
537             "Warning",
538             4,
539             {
540                 "string",
541                 "string",
542                 "number",
543                 "number",
544             },
545             "Contact the network administrator for problem resolution.",
546         }},
547     MessageEntry{
548         "ZoneCreated",
549         {
550             "Indicates that a zone was created.",
551             "Zone '%1' was created in fabric '%2'.",
552             "OK",
553             2,
554             {
555                 "string",
556                 "string",
557             },
558             "None.",
559         }},
560     MessageEntry{
561         "ZoneModified",
562         {
563             "Indicates that a zone was modified.",
564             "Zone '%1' in fabric '%2' was modified.",
565             "OK",
566             2,
567             {
568                 "string",
569                 "string",
570             },
571             "None.",
572         }},
573     MessageEntry{
574         "ZoneRemoved",
575         {
576             "Indicates that a zone was removed.",
577             "Zone '%1' was removed from fabric '%2'.",
578             "OK",
579             2,
580             {
581                 "string",
582                 "string",
583             },
584             "None.",
585         }},
586 
587 };
588 
589 enum class Index
590 {
591     addressPoolCreated = 0,
592     addressPoolModified = 1,
593     addressPoolRemoved = 2,
594     cableFailed = 3,
595     cableInserted = 4,
596     cableOK = 5,
597     cableRemoved = 6,
598     connectionCreated = 7,
599     connectionModified = 8,
600     connectionRemoved = 9,
601     degradedDownstreamLinkEstablished = 10,
602     degradedInterswitchLinkEstablished = 11,
603     degradedUpstreamLinkEstablished = 12,
604     downstreamLinkDropped = 13,
605     downstreamLinkEstablished = 14,
606     downstreamLinkFlapDetected = 15,
607     endpointCreated = 16,
608     endpointModified = 17,
609     endpointRemoved = 18,
610     interswitchLinkDropped = 19,
611     interswitchLinkEstablished = 20,
612     interswitchLinkFlapDetected = 21,
613     maxFrameSizeExceeded = 22,
614     mediaControllerAdded = 23,
615     mediaControllerModified = 24,
616     mediaControllerRemoved = 25,
617     portAutomaticallyDisabled = 26,
618     portAutomaticallyEnabled = 27,
619     portDegraded = 28,
620     portFailed = 29,
621     portManuallyDisabled = 30,
622     portManuallyEnabled = 31,
623     portOK = 32,
624     switchDegraded = 33,
625     switchFailed = 34,
626     switchOK = 35,
627     upstreamLinkDropped = 36,
628     upstreamLinkEstablished = 37,
629     upstreamLinkFlapDetected = 38,
630     zoneCreated = 39,
631     zoneModified = 40,
632     zoneRemoved = 41,
633 };
634 } // namespace redfish::registries::fabric
635