summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-10-14 00:56:36 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-10-14 22:11:17 +0300
commit989cbcf37fea988ef6b76b9bc1cc5774bacda2cf (patch)
tree9d27faf8a6212d0833064e6e4893af1289123f01 /meta-openbmc-mods/meta-common/recipes-phosphor
parent5d3fc64c142786581d792d145231c835afbcdded (diff)
downloadopenbmc-989cbcf37fea988ef6b76b9bc1cc5774bacda2cf.tar.xz
Update to internal 0.74-82
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Add-retries-to-mapper-calls.patch72
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0029-Add-RedundantCount-property-for-PSU-redundancy.patch33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0003-bmcweb-changes-for-setting-ApplyOptions-ClearCfg.patch36
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0021-Define-PSU-redundancy-property.patch206
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0022-schema-add-missing-tags.patch51
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0023-OemComputerSystems-add-missing-odata.types.patch33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0024-EventService-Log-events-for-subscription-actions.patch178
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0025-Add-missing-Context-property-to-MetricReport.patch33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0026-http-status-code-for-subscriber-limit-exceed.patch33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend6
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend2
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend2
15 files changed, 678 insertions, 12 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Add-retries-to-mapper-calls.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Add-retries-to-mapper-calls.patch
new file mode 100644
index 000000000..429b23c7e
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager/0001-Add-retries-to-mapper-calls.patch
@@ -0,0 +1,72 @@
+From 40be5b0a1376ece0265aa42817fa8fd643fb18d9 Mon Sep 17 00:00:00 2001
+From: James Feist <james.feist@linux.intel.com>
+Date: Thu, 10 Sep 2020 14:49:25 -0700
+Subject: [PATCH 1/1] Add retries to mapper calls
+
+During cycling we're seeing sometimes we exit due
+to mapper errors. Put in retries to avoid EM shutting
+down.
+
+Tested: Saw retries happen and EM stay up
+
+Change-Id: I2caa4a7ca0ae17a621c23152b3c362442c45592e
+Signed-off-by: James Feist <james.feist@linux.intel.com>
+---
+ src/EntityManager.cpp | 27 ++++++++++++++++++++++-----
+ 1 file changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
+index ec38dde..c96725d 100644
+--- a/src/EntityManager.cpp
++++ b/src/EntityManager.cpp
+@@ -184,7 +184,7 @@ void getInterfaces(
+ // getManagedObjects
+ void findDbusObjects(std::vector<std::shared_ptr<PerformProbe>>&& probeVector,
+ boost::container::flat_set<std::string>&& interfaces,
+- std::shared_ptr<PerformScan> scan)
++ std::shared_ptr<PerformScan> scan, size_t retries = 5)
+ {
+
+ for (const auto& [interface, _] : scan->dbusProbeObjects)
+@@ -199,8 +199,8 @@ void findDbusObjects(std::vector<std::shared_ptr<PerformProbe>>&& probeVector,
+ // find all connections in the mapper that expose a specific type
+ SYSTEM_BUS->async_method_call(
+ [interfaces{std::move(interfaces)}, probeVector{std::move(probeVector)},
+- scan](boost::system::error_code& ec,
+- const GetSubTreeType& interfaceSubtree) {
++ scan, retries](boost::system::error_code& ec,
++ const GetSubTreeType& interfaceSubtree) mutable {
+ boost::container::flat_set<
+ std::tuple<std::string, std::string, std::string>>
+ interfaceConnections;
+@@ -212,8 +212,25 @@ void findDbusObjects(std::vector<std::shared_ptr<PerformProbe>>&& probeVector,
+ }
+ std::cerr << "Error communicating to mapper.\n";
+
+- // if we can't communicate to the mapper something is very wrong
+- std::exit(EXIT_FAILURE);
++ if (!retries)
++ {
++ // if we can't communicate to the mapper something is very
++ // wrong
++ std::exit(EXIT_FAILURE);
++ }
++ std::shared_ptr<boost::asio::steady_timer> timer =
++ std::make_shared<boost::asio::steady_timer>(io);
++ timer->expires_after(std::chrono::seconds(10));
++
++ timer->async_wait(
++ [timer, interfaces{std::move(interfaces)}, scan,
++ probeVector{std::move(probeVector)},
++ retries](const boost::system::error_code&) mutable {
++ findDbusObjects(std::move(probeVector),
++ std::move(interfaces), scan,
++ retries - 1);
++ });
++ return;
+ }
+
+ for (const auto& [path, object] : interfaceSubtree)
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
index cf402206b..f3f7d7ebe 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/configuration/entity-manager_%.bbappend
@@ -3,4 +3,4 @@ SRC_URI = "git://github.com/openbmc/entity-manager.git"
SRCREV = "e18edb5badc2e16181cfc464a6ccd0ef51dc4548"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
+SRC_URI += "file://0001-Add-retries-to-mapper-calls.patch"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
index cf9c3053f..da44737fd 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/datetime/pch-time-sync/pch-time-sync.service
@@ -10,4 +10,4 @@ StartLimitInterval=0
Type=simple
[Install]
-WantedBy=sysinit.target
+WantedBy=multi-user.target
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0029-Add-RedundantCount-property-for-PSU-redundancy.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0029-Add-RedundantCount-property-for-PSU-redundancy.patch
new file mode 100644
index 000000000..0655de44b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0029-Add-RedundantCount-property-for-PSU-redundancy.patch
@@ -0,0 +1,33 @@
+From 09f95d9d57a9a5e6c739444dec367cdf9bf4bc16 Mon Sep 17 00:00:00 2001
+From: Kuiying Wang <kuiying.wang@intel.com>
+Date: Tue, 1 Sep 2020 13:52:30 +0800
+Subject: [PATCH] Add RedundantCount property for PSU redundancy
+
+RedundantCount is the min number of PSUs in the system
+required to obtain redundancy
+
+Change-Id: Icdfd9d2c473a793d3792a335a04aff1838d7d99c
+Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
+---
+ .../Control/PowerSupplyRedundancy.interface.yaml | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml b/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
+index e02e0aa..7f7d27b 100644
+--- a/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
++++ b/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
+@@ -35,6 +35,11 @@ properties:
+ type: byte
+ description: >
+ Number of PSUs are currently on system.
++ - name: RedundantCount
++ type: byte
++ description: >
++ The min number of PSUs in the system required to obtain redundancy
++ default: 2
+
+ enumerations:
+ - name: Algo
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
index adebde874..2e471cef2 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces_%.bbappend
@@ -16,4 +16,5 @@ SRC_URI += "file://0005-Add-DBUS-interface-of-CPU-and-Memory-s-properties.patch
file://0026-Add-StandbySpare-support-for-software-inventory.patch \
file://0027-Apply-Options-interface-for-Software.patch \
file://0028-MCTP-Daemon-D-Bus-interface-definition.patch \
+ file://0029-Add-RedundantCount-property-for-PSU-redundancy.patch \
"
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
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
index daa64f159..68aa751db 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/sensors/dbus-sensors_%.bbappend
@@ -1,4 +1,4 @@
-SRCREV = "2456dde72421cd4086ac43e619fb0817a55bf0a7"
+SRCREV = "8aeffd91ff3434f7812e9fdb6b0b03c6119921dd"
#SRC_URI = "git://github.com/openbmc/dbus-sensors.git"
DEPENDS_append = " libgpiod libmctp"
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
index 4a188f28e..9c4a3c879 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/webui/phosphor-webui_%.bbappend
@@ -1,4 +1,4 @@
SRC_URI = "git://github.com/Intel-BMC/phosphor-webui;protocol=ssh;branch=intel2"
FILESEXTRAPATHS_prepend_intel := "${THISDIR}/${PN}:"
-SRCREV = "3348cfbfd54e52a795516bc4a906e128c1bc6bcf"
+SRCREV = "9db94c5d0e61c6cd5935e770c14a9ad6231da497"