Clear host command queue on a power on

When the RequestedHostTransition property changes to On, clear
any pending commands in the command queue.  This is done to avoid
race conditions around state transitions as well as other
scenarios like the following:

1) Host is already off
2) RequestedHostTransition is set to Off
3) RequestedHostTransition is set to On
4) Host powers on
5) Host immediately powers off because of the pending command
   sent in 2).

Resolves openbmc/openbmc#3207

Tested:  Verified the scenario above no longer occurs.

Change-Id: I26c8195c305c75b01333d1b10ff4bf16d76b91a6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
2 files changed