Commit Graph

227 Commits

Author SHA1 Message Date
Felix Matouschek
ea8447dee8 fix(tests,kubevirt_vm): Fix assertion in verify.yml
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>
2024-06-05 16:17:31 +02:00
kubevirt-bot
520bf8d74f Merge pull request #105 from 0xFelix/runtime-2.15
chore: Update supported ansible-core versions to >=2.15
2024-06-05 09:59:43 +02:00
Felix Matouschek
fa6601cbe4 chore: Update supported ansible-core versions to >=2.15
Update the supported versions of ansible-core to >=2.15.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-05 09:16:56 +02:00
kubevirt-bot
92b11b5584 Merge pull request #103 from 0xFelix/ci-fixes
Make kubevirt_vm tests more robust
2024-06-04 10:37:37 +02:00
Felix Matouschek
2521e8ba24 fix(tests,kubevirt_vm): Assert there are no or expected changes
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>
2024-06-04 09:53:53 +02:00
Felix Matouschek
e1b2094e4e fix(tests,kubevirt_vm): Make waiting for VM more robust
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>
2024-06-04 09:53:53 +02:00
kubevirt-bot
4205a8328d Merge pull request #104 from 0xFelix/ansible-2.17
Bump tested ansible-core versions to 2.15-2.17
2024-06-04 08:21:35 +02:00
Felix Matouschek
57b172a865 chore(ci.yml): Bump tested ansible-core versions
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>
2024-06-03 16:41:40 +02:00
Felix Matouschek
14e9481e19 chore(integration.yml): Bump tested ansible-core versions
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>
2024-06-03 16:38:42 +02:00
kubevirt-bot
d81d9b1b96 Update changelog for release 1.4.0
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.4.0
2024-05-29 14:19:45 +00:00
kubevirt-bot
3a5100fd46 Merge pull request #102 from 0xFelix/bump-1.4.0
chore: Bump version to 1.4.0
2024-05-29 16:16:41 +02:00
Felix Matouschek
b910263304 chore: Bump version to 1.4.0
Bump version and add changelog with release summary.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-29 16:04:16 +02:00
kubevirt-bot
d4193f1d98 Merge pull request #100 from 0xFelix/kubernetes-core-4
fix: Ensure compatibility with kubernetes.core >=3.10,<4.1.0
2024-05-29 11:24:40 +02:00
Felix Matouschek
a9c6296794 fix: Ensure compatibility with kubernetes.core >=3.10,<4.1.0
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>
2024-05-29 10:11:05 +02:00
kubevirt-bot
131aacec43 Merge pull request #95 from 0xFelix/improved-docs
Provide links for docsite and improve docs by adding markup
2024-05-17 11:26:25 +02:00
kubevirt-bot
21c9bc8d4a Merge pull request #96 from jcanocan/add-inventory-tests
Add inventory unit tests
2024-05-17 11:24:25 +02:00
Javier Cano Cano
2b8767b424 test: add kubevirt inventory unit tests
Add unit tests for the following kubevirt functions:

