diff options
author | jmbills <42755197+jmbills@users.noreply.github.com> | 2020-10-16 23:18:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 23:18:48 +0300 |
commit | 68270ed7b1badbc28c382b429e2902f33e3785e1 (patch) | |
tree | 9d27faf8a6212d0833064e6e4893af1289123f01 /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces | |
parent | 0db3af3120d3d4c8a3945da3e74d4521c21c7359 (diff) | |
parent | 989cbcf37fea988ef6b76b9bc1cc5774bacda2cf (diff) | |
download | openbmc-68270ed7b1badbc28c382b429e2902f33e3785e1.tar.xz |
Merge pull request #51 from Intel-BMC/update
Update to internal 0.74-82
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces')
8 files changed, 568 insertions, 8 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch index 704031fe1..94dc4d14f 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch @@ -1,7 +1,7 @@ -From e883ea9d43a84998641428448d7220c0f5be72c0 Mon Sep 17 00:00:00 2001 +From c3948dcb2c472bcb2931e581bcec70004cc61bcf Mon Sep 17 00:00:00 2001 From: Vikram Bodireddy <vikram.bodireddy@intel.com> Date: Tue, 30 Jun 2020 22:09:10 +0530 -Subject: [PATCH] bmcweb changes for setting ApplyOptions-ClearCfg +Subject: [PATCH 1/1] bmcweb changes for setting ApplyOptions-ClearCfg ApplyOptions are used to specify firmware update specific options such as ClearConfig which is used while activating the updated @@ -16,19 +16,21 @@ Tested: Tested setting ClearConfig to true or false using PATCH Ran Redfish-Service-Validator and no new issues found. Signed-off-by: Vikram Bodireddy <vikram.bodireddy@intel.com> +Signed-off-by: James Feist <james.feist@linux.intel.com> --- - redfish-core/lib/update_service.hpp | 69 ++++++++++++++++++- - .../JsonSchemas/OemUpdateService/index.json | 69 +++++++++++++++++++ + redfish-core/lib/update_service.hpp | 71 ++++++++++++++++++- + static/redfish/v1/$metadata/index.xml | 5 +- + .../JsonSchemas/OemUpdateService/index.json | 69 ++++++++++++++++++ .../redfish/v1/schema/OemUpdateService_v1.xml | 40 +++++++++++ - 3 files changed, 177 insertions(+), 1 deletion(-) + 4 files changed, 183 insertions(+), 2 deletions(-) create mode 100644 static/redfish/v1/JsonSchemas/OemUpdateService/index.json create mode 100644 static/redfish/v1/schema/OemUpdateService_v1.xml diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp -index 86ddd8a..291acec 100644 +index bc68510..7ca3c69 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp -@@ -691,6 +691,29 @@ class UpdateService : public Node +@@ -691,6 +691,31 @@ class UpdateService : public Node "/xyz/openbmc_project/software/apply_time", "org.freedesktop.DBus.Properties", "Get", "xyz.openbmc_project.Software.ApplyTime", "RequestedApplyTime"); @@ -48,6 +50,8 @@ index 86ddd8a..291acec 100644 + + if (b) + { ++ aResp->res.jsonValue["Oem"]["ApplyOptions"]["@odata.type"] = ++ "#OemUpdateService.ApplyOptions"; + aResp->res.jsonValue["Oem"]["ApplyOptions"]["ClearConfig"] = + *b; + } @@ -58,7 +62,7 @@ index 86ddd8a..291acec 100644 } void doPatch(crow::Response& res, const crow::Request& req, -@@ -703,15 +726,59 @@ class UpdateService : public Node +@@ -703,15 +728,59 @@ class UpdateService : public Node std::optional<nlohmann::json> pushUriOptions; std::optional<std::vector<std::string>> imgTargets; std::optional<bool> imgTargetBusy; @@ -119,6 +123,22 @@ index 86ddd8a..291acec 100644 if (pushUriOptions) { std::optional<nlohmann::json> pushUriApplyTime; +diff --git a/static/redfish/v1/$metadata/index.xml b/static/redfish/v1/$metadata/index.xml +index 19f0fd9..09bddf3 100644 +--- a/static/redfish/v1/$metadata/index.xml ++++ b/static/redfish/v1/$metadata/index.xml +@@ -2502,7 +2502,10 @@ + <edmx:Reference Uri="/redfish/v1/schema/OemManager_v1.xml"> + <edmx:Include Namespace="OemManager"/> + </edmx:Reference> +- <edmx:Reference Uri="/redfish/v1/schema/OemCrashdump_v1.xml"> ++ <edmx:Reference Uri="/redfish/v1/schema/OemUpdateService_v1.xml"> ++ <edmx:Include Namespace="OemUpdateService"/> ++ </edmx:Reference> ++ <edmx:Reference Uri="/redfish/v1/schema/OemCrashdump_v1.xml"> + <edmx:Include Namespace="OemCrashdump.v1_0_0"/> + </edmx:Reference> + <edmx:Reference Uri="/redfish/v1/schema/OemComputerSystem_v1.xml"> diff --git a/static/redfish/v1/JsonSchemas/OemUpdateService/index.json b/static/redfish/v1/JsonSchemas/OemUpdateService/index.json new file mode 100644 index 0000000..74e39cd diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0021-Define-PSU-redundancy-property.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0021-Define-PSU-redundancy-property.patch new file mode 100644 index 000000000..1a3a45d58 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0021-Define-PSU-redundancy-property.patch @@ -0,0 +1,206 @@ +From fe04a2f507a5813f586acd1bf30d3a8694109144 Mon Sep 17 00:00:00 2001 +From: Kuiying Wang <kuiying.wang@intel.com> +Date: Wed, 26 Aug 2020 17:10:20 +0800 +Subject: [PATCH] Define PSU redundancy property. + +Currently PSU redundancy property is not implemented. + +Tested: +1. Passed redfish validator. +2. Redundancy property is shown in the redfish interace + redfish/v1/Chassis/WC_Baseboard/Power/ +"Redundancy": [ +{ +"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Power#/Redundancy/0" , +"@odata.type": "#Redundancy.v1_3_2.Redundancy" , +"MemberId": "PSURedundancy" , +"MinNumNeeded": 2 , +"Mode": "Failover" , +"Name": "PSURedundancy" , +"RedundancySet": [ +{ +"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Power#/PowerSupplies/0" +} , +{ +"@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Power#/PowerSupplies/1" +} +] , +"Status": { +"Health": "OK" , +"State": "Enabled" +} +} +] + +Change-Id: I58e44db8ea767d4c66f07638c43edec3bf6d2e53 +Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> + +%% original patch: 0021-Define-PSU-redundancy-property.patch + +Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> +--- + redfish-core/lib/sensors.hpp | 141 ++++++++++++++++++++++++++++++++++- + 1 file changed, 140 insertions(+), 1 deletion(-) + +diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp +index f12bbe0..48aa439 100644 +--- a/redfish-core/lib/sensors.hpp ++++ b/redfish-core/lib/sensors.hpp +@@ -1043,7 +1043,141 @@ void objectInterfacesToJson( + BMCWEB_LOG_DEBUG << "Added sensor " << sensorName; + } + +-static void ++inline void ++ populatePSURedundancy(std::shared_ptr<SensorsAsyncResp> sensorsAsyncResp) ++{ ++ crow::connections::systemBus->async_method_call( ++ [sensorsAsyncResp](const boost::system::error_code ec, ++ const GetSubTreeType& resp) { ++ if (ec) ++ { ++ return; // don't have to have this interface ++ } ++ for (const std::pair<std::string, ++ std::vector<std::pair< ++ std::string, std::vector<std::string>>>>& ++ pathPair : resp) ++ { ++ const std::string& path = pathPair.first; ++ const std::vector< ++ std::pair<std::string, std::vector<std::string>>>& objDict = ++ pathPair.second; ++ if (objDict.empty()) ++ { ++ continue; // this should be impossible ++ } ++ const std::string& owner = objDict.begin()->first; ++ ++ crow::connections::systemBus->async_method_call( ++ [path, owner, sensorsAsyncResp]( ++ const boost::system::error_code err, ++ const boost::container::flat_map< ++ std::string, std::variant<uint8_t, uint32_t, bool, ++ std::vector<uint8_t>, ++ std::string>>& ret) { ++ if (err) ++ { ++ BMCWEB_LOG_ERROR ++ << "Failed to call PSU redundancy interface"; ++ messages::internalError(sensorsAsyncResp->res); ++ return; ++ } ++ ++ auto findPSUNumber = ret.find("PSUNumber"); ++ auto findRedundantCount = ret.find("RedundantCount"); ++ auto findEnabled = ++ ret.find("PowerSupplyRedundancyEnabled"); ++ if (findPSUNumber == ret.end() || ++ findRedundantCount == ret.end() || ++ findEnabled == ret.end()) ++ { ++ BMCWEB_LOG_ERROR << "Failed to find PSUNumber | " ++ "PowerSupplyRedundancyEnabled"; ++ messages::internalError(sensorsAsyncResp->res); ++ return; ++ } ++ ++ auto psuNumber = ++ std::get_if<uint8_t>(&(findPSUNumber->second)); ++ auto enabled = ++ std::get_if<bool>(&(findEnabled->second)); ++ auto redundantCount = ++ std::get_if<uint8_t>(&(findRedundantCount->second)); ++ ++ if (psuNumber == nullptr || enabled == nullptr || ++ redundantCount == nullptr) ++ { ++ BMCWEB_LOG_ERROR ++ << "Invalid PSU redundancy property " ++ "types"; ++ messages::internalError(sensorsAsyncResp->res); ++ return; ++ } ++ ++ std::string health; ++ std::string state; ++ size_t minNumNeeded = *redundantCount; ++ if (*enabled) ++ { ++ state = "Enabled"; ++ } ++ else ++ { ++ state = "Disabled"; ++ } ++ if (*psuNumber >= minNumNeeded) ++ { ++ health = "OK"; ++ } ++ else ++ { ++ health = "Warning"; ++ } ++ ++ nlohmann::json& jResp = ++ sensorsAsyncResp->res.jsonValue["Redundancy"]; ++ jResp.push_back( ++ {{"@odata.id", ++ "/redfish/v1/Chassis/" + ++ sensorsAsyncResp->chassisId + "/" + ++ sensorsAsyncResp->chassisSubNode + ++ "#/Redundancy/" + ++ std::to_string(jResp.size())}, ++ {"@odata.type", "#Redundancy.v1_3_2.Redundancy"}, ++ {"MemberId", "PSURedundancy"}, ++ {"MinNumNeeded", minNumNeeded}, ++ {"Mode", "Failover"}, ++ {"Name", "PSURedundancy"}, ++ {"RedundancySet", nlohmann::json::array()}, ++ {"Status", ++ {{"Health", health}, {"State", state}}}}); ++ nlohmann::json& redundancySet = ++ jResp[0]["RedundancySet"]; ++ const nlohmann::json& psuRedfish = ++ sensorsAsyncResp->res.jsonValue["PowerSupplies"]; ++ for (auto& schemaItem : psuRedfish) ++ { ++ auto inputPower = schemaItem["PowerInputWatts"]; ++ if (inputPower > 0) ++ { ++ redundancySet.push_back( ++ {{"@odata.id", schemaItem["@odata.id"]}}); ++ } ++ } ++ }, ++ owner, path, "org.freedesktop.DBus.Properties", "GetAll", ++ "xyz.openbmc_project.Control.PowerSupplyRedundancy"); ++ } ++ }, ++ "xyz.openbmc_project.ObjectMapper", ++ "/xyz/openbmc_project/object_mapper", ++ "xyz.openbmc_project.ObjectMapper", "GetSubTree", ++ "/xyz/openbmc_project/control", 2, ++ std::array<const char*, 1>{ ++ "xyz.openbmc_project.Control.PowerSupplyRedundancy"}); ++} ++ ++inline void + populateFanRedundancy(std::shared_ptr<SensorsAsyncResp> sensorsAsyncResp) + { + crow::connections::systemBus->async_method_call( +@@ -2581,6 +2715,11 @@ void getSensorData( + { + populateFanRedundancy(SensorsAsyncResp); + } ++ else if (SensorsAsyncResp->chassisSubNode == ++ sensors::node::power) ++ { ++ populatePSURedundancy(SensorsAsyncResp); ++ } + } + BMCWEB_LOG_DEBUG << "getManagedObjectsCb exit"; + }; +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0022-schema-add-missing-tags.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0022-schema-add-missing-tags.patch new file mode 100644 index 000000000..f7564c8a6 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0022-schema-add-missing-tags.patch @@ -0,0 +1,51 @@ +From bbf1a93eb6935c426deb0ecbcf3d8611b17aeb30 Mon Sep 17 00:00:00 2001 +From: James Feist <james.feist@linux.intel.com> +Date: Tue, 22 Sep 2020 17:09:03 -0700 +Subject: [PATCH] schema: add missing tags + +Tested: Made validator pass for OemManager + +Change-Id: I2acef893bb5ead465ebdfb631259f34f8e93031d +Signed-off-by: James Feist <james.feist@linux.intel.com> +--- + static/redfish/v1/schema/OemAccountService_v1.xml | 2 +- + static/redfish/v1/schema/OemManager_v1.xml | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/static/redfish/v1/schema/OemAccountService_v1.xml b/static/redfish/v1/schema/OemAccountService_v1.xml +index c5783ca..7d58b2b 100644 +--- a/static/redfish/v1/schema/OemAccountService_v1.xml ++++ b/static/redfish/v1/schema/OemAccountService_v1.xml +@@ -25,7 +25,7 @@ + <Annotation Term="Redfish.OwningEntity" String="OpenBMC"/> + <Annotation Term="Redfish.Release" String="1.0"/> + +- <ComplexType Name="AuthMethodsConfig"> ++ <ComplexType Name="AuthMethodsConfig" BaseType="Resource.OemObject"> + <Annotation Term="OData.AdditionalProperties" Bool="false"/> + <Annotation Term="OData.Description" String="Authorization Methods configuration."/> + <Annotation Term="OData.LongDescription" String="Configuration describing which auth methods are enabled."/> +diff --git a/static/redfish/v1/schema/OemManager_v1.xml b/static/redfish/v1/schema/OemManager_v1.xml +index 26498f0..9a7a8c4 100644 +--- a/static/redfish/v1/schema/OemManager_v1.xml ++++ b/static/redfish/v1/schema/OemManager_v1.xml +@@ -28,14 +28,14 @@ + <Property Name="OpenBmc" Type="OemManager.OpenBmc"/> + </ComplexType> + +- <ComplexType Name="OpenBmc"> ++ <ComplexType Name="OpenBmc" BaseType="Resource.OemObject"> + <Annotation Term="OData.AdditionalProperties" Bool="true" /> + <Annotation Term="OData.Description" String="Oem properties for OpenBmc." /> + <Annotation Term="OData.AutoExpand"/> + <Property Name="Fan" Type="OemManager.Fan"/> + </ComplexType> + +- <ComplexType Name="Fan"> ++ <ComplexType Name="Fan" BaseType="Resource.OemObject"> + <Annotation Term="OData.AdditionalProperties" Bool="true" /> + <Annotation Term="OData.Description" String="OpenBmc oem fan properties." /> + <Annotation Term="OData.AutoExpand"/> +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0023-OemComputerSystems-add-missing-odata.types.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0023-OemComputerSystems-add-missing-odata.types.patch new file mode 100644 index 000000000..cab95c008 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0023-OemComputerSystems-add-missing-odata.types.patch @@ -0,0 +1,33 @@ +From cf618cc42f1baa3531385d53e25df517f41e668a Mon Sep 17 00:00:00 2001 +From: James Feist <james.feist@linux.intel.com> +Date: Wed, 23 Sep 2020 14:40:47 -0700 +Subject: [PATCH 1/1] OemComputerSystems: add missing odata.types + +odata.type wasn't added causing the validator to fail. + +Tested: Validator errors went away + +Change-Id: I26e2f4ba13051d6d3e18ddc94eac13bca1bad71c +Signed-off-by: James Feist <james.feist@linux.intel.com> +--- + redfish-core/lib/systems.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp +index 0788e84..9220279 100644 +--- a/redfish-core/lib/systems.hpp ++++ b/redfish-core/lib/systems.hpp +@@ -1412,6 +1412,10 @@ inline void getProvisioningStatus(std::shared_ptr<AsyncResp> aResp) + propertiesList) { + nlohmann::json& oemPFR = + aResp->res.jsonValue["Oem"]["OpenBmc"]["FirmwareProvisioning"]; ++ aResp->res.jsonValue["Oem"]["OpenBmc"]["@odata.type"] = ++ "#OemComputerSystem.OpenBmc"; ++ oemPFR["@odata.type"] = "#OemComputerSystem.FirmwareProvisioning"; ++ + if (ec) + { + BMCWEB_LOG_DEBUG << "DBUS response error " << ec; +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0024-EventService-Log-events-for-subscription-actions.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0024-EventService-Log-events-for-subscription-actions.patch new file mode 100644 index 000000000..2543c1d09 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0024-EventService-Log-events-for-subscription-actions.patch @@ -0,0 +1,178 @@ +From c9d0aca4db7cfb646da38f1ac3fabe13790b6f3c Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Thu, 24 Sep 2020 03:04:36 +0530 +Subject: [PATCH] EventService: Log events for subscription actions + +Log the redfish event for below 3 actions + - Add new subscription + - Update existing subscription properties + - Delete existing subscription + +Tested: + - Performed all the above actions and verified + the redfish events. + +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/include/event_service_manager.hpp | 33 ++++++++++++++--- + .../registries/openbmc_message_registry.hpp | 41 +++++++++++++++++++++- + redfish-core/lib/event_service.hpp | 2 +- + 3 files changed, 70 insertions(+), 6 deletions(-) + +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index fd42985..8397159 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -20,6 +20,7 @@ + #include "registries/openbmc_message_registry.hpp" + + #include <sys/inotify.h> ++#include <systemd/sd-journal.h> + + #include <boost/asio/io_context.hpp> + #include <boost/container/flat_map.hpp> +@@ -763,7 +764,7 @@ class EventServiceManager + return; + } + +- void updateSubscriptionData() ++ void persistSubscriptionData() + { + // Persist the config and subscription data. + nlohmann::json jsonData; +@@ -858,7 +859,7 @@ class EventServiceManager + + if (updateConfig) + { +- updateSubscriptionData(); ++ persistSubscriptionData(); + } + + if (updateRetryCfg) +@@ -945,7 +946,7 @@ class EventServiceManager + + if (updateFile) + { +- updateSubscriptionData(); ++ persistSubscriptionData(); + } + + #ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES +@@ -958,6 +959,12 @@ class EventServiceManager + subValue->updateRetryConfig(retryAttempts, retryTimeoutInterval); + subValue->updateRetryPolicy(); + ++ /* Log event for subscription addition */ ++ sd_journal_send("MESSAGE=Event subscription added(Id: %s)", id.c_str(), ++ "PRIORITY=%i", LOG_INFO, "REDFISH_MESSAGE_ID=%s", ++ "OpenBMC.0.1.EventSubscriptionAdded", ++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL); ++ + return id; + } + +@@ -978,10 +985,28 @@ class EventServiceManager + { + subscriptionsMap.erase(obj); + updateNoOfSubscribersCount(); +- updateSubscriptionData(); ++ persistSubscriptionData(); ++ /* Log event for subscription delete. */ ++ sd_journal_send("MESSAGE=Event subscription removed.(Id = %s)", ++ id.c_str(), "PRIORITY=%i", LOG_INFO, ++ "REDFISH_MESSAGE_ID=%s", ++ "OpenBMC.0.1.EventSubscriptionRemoved", ++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL); + } + } + ++ void updateSubscription(const std::string& id) ++ { ++ persistSubscriptionData(); ++ ++ /* Log event for subscription delete. */ ++ sd_journal_send("MESSAGE=Event subscription updated.(Id = %s)", ++ id.c_str(), "PRIORITY=%i", LOG_INFO, ++ "REDFISH_MESSAGE_ID=%s", ++ "OpenBMC.0.1.EventSubscriptionUpdated", ++ "REDFISH_MESSAGE_ARGS=%s", id.c_str(), NULL); ++ } ++ + size_t getNumberOfSubscriptions() + { + return subscriptionsMap.size(); +diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp +index 58c085d..6f1fec3 100644 +--- a/redfish-core/include/registries/openbmc_message_registry.hpp ++++ b/redfish-core/include/registries/openbmc_message_registry.hpp +@@ -29,7 +29,7 @@ const Header header = { + "0.1.0", + "OpenBMC", + }; +-constexpr std::array<MessageEntry, 185> registry = { ++constexpr std::array<MessageEntry, 188> registry = { + MessageEntry{ + "ADDDCCorrectable", + { +@@ -403,6 +403,45 @@ constexpr std::array<MessageEntry, 185> registry = { + {}, + "None.", + }}, ++ MessageEntry{"EventSubscriptionAdded", ++ { ++ "Indicates that an Event subscription with specific " ++ "id was added.", ++ "Event subscription with id %1 was added.", ++ "OK", ++ "OK", ++ 1, ++ { ++ "string", ++ }, ++ "None.", ++ }}, ++ MessageEntry{"EventSubscriptionRemoved", ++ { ++ "Indicates that an Event subscription with specific " ++ "id was removed.", ++ "Event subscription with id %1 was removed.", ++ "OK", ++ "OK", ++ 1, ++ { ++ "string", ++ }, ++ "None.", ++ }}, ++ MessageEntry{"EventSubscriptionUpdated", ++ { ++ "Indicates that an Event subscription with specific " ++ " id was updated.", ++ "Event subscription with id %1 was updated.", ++ "OK", ++ "OK", ++ 1, ++ { ++ "string", ++ }, ++ "None.", ++ }}, + MessageEntry{"FanInserted", + { + "Indicates that a system fan has been inserted.", +diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp +index b91b745..351f689 100644 +--- a/redfish-core/lib/event_service.hpp ++++ b/redfish-core/lib/event_service.hpp +@@ -694,7 +694,7 @@ class EventDestination : public Node + subValue->updateRetryPolicy(); + } + +- EventServiceManager::getInstance().updateSubscriptionData(); ++ EventServiceManager::getInstance().updateSubscription(params[0]); + } + + void doDelete(crow::Response& res, const crow::Request& req, +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Add-missing-Context-property-to-MetricReport.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Add-missing-Context-property-to-MetricReport.patch new file mode 100644 index 000000000..ecf791fcb --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Add-missing-Context-property-to-MetricReport.patch @@ -0,0 +1,33 @@ +From a8c8b39ce42b9360ee5419b1346e9d8899693bfc Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Thu, 24 Sep 2020 01:12:11 +0530 +Subject: [PATCH] Add missing Context property to MetricReport + +MetricReport schema version 1.3.1 added Context +property which is missing in implementation. + +Tested: + - Recieved MetricReport data on Listner has + context in it. + +Change-Id: Iafd37902b2295c9ed91e7b68e60303b37d32a89f +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/include/event_service_manager.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp +index 22d1f10..fd42985 100644 +--- a/redfish-core/include/event_service_manager.hpp ++++ b/redfish-core/include/event_service_manager.hpp +@@ -548,6 +548,7 @@ class Subscription + {"@odata.type", "#MetricReport.v1_3_0.MetricReport"}, + {"Id", id}, + {"Name", id}, ++ {"Context", this->customText}, + {"Timestamp", readingsTs}, + {"MetricReportDefinition", {{"@odata.id", metricReportDef}}}, + {"MetricValues", metricValuesArray}}; +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0026-http-status-code-for-subscriber-limit-exceed.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0026-http-status-code-for-subscriber-limit-exceed.patch new file mode 100644 index 000000000..dc298ea59 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0026-http-status-code-for-subscriber-limit-exceed.patch @@ -0,0 +1,33 @@ +From fd0fac037fea6414cdafda27b4b71f486802e68d Mon Sep 17 00:00:00 2001 +From: AppaRao Puli <apparao.puli@linux.intel.com> +Date: Thu, 24 Sep 2020 01:16:25 +0530 +Subject: [PATCH] http status code for subscriber limit exceed + +Correct the http status code for subscribers +limit exceed. It should be 503 - Service unavailable. + +Tested: + - Created 20 subscribers and it return proper status code. + +Change-Id: Iad6242c8b842ad7ae7fd7ac39790004a581c52a8 +Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com> +--- + redfish-core/src/error_messages.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp +index 290d3f2..1cc8191 100644 +--- a/redfish-core/src/error_messages.cpp ++++ b/redfish-core/src/error_messages.cpp +@@ -624,7 +624,7 @@ nlohmann::json eventSubscriptionLimitExceeded(void) + + void eventSubscriptionLimitExceeded(crow::Response& res) + { +- res.result(boost::beast::http::status::forbidden); ++ res.result(boost::beast::http::status::service_unavailable); + addMessageToErrorJson(res.jsonValue, eventSubscriptionLimitExceeded()); + } + +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index 52598bf15..f36be0d15 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -35,6 +35,12 @@ SRC_URI += "file://0001-Firmware-update-support-for-StandBySpare.patch \ file://0018-Add-sse-event-sequence-number.patch \ file://0019-EventService-Limit-SSE-connections-as-per-design.patch \ file://0020-EventService-Validate-SSE-query-filters.patch \ + file://0021-Define-PSU-redundancy-property.patch \ + file://0022-schema-add-missing-tags.patch \ + file://0023-OemComputerSystems-add-missing-odata.types.patch \ + file://0024-EventService-Log-events-for-subscription-actions.patch \ + file://0025-Add-missing-Context-property-to-MetricReport.patch \ + file://0026-http-status-code-for-subscriber-limit-exceed.patch \ " # Temporary downstream mirror of upstream patches, see telemetry\README for details |