Ejemplo n.º 1
0
    def populate(self, parameters):
        self.tftp_dir = self.mkdtemp(override=tftpd_dir())
        self.internal_pipeline = Pipeline(parent=self,
                                          job=self.job,
                                          parameters=parameters)
        self.set_namespace_data(action=self.name,
                                label='tftp',
                                key='tftp_dir',
                                value=self.tftp_dir,
                                parameters=parameters)

        for key in [
                'ramdisk', 'kernel', 'dtb', 'nfsrootfs', 'modules', 'preseed'
        ]:
            if key in parameters:
                self.internal_pipeline.add_action(
                    DownloaderAction(key, path=self.tftp_dir))
                if key == 'ramdisk':
                    self.set_namespace_data(action=self.name,
                                            label='tftp',
                                            key='ramdisk',
                                            value=True,
                                            parameters=parameters)

        # TftpAction is a deployment, so once the files are in place, just do the overlay
        self.internal_pipeline.add_action(PrepareOverlayTftp())
        self.internal_pipeline.add_action(LxcCreateUdevRuleAction())
        if self.test_needs_deployment(parameters):
            self.internal_pipeline.add_action(DeployDeviceEnvironment())
Ejemplo n.º 2
0
    def populate(self, parameters):
        self.tftp_dir = self.mkdtemp(override=filesystem.tftpd_dir())
        self.pipeline = Pipeline(parent=self,
                                 job=self.job,
                                 parameters=parameters)
        self.set_namespace_data(
            action=self.name,
            label="tftp",
            key="tftp_dir",
            value=self.tftp_dir,
            parameters=parameters,
        )

        for key in [
                "ramdisk", "kernel", "dtb", "nfsrootfs", "modules", "preseed"
        ]:
            if key in parameters:
                self.pipeline.add_action(
                    DownloaderAction(key,
                                     path=self.tftp_dir,
                                     params=parameters[key]))
                if key == "ramdisk":
                    self.set_namespace_data(
                        action=self.name,
                        label="tftp",
                        key="ramdisk",
                        value=True,
                        parameters=parameters,
                    )

        # TftpAction is a deployment, so once the files are in place, just do the overlay
        self.pipeline.add_action(PrepareOverlayTftp())
        self.pipeline.add_action(LxcCreateUdevRuleAction())
        if self.test_needs_deployment(parameters):
            self.pipeline.add_action(DeployDeviceEnvironment())
Ejemplo n.º 3
0
 def populate(self, parameters):
     download_dir = self.mkdtemp()
     self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)
     if 'recovery_image' in parameters:
         self.internal_pipeline.add_action(DownloaderAction('recovery_image', path=download_dir))
     self.internal_pipeline.add_action(LxcCreateUdevRuleAction())
     self.force_prompt = True
     self.internal_pipeline.add_action(ConnectDevice())
     self.internal_pipeline.add_action(ResetDevice())
     self.internal_pipeline.add_action(ExtractVExpressRecoveryImage())
     self.internal_pipeline.add_action(EnterVExpressMCC())
     self.internal_pipeline.add_action(EnableVExpressMassStorage())
     self.internal_pipeline.add_action(WaitUSBMassStorageDeviceAction())
     self.internal_pipeline.add_action(MountVExpressMassStorageDevice())
     self.internal_pipeline.add_action(DeployVExpressRecoveryImage())
     self.internal_pipeline.add_action(UnmountVExpressMassStorageDevice())
     self.internal_pipeline.add_action(VExpressFlashErase())
Ejemplo n.º 4
0
 def populate(self, parameters):
     download_dir = self.mkdtemp()
     self.pipeline = Pipeline(parent=self,
                              job=self.job,
                              parameters=parameters)
     self.pipeline.add_action(
         DownloaderAction("recovery_image",
                          path=download_dir,
                          params=parameters["recovery_image"]))
     self.pipeline.add_action(LxcCreateUdevRuleAction())
     self.force_prompt = True
     self.pipeline.add_action(ConnectDevice())
     self.pipeline.add_action(ResetDevice())
     self.pipeline.add_action(ExtractVExpressRecoveryImage())
     self.pipeline.add_action(EnterVExpressMCC())
     self.pipeline.add_action(EnableVExpressMassStorage())
     self.pipeline.add_action(WaitUSBMassStorageDeviceAction())
     self.pipeline.add_action(MountVExpressMassStorageDevice())
     self.pipeline.add_action(DeployVExpressRecoveryImage())
     self.pipeline.add_action(UnmountVExpressMassStorageDevice())
     if self.job.device["actions"]["deploy"]["methods"]["vemsd"][
             "parameters"].get("flash_prompt", False):
         self.pipeline.add_action(VExpressFlashErase())