Commit Graph
100 Commits
Author SHA1 Message Date
Felix Matouschek ef18e17d5c chore(ci): Exclude Python 3.11 from milestone
This Python version is no longer supported by milestone versions of
ansible-core.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-08-12 09:29:06 +02:00
Felix Matouschek 5bd7d7169a chore(ci): Exclude Python 3.11 from devel
This Python version is no longer supported by devel versions of
ansible-core.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-07-31 10:37:35 +02:00
Felix Matouschek a2c39afcbc chore: Add ignore file for ansible-core 2.20
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-07-01 11:53:24 +02:00
Felix Matouschek 235306be00 chore(deps): Add missing test dependency
Add missing dependency on typing-extensions to test-requirements.txt.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-06-27 09:17:36 +02:00
Felix Matouschek 6d9f9cc407 docs(README.md): Use absolute link for LICENSE
Use an absolute link for the LICENSE so it can be accessed when looking
at the README.md on Ansible Galaxy.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-06-05 10:13:32 +02:00
Felix Matouschek 976d3c668b Bump version and update changelog for release 2.2.3
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-06-04 11:39:42 +02:00
Felix Matouschek dc8d73edee chore(deps): Bump kubernetes.core to >=5.2.0,<7.0.0
Bump the dependency on kubernetes.core to >=5.2.0,<7.0.0.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-06-04 11:37:24 +02:00
Felix Matouschek e5b3cbeb58 Bump version and update changelog for release 2.2.2
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-05-20 14:20:08 +02:00
Felix Matouschek 804fe3a725 meta: Bump minimum Ansible version to 2.16
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-05-20 14:20:08 +02:00
Felix Matouschek 168c8ee239 docs: Add kubevirt_vmi_info to README.md
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-05-16 10:46:06 +02:00
Felix Matouschek 73eae2facb Bump version and update changelog for release 2.2.1
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-05-16 10:43:39 +02:00
Felix Matouschek 6570b7fc7e fix(e2e-setup.sh): Wait for CDI to be available
Wait for CDI to be available after deploying it.

Also add the missing --deploy-kubevirt-cdi flag to the usage help.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-05-09 10:20:58 +02:00
Felix Matouschek 8c31d4f5ab chore: Bump version to 2.2.0
Bump version to 2.2.0 and add a changelog entry for it.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-30 16:16:04 +02:00
Felix Matouschek aeb98d241c fix(kubevirt_vm): Allow switching between running and run_strategy
Allow switching between running and run_strategy by always clearing the
other value. E.g. if run_strategy was provided then running set to None
to clear it or vice versa.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-28 17:21:52 +02:00
Felix Matouschek 4a8b4ead2f feat(inventory): Use OCP projects if available
If no namespaces were specified in the inventory config try to get all
available namespaces by trying to list OCP projects first. If the resource
was not found (no OCP cluster) fall back to regular namespaces.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-28 15:45:38 +02:00
Felix Matouschek 117694ab1e fix(changed): Fix change detection temporarily
Fix the change detection of kubernetes.core temporarily by monkey
patching the service.diff_objects function. This fix should be removed
once it was merged into kubernetes.core. A dummy _patch_diff_objects
function is introduced to satisfy ansible linters.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-28 15:06:22 +02:00
Felix Matouschek a9d7fa22aa feat(modules): Add hidden_fields argument
Add the hidden_fields argument to kubevirt_vm and kubevirt_{vm,vmi}_info
which allows to hide and ignore certain fields in the returned definition
of a VM or VMI. By default this argument is set to ignore changes to the
kubemacpool.io/transaction-timestamp annotation and managed fields, which
may change at any time and cause the modules to return a changed status
although nothing has changed other than their values.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-28 14:39:42 +02:00
Felix Matouschek fe822b3352 chore(deps): Bump kubernetes.core to >= 5.2.0
In order to make use of new features in kubernetes.core bump its minimum
version to 5.2.0.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-28 10:26:53 +02:00
Felix Matouschek 6723f4e6b1 chore: Bump supported python and ansible-core versions
Bump to python >=3.10,<=3.13 and ansible-core >=2.16,<=2.19.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-25 15:06:55 +02:00
Felix Matouschek 93473cdd47 fix: Ensure compatibility with ansible-core >= 2.19
ansible-core 2.19 changes the way templates are trusted and provides a
new way of patching module args in unit tests.

With this commit the following changes are made to ensure compatibility
with ansible-core >= 2.19:

- Mark inputs to composable as trusted to align with the new template
  trust model.
- Utilize the updated method for patching module arguments in unit tests
  if available.
- Replace direct access to the self._cache attribute with the inventory's
  cache property.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-23 11:25:51 +02:00
