From b0cce0b8c417ffbe641984f4c5b8d3cf1589745e Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Wed, 12 Sep 2018 12:51:08 +0200 Subject: [PATCH 1/2] vmtools: actually use the chosen provider Fixes #561 --- fdroidserver/vmtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/vmtools.py b/fdroidserver/vmtools.py index f085afaf..56ded00f 100644 --- a/fdroidserver/vmtools.py +++ b/fdroidserver/vmtools.py @@ -184,7 +184,7 @@ class FDroidBuildVm(): global lock with lock: try: - self.vgrnt.up(provision=provision) + self.vgrnt.up(provision=provision, provider=self.provider) self.srvuuid = self._vagrant_fetch_uuid() except subprocess.CalledProcessError as e: raise FDroidBuildVmException("could not bring up vm '%s'" % self.srvname) from e From 1e90b6118e9d51138b2b7a665ae6b82ecee686a9 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Wed, 12 Sep 2018 12:56:25 +0200 Subject: [PATCH 2/2] vmtools: fix comment typos --- fdroidserver/vmtools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fdroidserver/vmtools.py b/fdroidserver/vmtools.py index 56ded00f..4c683095 100644 --- a/fdroidserver/vmtools.py +++ b/fdroidserver/vmtools.py @@ -103,7 +103,7 @@ def get_build_vm(srvdir, provider=None): :param srvdir: path to a directory which contains a Vagrantfile :param provider: optionally this parameter allows specifiying an - spesific vagrant provider. + specific vagrant provider. :returns: FDroidBuildVm instance. """ abssrvdir = abspath(srvdir) @@ -163,7 +163,7 @@ class FDroidBuildVm(): Use the factory method `fdroidserver.vmtools.get_build_vm()` for getting correct instances of this class. - This is intended to be a hypervisor independant, fault tolerant + This is intended to be a hypervisor independent, fault tolerant wrapper around the vagrant functions we use. """ def __init__(self, srvdir): @@ -451,7 +451,7 @@ class LibvirtBuildVm(FDroidBuildVm): try: _check_call(['virsh', '-c', 'qemu:///system', 'snapshot-create-as', self.srvname, snapshot_name]) except subprocess.CalledProcessError as e: - raise FDroidBuildVmException("could not cerate snapshot '%s' " + raise FDroidBuildVmException("could not create snapshot '%s' " "of libvirt vm '%s'" % (snapshot_name, self.srvname)) from e