示例#1
0
 def copy(self, ongoing_item_config):
     copy_task = TransactionalCopyTask(logger = self.logger, disk_util = self, ongoing_item_config = ongoing_item_config, patching=self.patching, encryption_environment = self.encryption_environment)
     try:
         mem_fs_result = copy_task.prepare_mem_fs()
         if(mem_fs_result != CommonVariables.process_success):
             return CommonVariables.tmpfs_error
         else:
             returnCode = copy_task.begin_copy()
             return returnCode
     finally:
         copy_task.clear_mem_fs()
 def copy(self, ongoing_item_config, status_prefix=''):
     copy_task = TransactionalCopyTask(logger=self.logger,
                                       disk_util=self,
                                       hutil=self.hutil,
                                       ongoing_item_config=ongoing_item_config,
                                       patching=self.distro_patcher,
                                       encryption_environment=self.encryption_environment,
                                       status_prefix=status_prefix)
     try:
         mem_fs_result = copy_task.prepare_mem_fs()
         if mem_fs_result != CommonVariables.process_success:
             return CommonVariables.tmpfs_error
         else:
             return copy_task.begin_copy()
     except Exception as e:
         message = "Failed to perform dd copy: {0}, stack trace: {1}".format(e, traceback.format_exc())
         self.logger.log(msg=message, level=CommonVariables.ErrorLevel)
     finally:
         copy_task.clear_mem_fs()
示例#3
0
 def copy(self, ongoing_item_config):
     copy_task = TransactionalCopyTask(
         logger=self.logger,
         disk_util=self,
         ongoing_item_config=ongoing_item_config,
         patching=self.patching,
         encryption_environment=self.encryption_environment)
     try:
         mem_fs_result = copy_task.prepare_mem_fs()
         if (mem_fs_result != CommonVariables.process_success):
             return CommonVariables.tmpfs_error
         else:
             returnCode = copy_task.begin_copy()
             return returnCode
     finally:
         copy_task.clear_mem_fs()
示例#4
0
 def copy(self, ongoing_item_config, status_prefix=''):
     copy_task = TransactionalCopyTask(logger=self.logger,
                                       disk_util=self,
                                       hutil=self.hutil,
                                       ongoing_item_config=ongoing_item_config,
                                       patching=self.distro_patcher,
                                       encryption_environment=self.encryption_environment,
                                       status_prefix=status_prefix)
     try:
         mem_fs_result = copy_task.prepare_mem_fs()
         if mem_fs_result != CommonVariables.process_success:
             return CommonVariables.tmpfs_error
         else:
             return copy_task.begin_copy()
     except Exception as e:
         message = "Failed to perform dd copy: {0}, stack trace: {1}".format(e, traceback.format_exc())
         self.logger.log(msg=message, level=CommonVariables.ErrorLevel)
     finally:
         copy_task.clear_mem_fs()