Bump the versions of installed software components during the e2e test setup
to the latest stable releases.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Swap the order of commands in hack/e2e-setup.sh, so it becomes possible
to run 'make cluster-down` when the kind/kubectl binaries are missing.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Change the license of the collection to Apache 2.0 to be compliant with
the CNCF licensing requirements.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Drop the vendored document fragments from kubernetes.core to slightly
enhance the documented options and to allow changing the license of the
collection.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Fix the assertion that was introduced in
2521e8ba24 by removing the superfluous 'd'
at the end of the variable names.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Assert there are no or expected changes in verify.yml of the kubevirt_vm
integration test. This is necessary since in downstream tests the
kubemacpool operator might add annotations to the VM which can trigger a
changed result.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
This changes the runme.sh of the kubevirt_vm integration tests to retry
the connection to the VM until a login is possible. This is necessary
since it is not possible with Ansible alone to retry a task in case the
connection failed with the unreachable status. This can happen when the
sshd of the VM already accepts connections but a login is not yet
possible because the VM is still booting up.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Bump the tested ansible-core versions in integration.yml to the
latest supported versions (2.15-2.17).
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Bump the tested ansible-core versions in integration.yml to the latest
supported versions (2.15-2.17).
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Ensure compatibility with kubernetes.core >=3.10,<4.1.0 by replacing
deprecated imports of HAS_K8S_MODULE_HELPER and k8s_import_exception.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Fix the for loop ranging over vmi labels. This loop is missing the
.items() statement, which it causes the following error:
```
for key, value in vmi.metadata.labels:
ValueError: too many values to unpack (expected 2)
```
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
Improve the generated documentations by adding Ansible documentation markup
where appropriate.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Fill in the links.yml template and provide correct links and
communication channels for the collection.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
It adds unit tests for the render_template function. These test cases
cover all cases for non-mandatory fields in the VM template.
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
Add the running parameter to kubevirt_vm_info from which the
wait_condition is derived from when parameter wait is set to
yes.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Adds a test to assert deletion options are the expected.
Refactors python fixtures to reuse common fields in both create and
delete tests.
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
To properly wait for a state change in the kubevirt_vm module the
wait_condition needs to adapted to the state of running.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Cleanup the YAML passed to the k8s module so it conforms to yaml output
you would expect from yaml.dump. Also refactor the tests to get rid of
duplicate definitions and make use of pytest.mark.parametrize and
yaml.dump.
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
Adds unit test to assert VM label and field selectors work as expected.
Refactors python fixtures to reuse defaults and avoid code duplication.
Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>