aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * fix XML name of DHCP host elementThomas Hipp2017-08-08
|/ | | | | | | Use `<host/>` instead of `<NetworkDHCPHost/>` as libvirt complains about the latter. Signed-off-by: Thomas Hipp <thipp@suse.de>
* cloudinit: show user_data in .tfstate fileThomas Hipp2017-08-08
| | | | | | This fixes #135. Signed-off-by: Thomas Hipp <thipp@suse.de>
* cloudinit: handle changes correctlyThomas Hipp2017-08-08
| | | | | | | | Use the correct cloudinit ID if things have changed. This fixes #145. Signed-off-by: Thomas Hipp <thipp@suse.de>
* fix importThomas Hipp2017-08-08
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* vendor: depend on terraform v0.10.0Thomas Hipp2017-08-08
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* network: ensure networks are recreatedThomas Hipp2017-08-08
| | | | | | | | | | Ensure that networks are only free'd if there are no errors. Furthermore, make sure that networks are recreated if they cannot be found on the remote. This fixes #74. Signed-off-by: Thomas Hipp <thipp@suse.de>
* ensure volumes are free'd if there are no errorsThomas Hipp2017-08-08
| | | | | | | | Make sure to only then free volumes if there are no errors. This fixes #151. Signed-off-by: Thomas Hipp <thipp@suse.de>
* Added support for specifying NVRAM templates when using UEFI images.J. Eduardo2017-08-01
|
* Improve documentationFlavio Castelli2017-07-31
| | | | | | Change the documentation to fit with the upstream one. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* 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>
* Fix broken testsFlavio Castelli2017-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests are failing because travis has an old version of libvirt that is not happy about the xml we generate. Unfortunately there's no way to get a more recent version of ubuntu on travis (it's stuck with trusty!!) and there are not libvirt 2.0 packages for trusty. This commit fixes the issues in the "inception" way: * travis provisions a ubuntu trusty VM as usual * the travis/host script does the following steps: * installs LXD * creates a system container based on the latest release of ubuntu * runs the container as privileged one * mount the git checkout into the container as read-only mount point (it easier than having a RW one) * runs the travis/guest script inside of the container: * install libvirt + go 1.8 * run the acceptance tests, save coverage to file * on the travis VM: * pull the coverage results file from the container * send it to coverall So far everything is working and is a miracle given the container, based on a more recent version of ubuntu, is using the kernel of the host, the old ubuntu trusty. This is just a termporary workaround until either travis updates its VMs to a more recent release of ubuntu or we switch the project to use Jenkins with an openSUSE worker. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* 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>
* vendor: add libvirt-go-xmlThomas Hipp2017-07-27
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Fix crash occuring when domain is in state file but doesn't exist in libvirt.Zbigniew Kostrzewa2017-07-15
|
* Exported logic used to create a new backingStore representation onto a ↵J. Eduardo2017-07-02
| | | | separated method.
* Added autodetection of base volume format, eliminating the need for explicit ↵J. Eduardo2017-07-02
| | | | configuration.
* Added support for using raw volumes and an example using the functionality.J. Eduardo2017-07-02
|
* Add autostart option for domain resource.localghost2017-06-26
|
* Merge pull request #136 from dmacvicar/domain-filesystemFlavio Castelli2017-06-26
|\ | | | | Add support of filesystem device to domain
| * 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: don't hide errorsFlavio Castelli2017-06-19
| | | | | | | | Ensure encoding errors are propagated to the user.
* | Merge pull request #132 from localghost/seed_rngFlavio Castelli2017-06-16
|\ \ | |/ |/| Seed RNG with current time.
| * Seed RNG with current time.Zbigniew Kostrzewa2017-06-15
| |
* | 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
| |/
* | Merge pull request #134 from monstermunchkin/feature/use-official-libvirt-goFlavio Castelli2017-06-16
|\ \ | |/ |/| use official libvirt-go bindings
| * use official libvirt-go bindingsThomas Hipp2017-06-16
|/ | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Merge pull request #128 from electrofelix/support-apparmorFlavio Castelli2017-06-09
|\ | | | | Use file type definition for disks
| * Use file type definition for disksDarragh Bailey2017-06-09
|/ | | | | | | | | | | | | Using file type definition for disks allows virt-aa-helper to identify the backing file correctly from the generated XML and add the necessary permissions to permit qemu to be able to access the storage disk provided it is located within a storage pool. Ensure that reading of existing tfstate using pool/volume definition remains working for upgrade compatibility by checking first if `File` is a non-zero string. Fixes #126
* Merge pull request #122 from monstermunchkin/feature/configurable-timeoutsFlavio Castelli2017-06-07
|\ | | | | Add configurable timeouts
| * Add default case for libvirt statesThomas Hipp2017-06-07
| | | | | | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
| * domain: add configurable timeoutsThomas Hipp2017-06-07
|/ | | | | | | | | | Terraform supports configurable timeouts since v0.9.0. With time commit, it's possible to configure the timeout for the creation of a libvirt domain. It defaults to 5 minutes, but can be as short as 10 seconds. Signed-off-by: Thomas Hipp <thipp@suse.de>
* Update README.mdFlavio Castelli2017-06-06
| | | Replace vndr references with glide.
* Merge pull request #130 from dmacvicar/glideFlavio Castelli2017-06-05
|\ | | | | Moving to glide
| * Fix broken tests by changing the way we vendor codeFlavio Castelli2017-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I configured the project to use vndr and I broke the unit tests. The tests were failing with these errors: ``` github.com/dmacvicar/terraform-provider-libvirt/vendor/github.com/hashicorp/terraform/builtin/providers/ignition vendor/github.com/hashicorp/terraform/builtin/providers/ignition/provider.go:92: undefined: types.SystemdUnit vendor/github.com/hashicorp/terraform/builtin/providers/ignition/provider.go:93: undefined: types.NetworkdUnit vendor/github.com/hashicorp/terraform/builtin/providers/ignition/provider.go:94: undefined: types.User vendor/github.com/hashicorp/terraform/builtin/providers/ignition/provider.go:95: undefined: types.Group ``` You can see the full log here: https://travis-ci.org/dmacvicar/terraform-provider-libvirt Terraform upstream doesn't have this problem because it vendors coreos ignition, which has all these types defined inside of `vendor/github.com/coreos/ignition/config/types/unit.go`. It turns out vndr is removing this file from our vendored terraform sources. I tried to use the whitelist option to prevent that from happening but it didn't work. Moreover, it looks like the whitelists are not stored into the `vendor.conf`, which means we would have to pass the flag every time we interact with the vendor code! With this commit we move from using vndr to use glide, which is not affected by this issue. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* | Merge pull request #129 from dmacvicar/fix-buildFlavio Castelli2017-06-05
|\| | | | | Fix build
| * DRY codeFlavio Castelli2017-05-27
| | | | | | | | | | | | | | Provide a generic function to return a copier to be used with `img.Import`. This reduces code duplication. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
| * Fix code broken accidentally by merge of PR 116Flavio Castelli2017-05-26
|/ | | | | | | Some of the code being used by CoreOS ignition was accidentally broken by a recent merge. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* Replace cryptic error with better oneFlavio Castelli2017-05-26
| | | | | | | | | | When the remote source was not found the check for its size failed because the size was empty, causing the to integer conversion to fail. The new code ensures the remote file exists before trying to convert its size. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* Merge pull request #107 from eamonnotoole/remote-ignition-temp-file-upstreamFlavio Castelli2017-05-26
|\ | | | | Write Ignition file as a volume in a libvirt storage pool
| * 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.
* | Merge pull request #116 from dmacvicar/if_modified_sinceFlavio Castelli2017-05-26
|\ \ | | | | | | Use If-Modified-Since for downloading images
| * | Use If-Modified-Since for downloading imagesAlvaro Saurin2017-03-29
| | |
* | | Fix travis: require latest stable release of GoFlavio Castelli2017-05-03
| | | | | | | | | | | | | | | The terraform code is taking advantage of features available only inside of go 1.8
* | | Update travis - do not use govendFlavio Castelli2017-05-03
| | | | | | | | | | | | | | | This is no longer needed now that all the deps are stored inside of the git repository.
* | | Vendor dependencies with vndrFlavio Castelli2017-05-03
|/ / | | | | | | This fixes issue #123
* | Code refactoring: rename structFlavio Castelli2017-03-29
| |
* | cloud-init: rework user-data handlingFlavio Castelli2017-03-29
| | | | | | | | | | | | | | | | Merge the user data specified by explicit terraform directives into the raw data provided by the user. The raw data has priority over the values specified using older directives. Signed-off-by: Flavio Castelli <fcastelli@suse.com>