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 "systems_logservices_hostlogger.hpp" 43 #include "systems_logservices_postcodes.hpp" 44 #include "task.hpp" 45 #include "telemetry_service.hpp" 46 #include "thermal.hpp" 47 #include "thermal_metrics.hpp" 48 #include "thermal_subsystem.hpp" 49 #include "trigger.hpp" 50 #include "update_service.hpp" 51 #include "virtual_media.hpp" 52 53 namespace redfish 54 { 55 56 RedfishService::RedfishService(App& app) 57 { 58 requestRoutesMetadata(app); 59 requestRoutesOdata(app); 60 61 requestAccountServiceRoutes(app); 62 if constexpr (BMCWEB_REDFISH_AGGREGATION) 63 { 64 requestRoutesAggregationService(app); 65 requestRoutesAggregationSourceCollection(app); 66 requestRoutesAggregationSource(app); 67 } 68 requestRoutesRoles(app); 69 requestRoutesRoleCollection(app); 70 requestRoutesServiceRoot(app); 71 requestRoutesNetworkProtocol(app); 72 requestRoutesSession(app); 73 requestEthernetInterfacesRoutes(app); 74 if constexpr (BMCWEB_REDFISH_ALLOW_DEPRECATED_POWER_THERMAL) 75 { 76 requestRoutesThermal(app); 77 requestRoutesPower(app); 78 } 79 if constexpr (BMCWEB_REDFISH_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM) 80 { 81 requestRoutesEnvironmentMetrics(app); 82 requestRoutesPowerSubsystem(app); 83 requestRoutesPowerSupply(app); 84 requestRoutesPowerSupplyCollection(app); 85 requestRoutesThermalMetrics(app); 86 requestRoutesThermalSubsystem(app); 87 requestRoutesFan(app); 88 requestRoutesFanCollection(app); 89 } 90 requestRoutesManagerCollection(app); 91 requestRoutesManager(app); 92 requestRoutesManagerResetAction(app); 93 requestRoutesManagerResetActionInfo(app); 94 requestRoutesManagerResetToDefaultsAction(app); 95 requestRoutesManagerDiagnosticData(app); 96 requestRoutesChassisCollection(app); 97 requestRoutesChassis(app); 98 requestRoutesChassisResetAction(app); 99 requestRoutesChassisResetActionInfo(app); 100 requestRoutesChassisDrive(app); 101 requestRoutesChassisDriveName(app); 102 requestRoutesUpdateService(app); 103 requestRoutesStorageCollection(app); 104 requestRoutesStorage(app); 105 requestRoutesStorageControllerCollection(app); 106 requestRoutesStorageController(app); 107 requestRoutesDrive(app); 108 requestRoutesCable(app); 109 requestRoutesCableCollection(app); 110 111 requestRoutesSystemLogServiceCollection(app); 112 requestRoutesEventLogService(app); 113 114 requestRoutesSystemsLogServicesPostCode(app); 115 116 if constexpr (BMCWEB_REDFISH_DUMP_LOG) 117 { 118 requestRoutesSystemDumpService(app); 119 requestRoutesSystemDumpEntryCollection(app); 120 requestRoutesSystemDumpEntry(app); 121 requestRoutesSystemDumpCreate(app); 122 requestRoutesSystemDumpClear(app); 123 124 requestRoutesBMCDumpService(app); 125 requestRoutesBMCDumpEntryCollection(app); 126 requestRoutesBMCDumpEntry(app); 127 requestRoutesBMCDumpEntryDownload(app); 128 requestRoutesBMCDumpCreate(app); 129 requestRoutesBMCDumpClear(app); 130 131 requestRoutesFaultLogDumpService(app); 132 requestRoutesFaultLogDumpEntryCollection(app); 133 requestRoutesFaultLogDumpEntry(app); 134 requestRoutesFaultLogDumpClear(app); 135 } 136 137 requestRoutesBMCLogServiceCollection(app); 138 139 if constexpr (BMCWEB_REDFISH_BMC_JOURNAL) 140 { 141 requestRoutesBMCJournalLogService(app); 142 } 143 144 if constexpr (BMCWEB_REDFISH_CPU_LOG) 145 { 146 requestRoutesCrashdumpService(app); 147 requestRoutesCrashdumpEntryCollection(app); 148 requestRoutesCrashdumpEntry(app); 149 requestRoutesCrashdumpFile(app); 150 requestRoutesCrashdumpClear(app); 151 requestRoutesCrashdumpCollect(app); 152 } 153 154 requestRoutesProcessorCollection(app); 155 requestRoutesProcessor(app); 156 requestRoutesOperatingConfigCollection(app); 157 requestRoutesOperatingConfig(app); 158 requestRoutesMemoryCollection(app); 159 requestRoutesMemory(app); 160 161 requestRoutesSystems(app); 162 163 requestRoutesBiosService(app); 164 requestRoutesBiosReset(app); 165 166 if constexpr (BMCWEB_VM_NBDPROXY) 167 { 168 requestNBDVirtualMediaRoutes(app); 169 } 170 171 if constexpr (BMCWEB_REDFISH_DBUS_LOG) 172 { 173 requestRoutesDBusLogServiceActionsClear(app); 174 requestRoutesDBusEventLogEntryCollection(app); 175 requestRoutesDBusEventLogEntry(app); 176 requestRoutesDBusEventLogEntryDownload(app); 177 } 178 else 179 { 180 requestRoutesJournalEventLogEntryCollection(app); 181 requestRoutesJournalEventLogEntry(app); 182 requestRoutesJournalEventLogClear(app); 183 } 184 185 if constexpr (BMCWEB_REDFISH_HOST_LOGGER) 186 { 187 requestRoutesSystemsLogServiceHostlogger(app); 188 } 189 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 if constexpr (BMCWEB_HYPERVISOR_COMPUTER_SYSTEM) 220 { 221 requestRoutesHypervisorSystems(app); 222 } 223 224 requestRoutesTelemetryService(app); 225 requestRoutesMetricReportDefinitionCollection(app); 226 requestRoutesMetricReportDefinition(app); 227 requestRoutesMetricReportCollection(app); 228 requestRoutesMetricReport(app); 229 requestRoutesTriggerCollection(app); 230 requestRoutesTrigger(app); 231 232 // Note, this must be the last route registered 233 requestRoutesRedfish(app); 234 } 235 236 } // namespace redfish 237