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/src/configuration.cpp b/phosphor-regulators/src/configuration.cpp
index 81b2c17..04babc7 100644
--- a/phosphor-regulators/src/configuration.cpp
+++ b/phosphor-regulators/src/configuration.cpp
@@ -56,7 +56,8 @@
services.getJournal().logDebug(message);
// Create ActionEnvironment
- ActionEnvironment environment{system.getIDMap(), device.getID()};
+ ActionEnvironment environment{system.getIDMap(), device.getID(),
+ services};
if (volts.has_value())
{
environment.setVolts(volts.value());