mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

All provider specific settings have been moved to the provider section. The image name itself is now located at the top level and called "name". It is required for all providers.
21 lines
643 B
Python
21 lines
643 B
Python
from bootstrapvz.base import Task
|
|
from bootstrapvz.common import phases
|
|
|
|
|
|
class MoveImage(Task):
|
|
description = 'Moving volume image'
|
|
phase = phases.image_registration
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
image_name = info.manifest.name.format(**info.manifest_vars)
|
|
filename = image_name + '.' + info.volume.extension
|
|
|
|
import os.path
|
|
destination = os.path.join(info.manifest.bootstrapper['workspace'], filename)
|
|
import shutil
|
|
shutil.move(info.volume.image_path, destination)
|
|
info.volume.image_path = destination
|
|
import logging
|
|
log = logging.getLogger(__name__)
|
|
log.info('The volume image has been moved to ' + destination)
|