Exemplo n.º 1
0
def process_disk(image, boot, file, location, target):
    image_location = copy_image(file, location)
    # Create the disk
    disk = ImageParser.Disk()
    disk.format = "raw"
    disk.file = image_location
    disk.use = "user"
    disk.id = image_location
    image.storage[disk.id] = disk

    #Create the drive
    drive = ImageParser.Drive()
    drive.id = image_location
    drive.target = target
    drive.disk = disk
    boot.disks.append(drive)