Exemple #1
0
 def make_root_device(self, path, size=None):
     self.check_host()
     if size is None:
         size = self.cfg['basefile_size']
     msg = 'making uml root device of size %s at %s' % (size, path)
     print msg
     create_sparse_file(path, size)
     self.set_targetimage(path)
def extract(tarball, basefile=None, size=None):
    cfg = UmlConfig()
    u = UmlChroot(cfg)
    u.options['paella_system_tarball'] = tarball
    u.options['paella_action'] = 'extract'
    u.options['devfs'] = 'mount'
    u.set_targetimage(basefile)
    if size is None:
        size = cfg['basefile_size']
    create_sparse_file(basefile, size=size)
    u.run_uml()
Exemple #3
0
def extract(tarball, basefile=None, size=None):
    cfg = UmlConfig()
    u = UmlChroot(cfg)
    u.options['paella_system_tarball'] = tarball
    u.options['paella_action'] = 'extract'
    u.options['devfs'] = 'mount'
    u.set_targetimage(basefile)
    if size is None:
        size = cfg['basefile_size']
    create_sparse_file(basefile, size=size)
    u.run_uml()
Exemple #4
0
def make_base_filesystem(suite, name, cfg=None, size=3000, mkfs='mke2fs'):
    if cfg is None:
        cfg = UmlConfig()
    bfpath = path(cfg.get('umlmachines', 'bootstrap_basepath')) / name
    bfpath = bfpath.expand()
    #path = join(cfg.get('umlmachines', 'bootstrap_basepath'), name)
    dirname = bfpath.dirname()
    print 'bfpath dirname', dirname
    makepaths(dirname)
    create_sparse_file(bfpath, size=size)
    return bfpath
def make_base_filesystem(suite, name, cfg=None, size=3000, mkfs='mke2fs'):
    if cfg is None:
        cfg = UmlConfig()
    bfpath = path(cfg.get('umlmachines', 'bootstrap_basepath')) / name
    bfpath = bfpath.expand()
    #path = join(cfg.get('umlmachines', 'bootstrap_basepath'), name)
    dirname = bfpath.dirname()
    print 'bfpath dirname', dirname
    makepaths(dirname)
    create_sparse_file(bfpath, size=size)
    return bfpath
def extract(tarball, basefile=None, size=None):
    cfg = UmlConfig()
    u = UmlChroot(cfg)
    u.options["paella_system_tarball"] = tarball
    u.options["paella_action"] = "extract"
    u.options["devfs"] = "mount"
    u.set_targetimage(basefile)
    if size is None:
        size = cfg["basefile_size"]
    create_sparse_file(basefile, size=size)
    u.run_uml()
Exemple #7
0
 def make_root_device(self, rpath, size=None):
     if size is None:
         size = self.cfg['basefile_size']
     dirname = path(rpath).dirname()
     if not dirname.isdir():
         if not dirname.exists():
             print "Creating directory %s" % str(dirname)
             dirname.makedirs()
         else:
             print "Can't create directory %s" % str(dirname)
             raise ValueError, "file exists that should be a directory"
     msg = 'making uml root device of size %s at %s' % (size, rpath)
     print msg
     create_sparse_file(rpath, size)
     self.set_targetimage(rpath)
 def make_root_device(self, rpath, size=None):
     if size is None:
         size = self.cfg['basefile_size']
     dirname = path(rpath).dirname()
     if not dirname.isdir():
         if not dirname.exists():
             print "Creating directory %s" % str(dirname)
             dirname.makedirs()
         else:
             print "Can't create directory %s" % str(dirname)
             raise ValueError, "file exists that should be a directory"
     msg = 'making uml root device of size %s at %s' % (size, rpath)
     print msg
     create_sparse_file(rpath, size)
     self.set_targetimage(rpath)
Exemple #9
0
def bootstrap_base(suite, path, cfg=None, size=3000, mkfs='mke2fs'):
    cfg = UmlConfig()
    makepaths(dirname(path))
    create_sparse_file(path, size=size)
    uml = UmlBootstrapper(suite, path, cfg=cfg)
    uml.run_uml()
def bootstrap_base(suite, path, cfg=None, size=3000, mkfs='mke2fs'):
    cfg = UmlConfig()
    makepaths(dirname(path))
    create_sparse_file(path, size=size)
    uml = UmlBootstrapper(suite, path, cfg=cfg)
    uml.run_uml()