/openbmc/bmcweb/redfish-core/lib/ |
H A D | log_services.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 38 #include <systemd/sd-id128.h> 61 namespace redfish namespace 143 if (entryStream >> std::get_time(&timeStruct, "%Y-%m-%dT%H:%M:%S")) in getUniqueEntryID() 172 static const std::string redfishLogFilename = "redfish"; in getRedfishLogFiles() 174 // Loop through the directory looking for redfish log files in getRedfishLogFiles() 178 // If we find a redfish log file, save the path in getRedfishLogFiles() 232 messages::internalError(asyncResp->res); in parseDumpEntryFromDbusObject() 249 messages::internalError(asyncResp->res); in parseDumpEntryFromDbusObject() 267 messages::internalError(asyncResp->res); in parseDumpEntryFromDbusObject() [all …]
|
H A D | redfish_v1.hpp | 16 namespace redfish namespace 22 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfishGet() 26 asyncResp->res.jsonValue["v1"] = "/redfish/v1/"; in redfishGet() 33 asyncResp->res.addHeader(boost::beast::http::field::allow, ""); in redfish404() 37 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish404() 48 messages::resourceNotFound(asyncResp->res, "", name); in redfish404() 57 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in redfish405() 63 asyncResp->res.result(boost::beast::http::status::method_not_allowed); in redfish405() 66 messages::resourceCannotBeDeleted(asyncResp->res); in redfish405() 70 messages::operationNotAllowed(asyncResp->res); in redfish405() [all …]
|
H A D | event_service.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 43 namespace redfish namespace 58 BMCWEB_ROUTE(app, "/redfish/v1/EventService/") in requestRoutesEventService() 59 .privileges(redfish::privileges::getEventService) in requestRoutesEventService() 65 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in requestRoutesEventService() 70 asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/EventService"; in requestRoutesEventService() 71 asyncResp->res.jsonValue["@odata.type"] = in requestRoutesEventService() 73 asyncResp->res.jsonValue["Id"] = "EventService"; in requestRoutesEventService() 74 asyncResp->res.jsonValue["Name"] = "Event Service"; in requestRoutesEventService() 75 asyncResp->res.jsonValue["ServerSentEventUri"] = in requestRoutesEventService() [all …]
|
H A D | task.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 38 namespace redfish namespace 45 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 103 status("OK"), state("Running"), messages(nlohmann::json::array()), in TaskData() 104 timer(crow::connections::systemBus->get_io_context()) in TaskData() 133 last->timer.cancel(); in createTask() 134 last->match.reset(); in createTask() 149 boost::urls::format("/redfish/v1/TaskService/Tasks/{}", strIdx); in populateResp() 158 "/redfish/v1/TaskService/TaskMonitors/{}", strIdx); in populateResp() 192 self->match.reset(); in extendTimer() [all …]
|
H A D | certificate_service.hpp | 24 namespace redfish namespace 70 req, asyncResp->res, // in getCertificateFromReqBody() 76 messages::internalError(asyncResp->res); in getCertificateFromReqBody() 82 messages::propertyValueNotInList(asyncResp->res, *certificateType, in getCertificateFromReqBody() 156 // example: O=openbmc-project.xyz,CN=localhost in updateCertIssuerOrSubject() 169 std::string_view key(tokenBegin, static_cast<size_t>(i - tokenBegin)); in updateCertIssuerOrSubject() 176 std::string_view val(tokenBegin, static_cast<size_t>(i - tokenBegin)); in updateCertIssuerOrSubject() 233 messages::internalError(asyncResp->res); in getCertificateList() 237 nlohmann::json& links = asyncResp->res.jsonValue[listPtr]; in getCertificateList() 254 "/redfish/v1/Managers/{}/NetworkProtocol/HTTPS/Certificates/{}", in getCertificateList() [all …]
|
H A D | fabric_adapters.hpp | 24 namespace redfish namespace 41 messages::internalError(asyncResp->res); in getFabricAdapterLocation() 46 asyncResp->res in getFabricAdapterLocation() 67 messages::internalError(asyncResp->res); in getFabricAdapterAsset() 84 messages::internalError(asyncResp->res); in getFabricAdapterAsset() 90 asyncResp->res.jsonValue["SerialNumber"] = *serialNumber; in getFabricAdapterAsset() 95 asyncResp->res.jsonValue["Model"] = *model; in getFabricAdapterAsset() 100 asyncResp->res.jsonValue["PartNumber"] = *partNumber; in getFabricAdapterAsset() 103 if (sparePartNumber != nullptr && !sparePartNumber->empty()) in getFabricAdapterAsset() 105 asyncResp->res.jsonValue["SparePartNumber"] = *sparePartNumber; in getFabricAdapterAsset() [all …]
|
H A D | systems_logservices_postcodes.hpp | 17 namespace redfish namespace 25 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSystemsLogServicesPostCodesGet() 32 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesPostCodesGet() 38 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesPostCodesGet() 42 asyncResp->res.jsonValue["@odata.id"] = in handleSystemsLogServicesPostCodesGet() 43 std::format("/redfish/v1/Systems/{}/LogServices/PostCodes", in handleSystemsLogServicesPostCodesGet() 45 asyncResp->res.jsonValue["@odata.type"] = "#LogService.v1_2_0.LogService"; in handleSystemsLogServicesPostCodesGet() 46 asyncResp->res.jsonValue["Name"] = "POST Code Log Service"; in handleSystemsLogServicesPostCodesGet() 47 asyncResp->res.jsonValue["Description"] = "POST Code Log Service"; in handleSystemsLogServicesPostCodesGet() 48 asyncResp->res.jsonValue["Id"] = "PostCodes"; in handleSystemsLogServicesPostCodesGet() [all …]
|
H A D | account_service.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 46 namespace redfish namespace 86 if (role == "priv-admin") in getRoleIdFromPrivilege() 90 if (role == "priv-user") in getRoleIdFromPrivilege() 94 if (role == "priv-operator") in getRoleIdFromPrivilege() 104 return "priv-admin"; in getPrivilegeFromRoleId() 108 return "priv-user"; in getPrivilegeFromRoleId() 112 return "priv-operator"; in getPrivilegeFromRoleId() 118 * @brief Maps user group names retrieved from D-Bus object to 133 if (userGroup == "redfish") in translateUserGroup() [all …]
|
H A D | systems_logservices_hostlogger.hpp | 16 namespace redfish namespace 26 "/redfish/v1/Systems/{}/LogServices/HostLogger/Entries/{}", in fillHostLoggerEntryJson() 41 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSystemsLogServicesHostloggerGet() 48 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesHostloggerGet() 54 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleSystemsLogServicesHostloggerGet() 58 asyncResp->res.jsonValue["@odata.id"] = in handleSystemsLogServicesHostloggerGet() 59 std::format("/redfish/v1/Systems/{}/LogServices/HostLogger", in handleSystemsLogServicesHostloggerGet() 61 asyncResp->res.jsonValue["@odata.type"] = "#LogService.v1_2_0.LogService"; in handleSystemsLogServicesHostloggerGet() 62 asyncResp->res.jsonValue["Name"] = "Host Logger Service"; in handleSystemsLogServicesHostloggerGet() 63 asyncResp->res.jsonValue["Description"] = "Host Logger Service"; in handleSystemsLogServicesHostloggerGet() [all …]
|
H A D | redfish_sessions.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 33 namespace redfish namespace 42 roles.emplace_back(redfish::getRoleIdFromPrivilege(session.userRole)); in fillSessionObject() 45 "/redfish/v1/SessionService/Sessions/{}", session.uniqueId); in fillSessionObject() 61 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSessionHead() 65 asyncResp->res.addHeader( in handleSessionHead() 67 "</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby"); in handleSessionHead() 75 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleSessionGet() 79 asyncResp->res.addHeader( in handleSessionGet() 81 "</redfish/v1/JsonSchemas/Session/Session.json>; rel=describedby"); in handleSessionGet() [all …]
|
H A D | manager_logservices_journal.hpp | 11 #include <systemd/sd-journal.h> 20 namespace redfish namespace 30 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) in getJournalMetadata() 66 BMCWEB_LOG_ERROR("Failed to read entry timestamp: {}", strerror(-ret)); in getEntryTimestamp() 69 entryTimestamp = redfish::time_utils::getDateTimeUintUs(timestamp); in getEntryTimestamp() 92 strerror(-ret)); in fillBMCJournalLogEntryJson() 103 BMCWEB_LOG_ERROR("Failed to read MESSAGE field: {}", strerror(-ret)); in fillBMCJournalLogEntryJson() 113 BMCWEB_LOG_DEBUG("Failed to read PRIORITY field: {}", strerror(-ret)); in fillBMCJournalLogEntryJson() 130 "/redfish/v1/Managers/{}/LogServices/Journal/Entries/{}", in fillBMCJournalLogEntryJson() 157 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleManagersLogServiceJournalGet() [all …]
|
H A D | update_service.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 55 namespace redfish namespace 59 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 61 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 64 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 67 // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) 72 int fd = -1; 81 other.fd = -1; in MemoryFileDescriptor() 88 if (fd != -1) in ~MemoryFileDescriptor() 96 if (lseek(fd, 0, SEEK_SET) == -1) in rewind() [all …]
|
H A D | managers.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 50 namespace redfish namespace 74 * @param[in] asyncResp - Shared pointer for completing asynchronous calls 86 // Create the D-Bus variant for D-Bus call. in doBMCGracefulRestart() 94 BMCWEB_LOG_DEBUG("[Set] Bad D-Bus request error: {}", ec); in doBMCGracefulRestart() 95 messages::internalError(asyncResp->res); in doBMCGracefulRestart() 99 messages::success(asyncResp->res); in doBMCGracefulRestart() 113 // Create the D-Bus variant for D-Bus call. in doBMCForceRestart() 121 BMCWEB_LOG_DEBUG("[Set] Bad D-Bus request error: {}", ec); in doBMCForceRestart() 122 messages::internalError(asyncResp->res); in doBMCForceRestart() [all …]
|
H A D | processor.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 44 namespace redfish namespace 47 // Interfaces which imply a D-Bus object represents a Processor 54 * requesting data from the given D-Bus object. 57 * @param[in] service D-Bus service to query. 58 * @param[in] objPath D-Bus object to query. 72 messages::internalError(asyncResp->res); in getProcessorUUID() 75 asyncResp->res.jsonValue["UUID"] = property; in getProcessorUUID() 86 asyncResp->res.jsonValue["Status"]["State"] = resource::State::Enabled; in getCpuDataByInterface() 87 asyncResp->res.jsonValue["Status"]["Health"] = resource::Health::OK; in getCpuDataByInterface() [all …]
|
H A D | pcie.hpp | 8 http://www.apache.org/licenses/LICENSE-2.0 35 namespace redfish namespace 69 messages::internalError(asyncResp->res); in handlePCIeDevicePath() 72 callback(pcieDevicePath, object.begin()->first); in handlePCIeDevicePath() 78 messages::resourceNotFound(asyncResp->res, "PCIeDevice", pcieDeviceId); in handlePCIeDevicePath() 95 BMCWEB_LOG_ERROR("D-Bus response error on GetSubTree {}", ec); in getValidPCIeDevicePath() 96 messages::internalError(asyncResp->res); in getValidPCIeDevicePath() 110 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handlePCIeDeviceCollectionGet() 117 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handlePCIeDeviceCollectionGet() 123 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handlePCIeDeviceCollectionGet() [all …]
|
H A D | bios.hpp | 10 namespace redfish namespace 20 if (!redfish::setUpRedfishRoute(app, req, asyncResp)) in handleBiosServiceGet() 27 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleBiosServiceGet() 33 messages::resourceNotFound(asyncResp->res, "ComputerSystem", in handleBiosServiceGet() 37 asyncResp->res.jsonValue["@odata.id"] = std::format( in handleBiosServiceGet() 38 "/redfish/v1/Systems/{}/Bios", BMCWEB_REDFISH_SYSTEM_URI_NAME); in handleBiosServiceGet() 39 asyncResp->res.jsonValue["@odata.type"] = "#Bios.v1_1_0.Bios"; in handleBiosServiceGet() 40 asyncResp->res.jsonValue["Name"] = "BIOS Configuration"; in handleBiosServiceGet() 41 asyncResp->res.jsonValue["Description"] = "BIOS Configuration Service"; in handleBiosServiceGet() 42 asyncResp->res.jsonValue["Id"] = "BIOS"; in handleBiosServiceGet() [all …]
|
H A D | fan.hpp | 22 namespace redfish namespace 32 nlohmann::json& fanList = asyncResp->res.jsonValue["Members"]; in updateFanList() 44 "/redfish/v1/Chassis/{}/ThermalSubsystem/Fans/{}", chassisId, in updateFanList() 49 asyncResp->res.jsonValue["Members@odata.count"] = fanList.size(); in updateFanList() 75 messages::internalError(asyncResp->res); in getFanPaths() 89 messages::resourceNotFound(asyncResp->res, "Chassis", chassisId); in doFanCollection() 93 asyncResp->res.addHeader( in doFanCollection() 95 "</redfish/v1/JsonSchemas/FanCollection/FanCollection.json>; rel=describedby"); in doFanCollection() 96 asyncResp->res.jsonValue["@odata.type"] = "#FanCollection.FanCollection"; in doFanCollection() 97 asyncResp->res.jsonValue["@odata.id"] = boost::urls::format( in doFanCollection() [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 | 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 | 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 …]
|
/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 | 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 | 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 | 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 …]
|