Skip to content

Commit

Permalink
modify library ovf clone tests to run on the eco vsphere env (#572)
Browse files Browse the repository at this point in the history
This test takes between 3 to 5 minutes due to OVF image creation, which is not too long (it was much more then that before the modification), but it can still make the PRs a little slower to get merge, so FYI.
The purpose of the test is to verify few vmware_rest modules related to ovf such as content_locallibrary_info vcenter_ovf_libraryitem.
The modules meant to enable the user to create vms from OVF image on a specific content library etc...
Note: seems like for these modules we need to add requirements.txt file with python packages to be installed, so I added it aswell in this PR.

Reviewed-by: mikemorency
  • Loading branch information
shellymiron authored Dec 26, 2024
1 parent d672536 commit 0e74dec
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ prepare_symlinks:
install-ansible-collections:
ansible-galaxy collection install --upgrade -r tests/integration/requirements.yml

.PHONY: install-python-packages
install-python-packages:
pip3 install -r tests/integration/requirements.txt

.PHONY: remove_aliases
remove_aliases:
@find tests/integration/targets/ -name "aliases" -exec rm -f {} +
Expand Down
10 changes: 10 additions & 0 deletions tests/integration/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
aiohttp
pyVim
podman
requests
pycdlib
ansible-core

pyVmomi>=6.7
# automation sdk >tag:8.0.2.0 requires pyVmomi 8
git+https://github.com/vmware/vsphere-automation-sdk-python.git@v8.0.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
resource_pool_name: "{{ tiny_prefix }}-test-clone-on-library-ovf-resource-pool"
vm_name: "{{ tiny_prefix }}-clone-on-library-ovf-vm"
vm_from_ovf_image_name: "{{ tiny_prefix }}-vm-from-ovf"
vm_from_ovf_image_on_host: "{{ tiny_prefix }}-vm-from-ovf-on-host"
library_name: "{{ tiny_prefix }}-content-library-test"
remote_path: '/nfs/iso_datastore'
num_libraries_to_loop: 4
vcenter_invalid_vm_folder: "invalid-folder-name"
ovf_image_name: "ovf-image"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- hosts: localhost
gather_facts: no
collections:
- community.vmware

tasks:
- name: Import vmware_rest_lookup_plugin test
ansible.builtin.import_role:
name: vmware_rest_library_and_ovf_clone
tags:
- eco-vcenter-ci
Loading

0 comments on commit 0e74dec

Please sign in to comment.