1 #include "redfish.hpp" 2 3 #include "bmcweb_config.h" 4 5 #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 "manager_logservices_journal.hpp" 22 #include "managers.hpp" 23 #include "memory.hpp" 24 #include "message_registries.hpp" 25 #include "metadata.hpp" 26 #include "metric_report.hpp" 27 #include "metric_report_definition.hpp" 28 #include "network_protocol.hpp" 29 #include "odata.hpp" 30 #include "pcie.hpp" 31 #include "power.hpp" 32 #include "power_subsystem.hpp" 33 #include "power_supply.hpp" 34 #include "processor.hpp" 35 #include "redfish_sessions.hpp" 36 #include "redfish_v1.hpp" 37 #include "roles.hpp" 38 #include "sensors.hpp" 39 #include "service_root.hpp" 40 #include "storage.hpp" 41 #include "systems.hpp" 42 #include "task.hpp" 43 #include "telemetry_service.hpp" 44 #include "thermal.hpp" 45 #include "thermal_metrics.hpp" 46 #include "thermal_subsystem.hpp" 47 #include "trigger.hpp" 48 #include "update_service.hpp" 49 #include "virtual_media.hpp" 50 51 namespace redfish 52 { 53 54 RedfishService::RedfishService(App& app) 55 { 56 requestRoutesMetadata(app); 57 requestRoutesOdata(app); 58 59 requestAccountServiceRoutes(app); 60 if constexpr (BMCWEB_REDFISH_AGGREGATION) 61 { 62 requestRoutesAggregationService(app); 63 requestRoutesAggregationSourceCollection(app); 64 requestRoutesAggregationSource(app); 65 } 66 requestRoutesRoles(app); 67 requestRoutesRoleCollection(app); 68 requestRoutesServiceRoot(app); 69 requestRoutesNetworkProtocol(app); 70 requestRoutesSession(app); 71 requestEthernetInterfacesRoutes(app); 72 if constexpr (BMCWEB_REDFISH_ALLOW_DEPRECATED_POWER_THERMAL) 73 { 74 requestRoutesThermal(app); 75 requestRoutesPower(app); 76 } 77 if constexpr (BMCWEB_REDFISH_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM) 78 { 79 requestRoutesEnvironmentMetrics(app); 80 requestRoutesPowerSubsystem(app); 81 requestRoutesPowerSupply(app); 82 requestRoutesPowerSupplyCollection(app); 83 requestRoutesThermalMetrics(app); 84 requestRoutesThermalSubsystem(app); 85 requestRoutesFan(app); 86 requestRoutesFanCollection(app); 87 } 88 requestRoutesManagerCollection(app); 89 requestRoutesManager(app); 90 requestRoutesManagerResetAction(app); 91 requestRoutesManagerResetActionInfo(app); 92 requestRoutesManagerResetToDefaultsAction(app); 93 requestRoutesManagerDiagnosticData(app); 94 requestRoutesChassisCollection(app); 95 requestRoutesChassis(app); 96 requestRoutesChassisResetAction(app); 97 requestRoutesChassisResetActionInfo(app); 98 requestRoutesChassisDrive(app); 99 requestRoutesChassisDriveName(app); 100 requestRoutesUpdateService(app); 101 requestRoutesStorageCollection(app); 102 requestRoutesStorage(app); 103 requestRoutesStorageControllerCollection(app); 104 requestRoutesStorageController(app); 105 requestRoutesDrive(app); 106 requestRoutesCable(app); 107 requestRoutesCableCollection(app); 108 109 requestRoutesSystemLogServiceCollection(app); 110 requestRoutesEventLogService(app); 111 requestRoutesPostCodesEntryAdditionalData(app); 112 113 requestRoutesPostCodesLogService(app); 114 requestRoutesPostCodesClear(app); 115 requestRoutesPostCodesEntry(app); 116 requestRoutesPostCodesEntryCollection(app); 117 118 if constexpr (BMCWEB_REDFISH_DUMP_LOG) 119 { 120 requestRoutesSystemDumpService(app); 121 requestRoutesSystemDumpEntryCollection(app); 122 requestRoutesSystemDumpEntry(app); 123 requestRoutesSystemDumpCreate(app); 124 requestRoutesSystemDumpClear(app); 125 126 requestRoutesBMCDumpService(app); 127 requestRoutesBMCDumpEntryCollection(app); 128 requestRoutesBMCDumpEntry(app); 129 requestRoutesBMCDumpEntryDownload(app); 130 requestRoutesBMCDumpCreate(app); 131 requestRoutesBMCDumpClear(app); 132 133 requestRoutesFaultLogDumpService(app); 134 requestRoutesFaultLogDumpEntryCollection(app); 135 requestRoutesFaultLogDumpEntry(app); 136 requestRoutesFaultLogDumpClear(app); 137 } 138 139 requestRoutesBMCLogServiceCollection(app); 140 141 if constexpr (BMCWEB_REDFISH_BMC_JOURNAL) 142 { 143 requestRoutesBMCJournalLogService(app); 144 } 145 146 if constexpr (BMCWEB_REDFISH_CPU_LOG) 147 { 148 requestRoutesCrashdumpService(app); 149 requestRoutesCrashdumpEntryCollection(app); 150 requestRoutesCrashdumpEntry(app); 151 requestRoutesCrashdumpFile(app); 152 requestRoutesCrashdumpClear(app); 153 requestRoutesCrashdumpCollect(app); 154 } 155 156 requestRoutesProcessorCollection(app); 157 requestRoutesProcessor(app); 158 requestRoutesOperatingConfigCollection(app); 159 requestRoutesOperatingConfig(app); 160 requestRoutesMemoryCollection(app); 161 requestRoutesMemory(app); 162 163 requestRoutesSystems(app); 164 165 requestRoutesBiosService(app); 166 requestRoutesBiosReset(app); 167 168 if constexpr (BMCWEB_VM_NBDPROXY) 169 { 170 requestNBDVirtualMediaRoutes(app); 171 } 172 173 if constexpr (BMCWEB_REDFISH_DBUS_LOG) 174 { 175 requestRoutesDBusLogServiceActionsClear(app); 176 requestRoutesDBusEventLogEntryCollection(app); 177 requestRoutesDBusEventLogEntry(app); 178 requestRoutesDBusEventLogEntryDownload(app); 179 } 180 else 181 { 182 requestRoutesJournalEventLogEntryCollection(app); 183 requestRoutesJournalEventLogEntry(app); 184 requestRoutesJournalEventLogClear(app); 185 } 186 187 if constexpr (BMCWEB_REDFISH_HOST_LOGGER) 188 { 189 requestRoutesSystemHostLogger(app); 190 requestRoutesSystemHostLoggerCollection(app); 191 requestRoutesSystemHostLoggerLogEntry(app); 192 } 193 194 requestRoutesMessageRegistryFileCollection(app); 195 requestRoutesMessageRegistryFile(app); 196 requestRoutesMessageRegistry(app); 197 198 requestRoutesCertificateService(app); 199 requestRoutesHTTPSCertificate(app); 200 requestRoutesLDAPCertificate(app); 201 requestRoutesTrustStoreCertificate(app); 202 203 requestRoutesSystemPCIeFunctionCollection(app); 204 requestRoutesSystemPCIeFunction(app); 205 requestRoutesSystemPCIeDeviceCollection(app); 206 requestRoutesSystemPCIeDevice(app); 207 208 requestRoutesSensorCollection(app); 209 requestRoutesSensor(app); 210 211 requestRoutesTaskMonitor(app); 212 requestRoutesTaskService(app); 213 requestRoutesTaskCollection(app); 214 requestRoutesTask(app); 215 requestRoutesEventService(app); 216 requestRoutesEventServiceSse(app); 217 requestRoutesEventDestinationCollection(app); 218 requestRoutesEventDestination(app); 219 requestRoutesFabricAdapters(app); 220 requestRoutesFabricAdapterCollection(app); 221 requestRoutesSubmitTestEvent(app); 222 223 if constexpr (BMCWEB_HYPERVISOR_COMPUTER_SYSTEM) 224 { 225 requestRoutesHypervisorSystems(app); 226 } 227 228 requestRoutesTelemetryService(app); 229 requestRoutesMetricReportDefinitionCollection(app); 230 requestRoutesMetricReportDefinition(app); 231 requestRoutesMetricReportCollection(app); 232 requestRoutesMetricReport(app); 233 requestRoutesTriggerCollection(app); 234 requestRoutesTrigger(app); 235 236 // Note, this must be the last route registered 237 requestRoutesRedfish(app); 238 } 239 240 } // namespace redfish 241