Andrew Geissler | 3652902 | 2016-11-29 15:23:54 -0600 | [diff] [blame] | 1 | #include <iostream> |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 2 | #include <map> |
| 3 | #include <string> |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 4 | #include <systemd/sd-bus.h> |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 5 | #include <sdbusplus/server.hpp> |
Saqib Khan | a8006a2 | 2017-02-14 11:37:08 -0600 | [diff] [blame] | 6 | #include <phosphor-logging/log.hpp> |
Andrew Geissler | 3652902 | 2016-11-29 15:23:54 -0600 | [diff] [blame] | 7 | #include "host_state_manager.hpp" |
| 8 | |
| 9 | namespace phosphor |
| 10 | { |
| 11 | namespace state |
| 12 | { |
| 13 | namespace manager |
| 14 | { |
| 15 | |
Andrew Geissler | 3e3b84b | 2016-12-02 15:46:17 -0600 | [diff] [blame] | 16 | // When you see server:: you know we're referencing our base class |
| 17 | namespace server = sdbusplus::xyz::openbmc_project::State::server; |
| 18 | |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 19 | using namespace phosphor::logging; |
| 20 | |
Josh D. King | ca35792 | 2017-04-11 13:44:09 -0500 | [diff] [blame] | 21 | constexpr auto HOST_STATE_POWEROFF_TGT = "obmc-host-stop@0.target"; |
| 22 | constexpr auto HOST_STATE_POWERON_TGT = "obmc-host-start@0.target"; |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 23 | constexpr auto HOST_STATE_QUIESCE_TGT = "obmc-quiesce-host@0.target"; |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 24 | |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 25 | constexpr auto ACTIVE_STATE = "active"; |
| 26 | constexpr auto ACTIVATING_STATE = "activating"; |
| 27 | |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 28 | /* Map a transition to it's systemd target */ |
| 29 | const std::map<server::Host::Transition,std::string> SYSTEMD_TARGET_TABLE = |
| 30 | { |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 31 | {server::Host::Transition::Off, HOST_STATE_POWEROFF_TGT}, |
| 32 | {server::Host::Transition::On, HOST_STATE_POWERON_TGT} |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1"; |
| 36 | constexpr auto SYSTEMD_OBJ_PATH = "/org/freedesktop/systemd1"; |
| 37 | constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager"; |
| 38 | |
| 39 | constexpr auto SYSTEM_SERVICE = "org.openbmc.managers.System"; |
| 40 | constexpr auto SYSTEM_OBJ_PATH = "/org/openbmc/managers/System"; |
| 41 | constexpr auto SYSTEM_INTERFACE = SYSTEM_SERVICE; |
| 42 | |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 43 | constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper"; |
Leonel Gonzalez | f318d87 | 2017-03-16 13:47:49 -0500 | [diff] [blame] | 44 | constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper"; |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 45 | constexpr auto MAPPER_INTERFACE = "xyz.openbmc_project.ObjectMapper"; |
| 46 | |
Saqib Khan | cbe08d1 | 2017-03-10 01:29:20 -0600 | [diff] [blame] | 47 | constexpr auto REBOOTCOUNTER_SERVICE("org.openbmc.Sensors"); |
| 48 | constexpr auto REBOOTCOUNTER_PATH("/org/openbmc/sensors/host/BootCount"); |
| 49 | constexpr auto REBOOTCOUNTER_INTERFACE("org.openbmc.SensorValue"); |
| 50 | |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 51 | constexpr auto SYSTEMD_PROPERTY_IFACE = "org.freedesktop.DBus.Properties"; |
| 52 | constexpr auto SYSTEMD_INTERFACE_UNIT = "org.freedesktop.systemd1.Unit"; |
| 53 | |
Saqib Khan | cbe08d1 | 2017-03-10 01:29:20 -0600 | [diff] [blame] | 54 | const sdbusplus::message::variant<int> DEFAULT_BOOTCOUNT = 2; |
| 55 | |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 56 | |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 57 | /* Map a system state to the HostState */ |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 58 | const std::map<std::string, server::Host::HostState> SYS_HOST_STATE_TABLE = { |
| 59 | {"HOST_BOOTING", server::Host::HostState::Running}, |
Saqib Khan | adaa721 | 2017-02-23 13:19:28 -0600 | [diff] [blame] | 60 | {"HOST_POWERED_OFF", server::Host::HostState::Off}, |
| 61 | {"HOST_QUIESCED", server::Host::HostState::Quiesced} |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 62 | }; |
| 63 | |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 64 | void Host::subscribeToSystemdSignals() |
| 65 | { |
| 66 | auto method = this->bus.new_method_call(SYSTEMD_SERVICE, |
| 67 | SYSTEMD_OBJ_PATH, |
| 68 | SYSTEMD_INTERFACE, |
| 69 | "Subscribe"); |
| 70 | this->bus.call_noreply(method); |
| 71 | |
| 72 | return; |
| 73 | } |
| 74 | |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 75 | // TODO - Will be rewritten once sdbusplus client bindings are in place |
| 76 | // and persistent storage design is in place |
| 77 | void Host::determineInitialState() |
| 78 | { |
| 79 | std::string sysState; |
| 80 | |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 81 | auto method = this->bus.new_method_call(SYSTEM_SERVICE, |
| 82 | SYSTEM_OBJ_PATH, |
| 83 | SYSTEM_INTERFACE, |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 84 | "getSystemState"); |
| 85 | |
| 86 | auto reply = this->bus.call(method); |
| 87 | |
| 88 | reply.read(sysState); |
| 89 | |
| 90 | if(sysState == "HOST_BOOTED") |
| 91 | { |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 92 | log<level::INFO>("Initial Host State will be Running", |
| 93 | entry("CURRENT_HOST_STATE=%s", |
| 94 | convertForMessage(HostState::Running).c_str())); |
Andrew Geissler | 9792414 | 2017-01-24 16:10:18 -0600 | [diff] [blame] | 95 | server::Host::currentHostState(HostState::Running); |
| 96 | server::Host::requestedHostTransition(Transition::On); |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 97 | } |
| 98 | else |
| 99 | { |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 100 | log<level::INFO>("Initial Host State will be Off", |
| 101 | entry("CURRENT_HOST_STATE=%s", |
| 102 | convertForMessage(HostState::Off).c_str())); |
Andrew Geissler | 9792414 | 2017-01-24 16:10:18 -0600 | [diff] [blame] | 103 | server::Host::currentHostState(HostState::Off); |
| 104 | server::Host::requestedHostTransition(Transition::Off); |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | // Set transition initially to Off |
| 108 | // TODO - Eventually need to restore this from persistent storage |
Andrew Geissler | 3e3b84b | 2016-12-02 15:46:17 -0600 | [diff] [blame] | 109 | server::Host::requestedHostTransition(Transition::Off); |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 110 | |
| 111 | return; |
| 112 | } |
| 113 | |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 114 | void Host::executeTransition(Transition tranReq) |
| 115 | { |
| 116 | auto sysdUnit = SYSTEMD_TARGET_TABLE.find(tranReq)->second; |
| 117 | |
| 118 | auto method = this->bus.new_method_call(SYSTEMD_SERVICE, |
| 119 | SYSTEMD_OBJ_PATH, |
| 120 | SYSTEMD_INTERFACE, |
| 121 | "StartUnit"); |
| 122 | |
| 123 | method.append(sysdUnit); |
| 124 | method.append("replace"); |
| 125 | |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 126 | this->bus.call_noreply(method); |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 127 | |
| 128 | return; |
| 129 | } |
| 130 | |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 131 | bool Host::stateActive(const std::string& target) |
| 132 | { |
| 133 | sdbusplus::message::variant<std::string> currentState; |
| 134 | sdbusplus::message::object_path unitTargetPath; |
| 135 | |
| 136 | auto method = this->bus.new_method_call(SYSTEMD_SERVICE, |
| 137 | SYSTEMD_OBJ_PATH, |
| 138 | SYSTEMD_INTERFACE, |
| 139 | "GetUnit"); |
| 140 | |
| 141 | method.append(target); |
| 142 | auto result = this->bus.call(method); |
| 143 | |
| 144 | //Check that the bus call didn't result in an error |
| 145 | if(result.is_method_error()) |
| 146 | { |
| 147 | log<level::ERR>("Error in bus call - could not resolve GetUnit for:", |
| 148 | entry(" %s", SYSTEMD_INTERFACE)); |
| 149 | return false; |
| 150 | } |
| 151 | |
| 152 | result.read(unitTargetPath); |
| 153 | |
| 154 | method = this->bus.new_method_call(SYSTEMD_SERVICE, |
| 155 | static_cast<const std::string&> |
| 156 | (unitTargetPath).c_str(), |
| 157 | SYSTEMD_PROPERTY_IFACE, |
| 158 | "Get"); |
| 159 | |
| 160 | method.append(SYSTEMD_INTERFACE_UNIT, "ActiveState"); |
| 161 | result = this->bus.call(method); |
| 162 | |
| 163 | //Check that the bus call didn't result in an error |
| 164 | if(result.is_method_error()) |
| 165 | { |
| 166 | log<level::ERR>("Error in bus call - could not resolve Get for:", |
| 167 | entry(" %s", SYSTEMD_PROPERTY_IFACE)); |
| 168 | return false; |
| 169 | } |
| 170 | |
| 171 | result.read(currentState); |
| 172 | |
| 173 | if(currentState != ACTIVE_STATE && currentState != ACTIVATING_STATE) |
| 174 | { |
| 175 | //False - not active |
| 176 | return false; |
| 177 | } |
| 178 | //True - active |
| 179 | return true; |
| 180 | } |
| 181 | |
| 182 | |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 183 | bool Host::isAutoReboot() |
| 184 | { |
| 185 | sdbusplus::message::variant<std::string> autoRebootParam; |
| 186 | std::string strParam; |
| 187 | |
| 188 | std::string HOST_PATH("/org/openbmc/settings/host0"); |
| 189 | std::string HOST_INTERFACE("org.openbmc.settings.Host"); |
| 190 | |
| 191 | auto mapper = this->bus.new_method_call(MAPPER_BUSNAME, |
| 192 | MAPPER_PATH, |
| 193 | MAPPER_INTERFACE, |
| 194 | "GetObject"); |
| 195 | |
| 196 | mapper.append(HOST_PATH, std::vector<std::string>({HOST_INTERFACE})); |
| 197 | auto mapperResponseMsg = this->bus.call(mapper); |
| 198 | |
| 199 | if (mapperResponseMsg.is_method_error()) |
| 200 | { |
| 201 | log<level::ERR>("Error in mapper call"); |
| 202 | return false; |
| 203 | } |
| 204 | |
| 205 | std::map<std::string, std::vector<std::string>> mapperResponse; |
| 206 | mapperResponseMsg.read(mapperResponse); |
| 207 | if (mapperResponse.empty()) |
| 208 | { |
| 209 | log<level::ERR>("Error reading mapper response"); |
| 210 | return false; |
| 211 | } |
| 212 | |
| 213 | const auto& host = mapperResponse.begin()->first; |
| 214 | |
| 215 | auto method = this->bus.new_method_call(host.c_str(), |
| 216 | HOST_PATH.c_str(), |
| 217 | "org.freedesktop.DBus.Properties", |
| 218 | "Get"); |
| 219 | |
| 220 | method.append(HOST_INTERFACE.c_str(), "auto_reboot"); |
| 221 | auto reply = this->bus.call(method); |
| 222 | |
| 223 | if (reply.is_method_error()) |
| 224 | { |
| 225 | log<level::ERR>("Error in auto_reboot Get"); |
| 226 | return false; |
| 227 | } |
| 228 | |
| 229 | reply.read(autoRebootParam); |
| 230 | strParam = |
| 231 | sdbusplus::message::variant_ns::get<std::string>(autoRebootParam); |
| 232 | |
| 233 | if (strParam.empty()) |
| 234 | { |
| 235 | log<level::ERR>("Error reading auto_reboot response"); |
| 236 | return false; |
| 237 | } |
| 238 | |
Saqib Khan | cbe08d1 | 2017-03-10 01:29:20 -0600 | [diff] [blame] | 239 | sdbusplus::message::variant<int> rebootCounterParam; |
| 240 | method = this->bus.new_method_call(REBOOTCOUNTER_SERVICE, |
| 241 | REBOOTCOUNTER_PATH, |
| 242 | REBOOTCOUNTER_INTERFACE, |
| 243 | "getValue"); |
| 244 | reply = this->bus.call(method); |
| 245 | if (reply.is_method_error()) |
| 246 | { |
| 247 | log<level::ERR>("Error in BOOTCOUNT getValue"); |
| 248 | return false; |
| 249 | } |
| 250 | reply.read(rebootCounterParam); |
| 251 | |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 252 | if (strParam == "yes") |
| 253 | { |
Saqib Khan | cbe08d1 | 2017-03-10 01:29:20 -0600 | [diff] [blame] | 254 | method = this->bus.new_method_call(REBOOTCOUNTER_SERVICE, |
| 255 | REBOOTCOUNTER_PATH, |
| 256 | REBOOTCOUNTER_INTERFACE, |
| 257 | "setValue"); |
| 258 | if( rebootCounterParam > 0) |
| 259 | { |
| 260 | // Reduce BOOTCOUNT by 1 |
| 261 | method.append((sdbusplus::message::variant_ns:: |
| 262 | get<int>(rebootCounterParam)) - 1); |
| 263 | this->bus.call_noreply(method); |
| 264 | return true; |
| 265 | } |
| 266 | if(rebootCounterParam == 0) |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 267 | { |
Saqib Khan | cbe08d1 | 2017-03-10 01:29:20 -0600 | [diff] [blame] | 268 | // Reset reboot counter and go to quiesce state |
| 269 | method.append(DEFAULT_BOOTCOUNT); |
| 270 | this->bus.call_noreply(method); |
| 271 | return false; |
| 272 | } |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | return false; |
| 276 | } |
| 277 | |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 278 | int Host::sysStateChangeSignal(sd_bus_message *msg, void *userData, |
| 279 | sd_bus_error *retError) |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 280 | { |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 281 | return static_cast<Host*>(userData)->sysStateChange(msg, retError); |
| 282 | } |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 283 | |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 284 | int Host::sysStateChange(sd_bus_message* msg, |
| 285 | sd_bus_error* retError) |
| 286 | { |
| 287 | uint32_t newStateID {}; |
| 288 | sdbusplus::message::object_path newStateObjPath; |
| 289 | std::string newStateUnit{}; |
| 290 | std::string newStateResult{}; |
| 291 | |
| 292 | auto sdPlusMsg = sdbusplus::message::message(msg); |
| 293 | //Read the msg and populate each variable |
| 294 | sdPlusMsg.read(newStateID, newStateObjPath, newStateUnit, newStateResult); |
| 295 | |
| 296 | if((newStateUnit == HOST_STATE_POWEROFF_TGT) && |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 297 | (newStateResult == "done") && |
| 298 | (!stateActive(HOST_STATE_POWERON_TGT))) |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 299 | { |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 300 | log<level::INFO>("Recieved signal that host is off"); |
| 301 | this->currentHostState(server::Host::HostState::Off); |
Andrew Geissler | 06dbc5b | 2016-12-13 11:46:16 -0600 | [diff] [blame] | 302 | |
| 303 | // Check if we need to start a new transition (i.e. a Reboot) |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 304 | if(this->server::Host::requestedHostTransition() == |
| 305 | Transition::Reboot) |
Andrew Geissler | 06dbc5b | 2016-12-13 11:46:16 -0600 | [diff] [blame] | 306 | { |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 307 | log<level::DEBUG>("Reached intermediate state, going to next"); |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 308 | this->executeTransition(server::Host::Transition::On); |
Andrew Geissler | 06dbc5b | 2016-12-13 11:46:16 -0600 | [diff] [blame] | 309 | } |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 310 | } |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 311 | else if((newStateUnit == HOST_STATE_POWERON_TGT) && |
Josh D. King | 929ef70 | 2017-03-02 10:58:11 -0600 | [diff] [blame^] | 312 | (newStateResult == "done") && |
| 313 | (stateActive(HOST_STATE_POWERON_TGT))) |
Andrew Geissler | 4da7e00 | 2017-01-24 15:21:40 -0600 | [diff] [blame] | 314 | { |
| 315 | log<level::INFO>("Recieved signal that host is running"); |
| 316 | this->currentHostState(server::Host::HostState::Running); |
| 317 | } |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 318 | else if((newStateUnit == HOST_STATE_QUIESCE_TGT) && |
| 319 | (newStateResult == "done")) |
| 320 | { |
| 321 | if (Host::isAutoReboot()) |
| 322 | { |
| 323 | log<level::INFO>("Auto reboot enabled. Beginning reboot..."); |
| 324 | Host::requestedHostTransition(server::Host::Transition::Reboot); |
| 325 | } |
| 326 | else |
| 327 | { |
| 328 | log<level::INFO>("Auto reboot disabled. Maintaining quiesce."); |
Saqib Khan | adaa721 | 2017-02-23 13:19:28 -0600 | [diff] [blame] | 329 | this->currentHostState(server::Host::HostState::Quiesced); |
Michael Tritz | 206a833 | 2017-02-06 16:01:23 -0600 | [diff] [blame] | 330 | } |
| 331 | |
| 332 | } |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 333 | |
| 334 | return 0; |
| 335 | } |
| 336 | |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 337 | Host::Transition Host::requestedHostTransition(Transition value) |
| 338 | { |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 339 | log<level::INFO>( |
| 340 | "Host State transaction request", |
| 341 | entry("REQUESTED_HOST_TRANSITION=%s", |
| 342 | convertForMessage(value).c_str())); |
Andrew Geissler | 0cd2eaf | 2016-12-07 10:50:13 -0600 | [diff] [blame] | 343 | |
Andrew Geissler | 06dbc5b | 2016-12-13 11:46:16 -0600 | [diff] [blame] | 344 | Transition tranReq = value; |
| 345 | if(value == server::Host::Transition::Reboot) |
| 346 | { |
| 347 | // On reboot requests we just need to do a off if we're on and |
| 348 | // vice versa. The handleSysStateChange() code above handles the |
| 349 | // second part of the reboot |
| 350 | if(this->server::Host::currentHostState() == |
| 351 | server::Host::HostState::Off) |
| 352 | { |
| 353 | tranReq = server::Host::Transition::On; |
| 354 | } |
| 355 | else |
| 356 | { |
| 357 | tranReq = server::Host::Transition::Off; |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | executeTransition(tranReq); |
Andrew Geissler | 3e3b84b | 2016-12-02 15:46:17 -0600 | [diff] [blame] | 362 | return server::Host::requestedHostTransition(value); |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 363 | } |
| 364 | |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 365 | Host::HostState Host::currentHostState(HostState value) |
| 366 | { |
Andrew Geissler | 1e3bf94 | 2016-12-13 15:32:22 -0600 | [diff] [blame] | 367 | log<level::INFO>("Change to Host State", |
| 368 | entry("CURRENT_HOST_STATE=%s", |
| 369 | convertForMessage(value).c_str())); |
Andrew Geissler | ef62116 | 2016-12-08 12:56:21 -0600 | [diff] [blame] | 370 | return server::Host::currentHostState(value); |
Andrew Geissler | ef3c184 | 2016-12-01 12:33:09 -0600 | [diff] [blame] | 371 | } |
| 372 | |
Andrew Geissler | 3652902 | 2016-11-29 15:23:54 -0600 | [diff] [blame] | 373 | } // namespace manager |
| 374 | } // namespace state |
| 375 | } // namepsace phosphor |