mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

I couldn't be bothered to untangle this, so here it goes: * Log colors depending on loglevel * Simplified Filelogger * Remove description=None from basetask * create_list creates task list from argument now * Task rollback feature: If a task fails, the tasklist calls rollback() on the completed tasks in reverse order * Added TaskException to common.exceptions as a base to extend from * Added TriggerRollback task to common.tasks for development purposes * An EBS volume for bootstrapping is now created and attached to the instance (including rollback actions) * EC2 Connect task now depends on host.GetInfo
21 lines
616 B
Python
21 lines
616 B
Python
|
|
|
|
class ManifestError(Exception):
|
|
def __init__(self, message, manifest, json_path=None):
|
|
self.message = message
|
|
self.manifest = manifest
|
|
self.json_path = json_path
|
|
def __str__(self):
|
|
if self.json_path is not None:
|
|
path = '.'.join(self.json_path)
|
|
return "{2}\n\tFile: {0}\n\tJSON path: {1}".format(self.manifest.path, path, self.message)
|
|
return "{0}: {1}".format(self.manifest.path, self.message)
|
|
|
|
class TaskListError(Exception):
|
|
def __init__(self, message):
|
|
self.message = message
|
|
def __str__(self):
|
|
return "Error in tasklist: {0}".format(self.message)
|
|
|
|
class TaskException(Exception):
|
|
pass
|