| Commit message (Collapse) | Author | Age |
... | |
|/
|
|
|
|
|
| |
Use `<host/>` instead of `<NetworkDHCPHost/>` as libvirt complains
about the latter.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
| |
This fixes #135.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
| |
Use the correct cloudinit ID if things have changed.
This fixes #145.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Make sure to only then free volumes if there are no errors.
This fixes #151.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
|
|
|
|
|
| |
Change the documentation to fit with the upstream one.
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
|
|
|
|
|
|
|
| |
When specifying a console port, it won't panic because of an invalid
interface conversion.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Replace the custom XML structs with libvirt's offcial ones.
This resolves #143.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
|
|
|
| |
separated method.
|
|
|
|
| |
configuration.
|
| |
|
| |
|
|\
| |
| | |
Add support of filesystem device to domain
|
| |
| |
| |
| |
| | |
Allow sharing of directories of the host with the guest by using the
filesystem device.
|
| |
| |
| |
| | |
Ensure encoding errors are propagated to the user.
|
|\ \
| |/
|/| |
Seed RNG with current time.
|
| | |
|
| |
| |
| |
| | |
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.
|
| |/ |
|
|\ \
| |/
|/| |
use official libvirt-go bindings
|
|/
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|\
| |
| | |
Use file type definition for disks
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Add configurable timeouts
|
| |
| |
| |
| | |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|/
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Replace vndr references with glide.
|
|\
| |
| | |
Moving to glide
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| | |
Fix build
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
| |
Some of the code being used by CoreOS ignition was accidentally
broken by a recent merge.
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Write Ignition file as a volume in a libvirt storage pool
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Use If-Modified-Since for downloading images
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The terraform code is taking advantage of features available only
inside of go 1.8
|
| | |
| | |
| | |
| | |
| | | |
This is no longer needed now that all the deps are stored inside of the
git repository.
|
|/ /
| |
| |
| | |
This fixes issue #123
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|