bootstrap-vz/bootstrapvz/plugins/image_commands/tasks.py

15 lines
438 B
Python
Raw Normal View History

from base import Task
from common import phases
class ImageExecuteCommand(Task):
description = 'Execute command in the image'
phase = phases.system_modification
@classmethod
def run(cls, info):
from common.tools import log_check_call
2014-01-12 12:58:29 +01:00
for raw_command in info.manifest.plugins['image_commands']['commands']:
2014-01-14 08:46:53 +01:00
command = map(lambda part: part.format(root=info.root, **info.manifest_vars), raw_command)
log_check_call(command)