summaryrefslogtreecommitdiff
path: root/test/integration/targets/vmware_guest/tasks/main.yml
blob: 71cc3326921861b6c0542d857493aa12e40fbd9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# 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)

- import_role:
    name: prepare_vmware_tests
  vars:
    setup_datacenter: true
    setup_attach_host: true
    setup_datastore: true
    setup_virtualmachines: true
    setup_resource_pool: true

- 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

- import_role:
    name: prepare_vmware_tests
  vars:
    setup_attach_host: true
    setup_datastore: true
    setup_virtualmachines: true

- 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
    - include: clone_with_convert.yml
    - include: clone_customize_guest_test.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:
        - newvm_DC0_H0_VM0
        - newvm_DC0_H0_VM1
        - newvm_efi_DC0_H0_VM0
        - newvm_efi_DC0_H0_VM1
        - 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