Esempio n. 1
0
 def populate(self, parameters):
     self.expect_shell = parameters.get('expect_shell', True)
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     self.internal_pipeline.add_action(BootloaderSecondaryMedia())
     self.internal_pipeline.add_action(BootloaderCommandOverlay())
     self.internal_pipeline.add_action(ConnectDevice())
     # FIXME: reset_device is a hikey hack due to fastboot/OTG issues
     # remove as part of LAVA-940 - convert to use fastboot-sequence
     reset_device = self.job.device['actions']['boot']['methods'].get(
         'grub-efi', {}).get('reset_device', True)
     if parameters['method'] == 'grub-efi' and reset_device:
         # added unless the device specifies not to reset the device in grub.
         self.internal_pipeline.add_action(ResetDevice())
     elif parameters['method'] == 'grub':
         self.internal_pipeline.add_action(ResetDevice())
     if parameters['method'] == 'grub-efi':
         self.internal_pipeline.add_action(UEFIMenuInterrupt())
         self.internal_pipeline.add_action(GrubMenuSelector())
     self.internal_pipeline.add_action(BootloaderInterrupt())
     self.internal_pipeline.add_action(BootloaderCommandsAction())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())
     else:
         if self.has_boot_finished(parameters):
             self.logger.debug("Doing a boot without a shell (installer)")
             self.internal_pipeline.add_action(InstallerWait())
             self.internal_pipeline.add_action(PowerOff())
Esempio n. 2
0
 def populate(self, parameters):
     self.expect_shell = parameters.get('expect_shell', True)
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     self.internal_pipeline.add_action(BootloaderCommandOverlay())
     self.internal_pipeline.add_action(ConnectDevice())
     self.internal_pipeline.add_action(ResetDevice())
     if parameters['method'] == 'grub-efi':
         self.internal_pipeline.add_action(UEFIMenuInterrupt())
         self.internal_pipeline.add_action(GrubMenuSelector())
     self.internal_pipeline.add_action(BootloaderInterrupt())
     self.internal_pipeline.add_action(BootloaderCommandsAction())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())
     else:
         if self.has_boot_finished(parameters):
             self.logger.debug("Doing a boot without a shell (installer)")
             self.internal_pipeline.add_action(InstallerWait())
             self.internal_pipeline.add_action(PowerOff())
Esempio n. 3
0
 def populate(self, parameters):
     super(GrubSequenceAction, self).populate(parameters)
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     sequences = self.job.device['actions']['boot']['methods']['grub'].get(
         'sequence', [])
     for sequence in sequences:
         mapped = _grub_sequence_map(sequence)
         if mapped[1]:
             self.internal_pipeline.add_action(mapped[0](type=mapped[1]))
         elif mapped[0]:
             self.internal_pipeline.add_action(mapped[0]())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())
     else:
         if self.has_boot_finished(parameters):
             self.logger.debug("Doing a boot without a shell (installer)")
             self.internal_pipeline.add_action(InstallerWait())
             self.internal_pipeline.add_action(PowerOff())
Esempio n. 4
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     self.internal_pipeline.add_action(ConnectSsh())
     self.internal_pipeline.add_action(AutoLoginAction())
     self.internal_pipeline.add_action(ExpectShellSession())
     self.internal_pipeline.add_action(ExportDeviceEnvironment())
     self.internal_pipeline.add_action(ScpOverlayUnpack())
Esempio n. 5
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     self.internal_pipeline.add_action(LxcStartAction())
     self.internal_pipeline.add_action(ConnectLxc())
     # Skip AutoLoginAction unconditionally as this action tries to parse kernel message
     # self.internal_pipeline.add_action(AutoLoginAction())
     self.internal_pipeline.add_action(ExpectShellSession())
     self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 6
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     self.internal_pipeline.add_action(KexecAction())
     # Add AutoLoginAction unconditionally as this action does nothing if
     # the configuration does not contain 'auto_login'
     self.internal_pipeline.add_action(AutoLoginAction())
     self.internal_pipeline.add_action(ExpectShellSession())
     self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 7
0
    def __init__(self, parent):
        super(BootKVM, self).__init__(parent)
        self.action = BootQEMUImageAction()
        self.action.job = self.job
        parent.add_action(self.action)

        internal_pipeline = Pipeline(parent=self.action, job=self.job)
        if 'auto_login' in self.action.parameters:
            internal_pipeline.add_action(AutoLoginAction())
        internal_pipeline.add_action(ExpectShellSession())
