bootstrap-vz/plugins/image_commands/tasks.py
2014-01-12 12:58:29 +01:00

14 lines
422 B
Python

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
for raw_command in info.manifest.plugins['image_commands']['commands']:
command = map(lambda part: part.format(**info.manifest_vars), raw_command)
log_check_call(command)