bootstrap-vz/base/bootstrapinfo.py

14 lines
430 B
Python
Raw Normal View History

2013-05-02 19:13:35 +02:00
class BootstrapInformation(object):
def __init__(self, manifest=None, debug=False):
2013-05-02 19:13:35 +02:00
self.manifest = manifest
from fs import load_volume
self.volume = load_volume(self.manifest.volume)
self.debug = debug
import random
2013-08-17 17:28:46 +02:00
self.run_id = random.randrange(16 ** 8)
import os.path
workspace_dirname = '{id:x}'.format(id=self.run_id)
self.workspace = os.path.join(manifest.bootstrapper['workspace'], workspace_dirname)