summaryrefslogtreecommitdiffstats
path: root/actions.hpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2017-01-22 00:58:54 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-02-01 16:28:34 -0500
commiteb68a687575b31d5d69a8ed9a26a2a0877ebec57 (patch)
tree72b3b071e737a6ab9adce5a83a42bf3ba01007d3 /actions.hpp
parentdb92c28ac9f354833753b451e4fba081c75d2564 (diff)
downloadphosphor-inventory-manager-eb68a687575b31d5d69a8ed9a26a2a0877ebec57.tar.gz
phosphor-inventory-manager-eb68a687575b31d5d69a8ed9a26a2a0877ebec57.zip
Add support for createObjects action
Change-Id: I999a5e506a236eac8ca0944b0e2b003c57612e54 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'actions.hpp')
-rw-r--r--actions.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/actions.hpp b/actions.hpp
index dfa1d00..634cbc9 100644
--- a/actions.hpp
+++ b/actions.hpp
@@ -3,6 +3,7 @@
#include <utility>
#include <memory>
#include "utils.hpp"
+#include "types.hpp"
namespace phosphor
{
@@ -48,6 +49,16 @@ inline auto destroyObjects(std::vector<const char*> paths)
};
}
+/** @brief Create objects action. */
+inline auto createObjects(
+ const std::map<sdbusplus::message::object_path, Object>& objs)
+{
+ return [&objs](auto&, auto & m)
+ {
+ m.createObjects(objs);
+ };
+}
+
/** @brief Set a property action.
*
* Invoke the requested method with a reference to the requested
OpenPOWER on IntegriCloud