- get_default_host_name
- get_host_from_service
- get_port_from_service
- parse
- fetch_objects
- get_cluster_domain
- get_available_namespaces
- get_vmis_for_namespace
- get_ssh_services_for_namespace
- set_ansible_host_and_port

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-05-15 17:41:50 +02:00
Javier Cano Cano
a1b0971b7f fix(kubevirt): fix inventory labels loop
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>
2024-05-15 16:23:45 +02:00
Javier Cano Cano
48b2a81679 fix(kubevirt): comment typo
Fix a small comment typo showing `LoadBalancer` instead of `NodePort`.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-05-15 16:12:19 +02:00
Felix Matouschek
4851e5d20d docs: Improve docs by adding markup
Improve the generated documentations by adding Ansible documentation markup
where appropriate.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-08 11:06:57 +02:00
Felix Matouschek
0fd9f625ee docs: Provide links for docsite
Fill in the links.yml template and provide correct links and
communication channels for the collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-08 11:03:23 +02:00
kubevirt-bot
10d8c23138 Merge pull request #92 from jcanocan/add-template-tests
tests: add render_template unit tests
2024-04-29 10:54:05 +02:00
Javier Cano Cano
86d1d748df tests: add render_template unit tests
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>
2024-04-29 10:27:52 +02:00
kubevirt-bot
13ceaf0f2d Merge pull request #91 from 0xFelix/wait-condition-info
feat(kubevirt_vm_info): Set wait_condition based on running
2024-04-25 14:06:24 +02:00
Felix Matouschek
71a88007fe feat(kubevirt_vm_info): Set wait_condition based on running
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>
2024-04-24 18:48:39 +02:00
Felix Matouschek
9d24aa878d cleanup: Run formatter on test_kubevirt_vm.py
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 18:38:51 +02:00
Felix Matouschek
03fcea0072 Merge pull request #90 from 0xFelix/docs-connections
docs: Use proper type for connections parameter

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 16:32:57 +02:00
kubevirt-bot
ce38c176a4 Merge pull request #86 from jcanocan/add-vm-delete-test
test: add kubevirt_vm delete test case
2024-04-24 16:08:25 +02:00
Javier Cano Cano
44936096ce test: add kubevirt_vm delete test case
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>
2024-04-24 15:57:32 +02:00
kubevirt-bot
c13bdfbbaf Merge pull request #89 from 0xFelix/wait-condition
fix(kubevirt_vm): Set wait_condition based on running
2024-04-24 15:28:23 +02:00
Felix Matouschek
86cee0172f fix(kubevirt_vm): Set wait_condition based on running
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>
2024-04-24 14:53:41 +02:00
Felix Matouschek
81418d7a30 Merge pull request #88 from 0xFelix/cleanup-yaml
cleanup: Cleanup YAML passed to k8s module

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 14:53:08 +02:00
Felix Matouschek
b232464dbe docs: Use proper type for connections parameter
The connections parameter is of type list of dicts.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 13:47:55 +02:00
Felix Matouschek
e5edf072cc cleanup: Cleanup YAML passed to k8s module
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>
2024-04-24 12:16:10 +02:00
kubevirt-bot
0531ac6c42 Merge pull request #85 from jcanocan/add-vm-info-test
test: add kubevirt_vm test cases
2024-04-19 09:04:04 +02:00
Javier Cano Cano
3814d1deb5 test: add kubevirt_vm test cases
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>
2024-04-18 17:01:30 +02:00
kubevirt-bot
8c7d55bb15 Update changelog for release 1.3.2
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.3.2
2024-04-17 13:24:51 +00:00
kubevirt-bot
0b24160331 Merge pull request #84 from 0xFelix/bump-ver
chore: Bump version to 1.3.2
2024-04-17 15:24:00 +02:00
Felix Matouschek
29ae157284 chore: Bump version to 1.3.2
Bump version once more and include appropriate changelogs this time.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-17 15:15:15 +02:00
kubevirt-bot
8d2bcd0613 Update changelog for release 1.3.1
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.3.1
2024-04-17 13:01:56 +00:00
kubevirt-bot
1fbd3cf4b4 Merge pull request #83 from 0xFelix/bump-ver
chore: Bump version to 1.3.1
2024-04-17 15:00:02 +02:00
Felix Matouschek
e35dcf8d43 chore: Bump version to 1.3.1
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-17 14:44:17 +02:00
kubevirt-bot
8881e33b71 Merge pull request #82 from 0xFelix/testing-docs
chore: Update testing instructions
2024-04-17 12:21:59 +02:00
Felix Matouschek
161b219e3e chore: Update testing instructions
Update the testing instructions and file exclusions in galaxy.yml, so
they still make sense in a released version of this collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-17 11:53:30 +02:00
kubevirt-bot
88189f432b Update changelog for release 1.3.0
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.3.0
2024-04-16 16:49:05 +00:00
kubevirt-bot
613a1b75f0 Merge pull request #81 from 0xFelix/bump-ver-2
chore: Bump version to 1.3.0
2024-04-16 18:44:37 +02:00
Felix Matouschek
c6306eef39 chore: Bump version to 1.3.0
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-16 18:34:06 +02:00
kubevirt-bot
67d579c363 Merge pull request #80 from 0xFelix/ansible-test-requirements
chore: Add requirements.txt for ansible-test units
2024-04-16 18:30:37 +02:00
Felix Matouschek
ee7f99267c chore: Add requirements.txt for ansible-test units
Add the requirements.txt with requirements needed by ansible-test units.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-16 18:17:37 +02:00
kubevirt-bot
b6c061fb9a Merge pull request #75 from 0xFelix/winrm
feat: Set ansible_connection to winrm for Windows hosts
2024-04-16 17:08:36 +02:00