summaryrefslogtreecommitdiff
path: root/libvirt/resource_libvirt_domain_test.go
Commit message (Collapse)AuthorAge
* Fix broken tests due to incorrect usage of t.Skip()Jonathan Ballet2018-03-05
| | | | | | | | | | | 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()
* refactor resourceLibvirtDomainCreateThomas Hipp2018-02-19
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* refactor schemasThomas Hipp2018-02-19
| | | | | | | | * 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>
* Add new method to get information on domain interfacesEamonn O'Toole2017-12-14
| | | | | | | | | | | | | | | | | | | 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
* support local cdromsThomas Hipp2017-12-01
| | | | | | | | | | | | | | | | | | | | 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>
* tests: format hcl stringsThomas Hipp2017-11-27
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Fix tests by adding fixture for kernel and initrdDuncan Mac-Vicar P2017-11-24
|
* Add support for kernel/initrd/cmdlineDuncan Mac-Vicar P2017-11-24
|
* remove duplicata declaration and simplify code.Dario Maiocchi2017-11-24
| | | | This fix is with the cmd "gofmt -w -s *"
* golint: Url -> URLDuncan Mac-Vicar P2017-11-19
|
* Add support for remote http disks (qemu http curl backend)Duncan Mac-Vicar P2017-11-19
|
* golint on resource_libvirt_domain_test.goDario Maiocchi2017-11-16
| | | | Use correct names in comments
* golint on various filesDario Maiocchi2017-11-16
|
* fix golinting libvirt/resource_libvirt_domain_testDario Maiocchi2017-11-16
|
* make golint happyDuncan Mac-Vicar P2017-11-10
|
* make the firmware file consistent with the docsDuncan Mac-Vicar P2017-11-10
|
* Fix libvirt ovmf firmware integration test on non-UbuntuDuncan Mac-Vicar P2017-11-10
| | | | | | | | 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.
* update Terraform and Go versionThomas Hipp2017-09-22
| | | | | | | | | | | | | | 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>
* Adding tests for machine and arch domain attributes from #166Dean Smith2017-08-30
|
* Added support for specifying NVRAM templates when using UEFI images.J. Eduardo2017-08-01
|
* fix failing console port conversionThomas Hipp2017-07-31
| | | | | | | When specifying a console port, it won't panic because of an invalid interface conversion. Signed-off-by: Thomas Hipp <thipp@suse.de>
* use github.com/libvirt-go-xmlThomas Hipp2017-07-27
| | | | | | | | Replace the custom XML structs with libvirt's offcial ones. This resolves #143. Signed-off-by: Thomas Hipp <thipp@suse.de>
* Add autostart option for domain resource.localghost2017-06-26
|
* Add support of filesystem device to domainFlavio Castelli2017-06-19
| | | | | Allow sharing of directories of the host with the guest by using the filesystem device.
* Fix broken testFlavio Castelli2017-06-16
| | | | The test got merged after we moved to the official libvirt go bindings.
* Merge pull request #133 from localghost/cpu_modeFlavio Castelli2017-06-16
|\ | | | | Add support for setting CPU mode.
| * Set "custom" CPU mode in CPU acceptance test.localghost2017-06-15
| | | | | | | | This is the default mode according to libvirt docs.
| * Add support for setting CPU mode.Zbigniew Kostrzewa2017-06-15
| |
* | use official libvirt-go bindingsThomas Hipp2017-06-16
|/ | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Write Ignition file as a volume in a libvirt storage poolEamonn O'Toole2017-03-23
| | | | | | | | | | | 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.
* Add scsi controller option and wwn to virtual disksEamonn O'Toole2017-03-22
| | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #103 from monstermunchkin/graphics-deviceFlavio Castelli2017-03-15
|\ | | | | create domain without graphics device
| * Add test for graphicsThomas Hipp2017-03-15
| | | | | | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* | Increase code coverage by running TF acceptance testsEamonn O'Toole2017-03-14
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gofmtAlvaro Saurin2017-03-06
|
* Improve code coverageFlavio Castelli2017-03-03
| | | | | | | 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>
* Ignition support: first phaseEamonn O'Toole2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Domain acceptance tests: mac is capitalized by libvirt, fix expectationsSilvio Moioli2016-10-27
|
* Domain acceptance tests: bridge is mandatory with mac, add itSilvio Moioli2016-10-27
|
* Domain acceptance tests: correct network name parameter nameSilvio Moioli2016-10-27
|
* Improved network resourceAlvaro Saurin2016-07-01
| | | | | Methods for adding/removing hosts to a network Style, formatting improvements and fixes
* testcase for issue #14Duncan Mac-Vicar P2016-05-05
|
* Use UUID as the resource id. Closes #3.Duncan Mac-Vicar P2016-04-23
|
* go fmtDuncan Mac-Vicar P2016-03-20
|
* implement network interfacesDuncan Mac-Vicar P2016-03-19
|
* rename test volumeDuncan Mac-Vicar P2016-03-13
|
* volume removal testDuncan Mac-Vicar P2016-03-12
|
* go fmtDuncan Mac-Vicar P2016-03-11
|
* test for volumeDuncan Mac-Vicar P2016-03-11
|
* use libvirt-go fork here tooDuncan Mac-Vicar P2016-03-11
|