Felix Matouschek da8e04243b feat(inventory): Add unset_ansible_port option
This adds the unset_ansible_port option to the inventory, which allows to
control if the value of ansible_port should be unset if no non-default
value was found.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-08 16:38:50 +02:00
Felix Matouschek 17ddb44b8a feat(inventory): Lookup winrm services for Windows hosts
This feature adds looking up winrm services and tries to populate the
ansible_host and ansible_port variables with the values from a
found service for the host. It looks up both winrm HTTP and HTTPS
services and prefers HTTPS if it found both for a given host.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-04-03 15:24:34 +02:00
Felix Matouschek cf64caee84 fix(ci): Exclude ansible-compat's new cache location
ansible-compat 25.0.0 now stores its cache in .ansible. Ignore this
location when running ansible-lint and in .gitignore.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2025-01-15 09:50:47 +01:00
Felix Matouschek 64bae7a14e ci(integration): Drop common-instancetypes deployment
Drop the flag for common-instancetypes deployment that was removed
previously.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-11-19 17:12:55 +01:00
Felix Matouschek ac9d7a1cc5 chore(e2e-setup): Bump to KubeVirt 1.4.0
Bump to KubeVirt 1.4.0 and drop manual deployment of
common-instancetypes as they are now deployed by KubeVirt by default.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-11-19 17:01:21 +01:00
Felix Matouschek 198a9d3f79 OWNERS: Drop opokornyy
Drop inactive reviewer opokornyy from OWNERS.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-11-08 16:04:25 +01:00
Felix Matouschek bab88aedab chore: Bump tested Ansible and Python versions
Bump the tested Ansible and Python version to include Ansible 2.18 and
Python 3.13.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-11-08 15:00:17 +01:00
Felix Matouschek 429824e631 chore: Add sanity ignore for ansible 2.19
Add sanity ignore file for ansible 2.19 to make CI pass again.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-11-04 15:35:20 +01:00
Felix Matouschek 94fdcca5c2 chore: Bump version to 2.1.0
Bump version and add changelog with release summary.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-09-04 14:56:30 +02:00
Felix Matouschek 2b875e145b renovate: Enable dashboard and format config
Format the renovate config and enable the dashboard for easier overview.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-28 17:16:00 +02:00
Felix Matouschek e98d9a48bd feat: Add kubevirt_vmi_info module
Add the kubevirt_vmi_info module which allows to fetch information about
VirtualMachineInstance(s).

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-19 08:22:24 +02:00
Felix Matouschek cd270e271b cleanup(info): Extract execute_module
Extract the execute_module function from the kubevirt_vm_info module to
make it available for other modules.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-19 08:22:02 +02:00
Felix Matouschek ae6f5900ea cleanup(yamllint): Add yamllint options required by ansible-lint
Fix ansible-lint warnings by adding required yamllint options.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-16 08:58:15 +02:00
Felix Matouschek 713193510a kubevirt_vm_info: Run integration test in random namespace
Run the integration tests for kubevirt_vm_info in a random namespace
and cleanup after the tests finish.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-16 08:37:40 +02:00
Felix Matouschek 71ea312cfc kubevirt_vm: Run integration test in random namespace
Run the integration tests for kubevirt_vm in a random namespace
and cleanup after the tests finish.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-16 08:37:36 +02:00
Felix Matouschek 00690ebc4c inventory_kubevirt: Run integration test in random namespace
Run the integration tests for inventory_kubevirt in a random namespace
and cleanup after the tests finish.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-16 08:37:00 +02:00
Felix Matouschek 68ec51982c e2e-setup: Use virt-operator to deploy common-instancetypes
Use the bundled common-instancetypes deployed by virt-operator instead
of deploying common-instancetypes manually.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-14 14:56:03 +02:00
Felix Matouschek ddd31183ba chore(renovate): Add renovate config
Add renovate configuration to automatically update used software
versions in e2e-setup and the github actions used by this repository.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-08-14 14:38:39 +02:00
Felix Matouschek 29a74c492e chore: Bump version to 2.0.0
Bump version and add changelog with release summary.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-17 11:30:16 +02:00
Felix Matouschek c1f651d972 feat(kubevirt_vm): Add support for RunStrategy
This change adds support for setting the RunStrategy of a VM.

Depending on the value set the wait condition for the VM is adjusted.
For the values Always, RerunOnFailure or Once the wait condition will
wait for the VM to run and be ready. For the value Halted the wait
condition will wait for the VM to not exist. For the value Manual
the wait condition is not set.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-16 10:20:09 +02:00
Felix Matouschek 25c38134a3 doc(README): Update supported kubernetes.core versions
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 11:09:23 +02:00
Felix Matouschek 501bd3d52f cleanup(kubevirt_vm): Simplify tests
Simplify kubevirt_vm tests by not using fixtures if not needed.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 11:09:23 +02:00
Felix Matouschek a2de465d1f cleanup(kubevirt_vm_info): Simplify tests
Simplify kubevirt_vm_info tests by not using fixtures if not needed.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 11:09:23 +02:00
Felix Matouschek 7495c34766 cleanup,doc(inventory): Add missing docstring
Add missing docstring for the _connections_compatibility method.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 11:09:23 +02:00
Felix Matouschek 9029574f7c cleanup(inventory): Mark methods as private
Mark all methods of the inventory which should be private with a underscore
prefix in their name.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 11:09:23 +02:00
Felix Matouschek c55763b5aa cleanup(inventory,tests): Remove dependency on addict
Replace the remaining uses of addict's Dict with ResourceField of the
Kubernetes client. This allows to drop the dependency on addict.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 10:34:13 +02:00
Felix Matouschek 060ac97b68 fix(inventory): Fix inventory source caching
Fix inventory source caching by separating the fetching of objects and
populating the inventory. This way objects can be fetched from the K8S
API or from a configured cached and the cache related parameters on the
plugin now actually work.

The inventory source cache was tested with the ansible.builtin.jsonfile
cache plugin and 100k hosts (~2G JSON file). Though it took a noticeable
amount of time for the inventory plugin to run it worked fine and no
failures could be observed.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-12 10:32:24 +02:00
Felix Matouschek a228fe2c26 cleanup(inventory): Rename default hostname method
Rename method get_default_host_name to get_default_hostname.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-11 15:28:32 +02:00
Felix Matouschek c4570b2089 cleanup(inventory): Use dicts where possible
Use dicts instead of ResourceFields where possible to allow
easier serialization/deserialization of objects fetched from the K8S
API.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-11 12:07:09 +02:00
Felix Matouschek 033f373c94 fix(inventory): Align versions for connections compatibility
Align the version in which backwards compatibility for the connections
parameter will be removed.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-11 12:07:09 +02:00
Felix Matouschek fd9c30103d cleanup(inventory): Drop support for multiple connections
The support for connections to multiple clusters in the inventory
plugin is dropped to better align with user expectations and how other
inventories work. If inventories of multiple clusters are needed the
inventory can be run multiple times with different configurations.
This also helps to clean up the code and make it simpler.

For now this adds a compatibility helper so that configurations with a
single connection entry remain supported and a warning is emitted.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-10 15:32:40 +02:00
Felix Matouschek 2e9d6cec15 cleanup(kubevirt_auth_options): Remove incorrect statement
Remove incorrect statement about a feature being added in a certain
version.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-10 15:32:40 +02:00
Felix Matouschek c279ba5fba chore(yamllint): Exclude .tox/ and .venv/
Do not lint files in .tox/ and .venv/ which are out of our control.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-10 15:32:40 +02:00
Felix Matouschek 463142c280 chore: Prepare release 1.5.0
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-10 14:21:34 +02:00
Felix Matouschek ff6a067c84 feat(inventory): Deprecate connections parameter
Deprecate the connections parameter of the inventory plugin. For now
this adds only a warning message while keeping the functionality.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-10 13:45:11 +02:00
Felix Matouschek 5e1271b609 chore(inventory): Add examples for stopped VMs
Add examples that show how to use the collection with stopped VMs.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:51 +02:00
Felix Matouschek f3b40ffdbd test(inventory): Add integration test for stopped VMs
Add an integration test that ensures that the inventory supports looking up
stopped VMs.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:51 +02:00
Felix Matouschek 3d501de002 test(inventory): Add blackbox unit test for stopped VMs
Add a blackbox unit test that ensures that the inventory supports looking up
stopped VMs.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:51 +02:00
Felix Matouschek be65833724 cleanup(tests): Major rework of inventory unit tests
Rework the inventory unit tests by splitting up
tests/unit/plugins/inventory/test_kubevirt.py into multiple files,
by trying to simplify the test code and making it more robust and by
using appropriate fixtures. This also adds new tests or test cases to
improve code coverage. Tests that work from the black box perspective
are now located in a subdirectory.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:51 +02:00
Felix Matouschek a94eda613f feat(inventory): Support stopped VMs
This enables the inventory to list stopped VMs by refactoring
the add_from_namespace method. The method is now looking up the related
VM and VMIs for a host and adds all status attributes of both objects
to the host's vars. To distinguish the origin of vars an appropriate
prefix (vm_ or vmi_) is applied to their name. The inventory now supports
hosts comprising just a VM (stopped), just a VMI or both.

This changes some of the hostvars previously reported by the inventory
plugin:

Dropped:
- object_type
- cluster_name

