Commit 7d78da6e authored by Neil Williams's avatar Neil Williams 💬

Fix usage of FastbootReboot

Missing super() call in __init__() prevents adding the class
to any pipeline. Ensure run() returns the connection object.
Change inheritance as this action does not need the self.cmd
and does not set it.
Same change in FastbootRebootBootloader

Change-Id: I5a31029c3e50935dd1da49b7f3fca8929399a73b
parent 414861e1
......@@ -256,9 +256,10 @@ class FastbootFlashAction(Action):
return connection
class FastbootReboot(FastbootFlashAction):
class FastbootReboot(Action):
def __init__(self):
super(FastbootReboot, self).__init__()
self.name = 'fastboot-reboot'
self.summary = 'execute a reboot using fastboot'
self.description = 'Reset a device between flash operations using fastboot reboot.'
......@@ -285,11 +286,13 @@ class FastbootReboot(FastbootFlashAction):
if command_output and 'error' in command_output:
raise InfrastructureError("Unable to reboot: %s"
% (command_output))
return connection
class FastbootRebootBootloader(FastbootFlashAction):
class FastbootRebootBootloader(Action):
def __init__(self):
super(FastbootRebootBootloader, self).__init__()
self.name = 'fastboot-reboot-bootloader'
self.summary = 'execute a reboot to bootloader using fastboot'
self.description = 'Reset a device between flash operations using fastboot reboot-bootloader.'
......@@ -317,3 +320,4 @@ class FastbootRebootBootloader(FastbootFlashAction):
raise InfrastructureError(
"Unable to reboot to bootloader: %s"
% (command_output))
return connection
......@@ -43,7 +43,7 @@
- {class: power.PDUReboot, name: pdu-reboot}
- {class: power.ReadFeedback, name: read-feedback}
- {class: actions.deploy.fastboot.FastbootFlashAction, name: fastboot-flash-action}
- {class: power.PDUReboot, name: pdu-reboot}
- {class: actions.deploy.fastboot.FastbootReboot, name: fastboot-reboot}
- {class: power.ReadFeedback, name: read-feedback}
- {class: actions.deploy.fastboot.FastbootFlashAction, name: fastboot-flash-action}
- class: actions.boot.grub.GrubSequenceAction
......
......@@ -61,7 +61,7 @@ actions:
reboot: hard-reset
boot:
url: http://images.validation.linaro.org/builds.96boards.org/snapshots/reference-platform/openembedded/morty/hikey960/rpb/71/boot-0.0+AUTOINC+7efa39f363-c906d2a849-r0-hikey960-20170630062530-71.uefi.img
reboot: hard-reset
reboot: fastboot-reboot
system:
url: http://images.validation.linaro.org/builds.96boards.org/snapshots/reference-platform/openembedded/morty/hikey960/rpb/71/rpb-console-image-lava-hikey960-20170630062530-71.rootfs.img.gz
compression: gz
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment