Example #1
0
    def populate(self, parameters):
        """
        The dispatcher does the first download as the first deployment is not guaranteed to
        have DNS resolution fully working, so we can use the IP address of the dispatcher
        to get it (with the advantage that the dispatcher decompresses it so that the ramdisk
        can pipe the raw image directly from wget to deploy with tools (dd,tar and so on).)
        This also allows the use of local file:// locations which are visible to the dispatcher
        but not the device.
        """
        self.image_path = self.mkdtemp()
        self.internal_pipeline = Pipeline(parent=self, job=self.job, parameters=parameters)

        uniquify = parameters.get('uniquify', True)
        self.internal_pipeline.add_action(QemudevDeployMasterAction())

        if 'rootfs_path' in parameters:
            self.internal_pipeline.add_action(DownloaderAction('rootfs', path=self.image_path, uniquify=uniquify))
            self.internal_pipeline.add_action(QemudevDeploySlaveAction())

        if self.test_needs_overlay(parameters):
            self.internal_pipeline.add_action(OverlayAction())  # idempotent, includes testdef
        
        # FIXME: could support tarballs too
        if self.test_needs_deployment(parameters):
            self.internal_pipeline.add_action(DeployDeviceEnvironment())
Example #2
0
 def populate(self, parameters):
     download_dir = self.mkdtemp()
     self.internal_pipeline = Pipeline(parent=self,
                                       job=self.job,
                                       parameters=parameters)
     if 'nfsrootfs' in parameters:
         self.internal_pipeline.add_action(
             DownloaderAction('nfsrootfs', path=download_dir))
     if 'modules' in parameters:
         self.internal_pipeline.add_action(
             DownloaderAction('modules', path=download_dir))
     # NfsAction is a deployment, so once the nfsrootfs has been deployed, just do the overlay
     self.internal_pipeline.add_action(ExtractNfsRootfs())
     self.internal_pipeline.add_action(OverlayAction())
     self.internal_pipeline.add_action(ExtractModules())
     self.internal_pipeline.add_action(ApplyOverlayTftp())
     if self.test_needs_deployment(parameters):
         self.internal_pipeline.add_action(DeployDeviceEnvironment())