Now prefixed with vm_ or vmi_ according to the origin:
- labels
- annotations
- resource_version
- uid

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 16:04:47 +02:00
Felix Matouschek c096f069e3 cleanup(kubevirt_vm): Drop dependency on Jinja2
Drop the dependency on Jinja2 in the kubevirt_vm module by using dicts
to construct a VM instead of rendering jinja templates internally.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-03 14:40:50 +02:00
Felix Matouschek 8ae9a395e9 cleanup(inventory): Consolidate fetching resources with K8SClient
This consolidates fetching of resources with K8SClient by introducing
the get_resources method, which is can be called by getters for certain
kinds of objects.

The former get_vmis_for_namespace method, which contains the main logic
of the inventory is renamed to populate_inventory_from_namespace.

This refactors the following getters:

- get_available_namespaces
- get_ssh_services_for_namespace

This introduces the following getters:

- get_vms_for_namespace (to be used in the following commit)
- get_vmis_for_namespace

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:56:04 +02:00
Felix Matouschek 01a0e535e2 cleanup(inventory): Move set_composable_vars to bottom of file
This suits the control flow a bit better and helps refactoring the
inventory plugin.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:56:04 +02:00
Felix Matouschek 63a03d75b2 cleanup(inventory): Rename GetVmiOptions to InventoryOptions
... and ensure base_domain is always initialized with the cluster
domain. This is done in preparation for a major refactoring of the
inventory plugin.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:56:04 +02:00
Felix Matouschek 241ca75b28 cleanup(inventory): Make methods more robust
Make the logic in the following methods more robust and add type hints
where appropriate.

- get_host_from_service
- get_port_from_service
- is_windows
- setup
- fetch_objects
- set_ansible_host_and_port
- set_composable_vars

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:55:50 +02:00
Felix Matouschek 83bcffedd7 cleanup(inventory): Drop unneeded connection_plugin and transport
These two variables seem to be unused and removing them did not have any
effect.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:54:43 +02:00
Felix Matouschek 4b70e0471f cleanup(inventory): Apply pylint suggestions
Make pylint happy by applying some simple suggestions.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-07-01 11:54:43 +02:00
Felix Matouschek 1bcef9c64d cleanup: Sync galaxy.yml with requirements.yml
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 16:14:12 +02:00
Felix Matouschek 1630cddc44 cleanup,test(modules): Cleanup module unit tests
Improve syntax in module unit tests and use only mocker instead of a
combination of mocker and monkeypatch.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 16:08:51 +02:00
Felix Matouschek 52d4b4c731 cleanup: Sync kind version in integration yaml
Use kind v0.23.0 in integration.yml and hack/e2e-setup.sh.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 16:01:38 +02:00
Felix Matouschek e2f55848c1 ci: Check if tree is clean before running other jobs
Run make format and check if the tree is still clean before running
other CI jobs.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 16:01:38 +02:00
Felix Matouschek 3261beff0a chore: Run make format
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 16:01:38 +02:00
Felix Matouschek d7d70125a7 chore: Add .vscode launch configs
Add vscode launch configs to debug the modules and the inventory plugin.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 15:44:21 +02:00
Felix Matouschek 35b2d3ef6b tests: Use ansible-test for integration tests
Integration tests do not work with tox, therefore use ansible-test to
run them.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-27 15:43:03 +02:00
Felix Matouschek 9a8cafd6b1 fix(ci): Do not test ansible-core milestone with py3.10
Python 3.10 is no longer supported by ansible-core milestone, so this
excludes it from the test matrices.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-26 09:37:51 +02:00
Felix Matouschek 738c70073e chore: Ensure compatibility with kubernetes.core >=3.1.0,<6.0.0
Ensure compatibility with kubernetes.core >=3.1.0,<6.0.0 and update
requirements.yml.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-18 07:59:06 +02:00
Felix MatouschekandGitHub d55c48ede4 Merge pull request #112 from 0xFelix/ci-devel
fix(ci): Do not test ansible-core devel with py3.10

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-18 07:58:11 +02:00
Felix Matouschek c4b7cc69e7 fix(ci): Do not test ansible-core devel with py3.10
Python 3.10 is no longer supported by ansible-core devel, so this
excludes it from the test matrices.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-18 07:56:47 +02:00
Felix Matouschek 634ccb8363 chore: Bump versions in hack/e2e-setup.sh
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>
2024-06-13 11:19:20 +02:00
Felix Matouschek 1a814389fe fix: Allow running make cluster-down when binaries are missing
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>
2024-06-13 11:18:17 +02:00
Felix Matouschek 5d31db3ea2 chore: Change license Apache 2.0
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>
2024-06-11 11:39:32 +02:00
Felix Matouschek df629ac39e chore: Drop vendored document fragments
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>
2024-06-11 11:39:21 +02:00
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
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
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
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
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
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
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
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 MatouschekandGitHub 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
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 MatouschekandGitHub 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
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