def provider(self): self._provider = provider if provider is None: self.vm_up = vagrant.bake("up", "--provider", provider) else: self.vm_up = vagrant.bake("up")
from sh import vagrant from sh import rsync vm_up = vagrant.bake("up") # vagrant up vm_ssh = vagrant.bake("ssh") # vargant ssh # use self.vm_up instead to cover the provider # vm_init = vagrant.bake("init") # vagrant init precise32 http://files.vagrantup.com/precise32.box vm_suspend = vagrant.bake("suspend") vm_halt = vagrant.bake("halt") # ? vm_destroy = vagrant.bake("destroy") # ? class vagrant: _provider = None def __init__(self, label, dir=None): """creates dir/label""" if dir is None: raise NotImplementedError() # use cwd else: self.dir = dir self.label = label # create dir/label def bootstrap(self, script):
from sh import vagrant from sh import rsync vm_up = vagrant.bake("up") # vagrant up vm_ssh = vagrant.bake("ssh") # vargant ssh # use self.vm_up instead to cover the provider # vm_init = vagrant.bake("init") # vagrant init precise32 http://files.vagrantup.com/precise32.box vm_suspend = vagrant.bake("suspend") vm_halt = vagrant.bake("halt") # ? vm_destroy = vagrant.bake("destroy") # ? class vagrant: _provider = None def __init__(self, label, dir=None): """creates dir/label""" if dir is None: raise NotImplementedError() # use cwd else: self.dir = dir self.label = label # create dir/label