blob: e7a58c1f41d6f2429c459c1e0b2748c8f99e8fa3 [file] [log] [blame]
Ed Tanous3cd70722024-04-06 09:24:01 -07001#include "redfish.hpp"
2
Ed Tanous5b904292024-04-16 11:10:17 -07003#include "bmcweb_config.h"
4
Ed Tanous3cd70722024-04-06 09:24:01 -07005#include "account_service.hpp"
6#include "aggregation_service.hpp"
7#include "app.hpp"
8#include "bios.hpp"
9#include "cable.hpp"
10#include "certificate_service.hpp"
11#include "chassis.hpp"
12#include "environment_metrics.hpp"
13#include "ethernet.hpp"
14#include "event_service.hpp"
15#include "eventservice_sse.hpp"
16#include "fabric_adapters.hpp"
17#include "fan.hpp"
18#include "hypervisor_system.hpp"
19#include "log_services.hpp"
20#include "manager_diagnostic_data.hpp"
21#include "managers.hpp"
22#include "memory.hpp"
23#include "message_registries.hpp"
24#include "metric_report.hpp"
25#include "metric_report_definition.hpp"
26#include "network_protocol.hpp"
27#include "pcie.hpp"
Ed Tanous3cd70722024-04-06 09:24:01 -070028#include "power.hpp"
29#include "power_subsystem.hpp"
30#include "power_supply.hpp"
31#include "processor.hpp"
32#include "redfish_sessions.hpp"
33#include "redfish_v1.hpp"
34#include "roles.hpp"
35#include "sensors.hpp"
36#include "service_root.hpp"
37#include "storage.hpp"
38#include "systems.hpp"
39#include "task.hpp"
40#include "telemetry_service.hpp"
41#include "thermal.hpp"
42#include "thermal_metrics.hpp"
43#include "thermal_subsystem.hpp"
44#include "trigger.hpp"
45#include "update_service.hpp"
46#include "virtual_media.hpp"
47
48namespace redfish
49{
50
51RedfishService::RedfishService(App& app)
52{
53 requestAccountServiceRoutes(app);
Ed Tanous25b54db2024-04-17 15:40:31 -070054 if constexpr (BMCWEB_REDFISH_AGGREGATION)
55 {
56 requestRoutesAggregationService(app);
57 requestRoutesAggregationSourceCollection(app);
58 requestRoutesAggregationSource(app);
59 }
Ed Tanous3cd70722024-04-06 09:24:01 -070060 requestRoutesRoles(app);
61 requestRoutesRoleCollection(app);
62 requestRoutesServiceRoot(app);
63 requestRoutesNetworkProtocol(app);
64 requestRoutesSession(app);
65 requestEthernetInterfacesRoutes(app);
Ed Tanous25b54db2024-04-17 15:40:31 -070066 if constexpr (BMCWEB_REDFISH_ALLOW_DEPRECATED_POWER_THERMAL)
67 {
68 requestRoutesThermal(app);
69 requestRoutesPower(app);
70 }
71 if constexpr (BMCWEB_REDFISH_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM)
72 {
73 requestRoutesEnvironmentMetrics(app);
74 requestRoutesPowerSubsystem(app);
75 requestRoutesPowerSupply(app);
76 requestRoutesPowerSupplyCollection(app);
77 requestRoutesThermalMetrics(app);
78 requestRoutesThermalSubsystem(app);
79 requestRoutesFan(app);
80 requestRoutesFanCollection(app);
81 }
Ed Tanous3cd70722024-04-06 09:24:01 -070082 requestRoutesManagerCollection(app);
83 requestRoutesManager(app);
84 requestRoutesManagerResetAction(app);
85 requestRoutesManagerResetActionInfo(app);
86 requestRoutesManagerResetToDefaultsAction(app);
87 requestRoutesManagerDiagnosticData(app);
88 requestRoutesChassisCollection(app);
89 requestRoutesChassis(app);
90 requestRoutesChassisResetAction(app);
91 requestRoutesChassisResetActionInfo(app);
92 requestRoutesChassisDrive(app);
93 requestRoutesChassisDriveName(app);
94 requestRoutesUpdateService(app);
95 requestRoutesStorageCollection(app);
96 requestRoutesStorage(app);
97 requestRoutesStorageControllerCollection(app);
98 requestRoutesStorageController(app);
99 requestRoutesDrive(app);
100 requestRoutesCable(app);
101 requestRoutesCableCollection(app);
Ed Tanous3cd70722024-04-06 09:24:01 -0700102
103 requestRoutesSystemLogServiceCollection(app);
104 requestRoutesEventLogService(app);
105 requestRoutesPostCodesEntryAdditionalData(app);
106
107 requestRoutesPostCodesLogService(app);
108 requestRoutesPostCodesClear(app);
109 requestRoutesPostCodesEntry(app);
110 requestRoutesPostCodesEntryCollection(app);
111
Ed Tanous25b54db2024-04-17 15:40:31 -0700112 if constexpr (BMCWEB_REDFISH_DUMP_LOG)
113 {
114 requestRoutesSystemDumpService(app);
115 requestRoutesSystemDumpEntryCollection(app);
116 requestRoutesSystemDumpEntry(app);
117 requestRoutesSystemDumpCreate(app);
118 requestRoutesSystemDumpClear(app);
Ed Tanous3cd70722024-04-06 09:24:01 -0700119
Ed Tanous25b54db2024-04-17 15:40:31 -0700120 requestRoutesBMCDumpService(app);
121 requestRoutesBMCDumpEntryCollection(app);
122 requestRoutesBMCDumpEntry(app);
123 requestRoutesBMCDumpEntryDownload(app);
124 requestRoutesBMCDumpCreate(app);
125 requestRoutesBMCDumpClear(app);
Ed Tanous3cd70722024-04-06 09:24:01 -0700126
Ed Tanous25b54db2024-04-17 15:40:31 -0700127 requestRoutesFaultLogDumpService(app);
128 requestRoutesFaultLogDumpEntryCollection(app);
129 requestRoutesFaultLogDumpEntry(app);
130 requestRoutesFaultLogDumpClear(app);
131 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700132
Ed Tanous25b54db2024-04-17 15:40:31 -0700133 if constexpr (BMCWEB_REDFISH_DBUS_LOG)
134 {
135 requestRoutesJournalEventLogEntryCollection(app);
136 requestRoutesJournalEventLogEntry(app);
137 requestRoutesJournalEventLogClear(app);
138 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700139
140 requestRoutesBMCLogServiceCollection(app);
Ed Tanous25b54db2024-04-17 15:40:31 -0700141 if constexpr (BMCWEB_REDFISH_BMC_JOURNAL)
142 {
143 requestRoutesBMCJournalLogService(app);
144 requestRoutesBMCJournalLogEntryCollection(app);
145 requestRoutesBMCJournalLogEntry(app);
146 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700147
Ed Tanous25b54db2024-04-17 15:40:31 -0700148 if constexpr (BMCWEB_REDFISH_CPU_LOG)
149 {
150 requestRoutesCrashdumpService(app);
151 requestRoutesCrashdumpEntryCollection(app);
152 requestRoutesCrashdumpEntry(app);
153 requestRoutesCrashdumpFile(app);
154 requestRoutesCrashdumpClear(app);
155 requestRoutesCrashdumpCollect(app);
156 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700157
158 requestRoutesProcessorCollection(app);
159 requestRoutesProcessor(app);
160 requestRoutesOperatingConfigCollection(app);
161 requestRoutesOperatingConfig(app);
162 requestRoutesMemoryCollection(app);
163 requestRoutesMemory(app);
164
165 requestRoutesSystems(app);
166
167 requestRoutesBiosService(app);
168 requestRoutesBiosReset(app);
169
Ed Tanous25b54db2024-04-17 15:40:31 -0700170 if constexpr (BMCWEB_VM_NBDPROXY)
171 {
172 requestNBDVirtualMediaRoutes(app);
173 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700174
Ed Tanous25b54db2024-04-17 15:40:31 -0700175 if constexpr (BMCWEB_REDFISH_DBUS_LOG)
176 {
177 requestRoutesDBusLogServiceActionsClear(app);
178 requestRoutesDBusEventLogEntryCollection(app);
179 requestRoutesDBusEventLogEntry(app);
180 requestRoutesDBusEventLogEntryDownload(app);
181 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700182
Ed Tanous25b54db2024-04-17 15:40:31 -0700183 if constexpr (BMCWEB_REDFISH_HOST_LOGGER)
184 {
185 requestRoutesSystemHostLogger(app);
186 requestRoutesSystemHostLoggerCollection(app);
187 requestRoutesSystemHostLoggerLogEntry(app);
188 }
Ed Tanous3cd70722024-04-06 09:24:01 -0700189
190 requestRoutesMessageRegistryFileCollection(app);
191 requestRoutesMessageRegistryFile(app);
192 requestRoutesMessageRegistry(app);
193
194 requestRoutesCertificateService(app);
195 requestRoutesHTTPSCertificate(app);
196 requestRoutesLDAPCertificate(app);
197 requestRoutesTrustStoreCertificate(app);
198
199 requestRoutesSystemPCIeFunctionCollection(app);
200 requestRoutesSystemPCIeFunction(app);
201 requestRoutesSystemPCIeDeviceCollection(app);
202 requestRoutesSystemPCIeDevice(app);
203
204 requestRoutesSensorCollection(app);
205 requestRoutesSensor(app);
206
207 requestRoutesTaskMonitor(app);
208 requestRoutesTaskService(app);
209 requestRoutesTaskCollection(app);
210 requestRoutesTask(app);
211 requestRoutesEventService(app);
212 requestRoutesEventServiceSse(app);
213 requestRoutesEventDestinationCollection(app);
214 requestRoutesEventDestination(app);
215 requestRoutesFabricAdapters(app);
216 requestRoutesFabricAdapterCollection(app);
217 requestRoutesSubmitTestEvent(app);
218
219 requestRoutesHypervisorSystems(app);
220
221 requestRoutesTelemetryService(app);
222 requestRoutesMetricReportDefinitionCollection(app);
223 requestRoutesMetricReportDefinition(app);
224 requestRoutesMetricReportCollection(app);
225 requestRoutesMetricReport(app);
226 requestRoutesTriggerCollection(app);
227 requestRoutesTrigger(app);
228
229 // Note, this must be the last route registered
230 requestRoutesRedfish(app);
231}
232
233} // namespace redfish