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); |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 71 | requestRoutesThermal(app); |
| 72 | requestRoutesManagerCollection(app); |
| 73 | requestRoutesManager(app); |
| 74 | requestRoutesManagerResetAction(app); |
| 75 | requestRoutesManagerResetActionInfo(app); |
| 76 | requestRoutesManagerResetToDefaultsAction(app); |
| 77 | requestRoutesPower(app); |
| 78 | requestRoutesChassisCollection(app); |
| 79 | requestRoutesChassis(app); |
| 80 | requestRoutesChassisResetAction(app); |
| 81 | requestRoutesChassisResetActionInfo(app); |
| 82 | requestRoutesUpdateService(app); |
| 83 | requestRoutesStorageCollection(app); |
| 84 | requestRoutesStorage(app); |
| 85 | requestRoutesDrive(app); |
Andrew Geissler | 0554c98 | 2019-04-23 14:40:12 -0500 | [diff] [blame] | 86 | #ifdef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 87 | requestRoutesUpdateServiceActionsSimpleUpdate(app); |
Andrew Geissler | 0554c98 | 2019-04-23 14:40:12 -0500 | [diff] [blame] | 88 | #endif |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 89 | requestRoutesSoftwareInventoryCollection(app); |
| 90 | requestRoutesSoftwareInventory(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 91 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 92 | requestRoutesSystemLogServiceCollection(app); |
| 93 | requestRoutesEventLogService(app); |
ZhikuiRen | a3316fc | 2020-01-29 14:58:08 -0800 | [diff] [blame] | 94 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 95 | requestRoutesPostCodesLogService(app); |
| 96 | requestRoutesPostCodesClear(app); |
| 97 | requestRoutesPostCodesEntry(app); |
| 98 | requestRoutesPostCodesEntryCollection(app); |
ZhikuiRen | a3316fc | 2020-01-29 14:58:08 -0800 | [diff] [blame] | 99 | |
Asmitha Karunanithi | 5cb1dd2 | 2020-05-07 04:35:02 -0500 | [diff] [blame] | 100 | #ifdef BMCWEB_ENABLE_REDFISH_DUMP_LOG |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 101 | requestRoutesSystemDumpService(app); |
| 102 | requestRoutesSystemDumpEntryCollection(app); |
| 103 | requestRoutesSystemDumpEntry(app); |
| 104 | requestRoutesSystemDumpCreate(app); |
| 105 | requestRoutesSystemDumpClear(app); |
Asmitha Karunanithi | 5cb1dd2 | 2020-05-07 04:35:02 -0500 | [diff] [blame] | 106 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 107 | requestRoutesBMCDumpService(app); |
| 108 | requestRoutesBMCDumpEntryCollection(app); |
| 109 | requestRoutesBMCDumpEntry(app); |
| 110 | requestRoutesBMCDumpCreate(app); |
| 111 | requestRoutesBMCDumpClear(app); |
raviteja-b | c9bb686 | 2020-02-03 11:53:32 -0600 | [diff] [blame] | 112 | #endif |
| 113 | |
Anthony Wilson | 08a4e4b | 2019-04-12 08:23:05 -0500 | [diff] [blame] | 114 | #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 115 | requestRoutesJournalEventLogEntryCollection(app); |
| 116 | requestRoutesJournalEventLogEntry(app); |
| 117 | requestRoutesJournalEventLogClear(app); |
Anthony Wilson | 08a4e4b | 2019-04-12 08:23:05 -0500 | [diff] [blame] | 118 | #endif |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 119 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 120 | requestRoutesBMCLogServiceCollection(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 121 | #ifdef BMCWEB_ENABLE_REDFISH_BMC_JOURNAL |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 122 | requestRoutesBMCJournalLogService(app); |
| 123 | requestRoutesBMCJournalLogEntryCollection(app); |
| 124 | requestRoutesBMCJournalLogEntry(app); |
Jason M. Bills | c4bf637 | 2018-11-05 13:48:27 -0800 | [diff] [blame] | 125 | #endif |
Ed Tanous | 1da66f7 | 2018-07-27 16:13:37 -0700 | [diff] [blame] | 126 | |
| 127 | #ifdef BMCWEB_ENABLE_REDFISH_CPU_LOG |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 128 | requestRoutesCrashdumpService(app); |
| 129 | requestRoutesCrashdumpEntryCollection(app); |
| 130 | requestRoutesCrashdumpEntry(app); |
| 131 | requestRoutesCrashdumpFile(app); |
| 132 | requestRoutesCrashdumpClear(app); |
| 133 | requestRoutesCrashdumpCollect(app); |
Ed Tanous | 1da66f7 | 2018-07-27 16:13:37 -0700 | [diff] [blame] | 134 | #endif // BMCWEB_ENABLE_REDFISH_CPU_LOG |
| 135 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 136 | requestRoutesProcessorCollection(app); |
| 137 | requestRoutesProcessor(app); |
| 138 | requestRoutesOperatingConfigCollection(app); |
| 139 | requestRoutesOperatingConfig(app); |
| 140 | requestRoutesMemoryCollection(app); |
| 141 | requestRoutesMemory(app); |
Rapkiewicz, Pawel | 443c293 | 2018-10-22 15:08:49 +0200 | [diff] [blame] | 142 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 143 | requestRoutesSystemsCollection(app); |
| 144 | requestRoutesSystems(app); |
| 145 | requestRoutesSystemActionsReset(app); |
| 146 | requestRoutesSystemResetActionInfo(app); |
| 147 | requestRoutesBiosService(app); |
| 148 | requestRoutesBiosReset(app); |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame^] | 149 | |
Przemyslaw Czarnowski | 107077d | 2019-07-11 10:16:43 +0200 | [diff] [blame] | 150 | #ifdef BMCWEB_ENABLE_VM_NBDPROXY |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame^] | 151 | requestNBDVirtualMediaRoutes(app); |
Przemyslaw Czarnowski | 107077d | 2019-07-11 10:16:43 +0200 | [diff] [blame] | 152 | #endif // BMCWEB_ENABLE_VM_NBDPROXY |
Ed Tanous | 22db172 | 2021-06-09 10:53:51 -0700 | [diff] [blame^] | 153 | |
Andrew Geissler | cb92c03 | 2018-08-17 07:56:14 -0700 | [diff] [blame] | 154 | #ifdef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 155 | requestRoutesDBusLogServiceActionsClear(app); |
| 156 | requestRoutesDBusEventLogEntryCollection(app); |
| 157 | requestRoutesDBusEventLogEntry(app); |
| 158 | requestRoutesDBusEventLogEntryDownload(app); |
Andrew Geissler | cb92c03 | 2018-08-17 07:56:14 -0700 | [diff] [blame] | 159 | #endif |
Tanous | f00032d | 2018-11-05 01:18:10 -0300 | [diff] [blame] | 160 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 161 | requestRoutesMessageRegistryFileCollection(app); |
| 162 | requestRoutesMessageRegistryFile(app); |
| 163 | requestRoutesMessageRegistry(app); |
Anthony Wilson | 95a3eca | 2019-06-11 10:44:47 -0500 | [diff] [blame] | 164 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 165 | requestRoutesCertificateService(app); |
| 166 | requestRoutesCertificateActionGenerateCSR(app); |
| 167 | requestRoutesCertificateActionsReplaceCertificate(app); |
| 168 | requestRoutesHTTPSCertificate(app); |
| 169 | requestRoutesHTTPSCertificateCollection(app); |
| 170 | requestRoutesCertificateLocations(app); |
| 171 | requestRoutesLDAPCertificateCollection(app); |
| 172 | requestRoutesLDAPCertificate(app); |
| 173 | requestRoutesTrustStoreCertificateCollection(app); |
| 174 | requestRoutesTrustStoreCertificate(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 175 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 176 | requestRoutesSystemPCIeFunctionCollection(app); |
| 177 | requestRoutesSystemPCIeFunction(app); |
| 178 | requestRoutesSystemPCIeDeviceCollection(app); |
| 179 | requestRoutesSystemPCIeDevice(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 180 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 181 | requestRoutesSensorCollection(app); |
| 182 | requestRoutesSensor(app); |
Sunitha Harish | 462023a | 2020-02-19 08:34:59 -0600 | [diff] [blame] | 183 | |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 184 | requestRoutesTaskMonitor(app); |
| 185 | requestRoutesTaskService(app); |
| 186 | requestRoutesTaskCollection(app); |
| 187 | requestRoutesTask(app); |
| 188 | requestRoutesEventService(app); |
| 189 | requestRoutesEventDestinationCollection(app); |
| 190 | requestRoutesEventDestination(app); |
| 191 | requestRoutesSubmitTestEvent(app); |
| 192 | |
Ed Tanous | b898395 | 2021-06-03 14:55:44 -0700 | [diff] [blame] | 193 | hypervisor::requestRoutesHypervisorSystems(app); |
John Edward Broadbent | 7e860f1 | 2021-04-08 15:57:16 -0700 | [diff] [blame] | 194 | |
| 195 | requestRoutesTelemetryService(app); |
| 196 | requestRoutesMetricReportDefinitionCollection(app); |
| 197 | requestRoutesMetricReportDefinition(app); |
| 198 | requestRoutesMetricReportCollection(app); |
| 199 | requestRoutesMetricReport(app); |
Borawski.Lukasz | c1a46bd | 2018-02-08 13:31:59 +0100 | [diff] [blame] | 200 | } |
Borawski.Lukasz | b6df6dc | 2018-01-24 10:20:45 +0100 | [diff] [blame] | 201 | }; |
| 202 | |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 203 | } // namespace redfish |