diff options
author | Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> | 2018-01-23 04:47:06 -0600 |
---|---|---|
committer | Tom Joseph <tomjoseph@in.ibm.com> | 2018-02-06 05:17:46 +0000 |
commit | 5c0beec1c30e2702e18359989ed16052ae222767 (patch) | |
tree | 8302db55f3c85bf3d8214c14f9bc49f09efc56c7 /utils.cpp | |
parent | b1e8fba50af2310136c6f92ab8765bf27aa5cec2 (diff) | |
download | phosphor-host-ipmid-5c0beec1c30e2702e18359989ed16052ae222767.tar.gz phosphor-host-ipmid-5c0beec1c30e2702e18359989ed16052ae222767.zip |
Support Get Sensor Thresholds Command
Adding support for sensor thresholds command
Resolves openbmc/openbmc#2624
Change-Id: I904c1b18c8709bceb7ecb7eec6e8e42e1f51525a
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Diffstat (limited to 'utils.cpp')
-rw-r--r-- | utils.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -198,6 +198,31 @@ PropertyMap getAllDbusProperties(sdbusplus::bus::bus& bus, return properties; } +ObjectValueTree getManagedObjects(sdbusplus::bus::bus& bus, + const std::string& service, + const std::string& objPath) +{ + ipmi::ObjectValueTree interfaces; + + auto method = bus.new_method_call( + service.c_str(), + objPath.c_str(), + "org.freedesktop.DBus.ObjectManager", + "GetManagedObjects"); + + auto reply = bus.call(method); + + if (reply.is_method_error()) + { + log<level::ERR>("Failed to get managed objects", + entry("PATH=%s", objPath.c_str())); + elog<InternalFailure>(); + } + + reply.read(interfaces); + return interfaces; +} + void setDbusProperty(sdbusplus::bus::bus& bus, const std::string& service, const std::string& objPath, |