/openbmc/bmcweb/redfish-core/lib/ |
H A D | log_services.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 33 #include <asm-generic/errno.h> 34 #include <systemd/sd-bus.h> 73 namespace redfish namespace 153 if (entryStream >> std::get_time(&timeStruct, "%Y-%m-%dT%H:%M:%S")) in getUniqueEntryID() 182 static const std::string redfishLogFilename = "redfish"; in getRedfishLogFiles() 184 // Loop through the directory looking for redfish log files in getRedfishLogFiles() 188 // If we find a redfish log file, save the path in getRedfishLogFiles() [all …]
|
H A D | event_service.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2020 Intel Corporation 25 #include <asm-generic/errno.h> 50 namespace redfish namespace 65 BMCWEB_ROUTE(app, "/redfish/v1/EventService/") in requestRoutesEventService() 66 .privileges(redfish::privileges::getEventService) in requestRoutesEventService() 72 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in requestRoutesEventService() 77 asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/EventService"; in requestRoutesEventService() 78 asyncResp->res.jsonValue["@odata.type"] = in requestRoutesEventService() [all …]
|
H A D | redfish_v1.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 31 namespace redfish namespace 37 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfishGet() 41 asyncResp->res.jsonValue["v1"] = "/redfish/v1/"; in redfishGet() 48 asyncResp->res.addHeader(boost::beast::http::field::allow, ""); in redfish404() 52 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish404() 63 messages::resourceNotFound(asyncResp->res, "", name); in redfish404() 72 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish405() 78 asyncResp->res.result(boost::beast::http::status::method_not_allowed); in redfish405() [all …]
|
H A D | task.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2020 Intel Corporation 49 namespace redfish namespace 56 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 114 status("OK"), state("Running"), messages(nlohmann::json::array()), in TaskData() 115 timer(crow::connections::systemBus->get_io_context()) in TaskData() 144 last->timer.cancel(); in createTask() 145 last->match.reset(); in createTask() 160 boost::urls::format("/redfish/v1/TaskService/Tasks/{}", strIdx); in populateResp() [all …]
|
H A D | manager_logservices_journal.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 20 #include <systemd/sd-journal.h> 34 namespace redfish namespace 42 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleManagersLogServiceJournalGet() 49 messages::resourceNotFound(asyncResp->res, "Manager", managerId); in handleManagersLogServiceJournalGet() 53 asyncResp->res.jsonValue["@odata.type"] = "#LogService.v1_2_0.LogService"; in handleManagersLogServiceJournalGet() 54 asyncResp->res.jsonValue["@odata.id"] = in handleManagersLogServiceJournalGet() 55 boost::urls::format("/redfish/v1/Managers/{}/LogServices/Journal", in handleManagersLogServiceJournalGet() 57 asyncResp->res.jsonValue["Name"] = "Open BMC Journal Log Service"; in handleManagersLogServiceJournalGet() [all …]
|
H A D | certificate_service.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 25 #include <systemd/sd-bus.h> 60 namespace redfish namespace 106 req, asyncResp->res, // in getCertificateFromReqBody() 112 messages::internalError(asyncResp->res); in getCertificateFromReqBody() 118 messages::propertyValueNotInList(asyncResp->res, *certificateType, in getCertificateFromReqBody() 142 // NOLINTNEXTLINE(misc-include-cleaner) in CertificateFile() 193 // example: O=openbmc-project.xyz,CN=localhost in updateCertIssuerOrSubject() 206 std::string_view key(tokenBegin, static_cast<size_t>(i - tokenBegin)); in updateCertIssuerOrSubject() [all …]
|
H A D | fabric_adapters.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 19 #include <asm-generic/errno.h> 34 namespace redfish namespace 51 messages::internalError(asyncResp->res); in getFabricAdapterLocation() 56 asyncResp->res in getFabricAdapterLocation() 77 messages::internalError(asyncResp->res); in getFabricAdapterAsset() 94 messages::internalError(asyncResp->res); in getFabricAdapterAsset() 100 asyncResp->res.jsonValue["SerialNumber"] = *serialNumber; in getFabricAdapterAsset() 105 asyncResp->res.jsonValue["Model"] = *model; in getFabricAdapterAsset() [all …]
|
H A D | systems_logservices_postcodes.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 25 #include <asm-generic/errno.h> 51 namespace redfish namespace 59 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSystemsLogServicesPostCodesGet() 66 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesPostCodesGet() 72 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesPostCodesGet() 76 asyncResp->res.jsonValue["@odata.id"] = in handleSystemsLogServicesPostCodesGet() 77 std::format("/redfish/v1/Systems/{}/LogServices/PostCodes", in handleSystemsLogServicesPostCodesGet() 79 asyncResp->res.jsonValue["@odata.type"] = "#LogService.v1_2_0.LogService"; in handleSystemsLogServicesPostCodesGet() [all …]
|
H A D | account_service.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 30 #include <systemd/sd-bus.h> 57 namespace redfish namespace 97 if (role == "priv-admin") in getRoleIdFromPrivilege() 101 if (role == "priv-user") in getRoleIdFromPrivilege() 105 if (role == "priv-operator") in getRoleIdFromPrivilege() 115 return "priv-admin"; in getPrivilegeFromRoleId() 119 return "priv-user"; in getPrivilegeFromRoleId() [all …]
|
H A D | redfish_sessions.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 37 namespace redfish namespace 46 roles.emplace_back(redfish::getRoleIdFromPrivilege(session.userRole)); in fillSessionObject() 49 "/redfish/v1/SessionService/Sessions/{}", session.uniqueId); in fillSessionObject() 65 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSessionHead() 69 asyncResp->res.addHeader( in handleSessionHead() 71 "</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby"); in handleSessionHead() 79 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSessionGet() [all …]
|
H A D | managers.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 29 #include <systemd/sd-bus.h> 56 namespace redfish namespace 80 * @param[in] asyncResp - Shared pointer for completing asynchronous calls 92 // Create the D-Bus variant for D-Bus call. in doBMCGracefulRestart() 100 BMCWEB_LOG_DEBUG("[Set] Bad D-Bus request error: {}", ec); in doBMCGracefulRestart() 101 messages::internalError(asyncResp->res); in doBMCGracefulRestart() 105 messages::success(asyncResp->res); in doBMCGracefulRestart() [all …]
|
H A D | update_service.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 71 namespace redfish namespace 75 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-globa [all...] |
H A D | processor.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 47 namespace redfish namespace 50 // Interfaces which imply a D-Bus object represents a Processor 57 * requesting data from the given D-Bus object. 60 * @param[in] service D-Bus service to query. 61 * @param[in] objPath D-Bus object to query. 75 messages::internalError(asyncResp->res); in getProcessorUUID() 78 asyncResp->res.jsonValue["UUID"] = property; in getProcessorUUID() [all …]
|
H A D | pcie.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 // SPDX-FileCopyrightText: Copyright 2018 Intel Corporation 23 #include <asm-generic/errno.h> 45 namespace redfish namespace 79 messages::internalError(asyncResp->res); in handlePCIeDevicePath() 82 callback(pcieDevicePath, object.begin()->first); in handlePCIeDevicePath() 88 messages::resourceNotFound(asyncResp->res, "PCIeDevice", pcieDeviceId); in handlePCIeDevicePath() 105 BMCWEB_LOG_ERROR("D-Bus response error on GetSubTree {}", ec); in getValidPCIeDevicePath() 106 messages::internalError(asyncResp->res); in getValidPCIeDevicePath() [all …]
|
H A D | systems_logservices_hostlogger.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 37 namespace redfish namespace 106 "/redfish/v1/Systems/{}/LogServices/HostLogger/Entries/{}", in fillHostLoggerEntryJson() 121 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSystemsLogServicesHostloggerGet() 128 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesHostloggerGet() 134 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesHostloggerGet() 138 asyncResp->res.jsonValue["@odata.id"] = in handleSystemsLogServicesHostloggerGet() 139 std::format("/redfish/v1/Systems/{}/LogServices/HostLogger", in handleSystemsLogServicesHostloggerGet() 141 asyncResp->res.jsonValue["@odata.type"] = "#LogService.v1_2_0.LogService"; in handleSystemsLogServicesHostloggerGet() [all …]
|
H A D | fan.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 16 #include <asm-generic/errno.h> 33 namespace redfish namespace 43 nlohmann::json& fanList = asyncResp->res.jsonValue["Members"]; in updateFanList() 55 "/redfish/v1/Chassis/{}/ThermalSubsystem/Fans/{}", chassisId, in updateFanList() 60 asyncResp->res.jsonValue["Members@odata.count"] = fanList.size(); in updateFanList() 86 messages::internalError(asyncResp->res); in getFanPaths() 100 messages::resourceNotFound(asyncResp->res, "Chassis", chassisId); in doFanCollection() 104 asyncResp->res.addHeader( in doFanCollection() [all …]
|
H A D | bios.hpp | 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 24 namespace redfish namespace 34 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleBiosServiceGet() 41 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleBiosServiceGet() 47 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleBiosServiceGet() 51 asyncResp->res.jsonValue["@odata.id"] = std::format( in handleBiosServiceGet() 52 "/redfish/v1/Systems/{}/Bios", BMCWEB_REDFISH_SYSTEM_URI_NAME); in handleBiosServiceGet() 53 asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios"; in handleBiosServiceGet() 54 asyncResp->res.jsonValue["Name"] = "BIOS Configuration"; in handleBiosServiceGet() [all …]
|
/openbmc/bmcweb/redfish-core/schema/dmtf/json-schema-installed/ |
H A D | MessageRegistry.v1_6_3.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 12 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 13 "description": "This property shall specify a valid odata or Redfish property.", 28 "description": "The available OEM-specific actions for this resource.", 29 …"longDescription": "This property shall contain the available OEM-specific actions for this resour… 37 …perties within indicate the events, specified by message keys for other messages in this registry,… 40 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 41 "description": "This property shall specify a valid odata or Redfish property.", [all …]
|
H A D | Task.v1_7_4.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/Task.v1_7_4.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 12 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 13 "description": "This property shall specify a valid odata or Redfish property.", 28 "description": "The available OEM-specific actions for this resource.", 29 …"longDescription": "This property shall contain the available OEM-specific actions for this resour… 38 …"longDescription": "This Redfish Specification-described type shall contain links to resources tha… 40 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 41 "description": "This property shall specify a valid odata or Redfish property.", [all …]
|
H A D | redfish-error.v1_0_2.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/redfish-error.v1_0_2.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 9 "description": "The error payload from a Redfish service.", 10 …"longDescription": "The Redfish Specification-described type shall contain an error payload from a… 14 "description": "The properties that describe an error from a Redfish service.", 15 …his property, as described by the Redfish Specification, shall contain properties that describe an… 25 "description": "The properties that describe an error from a Redfish service.", 26 …"longDescription": "The Redfish Specification-described type shall contain properties that describ… 35 …"description": "A human-readable error message corresponding to the message in a message registry.… [all …]
|
/openbmc/bmcweb/redfish-core/schema/dmtf/json-schema/ |
H A D | MessageRegistry.v1_6_3.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/MessageRegistry.v1_6_3.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 12 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 13 "description": "This property shall specify a valid odata or Redfish property.", 28 "description": "The available OEM-specific actions for this resource.", 29 …"longDescription": "This property shall contain the available OEM-specific actions for this resour… 37 …perties within indicate the events, specified by message keys for other messages in this registry,… 40 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 41 "description": "This property shall specify a valid odata or Redfish property.", [all …]
|
H A D | Task.v1_7_4.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/Task.v1_7_4.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 12 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 13 "description": "This property shall specify a valid odata or Redfish property.", 28 "description": "The available OEM-specific actions for this resource.", 29 …"longDescription": "This property shall contain the available OEM-specific actions for this resour… 38 …"longDescription": "This Redfish Specification-described type shall contain links to resources tha… 40 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 41 "description": "This property shall specify a valid odata or Redfish property.", [all …]
|
H A D | redfish-error.v1_0_2.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/redfish-error.v1_0_2.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 9 "description": "The error payload from a Redfish service.", 10 …"longDescription": "The Redfish Specification-described type shall contain an error payload from a… 14 "description": "The properties that describe an error from a Redfish service.", 15 …his property, as described by the Redfish Specification, shall contain properties that describe an… 25 "description": "The properties that describe an error from a Redfish service.", 26 …"longDescription": "The Redfish Specification-described type shall contain properties that describ… 35 …"description": "A human-readable error message corresponding to the message in a message registry.… [all …]
|
H A D | Job.v1_2_4.json | 2 "$id": "http://redfish.dmtf.org/schemas/v1/Job.v1_2_4.json", 4 "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json", 5 …"copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.or… 12 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { 13 "description": "This property shall specify a valid odata or Redfish property.", 28 "description": "The available OEM-specific actions for this resource.", 29 …"longDescription": "This property shall contain the available OEM-specific actions for this resour… 36 …"description": "The `Job` schema contains information about a job that a Redfish job service sched… 37 "longDescription": "This resource shall contain a job in a Redfish implementation.", 39 "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": { [all …]
|
/openbmc/docs/architecture/ |
H A D | redfish-logging-in-bmcweb.md | 1 # Redfish Event Logging in bmcweb 3 This guide is intended to help developers add new messages to the bmcweb Redfish 6 Redfish Message Objects can be represented in different ways. In bmcweb, we have 11 [Redfish Specification](http://redfish.dmtf.org/schemas/DSP0266_1.6.1.html). 15 The first step when adding a new message to the Redfish event log is to find or 19 "\redfish-core\include\registries" in source code, and they can be examined 20 through Redfish under "/redfish/v1/Registries". 27 If an appropriate message does not exist, new messages can be added as follows: 37 ## Logging Messages 39 Logging messages is done by providing a Redfish MessageId and any corresponding [all …]
|