regulators: Add Services to ActionEnvironment

Add Services& services to the ActionEnvironment constructor.
Add Services& getServices() to the ActionEnvironment class.
Add Services& services to the ActionEnvironment class.
Update the ActionEnvironment test for the new getServices() method.
Update classes that create an ActionEnvironment.
Update all affected testcases that create an ActionEnvironment.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I12ac9f301746965aa282b69432a71ad525739c9e
diff --git a/phosphor-regulators/test/actions/run_rule_action_tests.cpp b/phosphor-regulators/test/actions/run_rule_action_tests.cpp
index b688a78..23da62e 100644
--- a/phosphor-regulators/test/actions/run_rule_action_tests.cpp
+++ b/phosphor-regulators/test/actions/run_rule_action_tests.cpp
@@ -18,6 +18,7 @@
 #include "device.hpp"
 #include "id_map.hpp"
 #include "mock_action.hpp"
+#include "mock_services.hpp"
 #include "rule.hpp"
 #include "run_rule_action.hpp"
 
@@ -47,7 +48,8 @@
     try
     {
         IDMap idMap{};
-        ActionEnvironment env{idMap, ""};
+        MockServices services{};
+        ActionEnvironment env{idMap, "", services};
         RunRuleAction runRuleAction{"set_voltage_rule"};
         runRuleAction.execute(env);
         ADD_FAILURE() << "Should not have reached this line.";
@@ -77,7 +79,8 @@
         // Create ActionEnvironment
         IDMap idMap{};
         idMap.addRule(rule);
-        ActionEnvironment env{idMap, ""};
+        MockServices services{};
+        ActionEnvironment env{idMap, "", services};
 
         // Create RunRuleAction
         RunRuleAction runRuleAction{"exception_rule"};
@@ -100,7 +103,8 @@
         // Create ActionEnvironment
         IDMap idMap{};
         idMap.addRule(rule);
-        ActionEnvironment env{idMap, ""};
+        MockServices services{};
+        ActionEnvironment env{idMap, "", services};
 
         // Create RunRuleAction
         RunRuleAction runRuleAction{"infinite_rule"};
@@ -137,7 +141,8 @@
         // Create ActionEnvironment
         IDMap idMap{};
         idMap.addRule(rule);
-        ActionEnvironment env{idMap, ""};
+        MockServices services{};
+        ActionEnvironment env{idMap, "", services};
 
         // Create RunRuleAction
         RunRuleAction runRuleAction{"set_voltage_rule"};
@@ -169,7 +174,8 @@
         // Create ActionEnvironment
         IDMap idMap{};
         idMap.addRule(rule);
-        ActionEnvironment env{idMap, ""};
+        MockServices services{};
+        ActionEnvironment env{idMap, "", services};
 
         // Create RunRuleAction
         RunRuleAction runRuleAction{"set_voltage_rule"};