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