Sync w/ updated power control interfaces

setPowerState/getPowerState methods are removed.
all properties are removed except PGood and State.
return value of forcePowerOff is changed to bool from int32

TestBy:
    Ipmi command and click buttons
Change-Id: I0b5e51cea959594acf04257c566893da6ffe7d26
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
diff --git a/power-control/service-files/intel-power-start@.service b/power-control/service-files/intel-power-start@.service
index 763c115..2bb601c 100644
--- a/power-control/service-files/intel-power-start@.service
+++ b/power-control/service-files/intel-power-start@.service
@@ -7,8 +7,8 @@
 
 [Service]
 Type=oneshot
-ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
-          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power setPowerState i 1"
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
+          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power State i 1"
 SyslogIdentifier=intel-power-start
 StartLimitInterval=0
 
diff --git a/power-control/service-files/intel-power-stop@.service b/power-control/service-files/intel-power-stop@.service
index 5d0e46f..aac1946 100644
--- a/power-control/service-files/intel-power-stop@.service
+++ b/power-control/service-files/intel-power-stop@.service
@@ -7,8 +7,8 @@
 
 [Service]
 Type=oneshot
-ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
-          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power setPowerState i 0"
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
+          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power State i 0"
 SyslogIdentifier=intel-power-stop
 StartLimitInterval=0
 
diff --git a/power-control/service-files/intel-power-warm-reset@.service b/power-control/service-files/intel-power-warm-reset@.service
index c8bd4fc..ede20ac 100644
--- a/power-control/service-files/intel-power-warm-reset@.service
+++ b/power-control/service-files/intel-power-warm-reset@.service
@@ -7,8 +7,8 @@
 
 [Service]
 Type=oneshot
