def run(self, connection, max_end_time): overlay_file = self.get_namespace_data(action='compress-overlay', label='output', key='file') key_list = [list(self.data.keys())] self.logger.debug("[SEOJI] key_list: " + str(key_list)) if overlay_file: self.logger.debug("Overlay: %s", overlay_file) decompressed_image = self.get_namespace_data( action='download-action', label=self.image_key, key='file') self.logger.debug("Image: %s", decompressed_image) root_partition = None if self.use_root_partition: root_partition = self.parameters[self.image_key].get( 'root_partition') if root_partition is None: raise JobError( "Unable to apply the overlay image without 'root_partition'" ) self.logger.debug("root_partition: %s", root_partition) copy_in_overlay(decompressed_image, root_partition, overlay_file) else: self.logger.debug("No overlay to deploy") return connection
def run(self, connection, max_end_time): overlay_file = self.get_namespace_data(action="compress-overlay", label="output", key="file") if overlay_file: self.logger.debug("Overlay: %s", overlay_file) decompressed_image = self.get_namespace_data( action="download-action", label=self.image_key, key="file") self.logger.debug("Image: %s", decompressed_image) root_partition = None if self.use_root_partition: if (self.image_key not in self.parameters.keys() and "images" in self.parameters.keys()): if self.image_key in self.parameters["images"]: root_partition = self.parameters["images"][ self.image_key].get("root_partition") else: raise JobError( "Unable to find image configuration for '{image}'". format(image=self.image_key)) else: root_partition = self.parameters[self.image_key].get( "root_partition") if root_partition is None: raise JobError( "Unable to apply the overlay image without 'root_partition'" ) self.logger.debug("root_partition: %s", root_partition) copy_in_overlay(decompressed_image, root_partition, overlay_file) else: self.logger.debug("No overlay to deploy") return connection
def run(self, connection, max_end_time, args=None): overlay_file = self.get_namespace_data(action='compress-overlay', label='output', key='file') if overlay_file: self.logger.debug("Overlay: %s", overlay_file) decompressed_image = self.get_namespace_data(action='download-action', label=self.image_key, key='file') self.logger.debug("Image: %s", decompressed_image) root_partition = None if self.use_root_partition: root_partition = self.parameters[self.image_key].get('root_partition') if root_partition is None: raise JobError("Unable to apply the overlay image without 'root_partition'") self.logger.debug("root_partition: %s", root_partition) copy_in_overlay(decompressed_image, root_partition, overlay_file) else: self.logger.debug("No overlay to deploy") return connection