2017-11-06 17:28:15 +01:00
|
|
|
# Test code for the vmware_guest module.
|
|
|
|
# Copyright: (c) 2017, James Tanner <tanner.jc@gmail.com>
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
2019-04-24 19:58:09 +02:00
|
|
|
- import_role:
|
|
|
|
name: prepare_vmware_tests
|
|
|
|
vars:
|
2019-05-16 15:36:48 +02:00
|
|
|
setup_datacenter: true
|
2019-04-24 19:58:09 +02:00
|
|
|
setup_attach_host: true
|
|
|
|
setup_datastore: true
|
|
|
|
setup_virtualmachines: true
|
2019-05-16 15:36:48 +02:00
|
|
|
setup_resource_pool: true
|
2019-04-24 19:58:09 +02:00
|
|
|
|
2019-05-16 15:36:48 +02:00
|
|
|
- block:
|
|
|
|
- include: poweroff_d1_c1_f0.yml
|
|
|
|
- include: poweroff_d1_c1_f1.yml
|
|
|
|
- include: check_mode.yml
|
|
|
|
- include: clone_d1_c1_f0.yml
|
|
|
|
- include: create_d1_c1_f0.yml
|
|
|
|
- include: cdrom_d1_c1_f0.yml
|
|
|
|
- include: create_rp_d1_c1_f0.yml
|
|
|
|
- include: create_guest_invalid_d1_c1_f0.yml
|
|
|
|
- include: mac_address_d1_c1_f0.yml
|
|
|
|
- include: disk_type_d1_c1_f0.yml
|
|
|
|
- include: create_nw_d1_c1_f0.yml
|
|
|
|
- include: delete_vm.yml
|
|
|
|
- include: non_existent_vm_ops.yml
|
|
|
|
always:
|
|
|
|
- name: Remove VM
|
|
|
|
vmware_guest:
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
validate_certs: no
|
|
|
|
cluster: "{{ ccr1 }}"
|
|
|
|
name: '{{ item }}'
|
|
|
|
force: yes
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- CDROM-Test
|
|
|
|
- CDROM-Test-38679
|
|
|
|
- newvm_2
|
|
|
|
- newvm_3
|
|
|
|
- newvmnw_4
|
|
|
|
- DC0_H0_VM12
|
2019-04-24 19:58:09 +02:00
|
|
|
|
|
|
|
- import_role:
|
|
|
|
name: prepare_vmware_tests
|
|
|
|
vars:
|
|
|
|
setup_attach_host: true
|
|
|
|
setup_datastore: true
|
|
|
|
setup_virtualmachines: true
|
|
|
|
|
2019-05-16 15:36:48 +02:00
|
|
|
- block:
|
|
|
|
- include: network_negative_test.yml
|
|
|
|
# VCSIM does not return list of portgroups for dvswitch so commenting following TC
|
|
|
|
#- include: network_with_portgroup.yml
|
|
|
|
# Currently, VCSIM doesn't support DVPG (as portkeys are not available) so commenting this test
|
|
|
|
# - include: network_with_dvpg.yml
|
|
|
|
#- include: template_d1_c1_f0.yml
|
|
|
|
- include: vapp_d1_c1_f0.yml
|
|
|
|
- include: disk_size_d1_c1_f0.yml
|
|
|
|
- include: network_with_device.yml
|
|
|
|
- include: disk_mode_d1_c1_f0.yml
|
|
|
|
- include: linked_clone_d1_c1_f0.yml
|
|
|
|
always:
|
|
|
|
- name: Remove VM
|
|
|
|
vmware_guest:
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
validate_certs: no
|
|
|
|
cluster: "{{ ccr1 }}"
|
|
|
|
name: '{{ item }}'
|
|
|
|
force: yes
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- disk_mode_d1_c1_f0
|
|
|
|
- network_with_device
|
|
|
|
- new_vm_no_nw_type
|
|
|
|
- vApp-Test
|
|
|
|
|
|
|
|
- import_role:
|
|
|
|
name: prepare_vmware_tests
|
|
|
|
vars:
|
|
|
|
setup_attach_host: true
|
|
|
|
setup_datastore: true
|
|
|
|
setup_virtualmachines: true
|
|
|
|
- block:
|
|
|
|
- include: boot_firmware_d1_c1_f0.yml
|
2019-06-08 00:34:20 +02:00
|
|
|
# Failing, see: https://github.com/ansible/ansible/issues/57653
|
|
|
|
# - include: clone_with_convert.yml
|
|
|
|
# - include: clone_customize_guest_test.yml
|
2019-07-02 20:49:00 +02:00
|
|
|
- include: max_connections.yml
|
2019-05-16 15:36:48 +02:00
|
|
|
always:
|
|
|
|
- name: Remove VM
|
|
|
|
vmware_guest:
|
|
|
|
hostname: "{{ vcenter_hostname }}"
|
|
|
|
username: "{{ vcenter_username }}"
|
|
|
|
password: "{{ vcenter_password }}"
|
|
|
|
validate_certs: no
|
|
|
|
cluster: "{{ ccr1 }}"
|
|
|
|
name: '{{ item }}'
|
|
|
|
force: yes
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- newvm_DC0_H0_VM0
|
|
|
|
- newvm_DC0_H0_VM1
|
|
|
|
- newvm_efi_DC0_H0_VM0
|
|
|
|
- newvm_efi_DC0_H0_VM1
|
2019-07-02 20:49:00 +02:00
|
|
|
- newvm_mk_conn_DC0_H0_VM0
|
|
|
|
- newvm_mk_conn_DC0_H0_VM1
|
2019-05-16 15:36:48 +02:00
|
|
|
- thin_DC0_H0_VM0
|
|
|
|
- thin_DC0_H0_VM1
|
|
|
|
- thick_DC0_H0_VM0
|
|
|
|
- thick_DC0_H0_VM1
|
|
|
|
- eagerzeroedthick_DC0_H0_VM0
|
|
|
|
- eagerzeroedthick_DC0_H0_VM1
|
|
|
|
- net_customize_DC0_H0_VM0
|
|
|
|
- net_customize_DC0_H0_VM1
|