summaryrefslogtreecommitdiffstats
path: root/pychassisctl
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2017-07-30 09:36:33 -0500
committerAndrew Geissler <andrewg@us.ibm.com>2017-08-02 21:27:03 -0500
commit9903ec627606224ee14a8454452aef1d24818b1b (patch)
treee6159868a1d15963998f9b5b8047f1f57ae75ec0 /pychassisctl
parentefe5d2de3696f1fb462fac3a31e890a68b5995a0 (diff)
downloadtalos-skeleton-9903ec627606224ee14a8454452aef1d24818b1b.tar.gz
talos-skeleton-9903ec627606224ee14a8454452aef1d24818b1b.zip
Update button press handlers to new targets
The targets have changed within openbmc for hard power off and soft power down. This file will be deprecated some day but for now it needs to be in sync with the new targets. Resolves openbmc/openbmc#1593 Change-Id: I1e2949c67fd9b4756a6f18070eea63c8b161c7bf Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'pychassisctl')
-rw-r--r--pychassisctl/chassis_control.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pychassisctl/chassis_control.py b/pychassisctl/chassis_control.py
index 68281e6..16fb554 100644
--- a/pychassisctl/chassis_control.py
+++ b/pychassisctl/chassis_control.py
@@ -104,19 +104,18 @@ class ChassisControlObject(DbusProperties, DbusObjectManager):
in_signature='', out_signature='')
def powerOff(self):
print "Turn off power"
-
intf = self.getInterface('systemd')
f = getattr(intf, 'StartUnit')
- f.call_async('obmc-host-stop@0.target', 'replace')
+ f.call_async('obmc-chassis-hard-poweroff@0.target', 'replace')
return None
@dbus.service.method(DBUS_NAME,
in_signature='', out_signature='')
def softPowerOff(self):
print "Soft off power"
- intf = self.getInterface('host_services')
- ## host services will call power off when ready
- intf.SoftPowerOff()
+ intf = self.getInterface('systemd')
+ f = getattr(intf, 'StartUnit')
+ f.call_async('obmc-host-shutdown@0.target', 'replace')
return None
@dbus.service.method(DBUS_NAME,
OpenPOWER on IntegriCloud