-ExecStart=/bin/sh -c "busctl call `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
-          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power setPowerState i 2"
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` \
+          /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power State i 2"
 SyslogIdentifier=intel-power-warm-reset
 
 [Install]
diff --git a/power-control/service-files/obmc-chassis-hard-poweroff@.target b/power-control/service-files/obmc-chassis-hard-poweroff@.target
index 5f53251..9b66218 100644
--- a/power-control/service-files/obmc-chassis-hard-poweroff@.target
+++ b/power-control/service-files/obmc-chassis-hard-poweroff@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Chassis%i (Hard Power Off)
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-chassis-poweron@%i.target
diff --git a/power-control/service-files/obmc-chassis-poweroff@.target b/power-control/service-files/obmc-chassis-poweroff@.target
index aa026cf..1bc0691 100644
--- a/power-control/service-files/obmc-chassis-poweroff@.target
+++ b/power-control/service-files/obmc-chassis-poweroff@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Chassis%i (Power Off)
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-chassis-poweron@%i.target
diff --git a/power-control/service-files/obmc-chassis-poweron@.target b/power-control/service-files/obmc-chassis-poweron@.target
index 572dfa0..4b77af6 100644
--- a/power-control/service-files/obmc-chassis-poweron@.target
+++ b/power-control/service-files/obmc-chassis-poweron@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Chassis%i (Power On)
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-chassis-poweroff@%i.target
diff --git a/power-control/service-files/obmc-chassis-powerreset@.target b/power-control/service-files/obmc-chassis-powerreset@.target
index 8d7c47e..6f93925 100644
--- a/power-control/service-files/obmc-chassis-powerreset@.target
+++ b/power-control/service-files/obmc-chassis-powerreset@.target
@@ -4,4 +4,4 @@
 RefuseManualStop=yes
 
 [Install]
-WantedBy={SYSTEMD_DEFAULT_TARGET}
+WantedBy=obmc-standby.target
\ No newline at end of file
diff --git a/power-control/service-files/obmc-host-reboot@.target b/power-control/service-files/obmc-host-reboot@.target
index 2522012..e779ab2 100644
--- a/power-control/service-files/obmc-host-reboot@.target
+++ b/power-control/service-files/obmc-host-reboot@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Reboot Host%i
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-host-startmin@%i.target
diff --git a/power-control/service-files/obmc-host-soft-reboot@.target b/power-control/service-files/obmc-host-soft-reboot@.target
index ae620c4..0bb2938 100644
--- a/power-control/service-files/obmc-host-soft-reboot@.target
+++ b/power-control/service-files/obmc-host-soft-reboot@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Soft Reboot Host%i
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-host-startmin@%i.target
diff --git a/power-control/service-files/obmc-host-start@.target b/power-control/service-files/obmc-host-start@.target
index 96e6ea1..38f76c6 100644
--- a/power-control/service-files/obmc-host-start@.target
+++ b/power-control/service-files/obmc-host-start@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Start Host%i
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-host-stop@%i.target
diff --git a/power-control/service-files/obmc-host-startmin@.target b/power-control/service-files/obmc-host-startmin@.target
index bb79370..98f044f 100644
--- a/power-control/service-files/obmc-host-startmin@.target
+++ b/power-control/service-files/obmc-host-startmin@.target
@@ -1,6 +1,6 @@
 [Unit]
 Description=Start Host%i Minimum
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
diff --git a/power-control/service-files/obmc-host-stop@.target b/power-control/service-files/obmc-host-stop@.target
index df371b9..5178e83 100644
--- a/power-control/service-files/obmc-host-stop@.target
+++ b/power-control/service-files/obmc-host-stop@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Stop Host%i
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-host-startmin@%i.target
diff --git a/power-control/service-files/obmc-host-warm-reset@.target b/power-control/service-files/obmc-host-warm-reset@.target
index 6d4cbcf..8c6fa5a 100644
--- a/power-control/service-files/obmc-host-warm-reset@.target
+++ b/power-control/service-files/obmc-host-warm-reset@.target
@@ -1,7 +1,7 @@
 [Unit]
 Description=Warm reset Host%i
-Wants={SYSTEMD_DEFAULT_TARGET}
-After={SYSTEMD_DEFAULT_TARGET}
+Wants=obmc-standby.target
+After=obmc-standby.target
 Wants=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 After=mapper-wait@-xyz-openbmc_project-Chassis-Control-Power%i.service
 Conflicts=obmc-host-stop@%i.target
diff --git a/power-control/service-files/op-reset-chassis-running@.service b/power-control/service-files/op-reset-chassis-running@.service
index 3280d0a..2d6d32c 100644
--- a/power-control/service-files/op-reset-chassis-running@.service
+++ b/power-control/service-files/op-reset-chassis-running@.service
@@ -9,7 +9,7 @@
 [Service]
 RemainAfterExit=no
 Type=oneshot
-ExecStart=/bin/sh -c "if [ $(busctl get-property `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power pgood | sed 's/i\s*[1]/on/' | grep on | wc -l) != 0 ]; then mkdir -p /run/openbmc/ && touch /run/openbmc/chassis@%i-on; fi"
+ExecStart=/bin/sh -c "if [ $(busctl get-property `mapper get-service /xyz/openbmc_project/Chassis/Control/Power%i` /xyz/openbmc_project/Chassis/Control/Power%i xyz.openbmc_project.Chassis.Control.Power PGood | sed 's/i\s*[1]/on/' | grep on | wc -l) != 0 ]; then mkdir -p /run/openbmc/ && touch /run/openbmc/chassis@%i-on; fi"
 
 [Install]
 WantedBy=obmc-chassis-powerreset@%i.target
diff --git a/power-control/service-files/xyz.openbmc_project.Chassis.Control.Power@.service b/power-control/service-files/xyz.openbmc_project.Chassis.Control.Power@.service
index fe69931..3bbfb17 100644
--- a/power-control/service-files/xyz.openbmc_project.Chassis.Control.Power@.service
+++ b/power-control/service-files/xyz.openbmc_project.Chassis.Control.Power@.service
@@ -10,8 +10,8 @@
 ExecStart=/usr/bin/env power-control
 SyslogIdentifier=power-control
 Type=dbus
-BusName={BUSNAME}
+BusName=xyz.openbmc_project.Chassis.Control.Power
 
 [Install]
-WantedBy={SYSTEMD_DEFAULT_TARGET}
+WantedBy=obmc-standby.target