control: Support state parameter on net decrease target action
The net increase target action supports the use of a parameter to
determine the state at which group members must be at to request an
increase delta. The net decrease target action should also support the
use of a parameter to determine the state for decreases.
Change-Id: Ied883c70566b19bacfa1f76cc2a6c738c1cea85a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/actions/net_target_decrease.hpp b/control/json/actions/net_target_decrease.hpp
index 76a7f44..a0e1790 100644
--- a/control/json/actions/net_target_decrease.hpp
+++ b/control/json/actions/net_target_decrease.hpp
@@ -75,6 +75,9 @@
* dbus objects are processed, the minimum net target decrease calculated is
* requested on the zone.
*
+ * The state value can be specified in the JSON, or as a Manager parameter
+ * that another action will have set.
+ *
* @param[in] zone - Zone to run the action on
*/
void run(Zone& zone) override;
@@ -83,6 +86,12 @@
/* State the members must be at to decrease the target */
PropertyVariantType _state;
+ /**
+ * The Manager parameter to use to get the state value if that
+ * was the method specified in the JSON.
+ */
+ std::string _stateParameter;
+
/* Decrease delta for this action */
uint64_t _delta;