Ed Tanous | 3cd7072 | 2024-04-06 09:24:01 -0700 | [diff] [blame^] | 1 | #include "redfish.hpp" |
| 2 | |
| 3 | #include "account_service.hpp" |
| 4 | #include "aggregation_service.hpp" |
| 5 | #include "app.hpp" |
| 6 | #include "bios.hpp" |
| 7 | #include "cable.hpp" |
| 8 | #include "certificate_service.hpp" |
| 9 | #include "chassis.hpp" |
| 10 | #include "environment_metrics.hpp" |
| 11 | #include "ethernet.hpp" |
| 12 | #include "event_service.hpp" |
| 13 | #include "eventservice_sse.hpp" |
| 14 | #include "fabric_adapters.hpp" |
| 15 | #include "fan.hpp" |
| 16 | #include "hypervisor_system.hpp" |
| 17 | #include "log_services.hpp" |
| 18 | #include "manager_diagnostic_data.hpp" |
| 19 | #include "managers.hpp" |
| 20 | #include "memory.hpp" |
| 21 | #include "message_registries.hpp" |
| 22 | #include "metric_report.hpp" |
| 23 | #include "metric_report_definition.hpp" |
| 24 | #include "network_protocol.hpp" |
| 25 | #include "pcie.hpp" |
| 26 | #include "pcie_slots.hpp" |
| 27 | #include "power.hpp" |
| 28 | #include "power_subsystem.hpp" |
| 29 | #include "power_supply.hpp" |
| 30 | #include "processor.hpp" |
| 31 | #include "redfish_sessions.hpp" |
| 32 | #include "redfish_v1.hpp" |
| 33 | #include "roles.hpp" |
| 34 | #include "sensors.hpp" |
| 35 | #include "service_root.hpp" |
| 36 | #include "storage.hpp" |
| 37 | #include "systems.hpp" |
| 38 | #include "task.hpp" |
| 39 | #include "telemetry_service.hpp" |
| 40 | #include "thermal.hpp" |
| 41 | #include "thermal_metrics.hpp" |
| 42 | #include "thermal_subsystem.hpp" |
| 43 | #include "trigger.hpp" |
| 44 | #include "update_service.hpp" |
| 45 | #include "virtual_media.hpp" |
| 46 | |
| 47 | namespace redfish |
| 48 | { |
| 49 | |
| 50 | RedfishService::RedfishService(App& app) |
| 51 | { |
| 52 | requestAccountServiceRoutes(app); |
| 53 | #ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION |
| 54 | requestRoutesAggregationService(app); |
| 55 | requestRoutesAggregationSourceCollection(app); |
| 56 | requestRoutesAggregationSource(app); |
| 57 | #endif |
| 58 | requestRoutesRoles(app); |
| 59 | requestRoutesRoleCollection(app); |
| 60 | requestRoutesServiceRoot(app); |
| 61 | requestRoutesNetworkProtocol(app); |
| 62 | requestRoutesSession(app); |
| 63 | requestEthernetInterfacesRoutes(app); |
| 64 | #ifdef BMCWEB_ALLOW_DEPRECATED_POWER_THERMAL |
| 65 | requestRoutesThermal(app); |
| 66 | requestRoutesPower(app); |
| 67 | #endif |
| 68 | #ifdef BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM |
| 69 | requestRoutesEnvironmentMetrics(app); |
| 70 | requestRoutesPowerSubsystem(app); |
| 71 | requestRoutesPowerSupply(app); |
| 72 | requestRoutesPowerSupplyCollection(app); |
| 73 | requestRoutesThermalMetrics(app); |
| 74 | requestRoutesThermalSubsystem(app); |
| 75 | requestRoutesFan(app); |
| 76 | requestRoutesFanCollection(app); |
| 77 | #endif |
| 78 | requestRoutesManagerCollection(app); |
| 79 | requestRoutesManager(app); |
| 80 | requestRoutesManagerResetAction(app); |
| 81 | requestRoutesManagerResetActionInfo(app); |
| 82 | requestRoutesManagerResetToDefaultsAction(app); |
| 83 | requestRoutesManagerDiagnosticData(app); |
| 84 | requestRoutesChassisCollection(app); |
| 85 | requestRoutesChassis(app); |
| 86 | requestRoutesChassisResetAction(app); |
| 87 | requestRoutesChassisResetActionInfo(app); |
| 88 | requestRoutesChassisDrive(app); |
| 89 | requestRoutesChassisDriveName(app); |
| 90 | requestRoutesUpdateService(app); |
| 91 | requestRoutesStorageCollection(app); |
| 92 | requestRoutesStorage(app); |
| 93 | requestRoutesStorageControllerCollection(app); |
| 94 | requestRoutesStorageController(app); |
| 95 | requestRoutesDrive(app); |
| 96 | requestRoutesCable(app); |
| 97 | requestRoutesCableCollection(app); |
| 98 | #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE |
| 99 | requestRoutesUpdateServiceActionsSimpleUpdate(app); |
| 100 | #endif |
| 101 | requestRoutesSoftwareInventoryCollection(app); |
| 102 | requestRoutesSoftwareInventory(app); |
| 103 | |
| 104 | requestRoutesSystemLogServiceCollection(app); |
| 105 | requestRoutesEventLogService(app); |
| 106 | requestRoutesPostCodesEntryAdditionalData(app); |
| 107 | |
| 108 | requestRoutesPostCodesLogService(app); |
| 109 | requestRoutesPostCodesClear(app); |
| 110 | requestRoutesPostCodesEntry(app); |
| 111 | requestRoutesPostCodesEntryCollection(app); |
| 112 | |
| 113 | #ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG |
| 114 | requestRoutesSystemDumpService(app); |
| 115 | requestRoutesSystemDumpEntryCollection(app); |
| 116 | requestRoutesSystemDumpEntry(app); |
| 117 | requestRoutesSystemDumpCreate(app); |
| 118 | requestRoutesSystemDumpClear(app); |
| 119 | |
| 120 | requestRoutesBMCDumpService(app); |
| 121 | requestRoutesBMCDumpEntryCollection(app); |
| 122 | requestRoutesBMCDumpEntry(app); |
| 123 | requestRoutesBMCDumpEntryDownload(app); |
| 124 | requestRoutesBMCDumpCreate(app); |
| 125 | requestRoutesBMCDumpClear(app); |
| 126 | |
| 127 | requestRoutesFaultLogDumpService(app); |
| 128 | requestRoutesFaultLogDumpEntryCollection(app); |
| 129 | requestRoutesFaultLogDumpEntry(app); |
| 130 | requestRoutesFaultLogDumpClear(app); |
| 131 | #endif |
| 132 | |
| 133 | #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
| 134 | requestRoutesJournalEventLogEntryCollection(app); |
| 135 | requestRoutesJournalEventLogEntry(app); |
| 136 | requestRoutesJournalEventLogClear(app); |
| 137 | #endif |
| 138 | |
| 139 | requestRoutesBMCLogServiceCollection(app); |
| 140 | #ifdef BMCWEB_ENABLE_REDFISH_BMC_JOURNAL |
| 141 | requestRoutesBMCJournalLogService(app); |
| 142 | requestRoutesBMCJournalLogEntryCollection(app); |
| 143 | requestRoutesBMCJournalLogEntry(app); |
| 144 | #endif |
| 145 | |
| 146 | #ifdef BMCWEB_ENABLE_REDFISH_CPU_LOG |
| 147 | requestRoutesCrashdumpService(app); |
| 148 | requestRoutesCrashdumpEntryCollection(app); |
| 149 | requestRoutesCrashdumpEntry(app); |
| 150 | requestRoutesCrashdumpFile(app); |
| 151 | requestRoutesCrashdumpClear(app); |
| 152 | requestRoutesCrashdumpCollect(app); |
| 153 | #endif // BMCWEB_ENABLE_REDFISH_CPU_LOG |
| 154 | |
| 155 | requestRoutesProcessorCollection(app); |
| 156 | requestRoutesProcessor(app); |
| 157 | requestRoutesOperatingConfigCollection(app); |
| 158 | requestRoutesOperatingConfig(app); |
| 159 | requestRoutesMemoryCollection(app); |
| 160 | requestRoutesMemory(app); |
| 161 | |
| 162 | requestRoutesSystems(app); |
| 163 | |
| 164 | requestRoutesBiosService(app); |
| 165 | requestRoutesBiosReset(app); |
| 166 | |
| 167 | #ifdef BMCWEB_ENABLE_VM_NBDPROXY |
| 168 | requestNBDVirtualMediaRoutes(app); |
| 169 | #endif // BMCWEB_ENABLE_VM_NBDPROXY |
| 170 | |
| 171 | #ifdef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
| 172 | requestRoutesDBusLogServiceActionsClear(app); |
| 173 | requestRoutesDBusEventLogEntryCollection(app); |
| 174 | requestRoutesDBusEventLogEntry(app); |
| 175 | requestRoutesDBusEventLogEntryDownload(app); |
| 176 | #endif |
| 177 | |
| 178 | #ifdef BMCWEB_ENABLE_REDFISH_HOST_LOGGER |
| 179 | requestRoutesSystemHostLogger(app); |
| 180 | requestRoutesSystemHostLoggerCollection(app); |
| 181 | requestRoutesSystemHostLoggerLogEntry(app); |
| 182 | #endif |
| 183 | |
| 184 | requestRoutesMessageRegistryFileCollection(app); |
| 185 | requestRoutesMessageRegistryFile(app); |
| 186 | requestRoutesMessageRegistry(app); |
| 187 | |
| 188 | requestRoutesCertificateService(app); |
| 189 | requestRoutesHTTPSCertificate(app); |
| 190 | requestRoutesLDAPCertificate(app); |
| 191 | requestRoutesTrustStoreCertificate(app); |
| 192 | |
| 193 | requestRoutesSystemPCIeFunctionCollection(app); |
| 194 | requestRoutesSystemPCIeFunction(app); |
| 195 | requestRoutesSystemPCIeDeviceCollection(app); |
| 196 | requestRoutesSystemPCIeDevice(app); |
| 197 | |
| 198 | requestRoutesSensorCollection(app); |
| 199 | requestRoutesSensor(app); |
| 200 | |
| 201 | requestRoutesTaskMonitor(app); |
| 202 | requestRoutesTaskService(app); |
| 203 | requestRoutesTaskCollection(app); |
| 204 | requestRoutesTask(app); |
| 205 | requestRoutesEventService(app); |
| 206 | requestRoutesEventServiceSse(app); |
| 207 | requestRoutesEventDestinationCollection(app); |
| 208 | requestRoutesEventDestination(app); |
| 209 | requestRoutesFabricAdapters(app); |
| 210 | requestRoutesFabricAdapterCollection(app); |
| 211 | requestRoutesSubmitTestEvent(app); |
| 212 | |
| 213 | requestRoutesHypervisorSystems(app); |
| 214 | |
| 215 | requestRoutesTelemetryService(app); |
| 216 | requestRoutesMetricReportDefinitionCollection(app); |
| 217 | requestRoutesMetricReportDefinition(app); |
| 218 | requestRoutesMetricReportCollection(app); |
| 219 | requestRoutesMetricReport(app); |
| 220 | requestRoutesTriggerCollection(app); |
| 221 | requestRoutesTrigger(app); |
| 222 | |
| 223 | // Note, this must be the last route registered |
| 224 | requestRoutesRedfish(app); |
| 225 | } |
| 226 | |
| 227 | } // namespace redfish |