| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
Current tests were broken with the following error:
# github.com/dmacvicar/terraform-provider-libvirt/libvirt
libvirt/resource_libvirt_domain_test.go:874: Skip call has possible formatting directive %s
libvirt/resource_libvirt_domain_test.go:882: Skip call has possible formatting directive %s
FAIL github.com/dmacvicar/terraform-provider-libvirt/libvirt [build failed]
t.Skip with formatting should be t.Skipf()
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
| |
* use boolean where it makes sense
* do not use schema.TypeMap, but schema.TypeList with MaxItems=1
* do not split domain schema
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've found that, when executing destroy/create cycles on
a domain where the virtual network(s) to which it is attached
are persisted across these cycles then we get network failures
on recreation of the domain since the old entries for
the domain are still present in the virtual network(s). This issue
should (hopefully) be fixed by commit
a20d2a92668b2d5e077267c50074bf853ef371d. We've also found that,
on occasion, we don't get complete information on a domain's
interfaces from ListAllInterfaceAddresses. This patch implements
a new method getDomainInterfacesFromNetworks which is called from
domainGetIfacesInfo after the qemu agent method has been used if
the qemu agent method doesn't return any information. This new
method builds the interface information from information collected
from the networks themselves.
Change-Id: I5271ee191db93b2b1a0f14dc226d0b945f77a901
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Local cdroms can now be added directly to the domain. See the
following example:
```hcl
resource "libvirt_domain" "test-domain" {
name = "test"
disk {
file = "path/to/file.iso"
}
}
```
Furthermore, a small Tiny Core Linux (TCL) ISO image has been added to
the testdata. This can be used for testing purposes.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
| |
|
|
|
|
| |
This fix is with the cmd "gofmt -w -s *"
|
| |
|
| |
|
|
|
|
| |
Use correct names in comments
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
On SUSE systems, these paths are different.
In order to reuse the code that looks for the right files, we
make the template and no-template case sub-tests of the main test
containing the lookup code.
Also, if the files are not there, skip the test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This updates Terraform to the latest version. Travis will build with
go1.9 from now on, since Terraform > 0.10.2 doesn't support go1.8.
Glide was run with `--strip-vendor` which removes a lot of unnecessary
files.
Tests and Docs regarding `ignition` have been updated.
This resolves #194.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
When specifying a console port, it won't panic because of an invalid
interface conversion.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
| |
Replace the custom XML structs with libvirt's offcial ones.
This resolves #143.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
|
|
|
|
| |
Allow sharing of directories of the host with the guest by using the
filesystem device.
|
|
|
|
| |
The test got merged after we moved to the official libvirt go bindings.
|
|\
| |
| | |
Add support for setting CPU mode.
|
| |
| |
| |
| | |
This is the default mode according to libvirt docs.
|
| | |
|
|/
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids the problem where the Ignition file is remote to
the host on which the libvirt domain is being created. We've
added a "libvirt_ignition" resource which manages the Ignition
file in the libvirt volume - creates it, and destroys it. The
"coreos_ignition" field in the libvirt_domain definition must
point to the Id of a "libvirt_ignition" resource.
The code is modelled on that used for CloudInit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've added the facility to define a disk bus type of scsi to the
specification of a disk in the domain definition. If the disk is
a scsi disk, a random wwn is generated unless a wwn is provided for
that disk.
The disk stanza now looks as follows:
disk {
volume_id = "${libvirt_volume.mydisk.id}"
scsi = "yes"
wwn = "05abcd123456789a"
}
Having "scsi" present with any value will specify a scsi bus for
the disk. If "wwn" is present for a scsci disk then the value of
"wwn" is used for the disk wwn, otherwise a random value is generated.
|
|\
| |
| | |
create domain without graphics device
|
| |
| |
| |
| | |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has required a number of changes, first of all to .travis.yml
to allow the TF acceptance tests to run:
1. To avoid the need to build libvirt, we've added the Ubuntu
"cloud-archive:mitaka" repo which contains more recent versions
of libvirt than those that ship with 14.04. This also cuts
a couple of minutes off the travis run-time.
2. We need to define and start a default storage pool, since one
doesn't exist by default on 14.04.
3. We need to add the travis user to the libvirtd group, and
then run both tests with "sg" to set the libvirtd group without
requiring a log-out/log-in
4. We need to set a couple of global environment variables for
the travis run:
- TF_ACC to true to ensure that TF acceptance tests are run
- LIBVIRT_DEFAULT_URI needs to be set, we set it to qemu://system.
- We've added a new environment variable that can be used to
set the domain type for test purposes. We need to set the
domain type to "qemu" for travis CI. "test" doesn't implement
all of the libvirt functions that are used, and "kvm" isn't
yet available in travis.
5. We have to add "-v" to the test and goveralls command to ensure
that TF acceptance tests are run.
In addition, we had to make the following change to
resource_libvirt_domain_test.go
- The "br0" bridge doesn't exist by default, so instead we use
the default network in resource_libvirt_domain_test.go
With these changes the test coverage goes up to 44% as measured by
goveralls. Because we're using qemu emulation, the tests take about
2 mins to run on travis.
We might not need to run both the tests and goveralls; one might do.
|
| |
|
|
|
|
|
|
|
| |
Improve code coverage results by writing some unit tests.
These are really the low hanging fruits, more should come later.
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few changes here:
1. CoreOS Ignition support: A CoreOS Ignition file can be
specified for a domain using the "coreos_ignition"
parameter. Alternatively the "coreos_ignition" parameter
can be set equal to a Terraform ignition object. If the
latter, the ignition object is written to a file in /tmp
whose name is a hash of the object itself. This file-name
is stored in libvirt domain metadata, and is removed when
the domain is destroyed. This feature requires the emission
of qemu:commandline XML XML and also the setting of the XML
name-space to "http://libvirt.org/schemas/domain/qemu/1.0"
2. "graphics" block: A "graphics" block can be specified
in a domain definition. We've added this because we've
found that for some builds of qemu the default "spice"
emulator doesn't work and results in failure to boot the
VMs.
3. "console" block: One or more "console" blocks can be
specified in a domain definition. Note the description
in domain.html.markdown, and the information in
https://libvirt.org/formatdomain.html#elementsConsole
Added a test for coreos_ignition in resource_libvirt_domain_test.go
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Methods for adding/removing hosts to a network
Style, formatting improvements and fixes
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|