Beispiel #1
0
 def generate_tempfile(self,
                       root_dir,
                       filename="data",
                       size="10M",
                       timeout=360):
     backup_utils.generate_tempfile(self.main_vm, root_dir, filename, size,
                                    timeout)
     self.files_info.append([root_dir, filename])
Beispiel #2
0
    def generate_data_file(self, tag, filename=None):
        """
        Generate tempfile in the image

        :param tag: image tag
        :param filename: temp filename
        """
        if not filename:
            filename = utils_misc.generate_random_string(4)
        params = self.params.object_params(tag)
        image_size = params.get("tempfile_size", "10M")
        timeout = params.get_numeric("create_tempfile_timeout", 720)
        backup_utils.generate_tempfile(self.main_vm, self.disks_info[tag][1],
                                       filename, image_size, timeout)
        self.files_info[tag] = [filename]
 def prepare_data_disks(self):
     for tag in self.source_disks:
         self.format_data_disk(tag)
         backup_utils.generate_tempfile(
             self.main_vm, self.disks_info[tag][1], "data")