Esempio n. 8
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     self.internal_pipeline.add_action(BootQemuRetry())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 9
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     # establish a new connection before trying the reset
     self.internal_pipeline.add_action(ResetDevice())
     self.internal_pipeline.add_action(UBootInterrupt())
     self.internal_pipeline.add_action(BootloaderCommandsAction())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 10
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     # establish a new connection before trying the reset
     self.internal_pipeline.add_action(ResetDevice())
     self.internal_pipeline.add_action(MonitorBootloaderAutoBoot())  # wait
     # and set prompt to the uboot prompt
     # Add AutoLoginAction unconditionally as this action does nothing if
     # the configuration does not contain 'auto_login'
     self.internal_pipeline.add_action(AutoLoginAction())
     self.internal_pipeline.add_action(ExpectShellSession())  # wait
     self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 11
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     # establish a new connection before trying the reset
     self.internal_pipeline.add_action(ResetDevice())
     self.internal_pipeline.add_action(BootloaderInterrupt())
     # need to look for Hit any key to stop autoboot
     self.internal_pipeline.add_action(BootloaderCommandsAction())
     # Add AutoLoginAction unconditionally as this action does nothing if
     # the configuration does not contain 'auto_login'
     self.internal_pipeline.add_action(AutoLoginAction())
     self.internal_pipeline.add_action(ExpectShellSession())  # wait
     self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 12
0
 def populate(self, parameters):
     self.expect_shell = parameters.get('expect_shell', True)
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     self.internal_pipeline.add_action(BootloaderCommandOverlay())
     self.internal_pipeline.add_action(ConnectDevice())
     self.internal_pipeline.add_action(ResetDevice())
     self.internal_pipeline.add_action(BootloaderInterrupt())
     self.internal_pipeline.add_action(BootloaderCommandsAction())
     if self.expect_shell:
         self.internal_pipeline.add_action(AutoLoginAction())
         self.internal_pipeline.add_action(ExpectShellSession())  # wait
         self.internal_pipeline.add_action(ExportDeviceEnvironment())
     else:
         self.logger.debug("Doing a boot without a shell (installer)")
         self.internal_pipeline.add_action(InstallerWait())
         self.internal_pipeline.add_action(PowerOff())
Esempio n. 13
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     # Nexell extension
     if parameters['nexell_ext']:
         self.internal_pipeline.add_action(NexellStartAction())
         self.internal_pipeline.add_action(ConnectNexell())
         #self.internal_pipeline.add_action(AutoLoginAction())
         #self.internal_pipeline.add_action(ExpectShellSession())
         #self.internal_pipeline.add_action(ExportDeviceEnvironment())
     else:
         self.internal_pipeline.add_action(LxcStartAction())
         self.internal_pipeline.add_action(ConnectLxc())
         # Add AutoLoginAction unconditionally as this action does nothing if
         # the configuration does not contain 'auto_login'
         self.internal_pipeline.add_action(AutoLoginAction())
         self.internal_pipeline.add_action(ExpectShellSession())
         self.internal_pipeline.add_action(ExportDeviceEnvironment())
Esempio n. 14
0
 def populate(self, parameters):
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     self.internal_pipeline.add_action(BootloaderCommandOverlay())
     self.internal_pipeline.add_action(MenuConnect())
     self.internal_pipeline.add_action(ResetDevice())
     # Newer firmware often needs no menu interaction, just press to drop to shell
     if not self._skip_menu(parameters):
         # Some older firmware, UEFI Shell has to be selected from a menu.
         self.internal_pipeline.add_action(UefiShellMenuInterrupt())
         self.internal_pipeline.add_action(UefiShellMenuSelector())
     self.internal_pipeline.add_action(UefiShellInterrupt())
     self.internal_pipeline.add_action(UefiBootloaderCommandsAction())
     if self.has_prompts(parameters):
         self.internal_pipeline.add_action(AutoLoginAction())
         if self.test_has_shell(parameters):
             self.internal_pipeline.add_action(ExpectShellSession())
             if 'transfer_overlay' in parameters:
                 self.internal_pipeline.add_action(OverlayUnpack())
             self.internal_pipeline.add_action(ExportDeviceEnvironment())