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 EthernetFabric
23 {
24 static constexpr Header header = {
25 "Copyright 2020-2023 DMTF. All rights reserved.",
26 "#MessageRegistry.v1_6_2.MessageRegistry",
27 1,
28 0,
29 1,
30 "Ethernet Fabric Message Registry",
31 "en",
32 "This registry defines messages for Ethernet fabrics.",
33 "EthernetFabric",
34 "DMTF",
35 };
36
37 static constexpr const char* url =
38 "https://redfish.dmtf.org/registries/EthernetFabric.1.0.1.json";
39
40 static constexpr std::array registry =
41 {
42 MessageEntry{
43 "LLDPInterfaceDisabled",
44 {
45 "Indicates that an interface has disabled Link Layer Discovery Protocol (LLDP).",
46 "LLDP was disabled on switch '%1' port '%2'.",
47 "Warning",
48 2,
49 {
50 "string",
51 "string",
52 },
53 "Check that LLDP is enabled on device endpoints.",
54 }},
55 MessageEntry{
56 "LLDPInterfaceEnabled",
57 {
58 "Indicates that an interface has enabled Link Layer Discovery Protocol (LLDP).",
59 "LLDP was enabled on switch '%1' port '%2'.",
60 "OK",
61 2,
62 {
63 "string",
64 "string",
65 },
66 "None.",
67 }},
68 MessageEntry{
69 "MLAGInterfaceDegraded",
70 {
71 "Indicates that multi-chassis link aggregation group (MLAG) interfaces were established, but at an unexpectedly low aggregated link speed.",
72 "MLAG interface '%1' is degraded on switch '%2'.",
73 "Warning",
74 2,
75 {
76 "string",
77 "string",
78 },
79 "Contact the network administrator for problem resolution.",
80 }},
81 MessageEntry{
82 "MLAGInterfaceDown",
83 {
84 "Indicates that the multi-chassis link aggregation group (MLAG) interface is down on a switch.",
85 "The MLAG interface '%1' on switch '%2' is down.",
86 "Warning",
87 2,
88 {
89 "string",
90 "string",
91 },
92 "Check physical connectivity and that the MLAG system ID matches on switch pairs.",
93 }},
94 MessageEntry{
95 "MLAGInterfacesUp",
96 {
97 "Indicates that all multi-chassis link aggregation group (MLAG) interfaces are up.",
98 "All MLAG interfaces were established for MLAG ID '%1'.",
99 "OK",
100 1,
101 {
102 "string",
103 },
104 "None.",
105 }},
106 MessageEntry{
107 "MLAGPeerDown",
108 {
109 "Indicates that the multi-chassis link aggregation group (MLAG) peer is down.",
110 "MLAG peer switch '%1' with MLAG ID '%2' is down.",
111 "Warning",
112 2,
113 {
114 "string",
115 "string",
116 },
117 "Check physical connectivity and that the port channel ID matches on switch pairs.",
118 }},
119 MessageEntry{
120 "MLAGPeerUp",
121 {
122 "Indicates that the multi-chassis link aggregation group (MLAG) peer is up.",
123 "MLAG peer switch '%1' with MLAG ID '%2' is up.",
124 "OK",
125 2,
126 {
127 "string",
128 "string",
129 },
130 "None.",
131 }},
132 MessageEntry{
133 "RoutingFailureThresholdExceeded",
134 {
135 "Indicates that a switch has encountered an unusually large number of routing errors.",
136 "Switch '%1' has encountered %2 routing errors in the last %3 minutes.",
137 "Warning",
138 3,
139 {
140 "string",
141 "number",
142 "number",
143 },
144 "Contact the network administrator for problem resolution.",
145 }},
146
147 };
148
149 enum class Index
150 {
151 lLDPInterfaceDisabled = 0,
152 lLDPInterfaceEnabled = 1,
153 mLAGInterfaceDegraded = 2,
154 mLAGInterfaceDown = 3,
155 mLAGInterfacesUp = 4,
156 mLAGPeerDown = 5,
157 mLAGPeerUp = 6,
158 routingFailureThresholdExceeded = 7,
159 };
160 }; // struct ethernet_fabric
161
registerEthernetFabric()162 [[gnu::constructor]] inline void registerEthernetFabric()
163 { registerRegistry<EthernetFabric>(); }
164
165 } // namespace redfish::registries
166