Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 1 | /* |
Jason M. Bills | 70304cb | 2019-03-27 12:03:59 -0700 | [diff] [blame] | 2 | // Copyright (c) 2018-2019 Intel Corporation |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
| 17 | |
Lewanczyk, Dawid | 88d16c9 | 2018-02-02 14:51:09 +0100 | [diff] [blame] | 18 | #include "../lib/account_service.hpp" |
Carol Wang | d82a3ac | 2019-11-21 13:56:38 +0800 | [diff] [blame] | 19 | #include "../lib/bios.hpp" |
Marri Devender Rao | 5968cae | 2019-01-21 10:27:12 -0600 | [diff] [blame] | 20 | #include "../lib/certificate_service.hpp" |
Jennifer Lee | 729dae7 | 2018-04-24 15:59:34 -0700 | [diff] [blame] | 21 | #include "../lib/chassis.hpp" |
| 22 | #include "../lib/ethernet.hpp" |
AppaRao Puli | e5aaf04 | 2020-03-20 01:05:52 +0530 | [diff] [blame] | 23 | #include "../lib/event_service.hpp" |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame] | 24 | #include "../lib/hypervisor_system.hpp" |
Ed Tanous | 1da66f7 | 2018-07-27 16:13:37 -0700 | [diff] [blame] | 25 | #include "../lib/log_services.hpp" |
Borawski.Lukasz | 9c310685 | 2018-02-09 15:24:22 +0100 | [diff] [blame] | 26 | #include "../lib/managers.hpp" |
Gunnar Mills | ac6a444 | 2020-10-14 14:55:29 -0500 | [diff] [blame] | 27 | #include "../lib/memory.hpp" |
Jason M. Bills | 70304cb | 2019-03-27 12:03:59 -0700 | [diff] [blame] | 28 | #include "../lib/message_registries.hpp" |
Wludzik, Jozef | 081ebf0 | 2020-04-27 17:24:15 +0200 | [diff] [blame] | 29 | #include "../lib/metric_report.hpp" |
| 30 | #include "../lib/metric_report_definition.hpp" |
Borawski.Lukasz | 7014156 | 2018-01-24 12:45:29 +0100 | [diff] [blame] | 31 | #include "../lib/network_protocol.hpp" |
Jason M. Bills | f5c9f8b | 2018-12-18 16:51:18 -0800 | [diff] [blame] | 32 | #include "../lib/pcie.hpp" |
Ed Tanous | 2474adf | 2018-09-05 16:31:16 -0700 | [diff] [blame] | 33 | #include "../lib/power.hpp" |
Gunnar Mills | ac6a444 | 2020-10-14 14:55:29 -0500 | [diff] [blame] | 34 | #include "../lib/processor.hpp" |
Kowalski, Kamil | 2b7981f | 2018-01-31 13:24:59 +0100 | [diff] [blame] | 35 | #include "../lib/redfish_sessions.hpp" |
Lewanczyk, Dawid | 4e49bd4 | 2018-01-25 11:30:19 +0100 | [diff] [blame] | 36 | #include "../lib/roles.hpp" |
Anthony Wilson | 95a3eca | 2019-06-11 10:44:47 -0500 | [diff] [blame] | 37 | #include "../lib/sensors.hpp" |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 38 | #include "../lib/service_root.hpp" |
Nikhil Potade | a25aecc | 2019-08-23 16:35:26 -0700 | [diff] [blame] | 39 | #include "../lib/storage.hpp" |
Lewanczyk, Dawid | c5b2abe | 2018-05-30 16:59:42 +0200 | [diff] [blame] | 40 | #include "../lib/systems.hpp" |
James Feist | 4622957 | 2020-02-19 15:11:58 -0800 | [diff] [blame] | 41 | #include "../lib/task.hpp" |
Wludzik, Jozef | 081ebf0 | 2020-04-27 17:24:15 +0200 | [diff] [blame] | 42 | #include "../lib/telemetry_service.hpp" |
Lewanczyk, Dawid | 08777fb | 2018-03-22 23:33:49 +0100 | [diff] [blame] | 43 | #include "../lib/thermal.hpp" |
Jennifer Lee | 729dae7 | 2018-04-24 15:59:34 -0700 | [diff] [blame] | 44 | #include "../lib/update_service.hpp" |
Przemyslaw Czarnowski | 107077d | 2019-07-11 10:16:43 +0200 | [diff] [blame] | 45 | #include "../lib/virtual_media.hpp" |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 46 | |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 47 | namespace redfish |
| 48 | { |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 49 | /* |
| 50 | * @brief Top level class installing and providing Redfish services |
| 51 | */ |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 52 | class RedfishService |
| 53 | { |
| 54 | public: |
| 55 | /* |
| 56 | * @brief Redfish service constructor |
| 57 | * |
| 58 | * Loads Redfish configuration and installs schema resources |
| 59 | * |
| 60 | * @param[in] app Crow app on which Redfish will initialize |
| 61 | */ |
Ed Tanous | 52cc112 | 2020-07-18 13:51:21 -0700 | [diff] [blame] | 62 | RedfishService(App& app) |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 63 | { |
Ed Tanous | 6c51eab | 2021-06-03 12:30:29 -0700 | [diff] [blame] | 64 | requestAccountServiceRoutes(app); |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 65 | requestRoutesRoles(app); |
| 66 | requestRoutesRoleCollection(app); |
| 67 | requestRoutesServiceRoot(app); |
| 68 | requestRoutesNetworkProtocol(app); |
Ed Tanous | faa34cc | 2021-06-03 13:27:02 -0700 | [diff] [blame] | 69 | requestRoutesSession(app); |
Ed Tanous | bf648f7 | 2021-06-03 15:00:14 -0700 | [diff] [blame] | 70 | requestEthernetInterfacesRoutes(app); |
zhanghch05 | 0256b69 | 2021-06-12 10:26:52 +0800 | [diff] [blame^] | 71 | #ifdef BMCWEB_ALLOW_DEPRECATED_POWER_THERMAL |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 72 | requestRoutesThermal(app); |
zhanghch05 | 0256b69 | 2021-06-12 10:26:52 +0800 | [diff] [blame^] | 73 | requestRoutesPower(app); |
| 74 | #endif |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 75 | requestRoutesManagerCollection(app); |
| 76 | requestRoutesManager(app); |
| 77 | requestRoutesManagerResetAction(app); |
| 78 | requestRoutesManagerResetActionInfo(app); |
| 79 | requestRoutesManagerResetToDefaultsAction(app); |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 80 | requestRoutesChassisCollection(app); |
| 81 | requestRoutesChassis(app); |
| 82 | requestRoutesChassisResetAction(app); |
| 83 | requestRoutesChassisResetActionInfo(app); |
| 84 | requestRoutesUpdateService(app); |
| 85 | requestRoutesStorageCollection(app); |
| 86 | requestRoutesStorage(app); |
| 87 | requestRoutesDrive(app); |
Andrew Geissler | 0554c98 | 2019-04-23 14:40:12 -0500 | [diff] [blame] | 88 | #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 89 | requestRoutesUpdateServiceActionsSimpleUpdate(app); |
Andrew Geissler | 0554c98 | 2019-04-23 14:40:12 -0500 | [diff] [blame] | 90 | #endif |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 91 | requestRoutesSoftwareInventoryCollection(app); |
| 92 | requestRoutesSoftwareInventory(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 93 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 94 | requestRoutesSystemLogServiceCollection(app); |
| 95 | requestRoutesEventLogService(app); |
ZhikuiRen | a3316fc | 2020-01-29 14:58:08 -0800 | [diff] [blame] | 96 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 97 | requestRoutesPostCodesLogService(app); |
| 98 | requestRoutesPostCodesClear(app); |
| 99 | requestRoutesPostCodesEntry(app); |
| 100 | requestRoutesPostCodesEntryCollection(app); |
ZhikuiRen | a3316fc | 2020-01-29 14:58:08 -0800 | [diff] [blame] | 101 | |
Asmitha Karunanithi | 5cb1dd2 | 2020-05-07 04:35:02 -0500 | [diff] [blame] | 102 | #ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 103 | requestRoutesSystemDumpService(app); |
| 104 | requestRoutesSystemDumpEntryCollection(app); |
| 105 | requestRoutesSystemDumpEntry(app); |
| 106 | requestRoutesSystemDumpCreate(app); |
| 107 | requestRoutesSystemDumpClear(app); |
Asmitha Karunanithi | 5cb1dd2 | 2020-05-07 04:35:02 -0500 | [diff] [blame] | 108 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 109 | requestRoutesBMCDumpService(app); |
| 110 | requestRoutesBMCDumpEntryCollection(app); |
| 111 | requestRoutesBMCDumpEntry(app); |
| 112 | requestRoutesBMCDumpCreate(app); |
| 113 | requestRoutesBMCDumpClear(app); |
raviteja-b | c9bb686 | 2020-02-03 11:53:32 -0600 | [diff] [blame] | 114 | #endif |
| 115 | |
Anthony Wilson | 08a4e4b | 2019-04-12 08:23:05 -0500 | [diff] [blame] | 116 | #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 117 | requestRoutesJournalEventLogEntryCollection(app); |
| 118 | requestRoutesJournalEventLogEntry(app); |
| 119 | requestRoutesJournalEventLogClear(app); |
Anthony Wilson | 08a4e4b | 2019-04-12 08:23:05 -0500 | [diff] [blame] | 120 | #endif |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 121 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 122 | requestRoutesBMCLogServiceCollection(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 123 | #ifdef BMCWEB_ENABLE_REDFISH_BMC_JOURNAL |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 124 | requestRoutesBMCJournalLogService(app); |
| 125 | requestRoutesBMCJournalLogEntryCollection(app); |
| 126 | requestRoutesBMCJournalLogEntry(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 127 | #endif |
Ed Tanous | 1da66f7 | 2018-07-27 16:13:37 -0700 | [diff] [blame] | 128 | |
| 129 | #ifdef BMCWEB_ENABLE_REDFISH_CPU_LOG |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 130 | requestRoutesCrashdumpService(app); |
| 131 | requestRoutesCrashdumpEntryCollection(app); |
| 132 | requestRoutesCrashdumpEntry(app); |
| 133 | requestRoutesCrashdumpFile(app); |
| 134 | requestRoutesCrashdumpClear(app); |
| 135 | requestRoutesCrashdumpCollect(app); |
Ed Tanous | 1da66f7 | 2018-07-27 16:13:37 -0700 | [diff] [blame] | 136 | #endif // BMCWEB_ENABLE_REDFISH_CPU_LOG |
| 137 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 138 | requestRoutesProcessorCollection(app); |
| 139 | requestRoutesProcessor(app); |
| 140 | requestRoutesOperatingConfigCollection(app); |
| 141 | requestRoutesOperatingConfig(app); |
| 142 | requestRoutesMemoryCollection(app); |
| 143 | requestRoutesMemory(app); |
Rapkiewicz, Pawel | 443c293 | 2018-10-22 15:08:49 +0200 | [diff] [blame] | 144 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 145 | requestRoutesSystemsCollection(app); |
| 146 | requestRoutesSystems(app); |
| 147 | requestRoutesSystemActionsReset(app); |
| 148 | requestRoutesSystemResetActionInfo(app); |
| 149 | requestRoutesBiosService(app); |
| 150 | requestRoutesBiosReset(app); |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame] | 151 | |
Przemyslaw Czarnowski | 107077d | 2019-07-11 10:16:43 +0200 | [diff] [blame] | 152 | #ifdef BMCWEB_ENABLE_VM_NBDPROXY |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame] | 153 | requestNBDVirtualMediaRoutes(app); |
Przemyslaw Czarnowski | 107077d | 2019-07-11 10:16:43 +0200 | [diff] [blame] | 154 | #endif // BMCWEB_ENABLE_VM_NBDPROXY |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame] | 155 | |
Andrew Geissler | cb92c03 | 2018-08-17 07:56:14 -0700 | [diff] [blame] | 156 | #ifdef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 157 | requestRoutesDBusLogServiceActionsClear(app); |
| 158 | requestRoutesDBusEventLogEntryCollection(app); |
| 159 | requestRoutesDBusEventLogEntry(app); |
| 160 | requestRoutesDBusEventLogEntryDownload(app); |
Andrew Geissler | cb92c03 | 2018-08-17 07:56:14 -0700 | [diff] [blame] | 161 | #endif |
Tanous | f00032d | 2018-11-05 01:18:10 -0300 | [diff] [blame] | 162 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 163 | requestRoutesMessageRegistryFileCollection(app); |
| 164 | requestRoutesMessageRegistryFile(app); |
| 165 | requestRoutesMessageRegistry(app); |
Anthony Wilson | 95a3eca | 2019-06-11 10:44:47 -0500 | [diff] [blame] | 166 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 167 | requestRoutesCertificateService(app); |
| 168 | requestRoutesCertificateActionGenerateCSR(app); |
| 169 | requestRoutesCertificateActionsReplaceCertificate(app); |
| 170 | requestRoutesHTTPSCertificate(app); |
| 171 | requestRoutesHTTPSCertificateCollection(app); |
| 172 | requestRoutesCertificateLocations(app); |
| 173 | requestRoutesLDAPCertificateCollection(app); |
| 174 | requestRoutesLDAPCertificate(app); |
| 175 | requestRoutesTrustStoreCertificateCollection(app); |
| 176 | requestRoutesTrustStoreCertificate(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 177 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 178 | requestRoutesSystemPCIeFunctionCollection(app); |
| 179 | requestRoutesSystemPCIeFunction(app); |
| 180 | requestRoutesSystemPCIeDeviceCollection(app); |
| 181 | requestRoutesSystemPCIeDevice(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 182 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 183 | requestRoutesSensorCollection(app); |
| 184 | requestRoutesSensor(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 185 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 186 | requestRoutesTaskMonitor(app); |
| 187 | requestRoutesTaskService(app); |
| 188 | requestRoutesTaskCollection(app); |
| 189 | requestRoutesTask(app); |
| 190 | requestRoutesEventService(app); |
| 191 | requestRoutesEventDestinationCollection(app); |
| 192 | requestRoutesEventDestination(app); |
| 193 | requestRoutesSubmitTestEvent(app); |
| 194 | |
Ed Tanous | b898395 | 2021-06-03 14:55:44 -0700 | [diff] [blame] | 195 | hypervisor::requestRoutesHypervisorSystems(app); |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 196 | |
| 197 | requestRoutesTelemetryService(app); |
| 198 | requestRoutesMetricReportDefinitionCollection(app); |
| 199 | requestRoutesMetricReportDefinition(app); |
| 200 | requestRoutesMetricReportCollection(app); |
| 201 | requestRoutesMetricReport(app); |
Borawski.Lukasz | c1a46bd | 2018-02-08 13:31:59 +0100 | [diff] [blame] | 202 | } |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 203 | }; |
| 204 | |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 205 | } // namespace redfish |