summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/inventory_vmware_vm_inventory/aliases3
-rw-r--r--test/integration/targets/inventory_vmware_vm_inventory/ansible.cfg8
-rwxr-xr-xtest/integration/targets/inventory_vmware_vm_inventory/runme.sh83
-rw-r--r--test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml24
-rw-r--r--test/integration/targets/script_inventory_vmware_inventory/aliases7
-rwxr-xr-xtest/integration/targets/script_inventory_vmware_inventory/runme.sh58
-rw-r--r--test/integration/targets/script_inventory_vmware_inventory/test_vmware_inventory.yml18
-rwxr-xr-xtest/integration/targets/script_inventory_vmware_inventory/vmware_inventory.sh3
-rw-r--r--test/integration/targets/vcenter_folder/aliases3
-rw-r--r--test/integration/targets/vcenter_folder/meta/main.yml2
-rw-r--r--test/integration/targets/vcenter_folder/tasks/main.yml216
-rw-r--r--test/integration/targets/vcenter_license/aliases3
-rw-r--r--test/integration/targets/vcenter_license/meta/main.yml2
-rw-r--r--test/integration/targets/vcenter_license/tasks/main.yml27
-rw-r--r--test/integration/targets/vmware_about_facts/aliases4
-rw-r--r--test/integration/targets/vmware_about_facts/tasks/main.yml58
-rw-r--r--test/integration/targets/vmware_about_info/aliases4
-rw-r--r--test/integration/targets/vmware_about_info/tasks/main.yml58
-rw-r--r--test/integration/targets/vmware_category/aliases4
-rw-r--r--test/integration/targets/vmware_category/tasks/associable_obj_types.yml90
-rw-r--r--test/integration/targets/vmware_category/tasks/main.yml9
-rw-r--r--test/integration/targets/vmware_cluster/aliases4
-rw-r--r--test/integration/targets/vmware_cluster/tasks/main.yml62
-rw-r--r--test/integration/targets/vmware_cluster_drs/aliases4
-rw-r--r--test/integration/targets/vmware_cluster_drs/tasks/main.yml97
-rw-r--r--test/integration/targets/vmware_cluster_facts/aliases4
-rw-r--r--test/integration/targets/vmware_cluster_facts/tasks/main.yml92
-rw-r--r--test/integration/targets/vmware_cluster_ha/aliases4
-rw-r--r--test/integration/targets/vmware_cluster_ha/tasks/main.yml174
-rw-r--r--test/integration/targets/vmware_cluster_info/aliases4
-rw-r--r--test/integration/targets/vmware_cluster_info/tasks/main.yml91
-rw-r--r--test/integration/targets/vmware_cluster_vsan/aliases4
-rw-r--r--test/integration/targets/vmware_cluster_vsan/tasks/main.yml64
-rw-r--r--test/integration/targets/vmware_content_deploy_template/aliases4
-rw-r--r--test/integration/targets/vmware_content_deploy_template/tasks/main.yml37
-rw-r--r--test/integration/targets/vmware_content_library_info/aliases4
-rw-r--r--test/integration/targets/vmware_content_library_info/tasks/main.yml40
-rw-r--r--test/integration/targets/vmware_content_library_manager/aliases4
-rw-r--r--test/integration/targets/vmware_content_library_manager/tasks/main.yml91
-rw-r--r--test/integration/targets/vmware_datacenter/aliases4
-rw-r--r--test/integration/targets/vmware_datacenter/tasks/main.yml50
-rw-r--r--test/integration/targets/vmware_datastore_cluster/aliases4
-rw-r--r--test/integration/targets/vmware_datastore_cluster/tasks/main.yml125
-rw-r--r--test/integration/targets/vmware_datastore_facts/aliases4
-rw-r--r--test/integration/targets/vmware_datastore_facts/tasks/main.yml126
-rw-r--r--test/integration/targets/vmware_datastore_info/aliases4
-rw-r--r--test/integration/targets/vmware_datastore_info/tasks/main.yml192
-rw-r--r--test/integration/targets/vmware_datastore_maintenancemode/aliases4
-rw-r--r--test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml84
-rw-r--r--test/integration/targets/vmware_drs_group/aliases4
-rw-r--r--test/integration/targets/vmware_drs_group/tasks/main.yml75
-rw-r--r--test/integration/targets/vmware_drs_group_facts/aliases4
-rw-r--r--test/integration/targets/vmware_drs_group_facts/tasks/main.yml44
-rw-r--r--test/integration/targets/vmware_drs_group_info/aliases4
-rw-r--r--test/integration/targets/vmware_drs_group_info/tasks/main.yml44
-rw-r--r--test/integration/targets/vmware_drs_rule_facts/aliases4
-rw-r--r--test/integration/targets/vmware_drs_rule_facts/tasks/main.yml47
-rw-r--r--test/integration/targets/vmware_drs_rule_info/aliases4
-rw-r--r--test/integration/targets/vmware_drs_rule_info/tasks/main.yml47
-rw-r--r--test/integration/targets/vmware_dvs_portgroup/aliases4
-rw-r--r--test/integration/targets/vmware_dvs_portgroup/tasks/main.yml387
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_facts/aliases4
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml56
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_find/aliases4
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_find/tasks/main.yml23
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_info/aliases4
-rw-r--r--test/integration/targets/vmware_dvs_portgroup_info/tasks/main.yml56
-rw-r--r--test/integration/targets/vmware_dvswitch/aliases4
-rw-r--r--test/integration/targets/vmware_dvswitch/tasks/main.yml100
-rw-r--r--test/integration/targets/vmware_dvswitch_nioc/aliases4
-rw-r--r--test/integration/targets/vmware_dvswitch_nioc/tasks/main.yml103
-rw-r--r--test/integration/targets/vmware_dvswitch_pvlans/aliases4
-rw-r--r--test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml74
-rw-r--r--test/integration/targets/vmware_dvswitch_uplink_pg/aliases4
-rw-r--r--test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml75
-rw-r--r--test/integration/targets/vmware_evc_mode/aliases3
-rw-r--r--test/integration/targets/vmware_evc_mode/meta/main.yml2
-rw-r--r--test/integration/targets/vmware_evc_mode/tasks/main.yml52
-rw-r--r--test/integration/targets/vmware_export_ovf/aliases4
-rw-r--r--test/integration/targets/vmware_export_ovf/tasks/main.yml69
-rw-r--r--test/integration/targets/vmware_folder_info/aliases4
-rw-r--r--test/integration/targets/vmware_folder_info/tasks/main.yml51
-rw-r--r--test/integration/targets/vmware_guest/aliases4
-rw-r--r--test/integration/targets/vmware_guest/defaults/main.yml33
-rw-r--r--test/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml117
-rw-r--r--test/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml269
-rw-r--r--test/integration/targets/vmware_guest/tasks/check_mode.yml60
-rw-r--r--test/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml47
-rw-r--r--test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml101
-rw-r--r--test/integration/targets/vmware_guest/tasks/clone_resize_disks.yml77
-rw-r--r--test/integration/targets/vmware_guest/tasks/clone_with_convert.yml66
-rw-r--r--test/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml164
-rw-r--r--test/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml32
-rw-r--r--test/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml38
-rw-r--r--test/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml205
-rw-r--r--test/integration/targets/vmware_guest/tasks/delete_vm.yml22
-rw-r--r--test/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml89
-rw-r--r--test/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml31
-rw-r--r--test/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml33
-rw-r--r--test/integration/targets/vmware_guest/tasks/linked_clone_d1_c1_f0.yml100
-rw-r--r--test/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml37
-rw-r--r--test/integration/targets/vmware_guest/tasks/main.yml19
-rw-r--r--test/integration/targets/vmware_guest/tasks/max_connections.yml45
-rw-r--r--test/integration/targets/vmware_guest/tasks/mem_reservation.yml125
-rw-r--r--test/integration/targets/vmware_guest/tasks/network_negative_test.yml339
-rw-r--r--test/integration/targets/vmware_guest/tasks/network_with_device.yml60
-rw-r--r--test/integration/targets/vmware_guest/tasks/network_with_dvpg.yml152
-rw-r--r--test/integration/targets/vmware_guest/tasks/network_with_portgroup.yml47
-rw-r--r--test/integration/targets/vmware_guest/tasks/non_existent_vm_ops.yml23
-rw-r--r--test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml27
-rw-r--r--test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml22
-rw-r--r--test/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml73
-rw-r--r--test/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml61
-rw-r--r--test/integration/targets/vmware_guest/tasks/run_test_playbook.yml17
-rw-r--r--test/integration/targets/vmware_guest/tasks/template_d1_c1_f0.yml105
-rw-r--r--test/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml100
-rw-r--r--test/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml93
-rw-r--r--test/integration/targets/vmware_guest_boot_facts/aliases4
-rw-r--r--test/integration/targets/vmware_guest_boot_facts/tasks/main.yml51
-rw-r--r--test/integration/targets/vmware_guest_boot_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_boot_info/tasks/main.yml51
-rw-r--r--test/integration/targets/vmware_guest_controller/aliases4
-rw-r--r--test/integration/targets/vmware_guest_controller/tasks/main.yml82
-rw-r--r--test/integration/targets/vmware_guest_cross_vc_clone/aliases3
-rw-r--r--test/integration/targets/vmware_guest_cross_vc_clone/tasks/main.yml160
-rw-r--r--test/integration/targets/vmware_guest_custom_attribute_defs/aliases4
-rw-r--r--test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml85
-rw-r--r--test/integration/targets/vmware_guest_custom_attributes/aliases4
-rw-r--r--test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml110
-rw-r--r--test/integration/targets/vmware_guest_customization_facts/aliases4
-rw-r--r--test/integration/targets/vmware_guest_customization_facts/tasks/main.yml40
-rw-r--r--test/integration/targets/vmware_guest_customization_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_customization_info/tasks/main.yml40
-rw-r--r--test/integration/targets/vmware_guest_disk/aliases4
-rw-r--r--test/integration/targets/vmware_guest_disk/tasks/main.yml232
-rw-r--r--test/integration/targets/vmware_guest_disk_facts/aliases4
-rw-r--r--test/integration/targets/vmware_guest_disk_facts/tasks/main.yml52
-rw-r--r--test/integration/targets/vmware_guest_disk_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_disk_info/tasks/main.yml52
-rw-r--r--test/integration/targets/vmware_guest_facts/aliases4
-rw-r--r--test/integration/targets/vmware_guest_facts/tasks/main.yml226
-rw-r--r--test/integration/targets/vmware_guest_find/aliases4
-rw-r--r--test/integration/targets/vmware_guest_find/tasks/main.yml60
-rw-r--r--test/integration/targets/vmware_guest_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_info/tasks/main.yml226
-rw-r--r--test/integration/targets/vmware_guest_move/aliases4
-rw-r--r--test/integration/targets/vmware_guest_move/tasks/main.yml70
-rw-r--r--test/integration/targets/vmware_guest_network/aliases6
-rw-r--r--test/integration/targets/vmware_guest_network/tasks/main.yml353
-rw-r--r--test/integration/targets/vmware_guest_powerstate/aliases4
-rw-r--r--test/integration/targets/vmware_guest_powerstate/tasks/main.yml72
-rw-r--r--test/integration/targets/vmware_guest_register_operation/aliases4
-rw-r--r--test/integration/targets/vmware_guest_register_operation/tasks/main.yml261
-rw-r--r--test/integration/targets/vmware_guest_screenshot/aliases4
-rw-r--r--test/integration/targets/vmware_guest_screenshot/tasks/main.yml54
-rw-r--r--test/integration/targets/vmware_guest_sendkey/aliases4
-rw-r--r--test/integration/targets/vmware_guest_sendkey/tasks/main.yml55
-rw-r--r--test/integration/targets/vmware_guest_serial_port/aliases4
-rw-r--r--test/integration/targets/vmware_guest_serial_port/tasks/main.yml103
-rw-r--r--test/integration/targets/vmware_guest_snapshot/aliases4
-rw-r--r--test/integration/targets/vmware_guest_snapshot/tasks/main.yml178
-rw-r--r--test/integration/targets/vmware_guest_snapshot_facts/aliases4
-rw-r--r--test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml28
-rw-r--r--test/integration/targets/vmware_guest_snapshot_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_snapshot_info/tasks/main.yml28
-rw-r--r--test/integration/targets/vmware_guest_tools_info/aliases4
-rw-r--r--test/integration/targets/vmware_guest_tools_info/tasks/main.yml53
-rw-r--r--test/integration/targets/vmware_guest_tools_wait/aliases6
-rw-r--r--test/integration/targets/vmware_guest_tools_wait/tasks/main.yml47
-rw-r--r--test/integration/targets/vmware_host/aliases4
-rw-r--r--test/integration/targets/vmware_host/tasks/main.yml179
-rw-r--r--test/integration/targets/vmware_host_acceptance/aliases4
-rw-r--r--test/integration/targets/vmware_host_acceptance/tasks/main.yml42
-rw-r--r--test/integration/targets/vmware_host_active_directory/aliases3
-rw-r--r--test/integration/targets/vmware_host_active_directory/tasks/main.yml87
-rw-r--r--test/integration/targets/vmware_host_auto_start/aliases5
-rw-r--r--test/integration/targets/vmware_host_auto_start/tasks/esxi_auto_start_ops.yml368
-rw-r--r--test/integration/targets/vmware_host_auto_start/tasks/main.yml57
-rw-r--r--test/integration/targets/vmware_host_auto_start/tasks/reset_auto_start_config.yml35
-rw-r--r--test/integration/targets/vmware_host_auto_start/tasks/vcenter_auto_start_ops.yml367
-rw-r--r--test/integration/targets/vmware_host_capability_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_capability_facts/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_host_capability_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_capability_info/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_host_config_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_config_facts/tasks/main.yml68
-rw-r--r--test/integration/targets/vmware_host_config_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_config_info/tasks/main.yml68
-rw-r--r--test/integration/targets/vmware_host_config_manager/aliases4
-rw-r--r--test/integration/targets/vmware_host_config_manager/tasks/main.yml90
-rw-r--r--test/integration/targets/vmware_host_datastore/aliases4
-rw-r--r--test/integration/targets/vmware_host_datastore/tasks/main.yml84
-rw-r--r--test/integration/targets/vmware_host_dns/aliases3
-rw-r--r--test/integration/targets/vmware_host_dns/tasks/dhcp.yml303
-rw-r--r--test/integration/targets/vmware_host_dns/tasks/main.yml28
-rw-r--r--test/integration/targets/vmware_host_dns/tasks/static.yml225
-rw-r--r--test/integration/targets/vmware_host_dns_facts/aliases5
-rw-r--r--test/integration/targets/vmware_host_dns_facts/tasks/main.yml70
-rw-r--r--test/integration/targets/vmware_host_dns_info/aliases5
-rw-r--r--test/integration/targets/vmware_host_dns_info/tasks/main.yml70
-rw-r--r--test/integration/targets/vmware_host_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_facts/tasks/main.yml93
-rw-r--r--test/integration/targets/vmware_host_feature_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_feature_facts/tasks/main.yml77
-rw-r--r--test/integration/targets/vmware_host_feature_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_feature_info/tasks/main.yml77
-rw-r--r--test/integration/targets/vmware_host_firewall_facts/aliases5
-rw-r--r--test/integration/targets/vmware_host_firewall_facts/tasks/main.yml73
-rw-r--r--test/integration/targets/vmware_host_firewall_info/aliases5
-rw-r--r--test/integration/targets/vmware_host_firewall_info/tasks/main.yml73
-rw-r--r--test/integration/targets/vmware_host_firewall_manager/aliases4
-rw-r--r--test/integration/targets/vmware_host_firewall_manager/tasks/main.yml222
-rw-r--r--test/integration/targets/vmware_host_hyperthreading/aliases4
-rw-r--r--test/integration/targets/vmware_host_hyperthreading/tasks/main.yml92
-rw-r--r--test/integration/targets/vmware_host_ipv6/aliases4
-rw-r--r--test/integration/targets/vmware_host_ipv6/tasks/main.yml91
-rw-r--r--test/integration/targets/vmware_host_kernel_manager/aliases4
-rw-r--r--test/integration/targets/vmware_host_kernel_manager/tasks/main.yml52
-rw-r--r--test/integration/targets/vmware_host_ntp/aliases4
-rw-r--r--test/integration/targets/vmware_host_ntp/tasks/main.yml168
-rw-r--r--test/integration/targets/vmware_host_ntp_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_ntp_facts/tasks/main.yml24
-rw-r--r--test/integration/targets/vmware_host_ntp_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_ntp_info/tasks/main.yml24
-rw-r--r--test/integration/targets/vmware_host_package_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_package_facts/tasks/main.yml24
-rw-r--r--test/integration/targets/vmware_host_package_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_package_info/tasks/main.yml24
-rw-r--r--test/integration/targets/vmware_host_powermgmt_policy/aliases4
-rw-r--r--test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml103
-rw-r--r--test/integration/targets/vmware_host_powerstate/aliases3
-rw-r--r--test/integration/targets/vmware_host_powerstate/tasks/main.yml34
-rw-r--r--test/integration/targets/vmware_host_scanhba/aliases4
-rw-r--r--test/integration/targets/vmware_host_scanhba/tasks/main.yml25
-rw-r--r--test/integration/targets/vmware_host_service_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_service_facts/tasks/main.yml39
-rw-r--r--test/integration/targets/vmware_host_service_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_service_info/tasks/main.yml39
-rw-r--r--test/integration/targets/vmware_host_service_manager/aliases4
-rw-r--r--test/integration/targets/vmware_host_service_manager/tasks/main.yml86
-rw-r--r--test/integration/targets/vmware_host_snmp/aliases4
-rw-r--r--test/integration/targets/vmware_host_snmp/tasks/main.yml56
-rw-r--r--test/integration/targets/vmware_host_ssl_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_ssl_facts/tasks/main.yml70
-rw-r--r--test/integration/targets/vmware_host_ssl_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_ssl_info/tasks/main.yml70
-rw-r--r--test/integration/targets/vmware_host_vmhba_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml39
-rw-r--r--test/integration/targets/vmware_host_vmhba_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_vmhba_info/tasks/main.yml39
-rw-r--r--test/integration/targets/vmware_host_vmnic_facts/aliases4
-rw-r--r--test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml40
-rw-r--r--test/integration/targets/vmware_host_vmnic_info/aliases4
-rw-r--r--test/integration/targets/vmware_host_vmnic_info/tasks/main.yml40
-rw-r--r--test/integration/targets/vmware_local_role_facts/aliases4
-rw-r--r--test/integration/targets/vmware_local_role_facts/tasks/main.yml46
-rw-r--r--test/integration/targets/vmware_local_role_info/aliases4
-rw-r--r--test/integration/targets/vmware_local_role_info/tasks/main.yml46
-rw-r--r--test/integration/targets/vmware_local_role_manager/aliases4
-rw-r--r--test/integration/targets/vmware_local_role_manager/tasks/main.yml162
-rw-r--r--test/integration/targets/vmware_local_user_facts/aliases4
-rw-r--r--test/integration/targets/vmware_local_user_facts/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_local_user_info/aliases4
-rw-r--r--test/integration/targets/vmware_local_user_info/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_local_user_manager/aliases4
-rw-r--r--test/integration/targets/vmware_local_user_manager/tasks/main.yml39
-rw-r--r--test/integration/targets/vmware_maintenancemode/aliases4
-rw-r--r--test/integration/targets/vmware_maintenancemode/tasks/main.yml76
-rw-r--r--test/integration/targets/vmware_portgroup/aliases4
-rw-r--r--test/integration/targets/vmware_portgroup/tasks/main.yml73
-rw-r--r--test/integration/targets/vmware_portgroup_facts/aliases4
-rw-r--r--test/integration/targets/vmware_portgroup_facts/tasks/main.yml67
-rw-r--r--test/integration/targets/vmware_portgroup_info/aliases5
-rw-r--r--test/integration/targets/vmware_portgroup_info/tasks/main.yml67
-rw-r--r--test/integration/targets/vmware_resource_pool/aliases4
-rw-r--r--test/integration/targets/vmware_resource_pool/tasks/main.yml99
-rw-r--r--test/integration/targets/vmware_resource_pool_facts/aliases4
-rw-r--r--test/integration/targets/vmware_resource_pool_facts/tasks/main.yml20
-rw-r--r--test/integration/targets/vmware_resource_pool_info/aliases4
-rw-r--r--test/integration/targets/vmware_resource_pool_info/tasks/main.yml20
-rw-r--r--test/integration/targets/vmware_tag/aliases3
-rw-r--r--test/integration/targets/vmware_tag/tasks/main.yml7
-rw-r--r--test/integration/targets/vmware_tag/tasks/tag_crud_ops.yml112
-rw-r--r--test/integration/targets/vmware_tag/tasks/tag_manager_duplicate_tag_cat.yml163
-rw-r--r--test/integration/targets/vmware_tag/tasks/tag_manager_ops.yml62
-rw-r--r--test/integration/targets/vmware_tag_info/aliases3
-rw-r--r--test/integration/targets/vmware_tag_info/tasks/main.yml5
-rw-r--r--test/integration/targets/vmware_tag_info/tasks/tag_info.yml24
-rw-r--r--test/integration/targets/vmware_tag_manager/aliases3
-rw-r--r--test/integration/targets/vmware_tag_manager/tasks/main.yml5
-rw-r--r--test/integration/targets/vmware_tag_manager/tasks/tag_manager_dict.yml113
-rw-r--r--test/integration/targets/vmware_target_canonical_facts/aliases4
-rw-r--r--test/integration/targets/vmware_target_canonical_facts/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_target_canonical_info/aliases4
-rw-r--r--test/integration/targets/vmware_target_canonical_info/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_vcenter_settings/aliases4
-rw-r--r--test/integration/targets/vmware_vcenter_settings/tasks/main.yml83
-rw-r--r--test/integration/targets/vmware_vcenter_statistics/aliases4
-rw-r--r--test/integration/targets/vmware_vcenter_statistics/tasks/main.yml133
-rw-r--r--test/integration/targets/vmware_vm_facts/aliases5
-rw-r--r--test/integration/targets/vmware_vm_facts/tasks/main.yml100
-rw-r--r--test/integration/targets/vmware_vm_host_drs_rule/aliases4
-rw-r--r--test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml81
-rw-r--r--test/integration/targets/vmware_vm_info/aliases5
-rw-r--r--test/integration/targets/vmware_vm_info/tasks/main.yml100
-rw-r--r--test/integration/targets/vmware_vm_storage_policy_info/aliases4
-rw-r--r--test/integration/targets/vmware_vm_storage_policy_info/tasks/main.yml25
-rw-r--r--test/integration/targets/vmware_vm_vm_drs_rule/aliases4
-rw-r--r--test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml144
-rw-r--r--test/integration/targets/vmware_vmkernel/aliases4
-rw-r--r--test/integration/targets/vmware_vmkernel/tasks/main.yml65
-rw-r--r--test/integration/targets/vmware_vmkernel_facts/aliases4
-rw-r--r--test/integration/targets/vmware_vmkernel_facts/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_vmkernel_info/aliases4
-rw-r--r--test/integration/targets/vmware_vmkernel_info/tasks/main.yml38
-rw-r--r--test/integration/targets/vmware_vmotion/aliases4
-rw-r--r--test/integration/targets/vmware_vmotion/tasks/main.yml133
-rw-r--r--test/integration/targets/vmware_vsan_health_info/aliases4
-rw-r--r--test/integration/targets/vmware_vsan_health_info/tasks/main.yml22
-rw-r--r--test/integration/targets/vmware_vspan_session/aliases4
-rw-r--r--test/integration/targets/vmware_vspan_session/tasks/main.yml102
-rw-r--r--test/integration/targets/vmware_vswitch/aliases4
-rw-r--r--test/integration/targets/vmware_vswitch/tasks/main.yml86
-rw-r--r--test/integration/targets/vmware_vswitch/tasks/teardown.yml16
-rw-r--r--test/integration/targets/vmware_vswitch_facts/aliases4
-rw-r--r--test/integration/targets/vmware_vswitch_facts/tasks/main.yml41
-rw-r--r--test/integration/targets/vmware_vswitch_info/aliases4
-rw-r--r--test/integration/targets/vmware_vswitch_info/tasks/main.yml41
-rw-r--r--test/integration/targets/vsphere_file/aliases1
-rw-r--r--test/integration/targets/vsphere_file/tasks/main.yml369
-rw-r--r--test/sanity/ignore.txt142
-rw-r--r--test/units/contrib/inventory/test_vmware_inventory.py102
-rw-r--r--test/units/module_utils/test_vmware.py228
-rw-r--r--test/units/modules/cloud/vmware/test_data/test_vmware_guest_with_parameters.json106
-rw-r--r--test/units/modules/cloud/vmware/test_vmware_guest.py52
335 files changed, 0 insertions, 17057 deletions
diff --git a/test/integration/targets/inventory_vmware_vm_inventory/aliases b/test/integration/targets/inventory_vmware_vm_inventory/aliases
deleted file mode 100644
index 8a4d29b3a9..0000000000
--- a/test/integration/targets/inventory_vmware_vm_inventory/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-destructive
diff --git a/test/integration/targets/inventory_vmware_vm_inventory/ansible.cfg b/test/integration/targets/inventory_vmware_vm_inventory/ansible.cfg
deleted file mode 100644
index 158f5849fa..0000000000
--- a/test/integration/targets/inventory_vmware_vm_inventory/ansible.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-[defaults]
-inventory = test-config.vmware.yaml
-
-[inventory]
-enable_plugins = vmware_vm_inventory
-cache = True
-cache_plugin = jsonfile
-cache_connection = inventory_cache
diff --git a/test/integration/targets/inventory_vmware_vm_inventory/runme.sh b/test/integration/targets/inventory_vmware_vm_inventory/runme.sh
deleted file mode 100755
index e220624a59..0000000000
--- a/test/integration/targets/inventory_vmware_vm_inventory/runme.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env bash
-
-[[ -n "$DEBUG" || -n "$ANSIBLE_DEBUG" ]] && set -x
-
-set -euo pipefail
-
-# Required to differentiate between Python 2 and 3 environ
-PYTHON=${ANSIBLE_TEST_PYTHON_INTERPRETER:-python}
-
-export ANSIBLE_CONFIG=ansible.cfg
-export VMWARE_SERVER="${VCENTER_HOSTNAME}"
-export VMWARE_USERNAME="${VCENTER_USERNAME}"
-export VMWARE_PASSWORD="${VCENTER_PASSWORD}"
-port=5000
-VMWARE_CONFIG=test-config.vmware.yaml
-inventory_cache="$(pwd)/inventory_cache"
-
-cat > "$VMWARE_CONFIG" <<VMWARE_YAML
-plugin: vmware_vm_inventory
-strict: False
-validate_certs: False
-with_tags: False
-VMWARE_YAML
-
-cleanup() {
- echo "Cleanup"
- if [ -f "${VMWARE_CONFIG}" ]; then
- rm -f "${VMWARE_CONFIG}"
- fi
- if [ -d "${inventory_cache}" ]; then
- echo "Removing ${inventory_cache}"
- rm -rf "${inventory_cache}"
- fi
- echo "Done"
- exit 0
-}
-
-trap cleanup INT TERM EXIT
-
-echo "DEBUG: Using ${VCENTER_HOSTNAME} with username ${VCENTER_USERNAME} and password ${VCENTER_PASSWORD}"
-
-echo "Kill all previous instances"
-curl "http://${VCENTER_HOSTNAME}:${port}/killall" > /dev/null 2>&1
-
-echo "Start new VCSIM server"
-curl "http://${VCENTER_HOSTNAME}:${port}/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1
-
-echo "Debugging new instances"
-curl "http://${VCENTER_HOSTNAME}:${port}/govc_find"
-
-# Get inventory
-ansible-inventory -i ${VMWARE_CONFIG} --list
-
-echo "Check if cache is working for inventory plugin"
-if [ ! -n "$(find "${inventory_cache}" -maxdepth 1 -name 'vmware_vm_inventory_*' -print -quit)" ]; then
- echo "Cache directory not found. Please debug"
- exit 1
-fi
-echo "Cache is working"
-
-# Get inventory using YAML
-ansible-inventory -i ${VMWARE_CONFIG} --list --yaml
-
-# Install TOML for --toml
-${PYTHON} -m pip freeze | grep toml > /dev/null 2>&1
-TOML_TEST_RESULT=$?
-if [ $TOML_TEST_RESULT -ne 0 ]; then
- echo "Installing TOML package"
- ${PYTHON} -m pip install toml
-else
- echo "TOML package already exists, skipping installation"
-fi
-
-# Get inventory using TOML
-ansible-inventory -i ${VMWARE_CONFIG} --list --toml
-TOML_INVENTORY_LIST_RESULT=$?
-if [ $TOML_INVENTORY_LIST_RESULT -ne 0 ]; then
- echo "Inventory plugin failed to list inventory host using --toml, please debug"
- exit 1
-fi
-
-# Test playbook with given inventory
-ansible-playbook -i ${VMWARE_CONFIG} test_vmware_vm_inventory.yml --connection=local "$@"
diff --git a/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml b/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml
deleted file mode 100644
index 88e2be9bd1..0000000000
--- a/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware guest dynamic plugin module
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
----
-- name: Test VMware Guest Dynamic Inventroy Plugin
- hosts: localhost
- tasks:
- - name: store the vcenter container ip
- set_fact:
- vcsim: "{{ lookup('env', 'VCENTER_HOSTNAME') }}"
-
- - name: Check that there are 'all' and 'otherGuest' groups present in inventory
- assert:
- that: "'{{ item }}' in {{ groups.keys() | list }}"
- with_items:
- - all
- - otherGuest
-
- - name: Check if Hostname and other details are populated in hostvars
- assert:
- that:
- - hostvars[item].name is defined
- with_items: "{{ groups['all'] }}"
diff --git a/test/integration/targets/script_inventory_vmware_inventory/aliases b/test/integration/targets/script_inventory_vmware_inventory/aliases
deleted file mode 100644
index 17d4e97ab7..0000000000
--- a/test/integration/targets/script_inventory_vmware_inventory/aliases
+++ /dev/null
@@ -1,7 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-destructive
-needs/file/contrib/inventory/vmware_inventory.py
-needs/file/contrib/inventory/vmware_inventory.ini
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/script_inventory_vmware_inventory/runme.sh b/test/integration/targets/script_inventory_vmware_inventory/runme.sh
deleted file mode 100755
index fcfc1c8c13..0000000000
--- a/test/integration/targets/script_inventory_vmware_inventory/runme.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-[[ -n "$DEBUG" || -n "$ANSIBLE_DEBUG" ]] && set -x
-
-set -euo pipefail
-
-contrib_dir=../../../../contrib/inventory
-
-echo "DEBUG: using ${contrib_dir}"
-
-export ANSIBLE_CONFIG=ansible.cfg
-export VMWARE_SERVER="${VCENTER_HOSTNAME}"
-export VMWARE_USERNAME="${VCENTER_USERNAME}"
-export VMWARE_PASSWORD="${VCENTER_PASSWORD}"
-
-VMWARE_CONFIG=${contrib_dir}/vmware_inventory.ini
-
-
-trap cleanup INT TERM EXIT
-
-# Remove default inventory config file
-if [ -f "${VMWARE_CONFIG}" ];
-then
- echo "DEBUG: Creating backup of ${VMWARE_CONFIG}"
- cp "${VMWARE_CONFIG}" "${VMWARE_CONFIG}.bk"
-fi
-
-cat > "${VMWARE_CONFIG}" <<VMWARE_INI
-[vmware]
-server=${VMWARE_SERVER}
-username=${VMWARE_USERNAME}
-password=${VMWARE_PASSWORD}
-validate_certs=False
-VMWARE_INI
-
-function cleanup {
- # Revert back to previous one
- if [ -f "${VMWARE_CONFIG}.bk" ]; then
- echo "DEBUG: Cleanup ${VMWARE_CONFIG}"
- mv "${VMWARE_CONFIG}.bk" "${VMWARE_CONFIG}"
- fi
-}
-
-echo "DEBUG: Using ${VCENTER_HOSTNAME} with username ${VCENTER_USERNAME} and password ${VCENTER_PASSWORD}"
-
-echo "Kill all previous instances"
-curl "http://${VCENTER_HOSTNAME}:5000/killall" > /dev/null 2>&1
-
-echo "Start new VCSIM server"
-curl "http://${VCENTER_HOSTNAME}:5000/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1
-
-echo "Debugging new instances"
-curl "http://${VCENTER_HOSTNAME}:5000/govc_find"
-
-# Get inventory
-ansible-playbook -i ./vmware_inventory.sh "./test_vmware_inventory.yml" --connection=local "$@"
-
-echo "DEBUG: Done"
diff --git a/test/integration/targets/script_inventory_vmware_inventory/test_vmware_inventory.yml b/test/integration/targets/script_inventory_vmware_inventory/test_vmware_inventory.yml
deleted file mode 100644
index 035d1d16ec..0000000000
--- a/test/integration/targets/script_inventory_vmware_inventory/test_vmware_inventory.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Test code for the vmware guest contrib inventory
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
----
-- name: Test VMware guest contrib inventroy script
- hosts: localhost
- tasks:
- - name: store the vcenter container ip
- set_fact:
- vcsim: "{{ lookup('env', 'VCENTER_HOSTNAME') }}"
-
- - name: Check that groups present in inventory
- assert:
- that:
- - "'{{item}}' in groups"
- with_items:
- - all
diff --git a/test/integration/targets/script_inventory_vmware_inventory/vmware_inventory.sh b/test/integration/targets/script_inventory_vmware_inventory/vmware_inventory.sh
deleted file mode 100755
index 5ec1972e3f..0000000000
--- a/test/integration/targets/script_inventory_vmware_inventory/vmware_inventory.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-python.py "../../../../contrib/inventory/vmware_inventory.py" "$@"
diff --git a/test/integration/targets/vcenter_folder/aliases b/test/integration/targets/vcenter_folder/aliases
deleted file mode 100644
index be8c5b72ff..0000000000
--- a/test/integration/targets/vcenter_folder/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vcenter_folder/meta/main.yml b/test/integration/targets/vcenter_folder/meta/main.yml
deleted file mode 100644
index 828342c2da..0000000000
--- a/test/integration/targets/vcenter_folder/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_vmware_tests
diff --git a/test/integration/targets/vcenter_folder/tasks/main.yml b/test/integration/targets/vcenter_folder/tasks/main.yml
deleted file mode 100644
index 56cc503892..0000000000
--- a/test/integration/targets/vcenter_folder/tasks/main.yml
+++ /dev/null
@@ -1,216 +0,0 @@
-# Test code for the vcenter_folder module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Create all types of folder in check mode
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "{{ item }}_folder"
- folder_type: "{{ item }}"
- state: present
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
- check_mode: yes
-
-- debug:
- msg: "{{ all_folder_results }}"
-
-- name: ensure everything for {{ dc1 }}
- assert:
- that:
- - all_folder_results.changed
-
-- name: Create all types of folder
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "{{ item }}_folder"
- folder_type: "{{ item }}"
- state: present
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
-
-- debug:
- msg: "{{ all_folder_results }}"
-
-- name: ensure everything for {{ dc1 }}
- assert:
- that:
- - all_folder_results.changed
-
-- name: Create all types of sub folder in check mode
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "sub_{{ item }}_folder"
- parent_folder: 'vm_folder'
- state: present
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
- check_mode: yes
-
-- debug:
- msg: "{{ all_folder_results }}"
-
-- name: ensure everything for {{ dc1 }}
- assert:
- that:
- - all_folder_results.changed
-
-- name: Create all types of sub folder
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "sub_{{ item }}_folder"
- parent_folder: 'vm_folder'
- state: present
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
-
-- name: Recreate all types of sub folder
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "sub_{{ item }}_folder"
- parent_folder: 'vm_folder'
- state: present
- register: recreate_folders
- with_items:
- - vm
- - host
- - datastore
- - network
-
-- name: Create a 3rd level of directory
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: yet_another_level
- parent_folder: vm_folder/sub_vm_folder
- state: present
- register: yet_another_level
-- debug: var=yet_another_level
-
-- name: Recreate a 3rd level of directory
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: yet_another_level
- parent_folder: vm_folder/sub_vm_folder
- state: present
- register: recreate_yet_another_level
-- debug: var=recreate_yet_another_level
-
-- debug:
- msg: "{{ all_folder_results }}"
-
-- name: ensure everything for {{ dc1 }}
- assert:
- that:
- - all_folder_results.changed
- - not recreate_folders.changed
- - not recreate_yet_another_level.changed
-
-## Testcase: Delete all types of folder
-#
-# Doesn't work with vcsim. Looks like UnregisterAndDestroy isn't supported.
-- when: vcsim is not defined
- block:
- - name: Remove a 3rd level of directory
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: yet_another_level
- parent_folder: vm_folder/sub_vm_folder
- state: absent
- register: remove_yet_another_level
- - debug: var=remove_yet_another_level
-
- - name: Delete all types of folder
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "{{ item }}_folder"
- folder_type: "{{ item }}"
- state: absent
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
-
- - debug: msg="{{ all_folder_results }}"
-
- - name: ensure everything for {{ dc1 }}
- assert:
- that:
- - all_folder_results.changed
-
- - name: Delete all types of folder again
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "{{ item }}_folder"
- folder_type: "{{ item }}"
- state: absent
- register: all_folder_results
- with_items:
- - vm
- - host
- - datastore
- - network
-
- - debug: msg="{{ all_folder_results }}"
-
- - name: ensure everything for {{ dc1 }}
- assert:
- that:
- - not all_folder_results.changed
diff --git a/test/integration/targets/vcenter_license/aliases b/test/integration/targets/vcenter_license/aliases
deleted file mode 100644
index be8c5b72ff..0000000000
--- a/test/integration/targets/vcenter_license/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vcenter_license/meta/main.yml b/test/integration/targets/vcenter_license/meta/main.yml
deleted file mode 100644
index 828342c2da..0000000000
--- a/test/integration/targets/vcenter_license/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_vmware_tests
diff --git a/test/integration/targets/vcenter_license/tasks/main.yml b/test/integration/targets/vcenter_license/tasks/main.yml
deleted file mode 100644
index f57d3a5c16..0000000000
--- a/test/integration/targets/vcenter_license/tasks/main.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-# Test code for the vcenter license module.
-# Copyright: (c) 2017, Dag Wieers <dag@wieers.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: Add a vCenter evaluation license
- vcenter_license: &vcenter_lic_data
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- license: 00000-00000-00000-00000-00000
- state: present
-
- - name: Remove an (unused) vCenter evaluation license
- vcenter_license:
- <<: *vcenter_lic_data
- state: absent
-
- - name: Add an invalid vCenter license
- vcenter_license:
- <<: *vcenter_lic_data
- license: 00000-00000-00000-00000-00001
- state: present
- register: vcenter_license_output
- failed_when: '"is not existing or can not be added" not in vcenter_license_output.msg'
diff --git a/test/integration/targets/vmware_about_facts/aliases b/test/integration/targets/vmware_about_facts/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_about_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_about_facts/tasks/main.yml b/test/integration/targets/vmware_about_facts/tasks/main.yml
deleted file mode 100644
index 49499421c9..0000000000
--- a/test/integration/targets/vmware_about_facts/tasks/main.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-# Test code for the vmware_about_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Get Details about VMware vCenter Server
- vmware_about_facts: &vmware_about_data
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: about
-
-- assert:
- that:
- - about.about_facts["{{ item }}"] is defined
- with_items:
- - api_type
- - api_version
- - build
- - instance_uuid
- - license_product_name
- - license_product_version
- - locale_build
- - locale_version
- - os_type
- - product_full_name
- - product_line_id
- - product_name
- - vendor
- - version
-
-- name: Get Details about VMware vCenter Server in check mode
- vmware_about_facts:
- <<: *vmware_about_data
- register: about
- check_mode: yes
-
-- assert:
- that:
- - about.about_facts["{{ item }}"] is defined
- with_items:
- - api_type
- - api_version
- - build
- - instance_uuid
- - license_product_name
- - license_product_version
- - locale_build
- - locale_version
- - os_type
- - product_full_name
- - product_line_id
- - product_name
- - vendor
- - version
diff --git a/test/integration/targets/vmware_about_info/aliases b/test/integration/targets/vmware_about_info/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_about_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_about_info/tasks/main.yml b/test/integration/targets/vmware_about_info/tasks/main.yml
deleted file mode 100644
index a46c55edb4..0000000000
--- a/test/integration/targets/vmware_about_info/tasks/main.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-# Test code for the vmware_about_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Get Details about VMware vCenter Server
- vmware_about_info: &vmware_about_data
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: about
-
-- assert:
- that:
- - about.about_info["{{ item }}"] is defined
- with_items:
- - api_type
- - api_version
- - build
- - instance_uuid
- - license_product_name
- - license_product_version
- - locale_build
- - locale_version
- - os_type
- - product_full_name
- - product_line_id
- - product_name
- - vendor
- - version
-
-- name: Get Details about VMware vCenter Server in check mode
- vmware_about_info:
- <<: *vmware_about_data
- register: about
- check_mode: yes
-
-- assert:
- that:
- - about.about_info["{{ item }}"] is defined
- with_items:
- - api_type
- - api_version
- - build
- - instance_uuid
- - license_product_name
- - license_product_version
- - locale_build
- - locale_version
- - os_type
- - product_full_name
- - product_line_id
- - product_name
- - vendor
- - version
diff --git a/test/integration/targets/vmware_category/aliases b/test/integration/targets/vmware_category/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_category/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_category/tasks/associable_obj_types.yml b/test/integration/targets/vmware_category/tasks/associable_obj_types.yml
deleted file mode 100644
index a9d1749cd7..0000000000
--- a/test/integration/targets/vmware_category/tasks/associable_obj_types.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-# Test code for the vmware_category Operations.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Create different types of category with associable object types
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- category_name: '{{ item }} name'
- category_description: '{{ item }} description'
- associable_object_types:
- - "{{ item }}"
- state: present
- with_items:
- - All objects
- - Folder
- - Cluster
- - Datacenter
- - Datastore
- - Datastore Cluster
- - Distributed Port Group
- - Distributed Switch
- - Host
- - Content Library
- - Library item
- - Network
- - Resource Pool
- - vApp
- - Virtual Machine
-
-- name: Delete different types of category with associable object types
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- category_name: '{{ item }} name'
- state: absent
- with_items:
- - All objects
- - Folder
- - Cluster
- - Datacenter
- - Datastore
- - Datastore Cluster
- - Distributed Port Group
- - Distributed Switch
- - Host
- - Content Library
- - Library item
- - Network
- - Resource Pool
- - vApp
- - Virtual Machine
-
-- name: Create category with 2 associable object types
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- category_name: 'Sample_cate_0001'
- category_description: 'sample description'
- associable_object_types:
- - Datastore
- - Cluster
- state: present
- register: category_change
-
-- name: Assert change is made
- assert:
- that:
- - category_change.changed
-
-- name: Delete category with 2 associable object types
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- category_name: 'Sample_cate_0001'
- state: absent
- register: category_change
-
-- name: Assert change is made
- assert:
- that:
- - category_change.changed
diff --git a/test/integration/targets/vmware_category/tasks/main.yml b/test/integration/targets/vmware_category/tasks/main.yml
deleted file mode 100644
index 96a490f8c3..0000000000
--- a/test/integration/targets/vmware_category/tasks/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-# Test code for the vmware_category Operations.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- - include: associable_obj_types.yml
diff --git a/test/integration/targets/vmware_cluster/aliases b/test/integration/targets/vmware_cluster/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_cluster/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_cluster/tasks/main.yml b/test/integration/targets/vmware_cluster/tasks/main.yml
deleted file mode 100644
index 5652902e0a..0000000000
--- a/test/integration/targets/vmware_cluster/tasks/main.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-# Test code for the vmware_cluster module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-# Testcase 0001: Add Cluster
-- &add_cluster
- name: add cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_0001
- state: present
- register: cluster_result_0001
-
-- &ensure_changed
- name: ensure cluster is present
- assert:
- that:
- - "{{ cluster_result_0001.changed == true }}"
-
-# # Broken by: https://github.com/ansible/ansible/issues/54857
-# - <<: *add_cluster
-# name: add cluster (again)
-
-# - &ensure_unchanged
-# name: ensure cluster is unchanged
-# assert:
-# that:
-# - "{{ cluster_result_0001.changed == false }}"
-
-- when: vcsim is not defined
- block:
- - &del_cluster
- name: delete cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_0001
- state: absent
- register: cluster_result_0001
-
- - <<: *ensure_changed
-
- - <<: *del_cluster
- name: delete cluster (again)
-
- #- <<: *ensure_unchanged
- - name: ensure cluster is unchanged
- assert:
- that:
- - "{{ cluster_result_0001.changed == false }}"
diff --git a/test/integration/targets/vmware_cluster_drs/aliases b/test/integration/targets/vmware_cluster_drs/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_cluster_drs/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_cluster_drs/tasks/main.yml b/test/integration/targets/vmware_cluster_drs/tasks/main.yml
deleted file mode 100644
index 5662769e74..0000000000
--- a/test/integration/targets/vmware_cluster_drs/tasks/main.yml
+++ /dev/null
@@ -1,97 +0,0 @@
-# Test code for the vmware_cluster module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-# Setup: Create test cluster
-- name: Create test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_drs
- state: present
-
-# Testcase 0001: Enable DRS
-- name: Enable DRS
- vmware_cluster_drs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_drs
- enable_drs: yes
- register: cluster_drs_result_0001
-
-- name: Ensure DRS is enabled
- assert:
- that:
- - "{{ cluster_drs_result_0001.changed == true }}"
-
-# Testcase 0002: Disable DRS
-- name: Disable DRS
- vmware_cluster_drs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_drs
- enable_drs: no
- register: cluster_drs_result_0002
-
-- name: Ensure DRS is disabled
- assert:
- that:
- - "{{ cluster_drs_result_0002.changed == true }}"
-
-- when: vcsim is not defined
- block:
- - name: Change advanced setting "TryBalanceVmsPerHost" (check-mode)
- vmware_cluster_drs: &change_balance_vms
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_drs
- advanced_settings:
- 'TryBalanceVmsPerHost': '1'
- check_mode: yes
- register: change_balance_vms_check
-
- - assert:
- that:
- - change_balance_vms_check.changed
-
- - name: Change advanced setting "TryBalanceVmsPerHost"
- vmware_cluster_drs: *change_balance_vms
- register: change_balance_vms
-
- - assert:
- that:
- - change_balance_vms.changed
-
- - name: Change advanced setting "TryBalanceVmsPerHost" again
- vmware_cluster_drs: *change_balance_vms
- register: change_balance_vms_again
-
- - assert:
- that:
- - not change_balance_vms_again.changed
-
- # Delete test cluster
- - name: Delete test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_drs
- state: absent
diff --git a/test/integration/targets/vmware_cluster_facts/aliases b/test/integration/targets/vmware_cluster_facts/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_cluster_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_cluster_facts/tasks/main.yml b/test/integration/targets/vmware_cluster_facts/tasks/main.yml
deleted file mode 100644
index df7b34c555..0000000000
--- a/test/integration/targets/vmware_cluster_facts/tasks/main.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-# Test code for the vmware_cluster_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- &vc_all_data
- name: gather facts about all clusters in the given datacenter
- vmware_cluster_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- datacenter: "{{ dc1 }}"
- register: all_cluster_result
-
-- &ensure_vc_all_data
- name: ensure facts are gathered for all clusters
- assert:
- that:
- - all_cluster_result.clusters
- - not all_cluster_result.changed
-
-- <<: *vc_all_data
- name: Gather facts about all clusters in the given datacenter in check mode
- check_mode: yes
-
-- debug: msg=all_cluster_result
-
-- <<: *ensure_vc_all_data
- name: Ensure facts are gathered for all clusters in check mode
-
-- &vc_cluster_data
- name: Gather facts about the given cluster
- vmware_cluster_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: cluster_result
-
-- &ensure_vc_cluster_data
- name: Ensure facts are gathered for the given cluster
- assert:
- that:
- - cluster_result.clusters
- - not cluster_result.changed
-
-- <<: *vc_cluster_data
- name: Gather facts about the given cluster in check mode
- check_mode: yes
-
-- <<: *ensure_vc_cluster_data
- name: Ensure facts are gathered for the given cluster in check mode
-
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_category: true
- setup_tag: true
-
- - name: Apply tag to cluster
- vmware_tag_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- tag_names:
- - '{{ cluster_category }}:{{ cluster_tag }}'
- state: present
- object_name: '{{ ccr1 }}'
- object_type: ClusterComputeResource
-
- - name: Get facts about cluster
- vmware_cluster_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- show_tag: True
- cluster_name: "{{ ccr1 }}"
- register: cluster_info
-
- - assert:
- that:
- - cluster_info is defined
- - cluster_info.clusters[ccr1].tags is defined
diff --git a/test/integration/targets/vmware_cluster_ha/aliases b/test/integration/targets/vmware_cluster_ha/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_cluster_ha/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_cluster_ha/tasks/main.yml b/test/integration/targets/vmware_cluster_ha/tasks/main.yml
deleted file mode 100644
index bda03fd94c..0000000000
--- a/test/integration/targets/vmware_cluster_ha/tasks/main.yml
+++ /dev/null
@@ -1,174 +0,0 @@
-# Test code for the vmware_cluster module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-# Setup: Create test cluster
-- name: Create test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- state: present
-
-# Testcase 0001: Enable HA
-- name: Enable HA
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: yes
- register: cluster_ha_result_0001
-
-- name: Ensure HA is enabled
- assert:
- that:
- - "{{ cluster_ha_result_0001.changed == true }}"
-
-# Testcase 0002: Enable Slot based Admission Control
-- name: Enable Slot based Admission Control
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: yes
- slot_based_admission_control:
- failover_level: 1
- register: cluster_ha_result_0002
-
-- name: Ensure Admission Cotrol is enabled
- assert:
- that:
- - "{{ cluster_ha_result_0002.changed == true }}"
-
-# Testcase 0003: Enable Cluster resource Percentage based Admission Control
-- name: Enable Cluster resource Percentage based Admission Control
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: yes
- reservation_based_admission_control:
- auto_compute_percentages: false
- failover_level: 1
- cpu_failover_resources_percent: 33
- memory_failover_resources_percent: 33
- register: cluster_ha_result_0003
-
-- name: Ensure Admission Cotrol is enabled
- assert:
- that:
- - "{{ cluster_ha_result_0003.changed == true }}"
-
-# Testcase 0004: Set Isolation Response to powerOff
-- name: Set Isolation Response to powerOff
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: yes
- host_isolation_response: 'powerOff'
- register: cluster_ha_result_0004
-
-- name: Ensure Isolation Response is enabled
- assert:
- that:
- - "{{ cluster_ha_result_0004.changed == true }}"
-
-# Testcase 0005: Set Isolation Response to shutdown
-- name: Set Isolation Response to shutdown
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: yes
- host_isolation_response: 'shutdown'
- register: cluster_ha_result_0005
-
-- name: Ensure Isolation Response is enabled
- assert:
- that:
- - "{{ cluster_ha_result_0005.changed == true }}"
-
-# Testcase 0006: Disable HA
-- name: Disable HA
- vmware_cluster_ha:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- enable_ha: no
- register: cluster_ha_result_0006
-
-- name: Ensure HA is disabled
- assert:
- that:
- - "{{ cluster_ha_result_0006.changed == true }}"
-
-- when: vcsim is not defined
- block:
- - name: Change advanced setting "number of heartbeat datastores" (check-mode)
- vmware_cluster_ha: &change_num_heartbeat_ds
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- advanced_settings:
- 'das.heartbeatDsPerHost': '4'
- check_mode: yes
- register: change_num_heartbeat_ds_check
-
- - assert:
- that:
- - change_num_heartbeat_ds_check.changed
-
- - name: Change advanced setting "number of heartbeat datastores"
- vmware_cluster_ha: *change_num_heartbeat_ds
- register: change_num_heartbeat_ds
-
- - assert:
- that:
- - change_num_heartbeat_ds.changed
-
- - name: Change advanced setting "number of heartbeat datastores" again
- vmware_cluster_ha: *change_num_heartbeat_ds
- register: change_num_heartbeat_ds_again
-
- - assert:
- that:
- - not change_num_heartbeat_ds_again.changed
-
- # Delete test cluster
- - name: Delete test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_ha
- state: absent
diff --git a/test/integration/targets/vmware_cluster_info/aliases b/test/integration/targets/vmware_cluster_info/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_cluster_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_cluster_info/tasks/main.yml b/test/integration/targets/vmware_cluster_info/tasks/main.yml
deleted file mode 100644
index 0d0ba4e947..0000000000
--- a/test/integration/targets/vmware_cluster_info/tasks/main.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-# Test code for the vmware_cluster_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- &vc_all_data
- name: gather info about all clusters in the given datacenter
- vmware_cluster_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- datacenter: "{{ dc1 }}"
- register: all_cluster_result
-
-- &ensure_vc_all_data
- name: ensure info are gathered for all clusters
- assert:
- that:
- - all_cluster_result.clusters
- - not all_cluster_result.changed
-
-- <<: *vc_all_data
- name: Gather info about all clusters in the given datacenter in check mode
- check_mode: yes
-
-- debug: msg=all_cluster_result
-
-- <<: *ensure_vc_all_data
- name: Ensure info is gathered for all clusters in check mode
-
-- &vc_cluster_data
- name: Gather info about the given cluster
- vmware_cluster_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: cluster_result
-
-- &ensure_vc_cluster_data
- name: Ensure info are gathered for the given cluster
- assert:
- that:
- - cluster_result.clusters
- - not cluster_result.changed
-
-- <<: *vc_cluster_data
- name: Gather info about the given cluster in check mode
- check_mode: yes
-
-- <<: *ensure_vc_cluster_data
- name: Ensure info is gathered for the given cluster in check mode
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_category: true
- setup_tag: true
-
- - name: Apply tag to cluster
- vmware_tag_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- tag_names:
- - '{{ cluster_category }}:{{ cluster_tag }}'
- state: present
- object_name: '{{ ccr1 }}'
- object_type: ClusterComputeResource
-
- - name: Get info about cluster
- vmware_cluster_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- show_tag: True
- cluster_name: "{{ ccr1 }}"
- register: cluster_info
-
- - assert:
- that:
- - cluster_info is defined
- - cluster_info.clusters[ccr1].tags is defined
diff --git a/test/integration/targets/vmware_cluster_vsan/aliases b/test/integration/targets/vmware_cluster_vsan/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_cluster_vsan/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_cluster_vsan/tasks/main.yml b/test/integration/targets/vmware_cluster_vsan/tasks/main.yml
deleted file mode 100644
index 23657bb146..0000000000
--- a/test/integration/targets/vmware_cluster_vsan/tasks/main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-# Test code for the vmware_cluster module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-- when: vcsim is not defined
- block:
- # Setup: Create test cluster
- - name: Create test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_vsan
- state: present
-
- # Testcase 0001: Enable vSAN
- - name: Enable vSAN
- vmware_cluster_vsan:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_vsan
- enable_vsan: yes
- register: cluster_vsan_result_0001
-
- - name: Ensure vSAN is enabled
- assert:
- that:
- - "{{ cluster_vsan_result_0001.changed == true }}"
-
- # Testcase 0002: Disable vSAN
- - name: Disable vSAN
- vmware_cluster_vsan:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_vsan
- enable_vsan: no
- register: cluster_vsan_result_0002
-
- - name: Ensure vSAN is disabled
- assert:
- that:
- - "{{ cluster_vsan_result_0002.changed == true }}"
-
- # Delete test cluster
- - name: Delete test cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_vsan
- state: absent
diff --git a/test/integration/targets/vmware_content_deploy_template/aliases b/test/integration/targets/vmware_content_deploy_template/aliases
deleted file mode 100644
index a6a5f023b4..0000000000
--- a/test/integration/targets/vmware_content_deploy_template/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-unsupported
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_content_deploy_template/tasks/main.yml b/test/integration/targets/vmware_content_deploy_template/tasks/main.yml
deleted file mode 100644
index 38b511a716..0000000000
--- a/test/integration/targets/vmware_content_deploy_template/tasks/main.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Test code for the deploy VM from content library template.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.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
-
-- when: vcsim is not defined
- block:
- - &deploy_vm_from_content_library_template
- vmware_content_deploy_template:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- template: '{{ test_vm_temp }}'
- datastore: '{{ rw_datastore }}'
- datacenter: '{{ dc1 }}'
- folder: '{{ f0 }}'
- host: '{{ esx1 }}'
- name: 'test_content_deploy_vm'
- state: poweredon
- validate_certs: false
- register: template_deploy
-
- - name: Check VM deployed successfully
- assert:
- that:
- - template_deploy.changed
-
- - <<: *deploy_vm_from_content_library_template
- name: Deploy VM from template again
-
- - name: Check VM with same name is deployed
- assert:
- that:
- - not template_deploy.changed \ No newline at end of file
diff --git a/test/integration/targets/vmware_content_library_info/aliases b/test/integration/targets/vmware_content_library_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_content_library_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_content_library_info/tasks/main.yml b/test/integration/targets/vmware_content_library_info/tasks/main.yml
deleted file mode 100644
index d9d22b9812..0000000000
--- a/test/integration/targets/vmware_content_library_info/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Test code for the vmware_content_library_info.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
-
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_content_library: true
-
- # Get List of Content Libraries
- - name: Get List of Content Libraries
- vmware_content_library_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: false
- register: content_library_info
-
- - debug: var=content_library_info
- - set_fact: content_library="{{ content_library_info['content_libs'][0] }}"
-
- # Get Details of content library
- - name: Get facts about Content Library
- vmware_content_library_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- library_id: '{{ content_library }}'
- validate_certs: false
- register: content_lib_info
-
- - name: Check Content Library details
- assert:
- that:
- - '{{ content_lib_info.content_lib_details[0].library_id == content_library }}'
diff --git a/test/integration/targets/vmware_content_library_manager/aliases b/test/integration/targets/vmware_content_library_manager/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_content_library_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_content_library_manager/tasks/main.yml b/test/integration/targets/vmware_content_library_manager/tasks/main.yml
deleted file mode 100644
index 94134e3e71..0000000000
--- a/test/integration/targets/vmware_content_library_manager/tasks/main.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-# Test code for the vmware_content_library CRUD Operations.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.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_attach_host: true
- setup_datastore: true
-
-- when: vcsim is not defined
- block:
- - &content_lib_delete
- name: Delete content library if exists
- vmware_content_library_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- library_name: Sample_Library
- state: absent
-
- - &content_lib_create
- name: Create content library
- vmware_content_library_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- library_name: Sample_Library
- library_description: Sample Description
- datastore_name: '{{ rw_datastore }}'
- state: present
- register: content_lib_create_result
-
- - name: Check content library is created
- assert:
- that:
- - content_lib_create_result.changed
-
- - <<: *content_lib_create
- name: Create content library again
-
- - name: Check if no changes are made
- assert:
- that:
- - not content_lib_create_result.changed
-
- # Testcase Update Content Library
- - &update_content_lib
- name: Update a content library
- vmware_content_library_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- library_name: Sample_Library
- library_description: Update Sample Description
- state: present
- register: content_lib_update_result
-
- - name: Check content library is updated
- assert:
- that:
- - content_lib_update_result.changed
-
- - <<: *update_content_lib
- name: Update a content library again
-
- - name: Check content library is not updated
- assert:
- that:
- - not content_lib_update_result.changed
-
- # Testcase Delete the content library
- - <<: *content_lib_delete
- name: Delete content library
- register: content_lib_delete_result
-
- - name: Check content library is deleted
- assert:
- that:
- - content_lib_delete_result.changed
-
- - <<: *content_lib_delete
- name: Delete content library again
- register: content_lib_delete_result
-
- - name: Check if no changes are made
- assert:
- that:
- - not content_lib_delete_result.changed
diff --git a/test/integration/targets/vmware_datacenter/aliases b/test/integration/targets/vmware_datacenter/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_datacenter/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_datacenter/tasks/main.yml b/test/integration/targets/vmware_datacenter/tasks/main.yml
deleted file mode 100644
index 4a590b138d..0000000000
--- a/test/integration/targets/vmware_datacenter/tasks/main.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# Test code for the vmware_datacenter module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-- &add_dc
- name: Add datacenter
- vmware_datacenter:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: datacenter_0001
- state: present
- register: dc_result
-
-- debug:
- var: dc_result
-
-- name: Ensure datacenter is present
- assert:
- that:
- - dc_result.changed
-
-- <<: *add_dc
- name: add datacenter again to check idempotent behavior
-
-- name: Ensure datacenter status is not changed
- assert:
- that:
- - not dc_result.changed
-
-- when: vcsim is not defined
- block:
- - name: Delete datacenter
- vmware_datacenter:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: datacenter_0001
- state: absent
- register: dc_result_delete
-
- - name: Ensure datacenter is absent
- assert:
- that:
- - dc_result_delete.changed
diff --git a/test/integration/targets/vmware_datastore_cluster/aliases b/test/integration/targets/vmware_datastore_cluster/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_datastore_cluster/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_datastore_cluster/tasks/main.yml b/test/integration/targets/vmware_datastore_cluster/tasks/main.yml
deleted file mode 100644
index f679172feb..0000000000
--- a/test/integration/targets/vmware_datastore_cluster/tasks/main.yml
+++ /dev/null
@@ -1,125 +0,0 @@
-# Test code for the vmware_datastore_cluster module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
-
- - name: Add a datastore cluster to datacenter (check-mode)
- vmware_datastore_cluster: &add_datastore_cluster
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- datacenter_name: "{{ dc1 }}"
- datastore_cluster_name: DSC1
- enable_sdrs: False
- state: present
- check_mode: yes
- register: add_dsc_check
-
- - assert:
- that:
- - add_dsc_check.changed
-
- - name: Add a datastore cluster to datacenter
- vmware_datastore_cluster: *add_datastore_cluster
- register: add_dsc
-
- - assert:
- that:
- - add_dsc.changed
-
- - name: Add a datastore cluster to datacenter again
- vmware_datastore_cluster: *add_datastore_cluster
- register: add_dsc
-
- - assert:
- that:
- - not add_dsc.changed
-
- - name: Enable SDRS on a datastore cluster (check-mode)
- vmware_datastore_cluster: &enable_sdrs
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- datacenter_name: "{{ dc1 }}"
- datastore_cluster_name: DSC1
- enable_sdrs: True
- state: present
- check_mode: yes
- register: enable_sdrs_check
-
- - assert:
- that:
- - enable_sdrs_check.changed
-
- - name: Enable SDRS on a datastore cluster
- vmware_datastore_cluster: *enable_sdrs
- register: enable_sdrs
-
- - assert:
- that:
- - enable_sdrs.changed
-
- - name: Enable SDRS on a datastore cluster again
- vmware_datastore_cluster: *enable_sdrs
- register: enable_sdrs_again
-
- - assert:
- that:
- - not enable_sdrs_again.changed
-
- - name: Create a datastore folder on given Datacenter
- vcenter_folder:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ dc1 }}'
- folder_name: 'my_datastore_folder'
- folder_type: datastore
- state: present
- validate_certs: no
- register: my_datastore_folder
-
- - name: Add a datastore cluster using folder
- vmware_datastore_cluster:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- folder: "{{ my_datastore_folder.result.path }}"
- datastore_cluster_name: DSC2
- state: present
- register: add_dsc_folder_check
-
- - assert:
- that:
- - add_dsc_folder_check.changed
-
- - name: Delete a datastore cluster to datacenter (check-mode)
- vmware_datastore_cluster: &delete_datastore_cluster
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- datacenter_name: "{{ dc1 }}"
- datastore_cluster_name: DSC1
- state: absent
- check_mode: yes
- register: delete_dsc_check
-
- - assert:
- that:
- - delete_dsc_check.changed
-
- - name: Delete a datastore cluster to datacenter
- vmware_datastore_cluster: *delete_datastore_cluster
- register: delete_dsc_check
-
- - assert:
- that:
- - delete_dsc_check.changed
diff --git a/test/integration/targets/vmware_datastore_facts/aliases b/test/integration/targets/vmware_datastore_facts/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_datastore_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_datastore_facts/tasks/main.yml b/test/integration/targets/vmware_datastore_facts/tasks/main.yml
deleted file mode 100644
index a78d70fe1f..0000000000
--- a/test/integration/targets/vmware_datastore_facts/tasks/main.yml
+++ /dev/null
@@ -1,126 +0,0 @@
-# Test code for the vmware_datastore_facts module.
-# Copyright (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
-# Copyright (c) 2018, Ansible Project
-# 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_attach_host: true
- setup_datastore: true
-
-- when: vcsim is not defined
- block:
- - name: get list of facts about datastores from the ESXi
- vmware_datastore_facts:
- validate_certs: False
- hostname: '{{ item }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- register: facts_from_esxi
- with_items: "{{ esxi_hosts }}"
- - assert:
- that:
- - "facts_from_esxi.results[0].datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
-
-- name: get list of facts about datastores
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- gather_nfs_mount_info: true
- register: facts_from_vcenter_with_dc_filter
-
-- when: vcsim is not defined
- block:
- - name: get list of facts about datastores
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- gather_nfs_mount_info: true
- register: facts_from_vcenter_with_no_filter
-
- - assert:
- that:
- - "facts_from_vcenter_with_dc_filter.datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
- - "facts_from_vcenter_with_no_filter.datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
- - "facts_from_vcenter_with_no_filter.datastores[0]['capacity'] is defined"
-
-# Testcase 0002: Get a full list of datastores in a cluster
-- name: get list of facts about datastores - no dc
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster: "{{ ccr1 }}"
- register: datastore_facts_0002
-
-- debug:
- msg: "{{ datastore_facts_0002 }}"
-
-- assert:
- that:
- - "datastore_facts_0002['datastores'][0]['capacity'] is defined"
-
-# Testcase 0003: Find a specific datastore
-- name: get list of facts about one datastore
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- register: datastore_facts_0003
-
-- debug:
- msg: "{{ datastore_facts_0003 }}"
-
-- assert:
- that:
- - "datastore_facts_0003['datastores'][0]['name'] == ro_datastore"
- - "datastore_facts_0003['datastores'][0]['capacity'] is defined"
-
-- name: get list of extended facts about one datastore
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- gather_nfs_mount_info: True
- gather_vmfs_mount_info: True
- register: datastore_facts_0004
-
-- debug:
- msg: "{{ datastore_facts_0004 }}"
-
-- assert:
- that:
- - "datastore_facts_0004['datastores'][0]['name'] == ro_datastore"
- - "datastore_facts_0004['datastores'][0]['capacity'] is defined"
-
-- name: get list of facts about one datastore in check mode
- vmware_datastore_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- register: datastore_facts_0005
-
-- debug:
- msg: "{{ datastore_facts_0005 }}"
-
-- assert:
- that:
- - "datastore_facts_0005['datastores'][0]['name'] == ro_datastore"
- - "datastore_facts_0005['datastores'][0]['capacity'] is defined"
diff --git a/test/integration/targets/vmware_datastore_info/aliases b/test/integration/targets/vmware_datastore_info/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_datastore_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_datastore_info/tasks/main.yml b/test/integration/targets/vmware_datastore_info/tasks/main.yml
deleted file mode 100644
index eff3f73fc0..0000000000
--- a/test/integration/targets/vmware_datastore_info/tasks/main.yml
+++ /dev/null
@@ -1,192 +0,0 @@
-# Test code for the vmware_datastore_info module.
-# Copyright (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
-# Copyright (c) 2018, Ansible Project
-# 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_attach_host: true
- setup_datastore: true
-
-- when: vcsim is not defined
- block:
- - name: get list of info about datastores from the ESXi
- vmware_datastore_info:
- validate_certs: False
- hostname: '{{ item }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- register: info_from_esxi
- with_items: "{{ esxi_hosts }}"
- - assert:
- that:
- - "info_from_esxi.results[0].datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
-
-- name: get list of info about datastores
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- gather_nfs_mount_info: true
- register: info_from_vcenter_with_dc_filter
-
-- when: vcsim is not defined
- block:
- - name: get list of info about datastores
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- gather_nfs_mount_info: true
- register: info_from_vcenter_with_no_filter
-
- - assert:
- that:
- - "info_from_vcenter_with_dc_filter.datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
- - "info_from_vcenter_with_no_filter.datastores|selectattr('type', 'equalto', 'NFS')|list|length == 2"
- - "info_from_vcenter_with_no_filter.datastores[0]['capacity'] is defined"
-
-# Testcase 0002: Get a full list of datastores in a cluster
-- name: get list of info about datastores - no dc
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster: "{{ ccr1 }}"
- register: datastore_info_0002
-
-- debug:
- msg: "{{ datastore_info_0002 }}"
-
-- assert:
- that:
- - "datastore_info_0002['datastores'][0]['capacity'] is defined"
-
-# Testcase 0003: Find a specific datastore
-- name: get list of info about one datastore
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- register: datastore_info_0003
-
-- debug:
- msg: "{{ datastore_info_0003 }}"
-
-- assert:
- that:
- - "datastore_info_0003['datastores'][0]['name'] == ro_datastore"
- - "datastore_info_0003['datastores'][0]['capacity'] is defined"
-
-- name: get list of extended info about one datastore
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- gather_nfs_mount_info: True
- gather_vmfs_mount_info: True
- register: datastore_info_0004
-
-- debug:
- msg: "{{ datastore_info_0004 }}"
-
-- assert:
- that:
- - "datastore_info_0004['datastores'][0]['name'] == ro_datastore"
- - "datastore_info_0004['datastores'][0]['capacity'] is defined"
-
-- name: get list of info about one datastore in check mode
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- register: datastore_info_0005
-
-- debug:
- msg: "{{ datastore_info_0005 }}"
-
-- assert:
- that:
- - "datastore_info_0005['datastores'][0]['name'] == ro_datastore"
- - "datastore_info_0005['datastores'][0]['capacity'] is defined"
-
-# Testcase with property specify
-- name: get list of info about datastores with properties specify - no dc
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster: "{{ ccr1 }}"
- schema: vsphere
- properties:
- - name
- register: datastore_info_0006
-
-- debug:
- msg: "{{ datastore_info_0006 }}"
-
-- assert:
- that:
- - "datastore_info_0006['datastores'][0]['name'] is defined"
-
-- name: get list of info about one datastore with properties specify
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- schema: vsphere
- properties:
- - name
- register: datastore_info_0007
-
-- debug:
- msg: "{{ datastore_info_0007 }}"
-
-- assert:
- that:
- - "datastore_info_0007['datastores'][0]['name'] is defined"
- - "datastore_info_0007['datastores'][0]['name'] == ro_datastore"
- - "datastore_info_0007['datastores'] | length == 1"
-
-- name: get list of info about datastores with multiple properties specify
- vmware_datastore_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ ro_datastore }}"
- schema: vsphere
- properties:
- - name
- - capability.vsanSparseSupported
- - overallStatus
- register: datastore_info_0008
-
-- debug:
- msg: "{{ datastore_info_0008 }}"
-
-- assert:
- that:
- - "datastore_info_0008['datastores'][0]['name'] is defined"
- - "datastore_info_0008['datastores'][0]['capability']['vsanSparseSupported'] is defined"
- - "datastore_info_0008['datastores'][0]['overallStatus'] is defined"
diff --git a/test/integration/targets/vmware_datastore_maintenancemode/aliases b/test/integration/targets/vmware_datastore_maintenancemode/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_datastore_maintenancemode/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml b/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml
deleted file mode 100644
index 62632a047c..0000000000
--- a/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-# Test code for the vmware_datastore_maintenancemode module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support datastore maintenance mode properties
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
-
- - name: Enter datastore in maintenance mode
- vmware_datastore_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- datastore: "{{ ro_datastore }}"
- validate_certs: no
- register: test_result_0001
-
- - debug:
- var: test_result_0001
-
- - name: assert that changes were made
- assert:
- that:
- - test_result_0001 is changed
-
- - name: Enter datastore in maintenance mode again
- vmware_datastore_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- datastore: "{{ ro_datastore }}"
- validate_certs: no
- register: test_result_0002
-
- - debug:
- var: test_result_0002
-
- - name: assert that no changes were made
- assert:
- that:
- - not (test_result_0002 is changed)
-
- - name: Exit datastores from maintenance mode
- vmware_datastore_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- datastore: "{{ ro_datastore }}"
- validate_certs: no
- register: test_result_0003
-
- - debug:
- var: test_result_0003
-
- - name: assert that changes were made
- assert:
- that:
- - test_result_0003 is changed
-
- - name: Exit datastores from maintenance mode again
- vmware_datastore_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- datastore: "{{ ro_datastore }}"
- validate_certs: no
- register: test_result_0004
-
- - debug:
- var: test_result_0004
-
- - name: assert that no changes were made
- assert:
- that:
- - not (test_result_0004 is changed)
diff --git a/test/integration/targets/vmware_drs_group/aliases b/test/integration/targets/vmware_drs_group/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_drs_group/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_drs_group/tasks/main.yml b/test/integration/targets/vmware_drs_group/tasks/main.yml
deleted file mode 100644
index 071f9c0719..0000000000
--- a/test/integration/targets/vmware_drs_group/tasks/main.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# Test code for the vmware_drs_group module
-# Copyright: (c) 2018, Karsten Kaj Jakobsen <kj@patientsky.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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: Create DRS VM group
- vmware_drs_group:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- # Options
- cluster_name: '{{ ccr1 }}'
- datacenter_name: '{{ dc1 }}'
- group_name: TEST_VM_01
- vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}"
- state: present
- register: drs_vm_group_01_results
-
-- debug:
- var: drs_vm_group_01_results
-
-- assert:
- that:
- - "drs_vm_group_01_results.changed"
-
-- when: vcsim is defined or esxi_hosts | length >= 3
- block:
- - name: Create DRS Host group
- vmware_drs_group:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: '{{ ccr1 }}'
- datacenter_name: '{{ dc1 }}'
- group_name: TEST_HOST_01
- hosts: "{{ esxi_hosts[0:3] }}"
- state: present
- register: drs_host_group_01_results
-
- - debug:
- var: drs_host_group_01_results
-
- - assert:
- that:
- - "drs_host_group_01_results.changed"
-
- - name: Delete DRS Host group
- vmware_drs_group:
- # Login creds
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- # Options
- cluster_name: DC0_C0
- datacenter_name: DC0
- group_name: TEST_HOST_01
- hosts: []
- state: absent
- register: drs_host_group_01_delete_results
-
- - debug:
- var: drs_host_group_01_delete_results
-
- - assert:
- that:
- - "drs_host_group_01_delete_results.changed"
diff --git a/test/integration/targets/vmware_drs_group_facts/aliases b/test/integration/targets/vmware_drs_group_facts/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_drs_group_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_drs_group_facts/tasks/main.yml b/test/integration/targets/vmware_drs_group_facts/tasks/main.yml
deleted file mode 100644
index d941a2a5be..0000000000
--- a/test/integration/targets/vmware_drs_group_facts/tasks/main.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-# Test code for the vmware_drs_group_facts module
-# Copyright: (c) 2018, Karsten Kaj Jakobsen <kj@patientsky.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
-
-- when: vcsim is defined or esxi_hosts | length >= 3
- block:
- - name: Gather DRS group facts from given cluster
- vmware_drs_group_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: '{{ ccr1 }}'
- validate_certs: False
- register: drs_group_0001_results
-
- - debug:
- var: drs_group_0001_results
-
- - assert:
- that:
- - "drs_group_0001_results.drs_group_facts.DC0_C0 is defined"
- - "not drs_group_0001_results.drs_group_facts.DC0_C1 is defined"
- - "not drs_group_0001_results.changed"
-
- - name: Gather DRS group facts from given datacenter
- vmware_drs_group_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: '{{ dc1 }}'
- validate_certs: False
- register: drs_group_0002_results
-
- - debug:
- var: drs_group_0002_results
-
- - assert:
- that:
- - "drs_group_0002_results.drs_group_facts.DC0_C0 is defined"
- - "not drs_group_0002_results.drs_group_facts.DC0_C1 is defined"
- - "not drs_group_0002_results.changed"
diff --git a/test/integration/targets/vmware_drs_group_info/aliases b/test/integration/targets/vmware_drs_group_info/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_drs_group_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_drs_group_info/tasks/main.yml b/test/integration/targets/vmware_drs_group_info/tasks/main.yml
deleted file mode 100644
index 8b7e20be64..0000000000
--- a/test/integration/targets/vmware_drs_group_info/tasks/main.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-# Test code for the vmware_drs_group_info module
-# Copyright: (c) 2018, Karsten Kaj Jakobsen <kj@patientsky.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
-
-- when: vcsim is defined or esxi_hosts | length >= 3
- block:
- - name: Gather DRS group info from given cluster
- vmware_drs_group_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: '{{ ccr1 }}'
- validate_certs: False
- register: drs_group_0001_results
-
- - debug:
- var: drs_group_0001_results
-
- - assert:
- that:
- - "drs_group_0001_results.drs_group_info.DC0_C0 is defined"
- - "not drs_group_0001_results.drs_group_info.DC0_C1 is defined"
- - "not drs_group_0001_results.changed"
-
- - name: Gather DRS group info from given datacenter
- vmware_drs_group_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: '{{ dc1 }}'
- validate_certs: False
- register: drs_group_0002_results
-
- - debug:
- var: drs_group_0002_results
-
- - assert:
- that:
- - "drs_group_0002_results.drs_group_info.DC0_C0 is defined"
- - "not drs_group_0002_results.drs_group_info.DC0_C1 is defined"
- - "not drs_group_0002_results.changed"
diff --git a/test/integration/targets/vmware_drs_rule_facts/aliases b/test/integration/targets/vmware_drs_rule_facts/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_drs_rule_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml b/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml
deleted file mode 100644
index 825fc6ea4d..0000000000
--- a/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test code for the vmware_drs_rule_facts module
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- when: vcsim is defined or esxi_hosts | length >= 3
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather facts about DRS rule from given cluster
- vmware_drs_rule_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: DC0_C0
- register: drs_rule_0001_results
-
- - debug:
- var: drs_rule_0001_results
-
- - assert:
- that:
- - "drs_rule_0001_results.drs_rule_facts is defined"
- - "not drs_rule_0001_results.changed"
-
- - name: Gather facts about DRS rule from given datacenter
- vmware_drs_rule_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: DC0
- register: drs_rule_0001_results
-
- - debug:
- var: drs_rule_0001_results
-
- - assert:
- that:
- - "drs_rule_0001_results.drs_rule_facts is defined"
- - "not drs_rule_0001_results.changed"
diff --git a/test/integration/targets/vmware_drs_rule_info/aliases b/test/integration/targets/vmware_drs_rule_info/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_drs_rule_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_drs_rule_info/tasks/main.yml b/test/integration/targets/vmware_drs_rule_info/tasks/main.yml
deleted file mode 100644
index 1b4f428d69..0000000000
--- a/test/integration/targets/vmware_drs_rule_info/tasks/main.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test code for the vmware_drs_rule_info module
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- when: vcsim is defined or esxi_hosts | length >= 3
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather info about DRS rule from given cluster
- vmware_drs_rule_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: DC0_C0
- register: drs_rule_0001_results
-
- - debug:
- var: drs_rule_0001_results
-
- - assert:
- that:
- - "drs_rule_0001_results.drs_rule_info is defined"
- - "not drs_rule_0001_results.changed"
-
- - name: Gather info about DRS rule from given datacenter
- vmware_drs_rule_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: DC0
- register: drs_rule_0001_results
-
- - debug:
- var: drs_rule_0001_results
-
- - assert:
- that:
- - "drs_rule_0001_results.drs_rule_info is defined"
- - "not drs_rule_0001_results.changed"
diff --git a/test/integration/targets/vmware_dvs_portgroup/aliases b/test/integration/targets/vmware_dvs_portgroup/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml
deleted file mode 100644
index 00dbefd304..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml
+++ /dev/null
@@ -1,387 +0,0 @@
-# Test code for the vmware_dvs_portgroup module.
-# Copyright: (c) 2017, Philippe Dellaert <philippe@dellaert.org>
-# 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_dvswitch: true
-
-- name: create basic portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0001
-
-- debug:
- var: dvs_pg_result_0001
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0001.changed
-
-- name: create basic VLAN portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-vlan10"
- vlan_id: 10
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0002
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0002.changed
-
-- name: create basic trunk portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-trunk"
- vlan_id: 1-4094
- vlan_trunk: True
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0003
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0003.changed
-
-- name: create basic portgroup again
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0004
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - not dvs_pg_result_0004.changed
-
-- name: create basic portgroup with all security and policy settings enabled
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-all-enabled"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: yes
- mac_changes: yes
- port_policy:
- block_override: yes
- ipfix_override: yes
- live_port_move: yes
- network_rp_override: yes
- port_config_reset_at_disconnect: yes
- security_override: yes
- shaping_override: yes
- traffic_filter_override: yes
- uplink_teaming_override: yes
- vendor_config_override: yes
- vlan_override: yes
- register: dvs_pg_result_0005
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0005.changed
-
-- name: create basic portgroup with some security and policy settings enabled
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-some-enabled"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: yes
- mac_changes: no
- port_policy:
- vlan_override: yes
- register: dvs_pg_result_0006
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0006.changed
-
-- name: Change forged_transmits to no
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-some-enabled"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: no
- mac_changes: no
- port_policy:
- vlan_override: yes
- register: dvs_pg_result_0007
-
-- name: ensure forged_transmits is changed
- assert:
- that:
- - dvs_pg_result_0007.changed
-
-- name: Change vlan_override to no
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-some-enabled"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: no
- mac_changes: no
- port_policy:
- vlan_override: no
- register: dvs_pg_result_0008
-
-- name: ensure vlan_override is changed
- assert:
- that:
- - dvs_pg_result_0008.changed
-
-- name: Change num_ports to 16
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-some-enabled"
- vlan_id: 0
- num_ports: 16
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: no
- mac_changes: no
- port_policy:
- vlan_override: no
- register: dvs_pg_result_0009
-
-- name: ensure vlan_override is changed
- assert:
- that:
- - dvs_pg_result_0009.changed
-
-- name: Change portgroup_type to ephemeral
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-some-enabled"
- vlan_id: 0
- num_ports: 16
- portgroup_type: ephemeral
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: no
- mac_changes: no
- port_policy:
- vlan_override: no
- register: dvs_pg_result_0010
-
-- name: ensure vlan_override is changed
- assert:
- that:
- - dvs_pg_result_0010.changed
-
-- name: delete basic portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: absent
- register: dvs_pg_result_0011
-
-- name: ensure dvs portgroup is removed
- assert:
- that:
- - dvs_pg_result_0011.changed
-
-- name: delete basic portgroup again
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic"
- vlan_id: 0
- num_ports: 32
- portgroup_type: earlyBinding
- state: absent
- register: dvs_pg_result_0012
-
-- name: ensure dvs portgroup is removed
- assert:
- that:
- - not dvs_pg_result_0012.changed
-
-- name: Check valid VLAN id range in DVS Portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic_trunk_0001"
- vlan_id: 1-4096
- vlan_trunk: True
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0013
- ignore_errors: True
-
-- name: Ensure module fails for invalid VLAN id
- assert:
- that:
- - not dvs_pg_result_0013.changed
- - "'vlan_id range 1-4096 specified is incorrect. The valid vlan_id range is from 0 to 4094.' == '{{ dvs_pg_result_0013.msg }}'"
-
-- name: Change VLAN on basic VLAN portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-vlan10"
- vlan_id: 20
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0014
-
-- name: ensure dvs portgroup is changed
- assert:
- that:
- - dvs_pg_result_0014.changed
-
-- name: Change VLAN range on basic trunk portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "basic-trunk"
- vlan_id: 1000-2000
- vlan_trunk: True
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0015
-
-- name: ensure dvs portgroup is changed
- assert:
- that:
- - dvs_pg_result_0015.changed
-
-- name: create complex trunk portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "complex-trunk"
- vlan_id: 1-1000, 1005, 1100-1200
- vlan_trunk: True
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0016
-
-- name: ensure dvs portgroup is present
- assert:
- that:
- - dvs_pg_result_0016.changed
-
-- name: change complex trunk portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ dvswitch1 }}"
- portgroup_name: "complex-trunk"
- vlan_id: 1-1000, 1006, 1100-1200
- vlan_trunk: True
- num_ports: 32
- portgroup_type: earlyBinding
- state: present
- register: dvs_pg_result_0017
-
-- name: ensure dvs portgroup is changed
- assert:
- that:
- - dvs_pg_result_0017.changed
diff --git a/test/integration/targets/vmware_dvs_portgroup_facts/aliases b/test/integration/targets/vmware_dvs_portgroup_facts/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml
deleted file mode 100644
index 38a5b63b36..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# Test code for the vmware_dvs_portgroup_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_dvswitch: true
-
-- when: vcsim is not defined
- block:
- - &dvs_facts
- name: Gather facts about DVS portgroup
- vmware_dvs_portgroup_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- register: dvs_results
-
- - debug:
- var: dvs_results
-
- - assert:
- that:
- - dvs_results.dvs_portgroup_facts is defined
-
- - <<: *dvs_facts
- name: Gather facts about DVS portgroup in check mode
- check_mode: yes
-
- - debug:
- var: dvs_results
-
- - assert:
- that:
- - dvs_results.dvs_portgroup_facts is defined
-
-# Testcase 0002: Get portgroup facts for a given dvswitch
-- name: get facts for a given dvswitch
- vmware_dvs_portgroup_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- dvswitch: "{{ dvswitch1 }}"
- register: dvs_results_0002
-
-- debug:
- msg: "{{ dvs_results_0002 }}"
-
-- assert:
- that:
- - "dvs_results_0002['dvs_portgroup_facts']['DVS0'] is defined"
diff --git a/test/integration/targets/vmware_dvs_portgroup_find/aliases b/test/integration/targets/vmware_dvs_portgroup_find/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_find/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvs_portgroup_find/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup_find/tasks/main.yml
deleted file mode 100644
index 2eb372a018..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_find/tasks/main.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Test code for the vmware_dvs_portgroup_find module.
-# Copyright: (c) 2019, David Martinez (@dx0xm)
-# 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_dvswitch: true
-
-- name: get list of portgroups
- vmware_dvs_portgroup_find:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: dvspg_0001
-
-- debug:
- var: dvspg_0001
-
-- assert:
- that:
- - dvspg_0001.dvs_portgroups is defined
diff --git a/test/integration/targets/vmware_dvs_portgroup_info/aliases b/test/integration/targets/vmware_dvs_portgroup_info/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvs_portgroup_info/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup_info/tasks/main.yml
deleted file mode 100644
index 52babceeca..0000000000
--- a/test/integration/targets/vmware_dvs_portgroup_info/tasks/main.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# Test code for the vmware_dvs_portgroup_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_dvswitch: true
-
-- when: vcsim is not defined
- block:
- - &dvs_info
- name: Gather info about DVS portgroup
- vmware_dvs_portgroup_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- register: dvs_results
-
- - debug:
- var: dvs_results
-
- - assert:
- that:
- - dvs_results.dvs_portgroup_info is defined
-
- - <<: *dvs_info
- name: Gather info about DVS portgroup in check mode
- check_mode: yes
-
- - debug:
- var: dvs_results
-
- - assert:
- that:
- - dvs_results.dvs_portgroup_info is defined
-
-# Testcase 0002: Get portgroup info for a given dvswitch
-- name: get info for a given dvswitch
- vmware_dvs_portgroup_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- dvswitch: "{{ dvswitch1 }}"
- register: dvs_results_0002
-
-- debug:
- msg: "{{ dvs_results_0002 }}"
-
-- assert:
- that:
- - "dvs_results_0002['dvs_portgroup_info']['DVS0'] is defined"
diff --git a/test/integration/targets/vmware_dvswitch/aliases b/test/integration/targets/vmware_dvswitch/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_dvswitch/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvswitch/tasks/main.yml b/test/integration/targets/vmware_dvswitch/tasks/main.yml
deleted file mode 100644
index b1aa86675b..0000000000
--- a/test/integration/targets/vmware_dvswitch/tasks/main.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the vmware_dvswitch module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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
-
-- &dvs_data
- name: Add distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: present
- switch_name: dvswitch_0001
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0001
-
-- name: Ensure distributed vswitch is present
- assert:
- that:
- - dvs_result_0001.changed
-
-- name: Create a VM folder on given Datacenter
- vcenter_folder:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ dc1 }}'
- folder_name: network_folder
- folder_type: network
- state: present
- validate_certs: no
- register:
- network_folder_result
-
-- name: Add distributed vSwitch using folder
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ network_folder_result.result.path }}"
- state: present
- switch_name: dvswitch_0002
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0002
-
-- name: Ensure distributed vswitch is present
- assert:
- that:
- - dvs_result_0002.changed
-
-# vcsim doesn't support ldp check (self.dvs.config.linkDiscoveryProtocolConfig.protocol)
-- when: vcsim is not defined
- block:
- - <<: *dvs_data
- name: add distributed vSwitch again
- register: dvs_result_0002
-
- - name: ensure distributed vswitch is present
- assert:
- that:
- - not dvs_result_0002.changed
-
-# FIXME: Remove this testcase from block once vcsim supports distributed vswitch delete method
-# Currently, vcsim does not support distributed vswitch delete option,
-# Once this feature is available we can move this out of this block
-
-# Testcase 0003: Add Distributed vSwitch
- - name: delete the distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: absent
- switch_name: '{{ item }}'
- loop:
- - dvswitch_0001
- - dvswitch_0002
- register: dvswitch_delete
- - debug: var=dvswitch_delete
-
- - name: Ensure the state has changed
- assert:
- that:
- - dvswitch_delete.results[0] is changed
- - dvswitch_delete.results[1] is changed
diff --git a/test/integration/targets/vmware_dvswitch_nioc/aliases b/test/integration/targets/vmware_dvswitch_nioc/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvswitch_nioc/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvswitch_nioc/tasks/main.yml b/test/integration/targets/vmware_dvswitch_nioc/tasks/main.yml
deleted file mode 100644
index 1aa4da06cd..0000000000
--- a/test/integration/targets/vmware_dvswitch_nioc/tasks/main.yml
+++ /dev/null
@@ -1,103 +0,0 @@
-# Test code for the vmware_dvswitch_nioc module.
-# Copyright: (c) 2018, VMware, Inc.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# SPDX-License-Identifier: GPL-3.0-or-later
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
-
- - name: Add distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: present
- switch_name: dvswitch_0001
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0001
-
- - debug:
- var: dvs_result_0001
-
- - name: ensure distributed vswitch is present
- assert:
- that:
- - dvs_result_0001 is changed
-
- - &enable_nioc
- name: Enable NIOC
- vmware_dvswitch_nioc:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch: dvswitch_0001
- version: version3
- validate_certs: no
- resources:
- - name: vmotion
- limit: -1
- reservation: 128
- shares_level: normal
- - name: vsan
- limit: -1
- shares_level: custom
- shares: 99
- reservation: 256
- state: present
- register: enable_nioc_result
-
- - debug:
- var: enable_nioc_result
-
- - name: Check if nioc is enabled
- assert:
- that:
- - enable_nioc_result.changed
-
- - <<: *enable_nioc
- name: Change nioc settings again and make sure it does not change
- register: enable_nioc_result_2
-
- - name: Check if nioc changes are not made
- assert:
- that:
- - not enable_nioc_result_2.changed
-
- - &disable_nioc
- name: Disable NIOC
- vmware_dvswitch_nioc:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch: dvswitch_0001
- validate_certs: no
- state: absent
- register: disable_nioc_result
-
- - debug:
- var: disable_nioc_result
-
- - name: Check if nioc is disabled
- assert:
- that:
- - disable_nioc_result.changed
-
- - <<: *disable_nioc
- name: Disable NIOC again
- register: disable_nioc_result_2
-
- - debug:
- var: disable_nioc_result_2
-
- - name: Check if nioc is not disabled since it is already disabled
- assert:
- that:
- - not disable_nioc_result_2.changed
diff --git a/test/integration/targets/vmware_dvswitch_pvlans/aliases b/test/integration/targets/vmware_dvswitch_pvlans/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvswitch_pvlans/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml b/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml
deleted file mode 100644
index 093598e451..0000000000
--- a/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-# Test code for the vmware_dvswitch_pvlans module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- import_role:
- name: prepare_vmware_tests
-
-# Testcase 0001: Add Distributed vSwitch
-- name: add distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: present
- switch_name: dvswitch_0001
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0001
-
-- debug:
- var: dvs_result_0001
-
-- name: ensure distributed vswitch is present
- assert:
- that:
- - dvs_result_0001 is changed
-
-- &pv_data
- name: Configure PVLANs
- vmware_dvswitch_pvlans:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch: dvswitch_0001
- primary_pvlans:
- - primary_pvlan_id: 1
- - primary_pvlan_id: 4
- secondary_pvlans:
- - primary_pvlan_id: 1
- secondary_pvlan_id: 2
- pvlan_type: isolated
- - primary_pvlan_id: 1
- secondary_pvlan_id: 3
- pvlan_type: community
- - primary_pvlan_id: 4
- secondary_pvlan_id: 5
- pvlan_type: community
- validate_certs: no
- register: pvlans_result
-
-- debug:
- var: pvlans_result
-
-- name: ensure pvlans were configured
- assert:
- that:
- - pvlans_result is changed
-
-- when: vcsim is not defined
- block:
- - <<: *pv_data
- name: Configure PVLANs in check mode
- register: pvlans_result_check_mode
- check_mode: yes
- - debug:
- var: pvlans_result_check_mode
- - name: ensure pvlans were not changed
- assert:
- that:
- - not (pvlans_result_check_mode is changed)
diff --git a/test/integration/targets/vmware_dvswitch_uplink_pg/aliases b/test/integration/targets/vmware_dvswitch_uplink_pg/aliases
deleted file mode 100644
index b1212da1b7..0000000000
--- a/test/integration/targets/vmware_dvswitch_uplink_pg/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml b/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml
deleted file mode 100644
index 4ca85fdd11..0000000000
--- a/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# Test code for the vmware_dvswitch_uplink_pg module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- import_role:
- name: prepare_vmware_tests
-
-# Testcase 0001: Add Distributed vSwitch
-- name: add distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: present
- switch_name: dvswitch_0001
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0001
-
-- debug:
- var: dvs_result_0001
-
-- name: ensure distributed vswitch is present
- assert:
- that:
- - dvs_result_0001 is changed
-
-- when: vcsim is not defined
- block:
- - &uplink_data
- name: Configure Uplink portgroup in check mode
- vmware_dvswitch_uplink_pg:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch: dvswitch_0001
- name: dvswitch_0001-DVUplinks
- advanced:
- port_config_reset_at_disconnect: False
- block_override: False
- vendor_config_override: False
- vlan_override: False
- netflow_override: False
- traffic_filter_override: False
- vlan_trunk_range: [ 2-3967, 4049-4092 ]
- netflow_enabled: True
- block_all_ports: False
- validate_certs: no
- register: uplink_pg_result_check_mode
- check_mode: yes
-
- - debug:
- var: uplink_pg_result_check_mode
-
- - name: ensure uplink portgroup was changed
- assert:
- that:
- - uplink_pg_result_check_mode is changed
-
- - <<: *uplink_data
- name: Configure Uplink portgroup
- register: uplink_pg_result
- check_mode: no
-
- - debug:
- var: uplink_pg_result
-
- - name: ensure uplink portgroup was changed
- assert:
- that:
- - uplink_pg_result is changed
diff --git a/test/integration/targets/vmware_evc_mode/aliases b/test/integration/targets/vmware_evc_mode/aliases
deleted file mode 100644
index be8c5b72ff..0000000000
--- a/test/integration/targets/vmware_evc_mode/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_evc_mode/meta/main.yml b/test/integration/targets/vmware_evc_mode/meta/main.yml
deleted file mode 100644
index 828342c2da..0000000000
--- a/test/integration/targets/vmware_evc_mode/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_vmware_tests
diff --git a/test/integration/targets/vmware_evc_mode/tasks/main.yml b/test/integration/targets/vmware_evc_mode/tasks/main.yml
deleted file mode 100644
index 111e61ec8d..0000000000
--- a/test/integration/targets/vmware_evc_mode/tasks/main.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Test code for the vmware evc mode module.
-# Copyright: (c) 2019, Michael Tipton <mike () ibeta.org>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_datacenter: true
-
- - name: add cluster
- vmware_cluster:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_0001
- state: present
-
- - &evc_enable_data
- name: Enable EVC mode on vCenter Cluster
- vmware_evc_mode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_0001
- evc_mode: intel-broadwell
- state: present
-
- - <<: *evc_enable_data
- name: Enable EVC mode on vCenter cluster in check mode
- check_mode: yes
-
- - &evc_disable_data
- name: Disable EVC mode on vCenter Cluster
- vmware_evc_mode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter_name: "{{ dc1 }}"
- cluster_name: test_cluster_0001
- evc_mode: intel-broadwell
- state: absent
-
- - <<: *evc_disable_data
- name: Disable EVC mode on vCenter Cluster in check mode
- check_mode: yes
diff --git a/test/integration/targets/vmware_export_ovf/aliases b/test/integration/targets/vmware_export_ovf/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_export_ovf/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_export_ovf/tasks/main.yml b/test/integration/targets/vmware_export_ovf/tasks/main.yml
deleted file mode 100644
index 1f2a822fe3..0000000000
--- a/test/integration/targets/vmware_export_ovf/tasks/main.yml
+++ /dev/null
@@ -1,69 +0,0 @@
-# Test code for the vmware_export_ovf module
-# Copyright: (c) 2019, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: create temporary build directory
- tempfile:
- state: directory
- suffix: build
- register: temp_dir
- - debug: var=temp_dir
-
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: set state to poweroff on the tested VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines_in_cluster[0].name }}"
- state: poweredoff
-
- - name: export VM to ovf template
- vmware_export_ovf:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines_in_cluster[0].name }}"
- datacenter: "{{ dc1 }}"
- export_dir: "{{ temp_dir.path }}"
- register: ovf_template
- - debug: var=ovf_template
- - name: assert the ovf template exported
- assert:
- that:
- - "ovf_template.changed == true"
- - "ovf_template.instance.device_files | length >= 1"
-
- - name: export VM to ovf template with timeout set
- vmware_export_ovf:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines_in_cluster[0].name }}"
- datacenter: "{{ dc1 }}"
- export_dir: "{{ temp_dir.path }}"
- download_timeout: 30
- register: ovf_template
- - debug: var=ovf_template
- - name: assert the ovf template exported
- assert:
- that:
- - "ovf_template.changed == true"
- - "ovf_template.instance.device_files | length >= 1"
- always:
- - name: Clean up the temporary dir
- file:
- path: "{{ temp_dir.path }}"
- state: absent
- when: temp_dir.path is defined
diff --git a/test/integration/targets/vmware_folder_info/aliases b/test/integration/targets/vmware_folder_info/aliases
deleted file mode 100644
index b6fc00bfec..0000000000
--- a/test/integration/targets/vmware_folder_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_folder_info/tasks/main.yml b/test/integration/targets/vmware_folder_info/tasks/main.yml
deleted file mode 100644
index 8022b6b5ab..0000000000
--- a/test/integration/targets/vmware_folder_info/tasks/main.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-# Test code for the vmware_folder_info module.
-# Copyright: (c) 2019, David Hewitt (@davidmhewitt) <davidmhewitt@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
-
-- name: create example toplevel folder
- vcenter_folder:
- <<: &vcenter_folder_data
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 | basename }}"
- validate_certs: no
- folder_name: "toplevel"
-
-- name: create an example child folder
- vcenter_folder:
- <<: *vcenter_folder_data
- folder_name: "child_folder"
- parent_folder: "toplevel"
-
-# Testcase 0001: Get details about folders
-- name: get info about folders
- vmware_folder_info:
- <<: *vcenter_folder_data
- register: folder_info_0001
-
-- debug: var=folder_info_0001
-
-- assert:
- that:
- - "{{ item }} is defined"
- with_items:
- - folder_info_0001['folder_info']
- - folder_info_0001['folder_info']['datastoreFolders']
- - folder_info_0001['folder_info']['hostFolders']
- - folder_info_0001['folder_info']['vmFolders']
- - folder_info_0001['folder_info']['networkFolders']
- - folder_info_0001['folder_info']['vmFolders']['subfolders']['toplevel']
- - folder_info_0001['folder_info']['vmFolders']['subfolders']['toplevel']['subfolders']['child_folder']
-
-- assert:
- that:
- - "folder_info_0001['folder_info']['datastoreFolders']['path'] == \"/{{ dc1 | basename }}/datastore\""
- - "folder_info_0001['folder_info']['hostFolders']['path'] == \"/{{ dc1 | basename }}/host\""
- - "folder_info_0001['folder_info']['vmFolders']['path'] == \"/{{ dc1 | basename }}/vm\""
- - "folder_info_0001['folder_info']['networkFolders']['path'] == \"/{{ dc1 | basename }}/network\""
- - "folder_info_0001['folder_info']['vmFolders']['subfolders']['toplevel']['path'] == \"/{{ dc1 | basename }}/vm/toplevel\""
- - "folder_info_0001['folder_info']['vmFolders']['subfolders']['toplevel']['subfolders']['child_folder']['path'] == \"/{{ dc1 | basename }}/vm/toplevel/child_folder\""
diff --git a/test/integration/targets/vmware_guest/aliases b/test/integration/targets/vmware_guest/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest/defaults/main.yml b/test/integration/targets/vmware_guest/defaults/main.yml
deleted file mode 100644
index dfb0fd65dc..0000000000
--- a/test/integration/targets/vmware_guest/defaults/main.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-vmware_guest_test_playbooks:
- - boot_firmware_d1_c1_f0.yml
- - boot_firmware_d1_c1_f0.yml
- - cdrom_d1_c1_f0.yml
- - check_mode.yml
- - clone_customize_guest_test.yml
- - clone_d1_c1_f0.yml
- - clone_resize_disks.yml
- - clone_with_convert.yml
- - create_d1_c1_f0.yml
- - create_guest_invalid_d1_c1_f0.yml
- - create_nw_d1_c1_f0.yml
- - create_rp_d1_c1_f0.yml
- - delete_vm.yml
- - disk_mode_d1_c1_f0.yml
- - disk_size_d1_c1_f0.yml
- - disk_type_d1_c1_f0.yml
- - linked_clone_d1_c1_f0.yml
- - mac_address_d1_c1_f0.yml
- - max_connections.yml
- - mem_reservation.yml
- - network_negative_test.yml
- - network_with_device.yml
-# Currently, VCSIM doesn't support DVPG (as portkeys are not available) so commenting this test
-# - network_with_dvpg.yml
-# - network_with_portgroup.yml
- - non_existent_vm_ops.yml
- - poweroff_d1_c1_f0.yml
- - poweroff_d1_c1_f1.yml
-# - template_d1_c1_f0.yml
- - vapp_d1_c1_f0.yml
- - reconfig_vm_to_latest_version.yml
- - remove_vm_from_inventory.yml
diff --git a/test/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml
deleted file mode 100644
index aade1494e3..0000000000
--- a/test/integration/targets/vmware_guest/tasks/boot_firmware_d1_c1_f0.yml
+++ /dev/null
@@ -1,117 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs with boot_firmware as 'bios'
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- boot_firmware: "bios"
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: "{{ f0 }}"
- register: clone_d1_c1_f0
-
-- debug: var=clone_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_d1_c1_f0 is changed
-
-# VCSIM does not recognizes existing VMs boot firmware
-- when: vcsim is not defined
- block:
- - name: create new VMs again with boot_firmware as 'bios'
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- boot_firmware: "bios"
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: "{{ f0 }}"
- register: clone_d1_c1_f0
- - debug: var=clone_d1_c1_f0
- - name: assert that changes were not made
- assert:
- that:
- - clone_d1_c1_f0 is changed
-
-- name: create new VMs with boot_firmware as 'efi'
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm3
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- boot_firmware: "efi"
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: "{{ f0 }}"
- register: clone_d1_c1_f0
-
-- debug: var=clone_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_d1_c1_f0 is changed
-
-# VCSIM does not recognizes existing VMs boot firmware
-- when: vcsim is not defined
- block:
- - name: create new VMs again with boot_firmware as 'efi'
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm3
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- boot_firmware: "efi"
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: "{{ f0 }}"
- register: clone_d1_c1_f0
- - debug: var=clone_d1_c1_f0
- - name: assert that changes were not made
- assert:
- that:
- - not (clone_d1_c1_f0 is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml
deleted file mode 100644
index 467cf25d1a..0000000000
--- a/test/integration/targets/vmware_guest/tasks/cdrom_d1_c1_f0.yml
+++ /dev/null
@@ -1,269 +0,0 @@
-- name: Create VM with CDROM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: vm
- name: test_vm1
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: centos64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] centos.iso"
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was created
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: Update CDROM to iso for the new VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "vm"
- name: test_vm1
- datastore: "{{ rw_datastore }}"
- datacenter: "{{ dc1 }}"
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- state: present
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: Update CDROM to client for the new VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: vm
- name: test_vm1
- datacenter: "{{ dc1 }}"
- cdrom:
- type: client
- state: present
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: clone vm
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- template: test_vm1
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: vm
- convert: thin
-
-- name: Update CDROM to none for the new VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: vm
- name: test_vm2
- datacenter: "{{ dc1 }}"
- cdrom:
- type: none
- state: present
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: Create VM with multiple disks and a CDROM - GitHub issue 38679
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ f0 }}"
- name: test_vm3
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: centos64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was created
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: Create VM with multiple CDROMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: vm
- name: test_vm1
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: centos64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- cdrom:
- - controller_type: ide
- controller_number: 0
- unit_number: 0
- type: iso
- iso_path: "[{{ ro_datastore }}] centos.iso"
- - controller_type: ide
- controller_number: 0
- unit_number: 1
- type: client
- - controller_number: 1
- unit_number: 0
- type: none
- - controller_number: 1
- unit_number: 1
- type: client
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was created
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-- name: Remove the last 2 CDROMs and update the first 2 for the new VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: vm
- name: test_vm1
- datacenter: "{{ dc1 }}"
- cdrom:
- - controller_type: ide
- controller_number: 0
- unit_number: 0
- type: client
- - controller_type: ide
- controller_number: 0
- unit_number: 1
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- - controller_type: ide
- controller_number: 1
- unit_number: 0
- state: absent
- - controller_type: ide
- controller_number: 1
- unit_number: 1
- state: absent
- state: present
- register: cdrom_vm
-
-- debug: var=cdrom_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - "cdrom_vm.changed == true"
-
-# VCSIM fails with invalidspec exception but real vCenter PASS testcase
-# Commenting this testcase till the time
-- when: vcsim is not defined
- block:
- - name: Again create VM with multiple disks and a CDROM - GitHub issue 38679
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ f0 }}"
- name: test_vm3
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: centos64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] base.iso"
- register: cdrom_vm
- - debug: var=cdrom_vm
- - name: assert the VM was created
- assert:
- that:
- - cdrom_vm is changed
diff --git a/test/integration/targets/vmware_guest/tasks/check_mode.yml b/test/integration/targets/vmware_guest/tasks/check_mode.yml
deleted file mode 100644
index d3f6f22634..0000000000
--- a/test/integration/targets/vmware_guest/tasks/check_mode.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Perform all operation in check mode
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: "{{ item }}"
- with_items:
- - absent
- - present
- - poweredoff
- - poweredon
- - restarted
- - suspended
- - shutdownguest
- - rebootguest
- register: check_mode_state
- check_mode: yes
-
-- debug:
- var: check_mode_state
-
-- name: assert that changes were made
- assert:
- that:
- - "check_mode_state.results|map(attribute='changed')|unique|list == [true]"
- - "check_mode_state.results|map(attribute='vm_name')|unique|list == [ virtual_machines[0].name ]"
-
-- name: Perform all operation on non-existent VM in check mode
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: non_existent_vm
- datacenter: "{{ dc1 }}"
- state: "{{ item }}"
- with_items:
- - present
- - poweredoff
- - poweredon
- - restarted
- - suspended
- register: check_mode_state
- check_mode: yes
-
-- debug:
- var: check_mode_state
-
-- name: assert that changes were made
- assert:
- that:
- - "check_mode_state.results|map(attribute='changed')|unique|list == [true]"
- - "check_mode_state.results|map(attribute='desired_operation')|unique|list == ['deploy_vm']"
diff --git a/test/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml b/test/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml
deleted file mode 100644
index f40848298c..0000000000
--- a/test/integration/targets/vmware_guest/tasks/clone_customize_guest_test.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: clone vm from template and customize GOS
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- template: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: "{{ virtual_machines[0].folder }}"
- convert: thin
- register: clone_customize
-
-- debug:
- var: clone_customize
-
-- name: assert that changes were made
- assert:
- that:
- - clone_customize is changed
-
-- name: clone vm from template and customize GOS again
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- template: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: "{{ virtual_machines[0].folder }}"
- convert: thin
- register: clone_customize_again
-
-- debug:
- var: clone_customize_again
-
-- name: assert that changes were not made
- assert:
- that:
- - not (clone_customize_again is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml
deleted file mode 100644
index 3b3d2ad543..0000000000
--- a/test/integration/targets/vmware_guest/tasks/clone_d1_c1_f0.yml
+++ /dev/null
@@ -1,101 +0,0 @@
-# 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)
-
-- name: create new linked clone without specifying snapshot_src
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- template: "{{ virtual_machines[0].name }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- linked_clone: True
- register: linked_clone_d1_c1_f0
- ignore_errors: True
-
-- debug:
- var: linked_clone_d1_c1_f0
-
-- name: assert that changes were not made
- assert:
- that:
- - not (linked_clone_d1_c1_f0 is changed)
-
-- name: create new linked clone without specifying linked_clone
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- template: "{{ virtual_machines[0].name }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- snapshot_src: "snap_shot1"
- register: linked_clone_d1_c1_f0
- ignore_errors: True
-
-- debug:
- var: linked_clone_d1_c1_f0
-
-- name: assert that changes were not made
- assert:
- that:
- - not (linked_clone_d1_c1_f0 is changed)
-
-# TODO: VCSIM: snapshot is not supported in current vcsim
-#
-#- name: create new linked clone with linked_clone and snapshot_src
-# vmware_guest:
-# validate_certs: False
-# hostname: "{{ vcenter_hostname }}"
-# username: "{{ vcenter_username }}"
-# password: "{{ vcenter_password }}"
-# name: "{{ 'new_vm_' + item|basename }}"
-# template: "{{ item|basename }}"
-# guest_id: centos64Guest
-# datacenter: "{{ (item|basename).split('_')[0] }}"
-# folder: "{{ item|dirname }}"
-# snapshot_src: "snap_shot1"
-# linked_clone: True
-# with_items: "{{ vmlist['json'] }}"
-# register: linked_clone_d1_c1_f0
-# ignore_errors: True
-
-#- debug: var=linked_clone_d1_c1_f0
-
-#- name: assert that changes were made
-# assert:
-# that:
-# - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [true]"
-
-# TODO: VCSIM: snapshot is not supported in current vcsim
-#
-#- name: create new linked clone with linked_clone and snapshot_src again
-# vmware_guest:
-# validate_certs: False
-# hostname: "{{ vcenter_hostname }}"
-# username: "{{ vcenter_username }}"
-# password: "{{ vcenter_password }}"
-# name: "{{ 'new_vm_' + item|basename }}"
-# template: "{{ item|basename }}"
-# guest_id: centos64Guest
-# datacenter: "{{ (item|basename).split('_')[0] }}"
-# folder: "{{ item|dirname }}"
-# snapshot_src: "snap_shot1"
-# linked_clone: True
-# with_items: "{{ vmlist['json'] }}"
-# register: linked_clone_d1_c1_f0
-# ignore_errors: True
-
-#- debug: var=linked_clone_d1_c1_f0
-
-#- name: assert that changes were not made
-# assert:
-# that:
-# - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [false]"
diff --git a/test/integration/targets/vmware_guest/tasks/clone_resize_disks.yml b/test/integration/targets/vmware_guest/tasks/clone_resize_disks.yml
deleted file mode 100644
index 70004d161b..0000000000
--- a/test/integration/targets/vmware_guest/tasks/clone_resize_disks.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Noe Gonzalez <noe.a.gonzalez@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: create new VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: clone_resize_disks_original
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- folder: "{{ f0 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- guest_id: centos7_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
-
- - name: convert to VM template
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: clone_resize_disks_original
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- folder: "{{ f0 }}"
- is_template: True
-
- - name: clone template and modify disks
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: clone_resize_disks_clone
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- folder: "{{ f0 }}"
- disk:
- - size_gb: 2
- type: thin
- datastore: "{{ rw_datastore }}"
- - size_gb: 3
- type: thin
- datastore: "{{ rw_datastore }}"
- template: clone_resize_disks_original
- state: poweredoff
- register: l_clone_template_modify_disks
-
- - assert:
- that:
- - l_clone_template_modify_disks.changed | bool
-
- - name: delete VM clone & original template
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ item }}"
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- folder: "{{ f0 }}"
- state: absent
- with_items:
- - clone_resize_disks_original
- - clone_resize_disks_clone
diff --git a/test/integration/targets/vmware_guest/tasks/clone_with_convert.yml b/test/integration/targets/vmware_guest/tasks/clone_with_convert.yml
deleted file mode 100644
index bf3abfae36..0000000000
--- a/test/integration/targets/vmware_guest/tasks/clone_with_convert.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Christophe FERREIRA <christophe.ferreira@cnaf.fr>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: clone vm from template and convert to thin
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- template: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: "{{ virtual_machines[0].folder }}"
- convert: thin
- register: clone_thin
-
-- debug: var=clone_thin
-
-- name: assert that changes were made
- assert:
- that:
- - clone_thin is changed
-
-- name: clone vm from template and convert to thick
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- template: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: "{{ virtual_machines[0].folder }}"
- convert: thick
- register: clone_thick
-
-- debug: var=clone_thick
-
-- name: assert that changes were made
- assert:
- that:
- - clone_thick is changed
-
-- name: clone vm from template and convert to eagerzeroedthick
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm3
- template: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- state: poweredoff
- folder: "{{ virtual_machines[0].folder }}"
- convert: eagerzeroedthick
- register: clone_eagerzeroedthick
-
-- debug: var=clone_eagerzeroedthick
-
-- name: assert that changes were made
- assert:
- that:
- - clone_eagerzeroedthick is changed
diff --git a/test/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml
deleted file mode 100644
index b4ee85002d..0000000000
--- a/test/integration/targets/vmware_guest/tasks/create_d1_c1_f0.yml
+++ /dev/null
@@ -1,164 +0,0 @@
-# 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)
-
-- name: create new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- num_cpu_cores_per_socket: 1
- memory_mb: 128
- hotadd_memory: true
- hotadd_cpu: false
- # vcsim does not support these settings, so commenting
- # till the time.
- # memory_reservation: 128
- # memory_reservation_lock: False
- # nested_virt: True
- # hotremove_cpu: True
- # mem_limit: 8096
- # mem_reservation: 4096
- # cpu_limit: 8096
- # cpu_reservation: 4096
- max_connections: 10
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0
-
-- debug: var=clone_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_d1_c1_f0 is changed
-
-- name: create the VM again
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- num_cpu_cores_per_socket: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0_recreate
-
-- debug: var=clone_d1_c1_f0_recreate
-
-- name: assert that no changes were made after re-creating
- assert:
- that:
- - not (clone_d1_c1_f0_recreate is changed)
-
-- name: modify the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 2
- memory_mb: 128
- state: present
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0_modify
-
-- debug: var=clone_d1_c1_f0_modify
-
-- name: assert that changes were made with modification
- assert:
- that:
- - clone_d1_c1_f0_modify is changed
-
-- name: re-modify the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 2
- memory_mb: 128
- state: present
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0_remodify
-
-- debug: var=clone_d1_c1_f0_remodify
-
-- name: assert that no changes were made when re-modified
- assert:
- that:
- - not (clone_d1_c1_f0_remodify is changed)
-
-- name: delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- state: absent
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0_delete
-
-- debug: var=clone_d1_c1_f0_delete
-
-- name: assert that changes were made with deletion
- assert:
- that:
- - clone_d1_c1_f0_delete is changed
-
-- name: re-delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- state: absent
- folder: '{{ f0 }}'
- register: clone_d1_c1_f0_redelete
-
-- debug: var=clone_d1_c1_f0_redelete
-
-- name: assert that no changes were made with redeletion
- assert:
- that:
- - not (clone_d1_c1_f0_redelete is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml
deleted file mode 100644
index 8a0b6468b6..0000000000
--- a/test/integration/targets/vmware_guest/tasks/create_guest_invalid_d1_c1_f0.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: create new virtual machine with invalid guest id
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: invalid_vm
- guest_id: "invalid_guest_id"
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- folder: "{{ f0 }}"
- register: invalid_guest_0001_d1_c1_f0
- ignore_errors: yes
- - debug: var=invalid_guest_0001_d1_c1_f0
- - name: assert that changes were made
- assert:
- that:
- - "not (invalid_guest_0001_d1_c1_f0 is changed)"
- - "'configSpec.guestId' in invalid_guest_0001_d1_c1_f0['msg']"
diff --git a/test/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml
deleted file mode 100644
index 2a22dce2f6..0000000000
--- a/test/integration/targets/vmware_guest/tasks/create_nw_d1_c1_f0.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: 'VM Network'
- device_type: vmxnet3
- ip: 192.168.10.1
- netmask: 255.255.255.0
- wake_on_lan: True
- start_connected: True
- allow_guest_control: True
- state: poweredoff
- folder: F0
- register: clone_d1_c1_f0
-
-- debug: var=clone_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_d1_c1_f0 is changed
diff --git a/test/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml
deleted file mode 100644
index 30319b78d7..0000000000
--- a/test/integration/targets/vmware_guest/tasks/create_rp_d1_c1_f0.yml
+++ /dev/null
@@ -1,205 +0,0 @@
-# Create one with the defaults
-- name: create new VM with default resource pool
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: F0
- register: clone_rp_d1_c1_f0
-
-- debug: var=clone_rp_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_rp_d1_c1_f0 is changed
-
-- name: delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- state: absent
- folder: F0
- register: clone_rp_d1_c1_f0_delete
-
-- debug: var=clone_rp_d1_c1_f0_delete
-
-- name: assert that changes were made with deletion
- assert:
- that:
- - clone_rp_d1_c1_f0_delete is changed
-
-# now create with just a cluster
-- name: create new VM with default resource pool in cluster
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: F0
- register: clone_rpc_d1_c1_f0
-
-- debug: var=clone_rpc_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_rpc_d1_c1_f0 is changed
-
-- name: delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- state: absent
- folder: F0
- register: clone_rpc_d1_c1_f0_delete
-
-- debug: var=clone_rpc_d1_c1_f0_delete
-
-- name: assert that changes were made with deletion
- assert:
- that:
- - clone_rpc_d1_c1_f0_delete is changed
-
-# now create with a specific resource pool
-- name: create new VM with specific resource pool in cluster
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: DC0_C0_RP1
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: F0
- register: clone_rpcp_d1_c1_f0
-
-- debug: var=clone_rpcp_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_rpcp_d1_c1_f0 is changed
-
-- name: delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- state: absent
- folder: F0
- register: clone_rpcp_d1_c1_f0_delete
-
-- debug: var=clone_rpcp_d1_c1_f0_delete
-
-- name: assert that changes were made with deletion
- assert:
- that:
- - clone_rpcp_d1_c1_f0_delete is changed
-
-# now create with a specific host
-- name: create new VM with specific host
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- esxi_hostname: '{{ esxi1 }}'
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: F0
- register: clone_rph_d1_c1_f0
-
-- debug: var=clone_rph_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - clone_rph_d1_c1_f0 is changed
-
-- name: delete the new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- #template: "{{ item|basename }}"
- #guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- state: absent
- folder: F0
- register: clone_rph_d1_c1_f0_delete
-
-- debug: var=clone_rph_d1_c1_f0_delete
-
-- name: assert that changes were made with deletion
- assert:
- that:
- - clone_rph_d1_c1_f0_delete is changed
diff --git a/test/integration/targets/vmware_guest/tasks/delete_vm.yml b/test/integration/targets/vmware_guest/tasks/delete_vm.yml
deleted file mode 100644
index 600df0fc50..0000000000
--- a/test/integration/targets/vmware_guest/tasks/delete_vm.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Delete VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: nothinghere
- datacenter: "{{ dc1 }}"
- state: absent
- register: delete_vm
- ignore_errors: yes
-
-- debug: var=delete_vm
-
-- name: assert that changes were made
- assert:
- that:
- - "not delete_vm.changed"
diff --git a/test/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml
deleted file mode 100644
index 7a14d11981..0000000000
--- a/test/integration/targets/vmware_guest/tasks/disk_mode_d1_c1_f0.yml
+++ /dev/null
@@ -1,89 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs with invalid disk mode
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: 'invalid_disk_mode'
- state: poweredoff
- folder: "{{ f0 }}"
- register: test_vm1
- ignore_errors: True
-
-- debug: var=test_vm1
-
-- name: assert that changes were not made
- assert:
- that:
- - not(test_vm1 is changed)
-
-- name: create new VMs with valid disk mode
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: 'independent_persistent'
- state: poweredoff
- folder: "{{ f0 }}"
- register: test_vm1_2
-
-- debug: var=test_vm1_2
-
-- name: assert that changes were made
- assert:
- that:
- - test_vm1_2 is changed
-
-#TODO: vcsim does not support reconfiguration of disk mode, fails with types.InvalidDeviceSpec
-- when: vcsim is not defined
- block:
- - name: create new VMs with valid disk mode again
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: 'independent_persistent'
- state: poweredoff
- folder: "{{ f0 }}"
- register: test_vm1_2
- - debug: var=test_vm1_2
- - name: assert that changes were not made
- assert:
- that:
- - not (test_vm1_2 is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml
deleted file mode 100644
index c40f19e624..0000000000
--- a/test/integration/targets/vmware_guest/tasks/disk_size_d1_c1_f0.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs with invalid disk size
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 0gb
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: "{{ f0 }}"
- register: disk_size_d1_c1_f0
- ignore_errors: True
-
-- debug: var=disk_size_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - not (disk_size_d1_c1_f0 is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml
deleted file mode 100644
index 3bd4089597..0000000000
--- a/test/integration/targets/vmware_guest/tasks/disk_type_d1_c1_f0.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: poweredoff
- folder: F0
- register: disk_type_d1_c1_f0
-
-- debug: var=disk_type_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - disk_type_d1_c1_f0 is changed
diff --git a/test/integration/targets/vmware_guest/tasks/linked_clone_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/linked_clone_d1_c1_f0.yml
deleted file mode 100644
index 702ca59da7..0000000000
--- a/test/integration/targets/vmware_guest/tasks/linked_clone_d1_c1_f0.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new linked clone without specifying snapshot_src
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ 'new_vm_' + item.name }}"
- template: "{{ item.name }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- linked_clone: True
- with_items: "{{ virtual_machines }}"
- register: linked_clone_d1_c1_f0
- ignore_errors: True
-
-- debug: var=linked_clone_d1_c1_f0
-
-- name: assert that changes were not made
- assert:
- that:
- - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [false]"
-
-- name: create new linked clone without specifying linked_clone
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ 'new_vm_' + item.name }}"
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- snapshot_src: "snap_shot1"
- with_items: "{{ virtual_machines }}"
- register: linked_clone_d1_c1_f0
- ignore_errors: True
-
-- debug: var=linked_clone_d1_c1_f0
-
-- name: assert that changes were not made
- assert:
- that:
- - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [false]"
-
-# TODO: VCSIM: snapshot is not supported in current vcsim
-#
-#- name: create new linked clone with linked_clone and snapshot_src
-# vmware_guest:
-# validate_certs: False
-# hostname: "{{ vcsim }}"
-# username: "{{ vcsim_instance['json']['username'] }}"
-# password: "{{ vcsim_instance['json']['password'] }}"
-# name: "{{ 'new_vm_' + item|basename }}"
-# template: "{{ item|basename }}"
-# guest_id: centos64Guest
-# datacenter: "{{ (item|basename).split('_')[0] }}"
-# folder: "{{ item|dirname }}"
-# snapshot_src: "snap_shot1"
-# linked_clone: True
-# with_items: "{{ vmlist['json'] }}"
-# register: linked_clone_d1_c1_f0
-# ignore_errors: True
-
-#- debug: var=linked_clone_d1_c1_f0
-
-#- name: assert that changes were made
-# assert:
-# that:
-# - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [true]"
-
-# TODO: VCSIM: snapshot is not supported in current vcsim
-#
-#- name: create new linked clone with linked_clone and snapshot_src again
-# vmware_guest:
-# validate_certs: False
-# hostname: "{{ vcsim }}"
-# username: "{{ vcsim_instance['json']['username'] }}"
-# password: "{{ vcsim_instance['json']['password'] }}"
-# name: "{{ 'new_vm_' + item|basename }}"
-# template: "{{ item|basename }}"
-# guest_id: centos64Guest
-# datacenter: "{{ (item|basename).split('_')[0] }}"
-# folder: "{{ item|dirname }}"
-# snapshot_src: "snap_shot1"
-# linked_clone: True
-# with_items: "{{ vmlist['json'] }}"
-# register: linked_clone_d1_c1_f0
-# ignore_errors: True
-
-#- debug: var=linked_clone_d1_c1_f0
-
-#- name: assert that changes were not made
-# assert:
-# that:
-# - "linked_clone_d1_c1_f0.results|map(attribute='changed')|unique|list == [false]"
diff --git a/test/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml
deleted file mode 100644
index 6e5a8d9217..0000000000
--- a/test/integration/targets/vmware_guest/tasks/mac_address_d1_c1_f0.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: create new VMs with manual MAC address
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: VM Network
- ip: 192.168.10.12
- netmask: 255.255.255.0
- gateway: 192.168.10.254
- mac: aa:bb:cc:dd:aa:42
- state: poweredoff
- folder: vm
- register: clone_d1_c1_f0
-
-- debug: var=clone_d1_c1_f0
-
-- name: assert that changes were made
- assert:
- that:
- - "clone_d1_c1_f0['instance']['hw_eth0']['addresstype'] == 'manual'"
- - "clone_d1_c1_f0['instance']['hw_eth0']['macaddress'] == 'aa:bb:cc:dd:aa:42'"
diff --git a/test/integration/targets/vmware_guest/tasks/main.yml b/test/integration/targets/vmware_guest/tasks/main.yml
deleted file mode 100644
index d61f8ea1f3..0000000000
--- a/test/integration/targets/vmware_guest/tasks/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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_attach_host: true
- setup_datacenter: true
- setup_datastore: true
- setup_dvswitch: true
- setup_resource_pool: true
- setup_virtualmachines: true
- setup_dvs_portgroup: true
-
-- include_tasks: run_test_playbook.yml
- with_items: '{{ vmware_guest_test_playbooks }}'
- loop_control:
- loop_var: test_playbook
diff --git a/test/integration/targets/vmware_guest/tasks/max_connections.yml b/test/integration/targets/vmware_guest/tasks/max_connections.yml
deleted file mode 100644
index d9ab6b6621..0000000000
--- a/test/integration/targets/vmware_guest/tasks/max_connections.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - &add_mk_conn
- name: Create new VM with max_connections as 4
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- max_connections: 4
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- folder: "{{ f0 }}"
- register: mk_conn_result_0001
-
- - debug: var=mk_conn_result_0001
-
- - name: Assert that changes were made
- assert:
- that:
- - mk_conn_result_0001 is changed
-
- - <<: *add_mk_conn
- name: Again create new VMs again with max_connections as 4
- register: mk_conn_result_0002
-
- - debug: var=mk_conn_result_0002
-
- - name: Assert that changes were not made
- assert:
- that:
- - not (mk_conn_result_0002 is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/mem_reservation.yml b/test/integration/targets/vmware_guest/tasks/mem_reservation.yml
deleted file mode 100644
index a5a9762f62..0000000000
--- a/test/integration/targets/vmware_guest/tasks/mem_reservation.yml
+++ /dev/null
@@ -1,125 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - &add_mem_reserve
- name: Create new VMs with mem_reservation as 0
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- mem_reservation: 0
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- folder: "{{ virtual_machines[0].folder }}"
- register: mem_reserve_result_0001
-
- - debug: var=mem_reserve_result_0001
-
- - name: Assert that changes were made
- assert:
- that:
- - mem_reserve_result_0001 is changed
-
- - <<: *add_mem_reserve
- name: Again create new VMs with mem_reservation as 0
- register: mem_reserve_result_0002
-
- - debug: var=mem_reserve_result_0002
-
- - name: Assert that changes were not made
- assert:
- that:
- - not (mem_reserve_result_0002 is changed)
-
- - &add_memory_reserve
- name: Create new VM with memory_reservation as 0
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- memory_reservation: 0
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- folder: "{{ virtual_machines[0].folder }}"
- register: memory_reserve_result_0003
-
- - debug: var=memory_reserve_result_0003
-
- - name: Assert that changes were made
- assert:
- that:
- - memory_reserve_result_0003 is changed
-
- - <<: *add_memory_reserve
- name: Again create new VMs with memory_reservation as 0
- register: memory_reserve_result_0004
-
- - debug: var=memory_reserve_result_0004
-
- - name: Assert that changes were not made
- assert:
- that:
- - not (memory_reserve_result_0004 is changed)
-
- - &no_memory_reserve
- name: Create new VMs without memory_reservation or mem_reservation
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm3
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- memory_reservation: 0
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- folder: "{{ virtual_machines[0].folder }}"
- register: no_memory_reserve_result_0005
-
- - debug: var=no_memory_reserve_result_0005
-
- - name: Assert that changes were made
- assert:
- that:
- - no_memory_reserve_result_0005 is changed
-
- - <<: *no_memory_reserve
- name: Again create new VMs without memory_reservation or mem_reservation
- register: no_memory_reserve_result_0006
-
- - debug: var=no_memory_reserve_result_0006
-
- - name: Assert that changes were not made
- assert:
- that:
- - not (no_memory_reserve_result_0006 is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/network_negative_test.yml b/test/integration/targets/vmware_guest/tasks/network_negative_test.yml
deleted file mode 100644
index 768e06b042..0000000000
--- a/test/integration/targets/vmware_guest/tasks/network_negative_test.yml
+++ /dev/null
@@ -1,339 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- debug: var=f0
-
-- name: create new VMs with non-existent network
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "Non existent VM"
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: non_existent_network
- ignore_errors: yes
-
-- debug: var=non_existent_network
-
-- name: assert that no changes were not made
- assert:
- that:
- - not (non_existent_network is changed)
- - "'does not exist' in non_existent_network.msg"
-
-- name: create new VMs with network and with only IP
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- type: static
- ip: 10.10.10.10
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: no_netmask
- ignore_errors: yes
-
-- debug: var=no_netmask
-
-- name: assert that no changes were not made
- assert:
- that:
- - "not no_netmask.changed"
- - "\"'netmask' is required if 'ip' is specified under VM network list.\" in no_netmask.msg"
-
-- name: create new VMs with network and with only netmask
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- type: static
- netmask: 255.255.255.0
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: no_ip
- ignore_errors: yes
-
-- debug: var=no_ip
-
-- name: assert that changes were not made
- assert:
- that:
- - "not no_ip.changed"
- - "\"'ip' is required if 'netmask' is specified under VM network list.\" in no_ip.msg"
-
-- name: create new VMs with network and without network name
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - ip: 10.10.10.10
- netmask: 255.255.255
- type: static
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: no_network_name
- ignore_errors: yes
-
-- debug: var=no_network_name
-
-- name: assert that no changes were not made
- assert:
- that:
- - "not no_network_name.changed"
- - "\"Please specify at least a network name or a VLAN name under VM network list.\" in no_network_name.msg"
-
-- name: create new VMs with network and without network name
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - vlan: non_existing_vlan
- ip: 10.10.10.10
- netmask: 255.255.255
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: no_network
- ignore_errors: yes
-
-- debug: var=no_network
-
-- name: assert that changes were not made
- assert:
- that:
- - "not no_network.changed"
- - "\"VLAN 'non_existing_vlan' does not exist.\" in no_network.msg"
-
-- name: create new VMs with invalid device type
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- ip: 10.10.10.10
- netmask: 255.255.255
- device_type: abc
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: invalid_device_type
- ignore_errors: yes
-
-- debug: var=invalid_device_type
-
-- name: assert that changes were not made
- assert:
- that:
- - "not invalid_device_type.changed"
- - "\"Device type specified 'abc' is not valid.\" in invalid_device_type.msg"
-
-- name: create new VMs with invalid device MAC address
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- ip: 10.10.10.10
- netmask: 255.255.255
- device_type: e1000
- mac: abcdef
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: invalid_mac
- ignore_errors: yes
-
-- debug: var=invalid_mac
-
-- name: assert that changes were not made
- assert:
- that:
- - "not invalid_mac.changed"
- - "\"Device MAC address 'abcdef' is invalid.\" in invalid_mac.msg"
-
-- name: create new VMs with invalid network type
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- ip: 10.10.10.10
- netmask: 255.255.255
- device_type: e1000
- mac: 01:23:45:67:89:ab
- type: aaaaa
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: invalid_network_type
- ignore_errors: yes
-
-- debug: var=invalid_network_type
-
-- name: assert that changes were not made
- assert:
- that:
- - "not invalid_network_type.changed"
- - "\"Network type 'aaaaa' is not a valid parameter.\" in invalid_network_type.msg"
-
-- name: create new VMs with IP, netmask and network type as "DHCP"
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: new_vm
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- ip: 10.10.10.10
- netmask: 255.255.255
- device_type: e1000
- mac: 01:23:45:67:89:ab
- type: dhcp
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: invalid_dhcp_network_type
- ignore_errors: yes
-
-- debug: var=invalid_dhcp_network_type
-
-- name: assert that changes were not made
- assert:
- that:
- - "not invalid_dhcp_network_type.changed"
- - "\"Static IP information provided for network\" in invalid_dhcp_network_type.msg"
-
-- name: create new VMs with no network type which set network type as "DHCP"
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: "VM Network"
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: no_network_type
- ignore_errors: yes
-
-- debug: var=no_network_type
-
-- name: assert that changes were made
- assert:
- that:
- - "no_network_type.changed"
diff --git a/test/integration/targets/vmware_guest/tasks/network_with_device.yml b/test/integration/targets/vmware_guest/tasks/network_with_device.yml
deleted file mode 100644
index 64b591adb7..0000000000
--- a/test/integration/targets/vmware_guest/tasks/network_with_device.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Testcase to check #38605
-- name: Deploy VM first VM
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm1
- disk:
- - size: 10mb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: 'VM Network'
- device_type: "vmxnet3"
- register: vm_result
-
-- debug: var=vm_result
-
-- assert:
- that:
- - "vm_result.changed"
-
-- name: Deploy VM again
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm1
- disk:
- - size: 10mb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: 'VM Network'
- device_type: "vmxnet3"
- register: vm_result_again
-
-- debug: var=vm_result_again
-
-- assert:
- that:
- - not (vm_result_again is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/network_with_dvpg.yml b/test/integration/targets/vmware_guest/tasks/network_with_dvpg.yml
deleted file mode 100644
index fba25aeee5..0000000000
--- a/test/integration/targets/vmware_guest/tasks/network_with_dvpg.yml
+++ /dev/null
@@ -1,152 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Clone from existing VM with DVPG
-- when: vcsim is not defined
- block:
- - name: Deploy VM from template
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- template: "{{ virtual_machines[0].name }}"
- name: test_vm1
- disk:
- - size: 1gb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: '{{ dvpg1 }}'
- register: no_vm_result
- - debug: var=no_vm_result
- - assert:
- that:
- - no_vm_result is changed
-
- # New clone with DVPG
- - name: Deploy new VM with DVPG
- vmware_guest:
- esxi_hostname: "{{ esxi_hosts[0] }}"
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm2
- disk:
- - size: 1gb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: '{{ dvpg1 }}'
- dvswitch_name: "{{ dvswitch1 }}"
- register: no_vm_result
- - debug: var=no_vm_result
- - assert:
- that:
- - no_vm_result is changed
-
- - name: Deploy same VM again
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm2
- disk:
- - size: 1gb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: '{{ dvpg1 }}'
- register: no_vm_result
- - debug: var=no_vm_result
- - assert:
- that:
- - not (no_vm_result is changed)
-
- - name: Deploy new VM with DVPG with slash in name
- vmware_guest:
- esxi_hostname: "{{ esxi_hosts[0] }}"
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm3
- disk:
- - size: 1gb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: '{{ dvpg_with_slash }}'
- dvswitch_name: "{{ dvswitch1 }}"
- register: no_vm_result
- - debug: var=no_vm_result
- - assert:
- that:
- - no_vm_result is changed
-
- - name: Deploy same VM again
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- state: poweredon
- folder: "{{ f0 }}"
- name: test_vm3
- disk:
- - size: 1gb
- datastore: "{{ rw_datastore }}"
- guest_id: rhel7_64guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- networks:
- - name: '{{ dvpg_with_slash }}'
- register: no_vm_result
- - debug: var=no_vm_result
- - assert:
- that:
- - not (no_vm_result is changed)
- always:
- - when: vcsim is not defined
- name: Remove VM to free the portgroup
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: '{{ item }}'
- force: yes
- state: absent
- with_items:
- - test_vm1
- - test_vm2
- - test_vm3
diff --git a/test/integration/targets/vmware_guest/tasks/network_with_portgroup.yml b/test/integration/targets/vmware_guest/tasks/network_with_portgroup.yml
deleted file mode 100644
index c9eb80186a..0000000000
--- a/test/integration/targets/vmware_guest/tasks/network_with_portgroup.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>, Tim Steinbach <tim@nequissimus.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Add portgroup
- vmware_dvs_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- portgroup_name: "portgroup_network"
- switch_name: "{{ dvswitch1 }}"
- vlan_id: "1"
- num_ports: 2
- portgroup_type: earlyBinding
- state: present
- register: dvsportgroup
-- debug: var=dvsportgroup
-- name: create new VMs with portgroup
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- disk:
- - size: 3mb
- type: thin
- datastore: "{{ rw_datastore }}"
- networks:
- - name: portgroup_network
- switch_name: "{{ dvswitch1 }}"
- hardware:
- num_cpus: 1
- memory_mb: 128
- state: poweredoff
- folder: "{{ f0 }}"
- register: vm_with_portgroup
- ignore_errors: no
-
-- debug: var=vm_with_portgroup
-
-- assert:
- that:
- - vm_with_portgroup is changed
diff --git a/test/integration/targets/vmware_guest/tasks/non_existent_vm_ops.yml b/test/integration/targets/vmware_guest/tasks/non_existent_vm_ops.yml
deleted file mode 100644
index 0815fdf9c6..0000000000
--- a/test/integration/targets/vmware_guest/tasks/non_existent_vm_ops.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Perform operation on non-existent VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "non_existent_vm"
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- state: poweredoff
- register: non_existent_vm_ops
- ignore_errors: yes
-- debug: var=non_existent_vm_ops
-- name: assert that changes were not made
- assert:
- that:
- - not (non_existent_vm_ops is changed)
- - "'msg' in non_existent_vm_ops"
- - "'Unable to find the datastore with given parameters.' in non_existent_vm_ops.msg"
diff --git a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml
deleted file mode 100644
index 6bddf568f7..0000000000
--- a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f0.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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)
-
-- name: create a VM with the poweroff status
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ item.name }}"
- state: poweredoff
- with_items: "{{ virtual_machines }}"
- register: poweroff_d1_c1_f0
-
-- debug:
- var: poweroff_d1_c1_f0
-
-- name: make sure changes were made
- assert:
- that:
- - poweroff_d1_c1_f0.results[0].instance.hw_power_status == "poweredOff"
-
-- name: make sure no changes were made (the VMs are already off)
- assert:
- that:
- - poweroff_d1_c1_f0.results[0].changed|bool == false
diff --git a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml
deleted file mode 100644
index cb5ada078f..0000000000
--- a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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)
-
-# https://github.com/ansible/ansible/issues/25011
-# Sending "-folders 1" to vcsim nests the datacenter under
-# the folder so that the path prefix is no longer /vm
-#
-# /F0/DC0/vm/F0/DC0_H0_VM0
-
-- name: set state to poweredoff on all VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ item.name }}"
- state: poweredoff
- folder: "{{ item.folder }}"
- with_items: "{{ virtual_machines }}"
- register: poweroff_d1_c1_f1
-- debug: var=poweroff_d1_c1_f1
diff --git a/test/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml b/test/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml
deleted file mode 100644
index 619090dc0b..0000000000
--- a/test/integration/targets/vmware_guest/tasks/reconfig_vm_to_latest_version.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-# Skipping out idepotency test untill issue fixed in reconfigure_vm() become_method
-
-- name: Create VM with hardware version 12
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos7_64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- datastore: '{{ rw_datastore }}'
- hardware:
- num_cpus: 4
- memory_mb: 1028
- version: 12
- state: present
- register: create_vm_with_version_12
-
-- name: assert that changes were made
- assert:
- that:
- - create_vm_with_version_12 is changed
-
-- name: Deploy New VM with latest hardware version
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- guest_id: centos7_64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- datastore: '{{ rw_datastore }}'
- hardware:
- num_cpus: 4
- memory_mb: 1028
- version: latest
- state: present
- register: deploy_vm_to_latest
-
-- name: assert that changes were made
- assert:
- that:
- - deploy_vm_to_latest is changed
-
-- name: Upgrade VM to latest version
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos7_64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- datastore: '{{ rw_datastore }}'
- hardware:
- num_cpus: 4
- memory_mb: 1028
- version: latest
- state: present
- register: upgrade_vm
-
-- name: assert that changes were made
- assert:
- that:
- - upgrade_vm is changed
diff --git a/test/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml b/test/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml
deleted file mode 100644
index 74da57d4b0..0000000000
--- a/test/integration/targets/vmware_guest/tasks/remove_vm_from_inventory.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Create VM to unregister
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: F0
- hardware:
- num_cpus: 1
- num_cpu_cores_per_socket: 1
- memory_mb: 128
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- register: create_vm_for_test
-
-- name: assert that changes were made
- assert:
- that:
- - create_vm_for_test is changed
-
-- name: Remove VM from Inventory
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- delete_from_inventory: True
- state: absent
- register: remove_vm_from_inventory
-
-- name: assert that changes were made
- assert:
- that:
- - remove_vm_from_inventory is changed
-
-- name: Remove VM again from Inventory
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- delete_from_inventory: True
- state: absent
- register: remove_again_vm_from_inventory
-
-- name: assert that changes were made
- assert:
- that:
- - not (remove_again_vm_from_inventory is changed)
diff --git a/test/integration/targets/vmware_guest/tasks/run_test_playbook.yml b/test/integration/targets/vmware_guest/tasks/run_test_playbook.yml
deleted file mode 100644
index d60dc394e1..0000000000
--- a/test/integration/targets/vmware_guest/tasks/run_test_playbook.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-- block:
- - include_tasks: '{{ test_playbook }}'
- 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:
- - test_vm1
- - test_vm2
- - test_vm3
diff --git a/test/integration/targets/vmware_guest/tasks/template_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/template_d1_c1_f0.yml
deleted file mode 100644
index 55e27c9ded..0000000000
--- a/test/integration/targets/vmware_guest/tasks/template_d1_c1_f0.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-- name: Create VMs with the poweredoff state
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- folder: '{{ f0 }}'
- name: 'test_vm1'
- state: poweredoff
- guest_id: debian8_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- networks:
- - name: VM Network
-
-- name: ensure that VM1 are not flagged as templates
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[1].folder }}"
- name: "{{ virtual_machines[1].name }}"
- state: present
- is_template: False
- register: no_template_initial
-
-- debug: var=no_template_initial
-
-- name: ensure no changes were made
- assert:
- that:
- - not (no_template_initial is changed)
-
-- name: convert VM1 to template
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[1].folder }}"
- name: "{{ virtual_machines[1].name }}"
- state: present
- is_template: True
- register: convert_to_template
-
-- debug: var=convert_to_template
-
-- name: ensure that changes were made
- assert:
- that:
- - convert_to_template is changed
-
-- name: make double sure that VM1 is template
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[1].folder }}"
- name: "{{ virtual_machines[1].name }}"
- state: present
- is_template: True
- register: still_templates
-
-- debug: var=still_templates
-
-- name: ensure that no changes were made
- assert:
- that:
- - not (still_templates is changed)
-
-# To avoid the follow error of vcsim: VirtualMachine:vm-67 does not implement: MarkAsVirtualMachine
-- when: vcsim is not defined
- block:
- - name: convert template back to VMs
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[1].folder }}"
- name: "{{ virtual_machines[1].name }}"
- state: present
- is_template: False
- register: revert_to_vm
- - debug: var=revert_to_vm
- - name: ensure that changes were made
- assert:
- that:
- - revert_to_vm is changed
diff --git a/test/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml
deleted file mode 100644
index bd83f97db6..0000000000
--- a/test/integration/targets/vmware_guest/tasks/vapp_d1_c1_f0.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the vmware_guest module.
-# Copyright: (c) 2018, goshkis
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- &vapp_new_vm
- name: Create test VM with vAPP settings
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "vm"
- name: test_vm1
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: centos64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: "{{ rw_datastore }}"
- vapp_properties:
- - id: prop_id1
- category: category
- label: prop_label1
- type: string
- value: prop_value1
- - id: prop_id2
- category: category
- label: prop_label2
- type: string
- value: prop_value2
- register: vapp_vm
-
-- debug: var=vapp_vm
-
-- name: assert the vApp propeties were created
- assert:
- that:
- - "vapp_vm.failed == false"
- - "vapp_vm.changed == true"
-
-- when: vcsim is not defined
- block:
- - <<: *vapp_new_vm
- name: Try to create same VM with same vAPP settings
- register: vapp_vm_no_change
-
- - debug: var=vapp_vm_no_change
-
- - name: Assert that vApp properties were not changed
- assert:
- that:
- - "vapp_vm_no_change.failed == false"
- - "not vapp_vm_no_change.changed"
-
-- &vapp_edit_vm
- name: Edit one vApp property and removing another
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "vm"
- name: test_vm1
- datacenter: "{{ dc1 }}"
- vapp_properties:
- - id: prop_id1
- operation: remove
- - id: prop_id2
- value: prop_value3
- state: present
- register: vapp_vm
-
-- debug: var=vapp_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - "vapp_vm.failed == false"
- - "vapp_vm.changed == true"
-
-- when: vcsim is not defined
- block:
- - <<: *vapp_edit_vm
- name: Try to edit VM with vApp settings
- register: vapp_vm_no_change_edit
-
- - debug: var=vapp_vm_no_change_edit
-
- - name: assert the VM was changed
- assert:
- that:
- - "vapp_vm_no_change_edit.failed == false"
- - "vapp_vm_no_change_edit.changed == false"
diff --git a/test/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml b/test/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml
deleted file mode 100644
index 88a5757bf1..0000000000
--- a/test/integration/targets/vmware_guest/tasks/windows_vbs_d1_c1_f0.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-- name: Create Windows 10 VM with VBS enabled
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ f0 }}"
- name: vbs-Test
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: windows9_64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- virt_based_security: True
- version: 14
- boot_firmware: efi
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: '{{ rw_datastore }}'
- cdrom:
- type: client
- register: vbs_vm
-
-- debug: var=vbs_vm
-
-- name: assert the VM was created
- assert:
- that:
- - "vbs_vm.failed == false"
- - "vbs_vm.changed == true"
-
-- name: Create Windows Server 2016 VM without VBS enabled
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ f0 }}"
- name: vbs-Test2
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: Resources
- guest_id: windows9Server64Guest
- hardware:
- memory_mb: 128
- num_cpus: 1
- version: 14
- boot_firmware: efi
- scsi: paravirtual
- disk:
- - size_mb: 128
- type: thin
- datastore: '{{ rw_datastore }}'
- cdrom:
- type: client
- register: vbs_vm
-
-- debug: var=vbs_vm
-
-- name: assert the VM was created
- assert:
- that:
- - "vbs_vm.failed == false"
- - "vbs_vm.changed == true"
-
-- name: Enable VBS for Windows Server 2016 VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "{{ f0 }}"
- name: vbs-Test2
- datacenter: "{{ f0 }}"
- disk:
- - size_mb: 256
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- virt_based_security: True
- state: present
- register: vbs_vm
-
-- debug: var=vbs_vm
-
-- name: assert the VM was changed
- assert:
- that:
- - vbs_vm is changed
diff --git a/test/integration/targets/vmware_guest_boot_facts/aliases b/test/integration/targets/vmware_guest_boot_facts/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_boot_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_boot_facts/tasks/main.yml b/test/integration/targets/vmware_guest_boot_facts/tasks/main.yml
deleted file mode 100644
index a5d5cfc645..0000000000
--- a/test/integration/targets/vmware_guest_boot_facts/tasks/main.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-# Test code for the vmware_guest_boot_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: Gather facts about VM boot order
- vmware_guest_boot_facts:
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- register: vm1_facts
- - debug: var=vm1_facts
- - name: assert that values are set
- assert:
- that:
- - vm1_facts.vm_boot_facts.current_boot_delay is defined
- - vm1_facts.vm_boot_facts.current_boot_firmware is defined
- - vm1_facts.vm_boot_facts.current_boot_order is defined
- - vm1_facts.vm_boot_facts.current_boot_retry_delay is defined
- - vm1_facts.vm_boot_facts.current_boot_retry_enabled is defined
- - vm1_facts.vm_boot_facts.current_enter_bios_setup is defined
-
- - name: Gather facts about VM boot order in check mode
- vmware_guest_boot_facts:
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- check_mode: yes
- register: vm1_facts
- - debug: var=vm1_facts
- - name: assert that values are set
- assert:
- that:
- - vm1_facts.vm_boot_facts.current_boot_delay is defined
- - vm1_facts.vm_boot_facts.current_boot_firmware is defined
- - vm1_facts.vm_boot_facts.current_boot_order is defined
- - vm1_facts.vm_boot_facts.current_boot_retry_delay is defined
- - vm1_facts.vm_boot_facts.current_boot_retry_enabled is defined
- - vm1_facts.vm_boot_facts.current_enter_bios_setup is defined
diff --git a/test/integration/targets/vmware_guest_boot_info/aliases b/test/integration/targets/vmware_guest_boot_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_boot_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_boot_info/tasks/main.yml b/test/integration/targets/vmware_guest_boot_info/tasks/main.yml
deleted file mode 100644
index f40f397181..0000000000
--- a/test/integration/targets/vmware_guest_boot_info/tasks/main.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-# Test code for the vmware_guest_boot_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: Gather info about VM boot order
- vmware_guest_boot_info:
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- register: vm1_info
- - debug: var=vm1_info
- - name: assert that values are set
- assert:
- that:
- - vm1_info.vm_boot_info.current_boot_delay is defined
- - vm1_info.vm_boot_info.current_boot_firmware is defined
- - vm1_info.vm_boot_info.current_boot_order is defined
- - vm1_info.vm_boot_info.current_boot_retry_delay is defined
- - vm1_info.vm_boot_info.current_boot_retry_enabled is defined
- - vm1_info.vm_boot_info.current_enter_bios_setup is defined
-
- - name: Gather info about VM boot order in check mode
- vmware_guest_boot_info:
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- check_mode: yes
- register: vm1_info
- - debug: var=vm1_info
- - name: assert that values are set
- assert:
- that:
- - vm1_info.vm_boot_info.current_boot_delay is defined
- - vm1_info.vm_boot_info.current_boot_firmware is defined
- - vm1_info.vm_boot_info.current_boot_order is defined
- - vm1_info.vm_boot_info.current_boot_retry_delay is defined
- - vm1_info.vm_boot_info.current_boot_retry_enabled is defined
- - vm1_info.vm_boot_info.current_enter_bios_setup is defined
diff --git a/test/integration/targets/vmware_guest_controller/aliases b/test/integration/targets/vmware_guest_controller/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_controller/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_controller/tasks/main.yml b/test/integration/targets/vmware_guest_controller/tasks/main.yml
deleted file mode 100644
index 117ee1e2bd..0000000000
--- a/test/integration/targets/vmware_guest_controller/tasks/main.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# Test code for the vmware_guest_controller module
-# Copyright: (c) 2019, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: gather disk controllers facts of the virtual machine
- vmware_guest_controller:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- gather_disk_controller_facts: true
- register: disk_controller_facts
-
- - debug: var=disk_controller_facts
-
- - name: get the number of existing disk controllers
- set_fact:
- scsi_num: "{{ disk_controller_facts.disk_controller_data.scsi | length }}"
- - set_fact:
- sata_num: "{{ disk_controller_facts.disk_controller_data.sata | length }}"
- - set_fact:
- nvme_num: "{{ disk_controller_facts.disk_controller_data.nvme | length }}"
-
- - name: add new disk controllers to virtual machine
- vmware_guest_controller:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- sleep_time: 30
- controllers:
- - type: sata
- state: present
- - type: paravirtual
- state: present
- register: add_disk_controller
-
- - debug: var=add_disk_controller
-
- - name: assert the new disk controllers were added to VM
- assert:
- that:
- - "add_disk_controller.changed == true"
- - "{{ add_disk_controller.disk_controller_data.scsi | length | int }} == {{ scsi_num | int + 1 }}"
- - "{{ add_disk_controller.disk_controller_data.sata | length | int }} == {{ sata_num | int + 1 }}"
-
- - name: delete specified disk controllers
- vmware_guest_controller:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- sleep_time: 30
- controllers:
- - state: absent
- type: sata
- controller_number: "{{ sata_num }}"
- - state: absent
- type: paravirtual
- controller_number: "{{ scsi_num }}"
- register: del_disk_controller
-
- - debug: var=del_disk_controller
-
- - name: assert the disk controllers were removed
- assert:
- that:
- - "del_disk_controller.changed == true"
- - "{{ del_disk_controller.disk_controller_data.sata | length | int }} == {{ sata_num | int }}"
- - "{{ del_disk_controller.disk_controller_data.scsi | length | int }} == {{ scsi_num | int }}"
diff --git a/test/integration/targets/vmware_guest_cross_vc_clone/aliases b/test/integration/targets/vmware_guest_cross_vc_clone/aliases
deleted file mode 100644
index cf30c57ca1..0000000000
--- a/test/integration/targets/vmware_guest_cross_vc_clone/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-unsupported
-needs/target/prepare_vmware_tests \ No newline at end of file
diff --git a/test/integration/targets/vmware_guest_cross_vc_clone/tasks/main.yml b/test/integration/targets/vmware_guest_cross_vc_clone/tasks/main.yml
deleted file mode 100644
index 9b9faceb60..0000000000
--- a/test/integration/targets/vmware_guest_cross_vc_clone/tasks/main.yml
+++ /dev/null
@@ -1,160 +0,0 @@
-# Test code for the vmware_guest_cross_vc_clone Operations.
-# Copyright: (c) 2020, Anusha Hegde <anushah@vmware.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
-
-- name: Create VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- hardware:
- num_cpus: 1
- memory_mb: 512
- disk:
- - size: 1gb
- type: thin
- autoselect_datastore: True
- state: present
- register: create_vm_for_test
-
-- name: Create VM template
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm2
- is_template: True
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- hardware:
- num_cpus: 1
- memory_mb: 512
- disk:
- - size: 1gb
- type: thin
- autoselect_datastore: True
- state: present
- register: create_vm_template_for_test
-
-- name: clone a template across VC
- vmware_guest_cross_vc_clone:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: "test_vm2"
- destination_vm_name: "cloned_vm_from_template"
- destination_vcenter: '{{ destination_vcenter_hostname }}'
- destination_vcenter_username: '{{ destination_vcenter_username }}'
- destination_vcenter_password: '{{ destination_vcenter_password }}'
- destination_host: '{{ destination_esxi }}'
- destination_datastore: '{{ destination_datastore }}'
- destination_vm_folder: '{{ destination_vm_folder }}'
- power_on: no
- register: cross_vc_clone_from_template
-
-- name: assert that changes were made
- assert:
- that:
- - cross_vc_clone_from_template is changed
-
-- name: clone a VM across VC
- vmware_guest_cross_vc_clone:
- hostname: '{{ destination_vcenter_hostname }}'
- username: '{{ destination_vcenter_username }}'
- password: "{{ destination_vcenter_password }}"
- validate_certs: no
- name: "test_vm1"
- destination_vm_name: "cloned_vm_from_vm"
- destination_vcenter: '{{ destination_vcenter_hostname }}'
- destination_vcenter_username: '{{ destination_vcenter_username }}'
- destination_vcenter_password: '{{ destination_vcenter_password }}'
- destination_vcenter_port: '{{ destination_vcenter_port }}'
- destination_vcenter_validate_certs: '{{ destination_vcenter_validate_certs }}'
- destination_host: '{{ destination_esxi1 }}'
- destination_datastore: '{{ destination_datastore }}'
- destination_vm_folder: '{{ destination_vm_folder }}'
- power_on: yes
- register: cross_vc_clone_from_vm
-
-- name: assert that changes were made
- assert:
- that:
- - cross_vc_clone_from_vm is changed
-
-- name: clone a VM across VC when datastore cluster is specified
- vmware_guest_cross_vc_clone:
- hostname: '{{ destination_vcenter_hostname }}'
- username: '{{ destination_vcenter_username }}'
- password: "{{ destination_vcenter_password }}"
- validate_certs: no
- name: "test_vm1"
- destination_vm_name: "cloned_vm_from_vm"
- destination_vcenter: '{{ destination_vcenter_hostname }}'
- destination_vcenter_username: '{{ destination_vcenter_username }}'
- destination_vcenter_password: '{{ destination_vcenter_password }}'
- destination_host: '{{ destination_esxi1 }}'
- destination_datastore: '{{ destination_datastore_cluster }}'
- destination_vm_folder: '{{ destination_vm_folder }}'
- power_on: yes
- register: cross_vc_clone_from_vm_with_datastore_cluster
-
-- name: assert that changes were made
- assert:
- that:
- - cross_vc_clone_from_vm_with_datastore_cluster is changed
-
-- name: clone in check mode
- vmware_guest_cross_vc_clone:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: "test_vm2"
- destination_vm_name: "cloned_vm_from_template_in_check_mode"
- destination_vcenter: '{{ destination_vcenter_hostname }}'
- destination_vcenter_username: '{{ destination_vcenter_username }}'
- destination_vcenter_password: '{{ destination_vcenter_password }}'
- destination_host: '{{ destination_esxi }}'
- destination_datastore: '{{ destination_datastore }}'
- destination_vm_folder: '{{ destination_vm_folder }}'
- power_on: no
- check_mode: yes
- register: check_mode_clone
-
-- debug:
- var: check_mode_clone
-
-- name: idempotency check - VM name already exists
- vmware_guest_cross_vc_clone:
- hostname: '{{ destination_vcenter_hostname }}'
- username: '{{ destination_vcenter_username }}'
- password: "{{ destination_vcenter_password }}"
- validate_certs: no
- name: "test_vm1"
- destination_vm_name: "cloned_vm_from_vm"
- destination_vcenter: '{{ destination_vcenter_hostname }}'
- destination_vcenter_username: '{{ destination_vcenter_username }}'
- destination_vcenter_password: '{{ destination_vcenter_password }}'
- destination_host: '{{ destination_esxi1 }}'
- destination_datastore: '{{ destination_datastore }}'
- destination_vm_folder: '{{ destination_vm_folder }}'
- power_on: yes
- register: idempotency_check
-
-- name: assert that no changes were made
- assert:
- that:
- - idempotency_check is unchanged \ No newline at end of file
diff --git a/test/integration/targets/vmware_guest_custom_attribute_defs/aliases b/test/integration/targets/vmware_guest_custom_attribute_defs/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_custom_attribute_defs/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml b/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml
deleted file mode 100644
index 684eb9ddcc..0000000000
--- a/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-# Test code for the vmware_guest_custom_attribute_defs module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-- name: remove attribute definition
- vmware_guest_custom_attribute_defs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- attribute_key: sample_5
-
-- name: add custom attribute definition
- vmware_guest_custom_attribute_defs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- attribute_key: sample_5
- register: add_attrib_def
-
-- debug: var=add_attrib_def
-
-- assert:
- that:
- - add_attrib_def is changed
- - "'sample_5' in add_attrib_def.custom_attribute_defs"
-
-- name: add attribute definition again
- vmware_guest_custom_attribute_defs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- attribute_key: sample_5
- register: add_attrib_def
-
-- debug: var=add_attrib_def
-
-- assert:
- that:
- - not (add_attrib_def is changed)
-
-- name: remove attribute definition
- vmware_guest_custom_attribute_defs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- attribute_key: sample_5
- register: remove_attrib_def
-
-- debug: var=remove_attrib_def
-
-- assert:
- that:
- - "remove_attrib_def.changed"
- - "'sample_5' not in remove_attrib_def.custom_attribute_defs"
-
-- name: remove attribute definition
- vmware_guest_custom_attribute_defs:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- attribute_key: sample_5
- register: remove_attrib_def
-
-- debug: var=remove_attrib_def
-
-- assert:
- that:
- - "not remove_attrib_def.changed"
- - "'sample_5' not in remove_attrib_def.custom_attribute_defs"
diff --git a/test/integration/targets/vmware_guest_custom_attributes/aliases b/test/integration/targets/vmware_guest_custom_attributes/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_custom_attributes/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml b/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml
deleted file mode 100644
index 64b9f8963c..0000000000
--- a/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml
+++ /dev/null
@@ -1,110 +0,0 @@
-# Test code for the vmware_guest_custom_attributes module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: Current pinned version of vcsim does not support custom fields
-# commenting testcase below
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-- name: Add custom attribute to the given virtual machine
- vmware_guest_custom_attributes:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- attributes:
- - name: 'sample_1'
- value: 'sample_1_value'
- - name: 'sample_2'
- value: 'sample_2_value'
- - name: 'sample_3'
- value: 'sample_3_value'
- register: guest_info_0001
-
-- debug: var=guest_info_0001
-
-- assert:
- that:
- - guest_info_0001 is changed
-
-- name: Add custom attribute to the given virtual machine again
- vmware_guest_custom_attributes:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- attributes:
- - name: 'sample_1'
- value: 'sample_1_value'
- - name: 'sample_2'
- value: 'sample_2_value'
- - name: 'sample_3'
- value: 'sample_3_value'
- register: guest_info_0002
-
-- debug: var=guest_info_0002
-
-- assert:
- that:
- - not (guest_info_0002 is changed)
-
-- name: Remove custom attribute to the given virtual machine
- vmware_guest_custom_attributes:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: absent
- attributes:
- - name: 'sample_1'
- - name: 'sample_2'
- - name: 'sample_3'
- register: guest_info_0004
-
-- debug: msg="{{ guest_info_0004 }}"
-
-- assert:
- that:
- - "guest_info_0004.changed"
-
-# TODO: vcsim returns duplicate values so removing custom attributes
-# results in change. vCenter show correct behavior. Commenting this
-# till this is supported by vcsim.
-- when: vcsim is not defined
- block:
- - name: Remove custom attribute to the given virtual machine again
- vmware_guest_custom_attributes:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: absent
- attributes:
- - name: 'sample_1'
- - name: 'sample_2'
- - name: 'sample_3'
- register: guest_info_0005
-
- - debug: var=guest_info_0005
-
- - assert:
- that:
- - not (guest_info_0005 is changed)
diff --git a/test/integration/targets/vmware_guest_customization_facts/aliases b/test/integration/targets/vmware_guest_customization_facts/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_customization_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_customization_facts/tasks/main.yml b/test/integration/targets/vmware_guest_customization_facts/tasks/main.yml
deleted file mode 100644
index e515707fb6..0000000000
--- a/test/integration/targets/vmware_guest_customization_facts/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Test code for the vmware_guest_customization_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support customizationspecmanager related functionalities
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - &vm_guest_facts
- name: Gather facts about given customization spec
- vmware_guest_customization_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: vm_custom_spec_facts
-
- - debug:
- var: vm_custom_spec_facts
-
- - assert:
- that:
- - "not vm_custom_spec_facts.changed"
-
- - <<: *vm_guest_facts
- name: Gather facts about given customization spec in check module
-
- - debug:
- var: vm_custom_spec_facts
-
- - assert:
- that:
- - "not vm_custom_spec_facts.changed"
diff --git a/test/integration/targets/vmware_guest_customization_info/aliases b/test/integration/targets/vmware_guest_customization_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_customization_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_customization_info/tasks/main.yml b/test/integration/targets/vmware_guest_customization_info/tasks/main.yml
deleted file mode 100644
index a371d8a3d3..0000000000
--- a/test/integration/targets/vmware_guest_customization_info/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Test code for the vmware_guest_customization_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support customizationspecmanager related functionalities
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - &vm_guest_info
- name: Gather info about given customization spec
- vmware_guest_customization_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: vm_custom_spec_info
-
- - debug:
- var: vm_custom_spec_info
-
- - assert:
- that:
- - "not vm_custom_spec_info.changed"
-
- - <<: *vm_guest_info
- name: Gather info about given customization spec in check module
-
- - debug:
- var: vm_custom_spec_info
-
- - assert:
- that:
- - "not vm_custom_spec_info.changed"
diff --git a/test/integration/targets/vmware_guest_disk/aliases b/test/integration/targets/vmware_guest_disk/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_disk/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_disk/tasks/main.yml b/test/integration/targets/vmware_guest_disk/tasks/main.yml
deleted file mode 100644
index 6c2d1c2cbb..0000000000
--- a/test/integration/targets/vmware_guest_disk/tasks/main.yml
+++ /dev/null
@@ -1,232 +0,0 @@
-# Test code for the vmware_guest_disk_disk module.
-
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: create new disk with invalid disk mode
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - datastore: "{{ rw_datastore }}"
- disk_mode: "invalid_disk_mode"
- scsi_controller: 0
- scsi_type: 'paravirtual'
- size_gb: 10
- state: present
- type: eagerzeroedthick
- unit_number: 2
- register: test_create_disk1
- ignore_errors: True
-
-- debug:
- msg: "{{ test_create_disk1 }}"
-
-- name: assert that changes were not made
- assert:
- that:
- - not(test_create_disk1 is changed)
-
-- name: create new disk(s) with valid disk mode
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - datastore: "{{ rw_datastore }}"
- disk_mode: "independent_persistent"
- scsi_controller: 0
- scsi_type: 'paravirtual'
- size_gb: 1
- state: present
- type: eagerzeroedthick
- unit_number: 2
- - datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 0
- scsi_type: 'paravirtual'
- size_gb: 1
- state: present
- type: eagerzeroedthick
- unit_number: 3
- - datastore: "{{ rw_datastore }}"
- disk_mode: "persistent"
- scsi_controller: 0
- scsi_type: 'paravirtual'
- size_gb: 1
- state: present
- type: eagerzeroedthick
- unit_number: 4
- register: test_create_disk2
-
-- debug:
- msg: "{{ test_create_disk2 }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_create_disk2 is changed
-
-- name: create new disk with custom shares
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - size_gb: 1
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 1
- state: present
- unit_number: 4
- shares:
- level: custom
- level_value: 1300
- register: test_custom_shares
-
-- debug:
- msg: "{{ test_custom_shares }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_custom_shares is changed
-
-- name: create new disk with custom IO limits and shares in IO Limits
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - size_gb: 1
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 2
- state: present
- unit_number: 4
- iolimit:
- limit: 1506
- shares:
- level: custom
- level_value: 1305
- register: test_custom_IoLimit_shares
-
-- debug:
- msg: "{{ test_custom_IoLimit_shares }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_custom_IoLimit_shares is changed
-
-- name: Update disk for custom IO limits in IO Limits
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - size_gb: 2
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 2
- state: present
- unit_number: 4
- iolimit:
- limit: 1500
- shares:
- level: custom
- level_value: 1305
- register: test_custom_IoLimit
-
-- debug:
- msg: "{{ test_custom_IoLimit }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_custom_IoLimit is changed
-
-- name: Update disk for shares of IO limits
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - size_gb: 3
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 2
- state: present
- unit_number: 4
- iolimit:
- limit: 1500
- shares:
- level: low
- level_value: 650
- register: test_shares_IoLimit
-
-- debug:
- msg: "{{ test_shares_IoLimit }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_shares_IoLimit is changed
-
-- name: Update disk for shares and IoLimits of IO limits
- vmware_guest_disk:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: "{{ virtual_machines[0].name }}"
- disk:
- - size_gb: 4
- type: eagerzeroedthick
- datastore: "{{ rw_datastore }}"
- disk_mode: "independent_nonpersistent"
- scsi_controller: 2
- state: present
- unit_number: 4
- iolimit:
- limit: 1507
- shares:
- level: high
- level_value: 1200
- register: test_shares_IoLimits
-
-- debug:
- msg: "{{ test_shares_IoLimits }}"
-
-- name: assert that changes were made
- assert:
- that:
- - test_shares_IoLimits is changed
diff --git a/test/integration/targets/vmware_guest_disk_facts/aliases b/test/integration/targets/vmware_guest_disk_facts/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_disk_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_disk_facts/tasks/main.yml b/test/integration/targets/vmware_guest_disk_facts/tasks/main.yml
deleted file mode 100644
index eb5367c677..0000000000
--- a/test/integration/targets/vmware_guest_disk_facts/tasks/main.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Test code for the vmware_guest_disk_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: set state to poweron the first VM
- vmware_guest_powerstate:
- validate_certs: no
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- folder: '{{ f0 }}'
- state: powered-on
-
-- name: Gather facts about virtual machine disks
- vmware_guest_disk_facts: &get_facts
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- datacenter: '{{ dc1 }}'
- register: disk_facts
-
-- debug:
- msg: '{{ disk_facts }}'
-
-- name: assert that no changes were made
- assert:
- that:
- - "not disk_facts.changed"
-
-- name: Gather facts about virtual machine disks in check mode
- vmware_guest_disk_facts:
- <<: *get_facts
- register: disk_facts
- check_mode: yes
-
-- debug:
- msg: '{{ disk_facts }}'
-
-- name: assert that no changes were made
- assert:
- that:
- - "not disk_facts.changed"
diff --git a/test/integration/targets/vmware_guest_disk_info/aliases b/test/integration/targets/vmware_guest_disk_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_disk_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_disk_info/tasks/main.yml b/test/integration/targets/vmware_guest_disk_info/tasks/main.yml
deleted file mode 100644
index 3c6b6c5336..0000000000
--- a/test/integration/targets/vmware_guest_disk_info/tasks/main.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Test code for the vmware_guest_disk_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: set state to poweron the first VM
- vmware_guest_powerstate:
- validate_certs: no
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- folder: '{{ f0 }}'
- state: powered-on
-
-- name: Gather info about virtual machine disks
- vmware_guest_disk_info: &get_info
- validate_certs: no
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- name: "{{ virtual_machines[0].name }}"
- datacenter: '{{ dc1 }}'
- register: disk_info
-
-- debug:
- msg: '{{ disk_info }}'
-
-- name: assert that no changes were made
- assert:
- that:
- - "not disk_info.changed"
-
-- name: Gather info about virtual machine disks in check mode
- vmware_guest_disk_info:
- <<: *get_info
- register: disk_info
- check_mode: yes
-
-- debug:
- msg: '{{ disk_info }}'
-
-- name: assert that no changes were made
- assert:
- that:
- - "not disk_info.changed"
diff --git a/test/integration/targets/vmware_guest_facts/aliases b/test/integration/targets/vmware_guest_facts/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_facts/tasks/main.yml b/test/integration/targets/vmware_guest_facts/tasks/main.yml
deleted file mode 100644
index 187e7c7f48..0000000000
--- a/test/integration/targets/vmware_guest_facts/tasks/main.yml
+++ /dev/null
@@ -1,226 +0,0 @@
-# Test code for the vmware_guest_facts module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# Copyright: (c) 2018, James E. King III (@jeking3) <jking@apache.org>
-# 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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-# Testcase 0001: Get details about virtual machines
-- name: get list of facts about virtual machines
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: guest_facts_0001
-
-- debug:
- var: guest_facts_0001
-
-- assert:
- that:
- - "guest_facts_0001['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_facts_0001['instance']['hw_product_uuid'] is defined"
- - "guest_facts_0001['instance']['hw_cores_per_socket'] is defined"
- - "guest_facts_0001['instance']['hw_datastores'] is defined"
- - "guest_facts_0001['instance']['hw_esxi_host'] is defined"
- - "guest_facts_0001['instance']['hw_files'] is defined"
- - "guest_facts_0001['instance']['hw_guest_ha_state'] is defined"
- - "guest_facts_0001['instance']['hw_is_template'] is defined"
- - "guest_facts_0001['instance']['hw_folder'] is defined"
- - "guest_facts_0001['instance']['guest_question'] is defined"
- - "guest_facts_0001['instance']['guest_consolidation_needed'] is defined"
- - "guest_facts_0001['instance']['moid'] is defined"
- - "guest_facts_0001['instance']['vimref'] is defined"
- - "'portgroup_portkey' in guest_facts_0001['instance']['hw_eth0']"
- - "'portgroup_key' in guest_facts_0001['instance']['hw_eth0']"
- - "guest_facts_0001['instance']['instance_uuid'] is defined"
-
-- set_fact: vm1_uuid="{{ guest_facts_0001['instance']['hw_product_uuid'] }}"
-
-- set_fact: vm1_instance_uuid="{{ guest_facts_0001['instance']['instance_uuid'] }}"
-
-- set_fact: vm1_moid="{{ guest_facts_0001['instance']['moid'] }}"
-
-- debug:
- var: vm1_uuid
-
-# Testcase 0002: Get details about virtual machines using UUID
-- name: get list of facts about virtual machines using UUID
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_facts_0002
-
-- debug:
- var: guest_facts_0002
-
-- name: Get specific details about virtual machines using the vsphere output schema
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- schema: vsphere
- properties:
- - config.hardware.memoryMB
- - guest
- - name
- - summary.runtime.connectionState
- register: guest_facts_0002b
-
-- debug:
- var: guest_facts_0002b
-
-- assert:
- that:
- - "guest_facts_0002['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_facts_0002['instance']['hw_product_uuid'] is defined"
- - "guest_facts_0002['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_facts_0002['instance']['hw_cores_per_socket'] is defined"
- - "guest_facts_0002b['instance']['config']['hardware']['memoryMB'] is defined"
- - "guest_facts_0002b['instance']['config']['hardware']['numCoresPerSocket'] is not defined"
- - "guest_facts_0002b['instance']['guest']['toolsVersion'] is defined"
- - "guest_facts_0001['instance']['moid'] is defined"
- - "guest_facts_0001['instance']['vimref'] is defined"
- - "guest_facts_0002b['instance']['overallStatus'] is not defined"
-
-# Testcase 0003: Get details about virtual machines without snapshots using UUID
-- name: get empty list of snapshots from virtual machine using UUID
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_facts_0003
-
-- debug:
- var: guest_facts_0003
-
-- assert:
- that:
- - "guest_facts_0003['instance']['snapshots']|length == 0"
- - "guest_facts_0003['instance']['current_snapshot'] is none"
-
-# Testcase 0004: Get details about virtual machines with two snapshots using UUID
-- name: Create first snapshot
- vmware_guest_snapshot: &vm_snap
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap1
-
-- name: Create second snapshot
- vmware_guest_snapshot:
- <<: *vm_snap
- snapshot_name: snap2
-
-- name: get list of snapshots from virtual machine using UUID
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_facts_0004
-
-- debug:
- var: guest_facts_0004
-
-- assert:
- that:
- - "guest_facts_0004['instance']['snapshots'] is defined"
- - "guest_facts_0004['instance']['snapshots'][0]['name'] == 'snap1'"
- - "guest_facts_0004['instance']['snapshots'][1]['name'] == 'snap2'"
- - "guest_facts_0004['instance']['current_snapshot']['name'] == 'snap2'"
- - "guest_facts_0004['instance']['hw_folder'] is defined"
-
-# Testcase 0005: Get details about virtual machines using UUID
-- name: get list of facts about virtual machines using instance UUID
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_instance_uuid }}"
- use_instance_uuid: True
- register: guest_facts_0005
-
-- debug:
- msg: "{{ guest_facts_0005 }}"
-
-- assert:
- that:
- - "guest_facts_0005['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_facts_0005['instance']['hw_product_uuid'] is defined"
- - "guest_facts_0005['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_facts_0005['instance']['hw_cores_per_socket'] is defined"
- - "guest_facts_0005['instance']['hw_datastores'] is defined"
- - "guest_facts_0005['instance']['hw_esxi_host'] is defined"
- - "guest_facts_0005['instance']['hw_files'] is defined"
- - "guest_facts_0005['instance']['hw_guest_ha_state'] is defined"
- - "guest_facts_0005['instance']['hw_is_template'] is defined"
- - "guest_facts_0005['instance']['hw_folder'] is defined"
- - "guest_facts_0005['instance']['guest_question'] is defined"
- - "guest_facts_0005['instance']['guest_consolidation_needed'] is defined"
- - "guest_facts_0005['instance']['instance_uuid'] is defined"
- - "guest_facts_0005['instance']['instance_uuid'] == vm1_instance_uuid"
- - "guest_facts_0005['instance']['moid'] is defined"
- - "guest_facts_0005['instance']['vimref'] is defined"
-
-# Testcase 0006: Get details about virtual machines using MoID
-- name: get list of facts about virtual machines using instance MoID
- vmware_guest_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- moid: "{{ vm1_moid }}"
- use_instance_uuid: True
- register: guest_facts_0006
-
-- debug:
- msg: "{{ guest_facts_0006 }}"
-
-- assert:
- that:
- - "guest_facts_0006['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_facts_0006['instance']['hw_product_uuid'] is defined"
- - "guest_facts_0006['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_facts_0006['instance']['hw_cores_per_socket'] is defined"
- - "guest_facts_0006['instance']['hw_datastores'] is defined"
- - "guest_facts_0006['instance']['hw_esxi_host'] is defined"
- - "guest_facts_0006['instance']['hw_files'] is defined"
- - "guest_facts_0006['instance']['hw_guest_ha_state'] is defined"
- - "guest_facts_0006['instance']['hw_is_template'] is defined"
- - "guest_facts_0006['instance']['hw_folder'] is defined"
- - "guest_facts_0006['instance']['guest_question'] is defined"
- - "guest_facts_0006['instance']['guest_consolidation_needed'] is defined"
- - "guest_facts_0006['instance']['instance_uuid'] is defined"
- - "guest_facts_0006['instance']['instance_uuid'] == vm1_instance_uuid"
- - "guest_facts_0006['instance']['moid'] is defined"
- - "guest_facts_0006['instance']['vimref'] is defined"
diff --git a/test/integration/targets/vmware_guest_find/aliases b/test/integration/targets/vmware_guest_find/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_find/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_find/tasks/main.yml b/test/integration/targets/vmware_guest_find/tasks/main.yml
deleted file mode 100644
index f8b7832249..0000000000
--- a/test/integration/targets/vmware_guest_find/tasks/main.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-# Test code for the vmware_guest_find 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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-- name: find folders for each vm
- vmware_guest_find:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ item.name }}"
- with_items: "{{ virtual_machines }}"
- register: folders
-
-- debug: var=item
- with_items: "{{ folders.results }}"
-
-# We only care that each VM was found, not that the folder path
-# is completely accurate. Eventually the test should be extended
-# to validate the full path for each VM.
-- assert:
- that:
- - "{{ 'folders' in item }}"
- - "{{ item['folders']|length == 1 }}"
- with_items: "{{ folders.results }}"
-
-- name: get fact of the first VM
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: guest_info_0001
-
-- debug: var=guest_info_0001
-
-- name: find folders for each vm using UUID
- vmware_guest_find:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- uuid: "{{ guest_info_0001['instance']['hw_product_uuid'] }}"
- register: folder_uuid
-
-- debug: var=folder_uuid
-
-- assert:
- that:
- - "{{ 'folders' in folder_uuid }}"
- - "{{ folder_uuid['folders']|length == 1 }}"
diff --git a/test/integration/targets/vmware_guest_info/aliases b/test/integration/targets/vmware_guest_info/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_info/tasks/main.yml b/test/integration/targets/vmware_guest_info/tasks/main.yml
deleted file mode 100644
index cebfed0ad3..0000000000
--- a/test/integration/targets/vmware_guest_info/tasks/main.yml
+++ /dev/null
@@ -1,226 +0,0 @@
-# Test code for the vmware_guest_info module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# Copyright: (c) 2018, James E. King III (@jeking3) <jking@apache.org>
-# 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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-# Testcase 0001: Get details about virtual machines
-- name: get list of info about virtual machines
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: guest_info_0001
-
-- debug:
- var: guest_info_0001
-
-- assert:
- that:
- - "guest_info_0001['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_info_0001['instance']['hw_product_uuid'] is defined"
- - "guest_info_0001['instance']['hw_cores_per_socket'] is defined"
- - "guest_info_0001['instance']['hw_datastores'] is defined"
- - "guest_info_0001['instance']['hw_esxi_host'] is defined"
- - "guest_info_0001['instance']['hw_files'] is defined"
- - "guest_info_0001['instance']['hw_guest_ha_state'] is defined"
- - "guest_info_0001['instance']['hw_is_template'] is defined"
- - "guest_info_0001['instance']['hw_folder'] is defined"
- - "guest_info_0001['instance']['guest_question'] is defined"
- - "guest_info_0001['instance']['guest_consolidation_needed'] is defined"
- - "guest_info_0001['instance']['moid'] is defined"
- - "guest_info_0001['instance']['vimref'] is defined"
- - "'portgroup_portkey' in guest_info_0001['instance']['hw_eth0']"
- - "'portgroup_key' in guest_info_0001['instance']['hw_eth0']"
- - "guest_info_0001['instance']['instance_uuid'] is defined"
-
-- set_fact: vm1_uuid="{{ guest_info_0001['instance']['hw_product_uuid'] }}"
-
-- set_fact: vm1_instance_uuid="{{ guest_info_0001['instance']['instance_uuid'] }}"
-
-- set_fact: vm1_moid="{{ guest_info_0001['instance']['moid'] }}"
-
-- debug:
- var: vm1_uuid
-
-# Testcase 0002: Get details about virtual machines using UUID
-- name: get list of info about virtual machines using UUID
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_info_0002
-
-- debug:
- var: guest_info_0002
-
-- name: Get specific details about virtual machines using the vsphere output schema
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- schema: vsphere
- properties:
- - config.hardware.memoryMB
- - guest
- - name
- - summary.runtime.connectionState
- register: guest_info_0002b
-
-- debug:
- var: guest_info_0002b
-
-- assert:
- that:
- - "guest_info_0002['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_info_0002['instance']['hw_product_uuid'] is defined"
- - "guest_info_0002['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_info_0002['instance']['hw_cores_per_socket'] is defined"
- - "guest_info_0002b['instance']['config']['hardware']['memoryMB'] is defined"
- - "guest_info_0002b['instance']['config']['hardware']['numCoresPerSocket'] is not defined"
- - "guest_info_0002b['instance']['guest']['toolsVersion'] is defined"
- - "guest_info_0001['instance']['moid'] is defined"
- - "guest_info_0001['instance']['vimref'] is defined"
- - "guest_info_0002b['instance']['overallStatus'] is not defined"
-
-# Testcase 0003: Get details about virtual machines without snapshots using UUID
-- name: get empty list of snapshots from virtual machine using UUID
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_info_0003
-
-- debug:
- var: guest_info_0003
-
-- assert:
- that:
- - "guest_info_0003['instance']['snapshots']|length == 0"
- - "guest_info_0003['instance']['current_snapshot'] is none"
-
-# Testcase 0004: Get details about virtual machines with two snapshots using UUID
-- name: Create first snapshot
- vmware_guest_snapshot: &vm_snap
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap1
-
-- name: Create second snapshot
- vmware_guest_snapshot:
- <<: *vm_snap
- snapshot_name: snap2
-
-- name: get list of snapshots from virtual machine using UUID
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_uuid }}"
- register: guest_info_0004
-
-- debug:
- var: guest_info_0004
-
-- assert:
- that:
- - "guest_info_0004['instance']['snapshots'] is defined"
- - "guest_info_0004['instance']['snapshots'][0]['name'] == 'snap1'"
- - "guest_info_0004['instance']['snapshots'][1]['name'] == 'snap2'"
- - "guest_info_0004['instance']['current_snapshot']['name'] == 'snap2'"
- - "guest_info_0004['instance']['hw_folder'] is defined"
-
-# Testcase 0005: Get details about virtual machines using UUID
-- name: get list of info about virtual machines using instance UUID
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- uuid: "{{ vm1_instance_uuid }}"
- use_instance_uuid: True
- register: guest_info_0005
-
-- debug:
- msg: "{{ guest_info_0005 }}"
-
-- assert:
- that:
- - "guest_info_0005['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_info_0005['instance']['hw_product_uuid'] is defined"
- - "guest_info_0005['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_info_0005['instance']['hw_cores_per_socket'] is defined"
- - "guest_info_0005['instance']['hw_datastores'] is defined"
- - "guest_info_0005['instance']['hw_esxi_host'] is defined"
- - "guest_info_0005['instance']['hw_files'] is defined"
- - "guest_info_0005['instance']['hw_guest_ha_state'] is defined"
- - "guest_info_0005['instance']['hw_is_template'] is defined"
- - "guest_info_0005['instance']['hw_folder'] is defined"
- - "guest_info_0005['instance']['guest_question'] is defined"
- - "guest_info_0005['instance']['guest_consolidation_needed'] is defined"
- - "guest_info_0005['instance']['instance_uuid'] is defined"
- - "guest_info_0005['instance']['instance_uuid'] == vm1_instance_uuid"
- - "guest_info_0005['instance']['moid'] is defined"
- - "guest_info_0005['instance']['vimref'] is defined"
-
-# Testcase 0006: Get details about virtual machines using MoID
-- name: get list of information about virtual machines using instance MoID
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- moid: "{{ vm1_moid }}"
- use_instance_uuid: True
- register: guest_info_0006
-
-- debug:
- msg: "{{ guest_info_0006 }}"
-
-- assert:
- that:
- - "guest_info_0006['instance']['hw_name'] == virtual_machines[0].name"
- - "guest_info_0006['instance']['hw_product_uuid'] is defined"
- - "guest_info_0006['instance']['hw_product_uuid'] == vm1_uuid"
- - "guest_info_0006['instance']['hw_cores_per_socket'] is defined"
- - "guest_info_0006['instance']['hw_datastores'] is defined"
- - "guest_info_0006['instance']['hw_esxi_host'] is defined"
- - "guest_info_0006['instance']['hw_files'] is defined"
- - "guest_info_0006['instance']['hw_guest_ha_state'] is defined"
- - "guest_info_0006['instance']['hw_is_template'] is defined"
- - "guest_info_0006['instance']['hw_folder'] is defined"
- - "guest_info_0006['instance']['guest_question'] is defined"
- - "guest_info_0006['instance']['guest_consolidation_needed'] is defined"
- - "guest_info_0006['instance']['instance_uuid'] is defined"
- - "guest_info_0006['instance']['instance_uuid'] == vm1_instance_uuid"
- - "guest_info_0006['instance']['moid'] is defined"
- - "guest_info_0006['instance']['vimref'] is defined"
diff --git a/test/integration/targets/vmware_guest_move/aliases b/test/integration/targets/vmware_guest_move/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_move/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_move/tasks/main.yml b/test/integration/targets/vmware_guest_move/tasks/main.yml
deleted file mode 100644
index e540bf884a..0000000000
--- a/test/integration/targets/vmware_guest_move/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Test code for the vmware_guest_move module
-# Copyright: (c) 2018, Jose Angel Munoz <josea.munoz@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_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: Create a VM folder on given Datacenter
- vcenter_folder:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ dc1 }}'
- folder_name: 'f1'
- folder_type: vm
- state: present
- validate_certs: no
- register: dest_folder
-
-# Testcase 0001: Move vm and get changed status
-- name: Move VM (Changed)
- vmware_guest_move:
- validate_certs: false
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ dc1 }}'
- name: '{{ virtual_machines[0].name }}'
- # Depends-On: https://github.com/ansible/ansible/pull/55237
- dest_folder: '{{ dest_folder.result.path }}'
- register: vm_info_0001
-
-
-# Testcase 0002: Move vm and get OK status (Already Moved)
-- &vm_move
- name: Move VM (OK)
- vmware_guest_move:
- validate_certs: false
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ dc1 }}'
- name: '{{ virtual_machines[0].name }}'
- dest_folder: '{{ dest_folder.result.path }}'
- register: vm_info_0002
-
-- debug:
- msg: "{{ vm_info_0001 }}"
-
-- debug:
- msg: "{{ vm_info_0002 }}"
-
-- name: Make sure changes are done
- assert:
- that:
- - vm_info_0001.changed
- - not vm_info_0002.changed
-
-- <<: *vm_move
- name: Move VM in check mode
- check_mode: yes
- register: vm_move_0003
-
-- name: Make sure changes are not made in check mode
- assert:
- that:
- - vm_move_0003.changed
diff --git a/test/integration/targets/vmware_guest_network/aliases b/test/integration/targets/vmware_guest_network/aliases
deleted file mode 100644
index 832eed362a..0000000000
--- a/test/integration/targets/vmware_guest_network/aliases
+++ /dev/null
@@ -1,6 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
-# until we figure out why vmware_guest_tools_wait fails in the CI
-disabled
diff --git a/test/integration/targets/vmware_guest_network/tasks/main.yml b/test/integration/targets/vmware_guest_network/tasks/main.yml
deleted file mode 100644
index 7266f4c574..0000000000
--- a/test/integration/targets/vmware_guest_network/tasks/main.yml
+++ /dev/null
@@ -1,353 +0,0 @@
-# Test code for the vmware_guest_network module
-# Copyright: (c) 2019, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_dvs_portgroup: true
- setup_dvswitch: true
-
- - name: Create VMs
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- folder: '/DC0/vm/F0'
- name: test_vm1
- state: poweredon
- guest_id: centos7_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- version: latest
- memory_mb: 1024
- num_cpus: 1
- scsi: paravirtual
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- networks:
- - name: VM Network
-
- - vmware_guest_tools_wait:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- timeout: 600
- validate_certs: no
- name: test_vm1
-
- - name: gather network adapters' facts of the virtual machine
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- gather_network_info: true
- register: netadapter_info
-
- - debug: var=netadapter_info
-
- - name: get number of existing netowrk adapters
- set_fact:
- netadapter_num: "{{ netadapter_info.network_data | length }}"
-
- - name: add new network adapters to virtual machine
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "VM Network"
- state: new
- device_type: e1000e
- manual_mac: "aa:50:56:58:59:60"
- connected: True
- - name: "VM Network"
- state: new
- connected: True
- device_type: vmxnet3
- manual_mac: "aa:50:56:58:59:61"
- register: add_netadapter
-
- - debug: var=add_netadapter
-
- - name: assert the new netowrk adapters were added to VM
- assert:
- that:
- - add_netadapter is changed
- - "{{ add_netadapter.network_data | length | int }} == {{ netadapter_num | int + 2 }}"
-
- - name: delete one specified network adapter
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - state: absent
- mac: "aa:50:56:58:59:60"
- register: del_netadapter
-
- - debug: var=del_netadapter
-
- - name: assert the network adapter was removed
- assert:
- that:
- - del_netadapter is changed
- - "{{ del_netadapter.network_data | length | int }} == {{ netadapter_num | int + 1 }}"
-
- - name: get instance uuid of virtual machines
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- datacenter: '{{ dc1 }}'
- register: guest_info
-
- - set_fact: vm1_instance_uuid="{{ guest_info['instance']['instance_uuid'] }}"
-
- - name: add new network adapters to virtual machine with instance uuid
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- uuid: '{{ vm1_instance_uuid }}'
- use_instance_uuid: True
- networks:
- - name: "VM Network"
- state: new
- connected: True
- device_type: e1000e
- manual_mac: "bb:50:56:58:59:60"
- register: add_netadapter_instanceuuid
-
- - debug: var=add_netadapter_instanceuuid
-
- - name: assert the new netowrk adapters were added to VM
- assert:
- that:
- - add_netadapter_instanceuuid is changed
- - "{{ add_netadapter_instanceuuid.network_data | length | int }} == {{ netadapter_num | int + 2 }}"
-
- - name: delete again one specified network adapter
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - state: absent
- mac: "bb:50:56:58:59:60"
- register: del_again_netadapter
-
- - debug: var=del_again_netadapter
-
- - name: assert the network adapter was removed
- assert:
- that:
- - del_again_netadapter is changed
- - "{{ del_again_netadapter.network_data | length | int }} == {{ netadapter_num | int + 1 }}"
-
- - name: disable DirectPath I/O on a Vmxnet3 adapter
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "test_vm1"
- networks:
- - state: present
- mac: "aa:50:56:58:59:61"
- directpath_io: False
- register: disable_directpath_io
-
- - debug: var=disable_directpath_io
-
- - name: enable DirectPath I/O on a Vmxnet3 adapter
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "test_vm1"
- networks:
- - state: present
- mac: "aa:50:56:58:59:61"
- directpath_io: True
- register: enable_directpath_io
-
- - debug: var=enable_directpath_io
-
- - name: disconnect one specified network adapter
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - state: present
- mac: "aa:50:56:58:59:61"
- connected: false
- register: disc_netadapter
-
- - debug: var=disc_netadapter
-
- - name: assert the network adapter was disconnected
- assert:
- that:
- - disc_netadapter is changed
- - "{{ disc_netadapter.network_data[netadapter_num]['connected'] }} == false"
-
- - name: Check if network does not exists
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: non-existing-nw
- manual_mac: "aa:50:56:11:22:33"
- state: new
- register: no_nw_details
- ignore_errors: yes
-
- - debug: var=no_nw_details
-
- - name: Check if network does not exists
- assert:
- that:
- - not (no_nw_details is changed)
- - no_nw_details.failed
-
- - name: Change portgroup to dvPortgroup
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "{{ dvpg1 }}"
- label: "Network adapter 1"
- connected: false
- start_connected: true
- state: present
- register: change_netaddr_dvp
-
- - debug: var=change_netaddr_dvp
-
- - name: Check changed to dvPortgroup from PortGroup
- assert:
- that:
- - change_netaddr_dvp.changed is sameas true
-
- - name: Change portgroup to dvPortgroup
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "{{ dvpg1 }}"
- label: "Network adapter 1"
- connected: false
- start_connected: true
- state: present
- register: change_netaddr_dvp
-
- - debug: var=change_netaddr_dvp
-
- - name: Check not changed of dvPortgroup
- assert:
- that:
- - change_netaddr_dvp.changed is sameas false
-
- - name: Change dvPortgroup to PortGroup
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "VM Network"
- label: "Network adapter 1"
- connected: false
- start_connected: true
- state: present
- register: change_netaddr_pg
-
- - debug: var=change_netaddr_pg
-
- - name: Check changed to dvPortgroup from PortGroup
- assert:
- that:
- - change_netaddr_pg.changed is sameas true
- - change_netaddr_pg.network_data['0'].name == "VM Network"
-
- - name: Change dvPortgroup to PortGroup
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "VM Network"
- label: "Network adapter 1"
- connected: false
- start_connected: true
- state: present
- register: change_netaddr_pg
-
- - debug: var=change_netaddr_pg
-
- - name: Check not changed of PortGroup
- assert:
- that:
- - change_netaddr_pg.changed is sameas false
- - change_netaddr_pg.network_data['0'].name == "VM Network"
-
- # https://github.com/ansible/ansible/issues/65968
- - name: Create a network with dvPortgroup
- vmware_guest_network:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- networks:
- - name: "{{ dvpg1 }}"
- label: "Network adapter 2"
- connected: true
- start_connected: true
- state: new
- register: create_netaddr_pg
-
- - debug: var=create_netaddr_pg
-
- - name: Check if network is created with dvpg
- assert:
- that:
- - create_netaddr_pg.changed is sameas true
diff --git a/test/integration/targets/vmware_guest_powerstate/aliases b/test/integration/targets/vmware_guest_powerstate/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_powerstate/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_powerstate/tasks/main.yml b/test/integration/targets/vmware_guest_powerstate/tasks/main.yml
deleted file mode 100644
index 9460e25731..0000000000
--- a/test/integration/targets/vmware_guest_powerstate/tasks/main.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-# Test code for the vmware_guest_powerstate module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
- setup_datastore: true
-
-- name: Create a VM with the state poweredoff
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- folder: '{{ f0 }}'
- name: test_vm1
- state: poweredoff
- guest_id: debian8_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- memory_mb: 128
- num_cpus: 1
- scsi: paravirtual
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- networks:
- - name: VM Network
-
-- name: set state to poweroff the first VM
- vmware_guest_powerstate:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- folder: '{{ f0 }}'
- state: powered-off
- register: poweroff_d1_c1_f0
-
-- debug:
- var: poweroff_d1_c1_f0
-
-- name: make sure change was made
- assert:
- that:
- - not (poweroff_d1_c1_f0 is changed)
-
-- when: vcsim is not defined
- block:
- - name: Set a schedule task for first VM
- vmware_guest_powerstate:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- folder: '{{ f0 }}'
- scheduled_at: "10/10/2030 10:10"
- state: powered-on
- register: poweron_d1_c1_f0
-
- - name: Check that task is schedule
- assert:
- that:
- - poweron_d1_c1_f0 is changed
diff --git a/test/integration/targets/vmware_guest_register_operation/aliases b/test/integration/targets/vmware_guest_register_operation/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_guest_register_operation/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_register_operation/tasks/main.yml b/test/integration/targets/vmware_guest_register_operation/tasks/main.yml
deleted file mode 100644
index 8e9cafe5ad..0000000000
--- a/test/integration/targets/vmware_guest_register_operation/tasks/main.yml
+++ /dev/null
@@ -1,261 +0,0 @@
-# Test code for the vmware_guest_register_operation module
-# Copyright: (c) 2019, sky-joker <sky.jokerxx@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_attach_host: true
- setup_datastore: true
- setup_cluster: true
- setup_virtualmachines: true
- setup_resource_pool: true
-
-- block:
- - name: gather facts of vm
- vmware_guest_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- name: "{{ virtual_machines[0].name }}"
- register: vm_facts
-
- - name: get a vm vmx file path
- set_fact: vm_vmx_file_path="{{ vm_facts.instance.hw_files[0] }}"
-
-- name: Powered off the vm
- vmware_guest_powerstate:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- folder: /vm
- name: "{{ virtual_machines[0].name }}"
- state: powered-off
-
-- name: Unregister VM from inventory
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- name: "{{ virtual_machines[0].name }}"
- state: absent
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | map(attribute='guest_name')
- | list
- | length == 0
-
-- assert:
- that:
- - item.guest_name != virtual_machines[0].name
- loop: "{{ vms.virtual_machines }}"
-
-- name: Register VM to inventory
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- esxi_hostname: "{{ esxi1 }}"
- name: "{{ virtual_machines[0].name }}"
- path: "{{ vm_vmx_file_path }}"
- state: present
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | selectattr('esxi_hostname', 'equalto', esxi1)
- | map(attribute='guest_name')
- | list
- | length == 1
-
-- name: Unregister VM from inventory
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- name: "{{ virtual_machines[0].name }}"
- state: absent
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | map(attribute='guest_name')
- | list
- | length == 0
-
-- name: Register VM in Cluster
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- cluster: "{{ ccr1 }}"
- name: "{{ virtual_machines[0].name }}"
- path: "{{ vm_vmx_file_path }}"
- state: present
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | selectattr('cluster', 'equalto', ccr1)
- | map(attribute='guest_name')
- | list
- | length == 1
-
-- name: Unregister VM from inventory
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- name: "{{ virtual_machines[0].name }}"
- state: absent
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | map(attribute='guest_name')
- | list
- | length == 0
-
-- name: Register VM in Resource pool
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- resource_pool: DC0_C0_RP1
- name: "{{ virtual_machines[0].name }}"
- path: "{{ vm_vmx_file_path }}"
- state: present
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | map(attribute='guest_name')
- | list
- | length == 1
-
-- name: Gather facts of vm
- vmware_guest_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- name: "{{ virtual_machines[0].name }}"
- register: vm_facts
-
-- name: Get a vm uuid
- set_fact: vm_uuid="{{ vm_facts.instance.hw_product_uuid }}"
-
-- name: Unregister VM from inventory with uuid parameter
- vmware_guest_register_operation:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder: "/vm"
- name: "{{ virtual_machines[0].name }}"
- uuid: "{{ vm_uuid }}"
- state: absent
-
-- name: Gather all registered virtual machines
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: vms
-
-- assert:
- that:
- - >-
- vms.virtual_machines
- | selectattr('guest_name', 'equalto', virtual_machines[0].name)
- | map(attribute='guest_name')
- | list
- | length == 0
diff --git a/test/integration/targets/vmware_guest_screenshot/aliases b/test/integration/targets/vmware_guest_screenshot/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_screenshot/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_screenshot/tasks/main.yml b/test/integration/targets/vmware_guest_screenshot/tasks/main.yml
deleted file mode 100644
index 30ccf6bfde..0000000000
--- a/test/integration/targets/vmware_guest_screenshot/tasks/main.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-# Test code for the vmware_guest_screenshot module
-# Copyright: (c) 2019, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: set VM state to powered on
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[0].folder }}"
- name: "{{ virtual_machines[0].name }}"
- state: poweredon
-
- - name: take screenshot of virtual machine's console
- vmware_guest_screenshot:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- register: take_screenshot
- - debug: var=take_screenshot
- - name: assert the screenshot captured
- assert:
- that:
- - "take_screenshot.changed == true"
-
- - name: take screenshot of virtual machine's console and download to local
- vmware_guest_screenshot:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- local_path: "/tmp/screenshot_test.png"
- datacenter: "{{ dc1 }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: take_screenshot
- - debug: var=take_screenshot
- - name: assert the screenshot captured
- assert:
- that:
- - "take_screenshot.changed == true"
diff --git a/test/integration/targets/vmware_guest_sendkey/aliases b/test/integration/targets/vmware_guest_sendkey/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_sendkey/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_sendkey/tasks/main.yml b/test/integration/targets/vmware_guest_sendkey/tasks/main.yml
deleted file mode 100644
index b23299223e..0000000000
--- a/test/integration/targets/vmware_guest_sendkey/tasks/main.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# Test code for the vmware_guest_sendkey module
-# Copyright: (c) 2017, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: set state to poweron the first VM
- vmware_guest_powerstate:
- validate_certs: no
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- folder: '{{ f0 }}'
- state: powered-on
-
- - name: send keys to virtual machine
- vmware_guest_sendkey:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- keys_send:
- - DOWNARROW
- - DOWNARROW
- - ENTER
- register: send_key
- - debug: var=send_key
- - name: assert the keys were sent to VM
- assert:
- that:
- - "send_key.changed == true"
-
- - name: send string to virtual machine
- vmware_guest_sendkey:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- string_send: "test-user"
- register: send_string
- - debug: var=send_string
- - name: assert the string was sent to VM
- assert:
- that:
- - "send_string.changed == true"
diff --git a/test/integration/targets/vmware_guest_serial_port/aliases b/test/integration/targets/vmware_guest_serial_port/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_serial_port/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_serial_port/tasks/main.yml b/test/integration/targets/vmware_guest_serial_port/tasks/main.yml
deleted file mode 100644
index 236176b3cb..0000000000
--- a/test/integration/targets/vmware_guest_serial_port/tasks/main.yml
+++ /dev/null
@@ -1,103 +0,0 @@
-# Test code for the vmware_guest_serial_port Operations.
-# Copyright: (c) 2019, Anusha Hegde <anushah@vmware.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_attach_host: true
- setup_datastore: true
-
-- name: Create VM
- vmware_guest:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: test_vm1
- guest_id: centos64Guest
- datacenter: "{{ dc1 }}"
- folder: "{{ f0 }}"
- hardware:
- num_cpus: 1
- memory_mb: 512
- disk:
- - size: 1gb
- type: thin
- datastore: "{{ rw_datastore }}"
- state: present
- register: create_vm_for_test
-
-- name: assert that changes were made
- assert:
- that:
- - create_vm_for_test is changed
-
-- name: Create multiple serial ports with Backing type - network, pipe, device and file
- vmware_guest_serial_port:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: "test_vm1"
- backings:
- - type: 'network'
- direction: 'client'
- service_uri: 'tcp://6000'
- yield_on_poll: True
- - type: 'pipe'
- pipe_name: 'serial_pipe'
- endpoint: 'client'
- - type: 'device'
- device_name: '/dev/char/serial/uart0'
- - type: 'file'
- file_path: '[{{ rw_datastore }}]/file1'
- yield_on_poll: True
- register: create_multiple_ports
-
-- debug: var=create_multiple_ports
-
-- name: assert that changes were made
- assert:
- that:
- - create_multiple_ports is changed
-
-- name: Modify existing serial port with Backing type - network
- vmware_guest_serial_port:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: 'test_vm1'
- backings:
- - type: 'network'
- state: 'present'
- direction: 'server'
- service_uri: 'tcp://6000'
- register: modify_network_port
-
-- debug: var=modify_network_port
-
-- name: assert that changes were made
- assert:
- that:
- - modify_network_port is changed
-
-- name: Remove serial port with Backing type - pipe
- vmware_guest_serial_port:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- name: 'test_vm1'
- backings:
- - type: 'pipe'
- state: 'absent'
- register: remove_pipe_port
-
-- debug: var=remove_pipe_port
-
-- name: assert that changes were made
- assert:
- that:
- - remove_pipe_port is changed
diff --git a/test/integration/targets/vmware_guest_snapshot/aliases b/test/integration/targets/vmware_guest_snapshot/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_snapshot/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_snapshot/tasks/main.yml b/test/integration/targets/vmware_guest_snapshot/tasks/main.yml
deleted file mode 100644
index 758a91da04..0000000000
--- a/test/integration/targets/vmware_guest_snapshot/tasks/main.yml
+++ /dev/null
@@ -1,178 +0,0 @@
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-# Test0001: Try to delete the non-existent snapshot
-- name: 0001 - Delete non-existent snapshot
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: absent
- snapshot_name: snap_a
-
-# Test0002: Create two snapshots
-- name: 0002 - Create snapshot
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: "snap_{{item}}"
- description: "snap named {{item}}"
- with_items:
- - a
- - b
-
-- when: vcsim is not defined
- block:
-# Test0003: Reanme a to c
- - name: 0003 - Rename snapshot
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap_a
- new_snapshot_name: snap_c
-
-# Test0004: Create snap_a again
-- name: 0004 - Re-create snapshot a
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap_a
- description: "snap named a"
-
-# Test0005: Change description of snap_c
-- name: 0005 - Change description of snap_c
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap_c
- new_description: "renamed to snap_c from snap_a"
-
-- when: vcsim is not defined
- block:
-# Test0006: Delete snap_b with child remove
- - name: 0006 - Delete snap_b with child remove
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: absent
- snapshot_name: snap_b
- remove_children: True
-
- # Test0007: Delete all snapshots
- - name: 0007 - Delete all snapshots
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: remove_all
-
-# Test0008: Create snap_a again and revert to it
-- name: 0008 - Re-create snapshot a
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap_a
- description: "snap named a"
-
-- when: vcsim is not defined
- block:
- - name: 0008 - Revert to snap_a
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: revert
- snapshot_name: snap_a
-
-# Test0009: Create snap_a and check in result
-- name: 0009 - create snapshot a
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- state: present
- snapshot_name: snap_a
- description: "snap named a"
- register: snapshot_details
-
-- debug: var=snapshot_details
-
-- name: Check if snapshot details available or not
- assert:
- that:
- - "snapshot_details['msg'] == 'Snapshot named [snap_a] already exists and is current.'"
-
-# Test0011: Failure sceanrios - when name and UUID is not specified
-- name: 0011 - name and UUID is missing
- vmware_guest_snapshot:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: "{{ dc1 }}"
- state: present
- snapshot_name: snap_a
- description: "snap named a"
- register: snapshot_failure_details
- ignore_errors: yes
-
-- name: Check if error is shown
- assert:
- that:
- - "'one of the following is required: name, uuid' in snapshot_failure_details['msg']"
- - "snapshot_failure_details.changed == false"
diff --git a/test/integration/targets/vmware_guest_snapshot_facts/aliases b/test/integration/targets/vmware_guest_snapshot_facts/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_snapshot_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml b/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml
deleted file mode 100644
index f8908675cf..0000000000
--- a/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Test code for the vmware_host_dns_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support snapshot related functionalities
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: Gather snapshot facts about given virtual machine
- vmware_guest_snapshot_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: vm_snapshot_facts
-
-- debug: var=vm_snapshot_facts
-
-- assert:
- that:
- - '"guest_snapshots" in vm_snapshot_facts'
diff --git a/test/integration/targets/vmware_guest_snapshot_info/aliases b/test/integration/targets/vmware_guest_snapshot_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_snapshot_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_snapshot_info/tasks/main.yml b/test/integration/targets/vmware_guest_snapshot_info/tasks/main.yml
deleted file mode 100644
index 81bc1fa10b..0000000000
--- a/test/integration/targets/vmware_guest_snapshot_info/tasks/main.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Test code for the vmware_host_dns_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support snapshot related functionalities
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- name: Gather snapshot info about given virtual machine
- vmware_guest_snapshot_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- name: "{{ virtual_machines[0].name }}"
- folder: "{{ virtual_machines[0].folder }}"
- register: vm_snapshot_info
-
-- debug: var=vm_snapshot_info
-
-- assert:
- that:
- - '"guest_snapshots" in vm_snapshot_info'
diff --git a/test/integration/targets/vmware_guest_tools_info/aliases b/test/integration/targets/vmware_guest_tools_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_guest_tools_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_guest_tools_info/tasks/main.yml b/test/integration/targets/vmware_guest_tools_info/tasks/main.yml
deleted file mode 100644
index 2302f13d99..0000000000
--- a/test/integration/targets/vmware_guest_tools_info/tasks/main.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-# Test code for the vmware_guest_tools_info module
-# Copyright: (c) 2019, Diane Wang (Tomorrow9) <dianew@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: get instance uuid of virtual machine
- vmware_guest_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- register: guest_info
- - debug: var=guest_info
-
- - name: get VMware tools info of virtual machine by instance uuid
- vmware_guest_tools_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- uuid: "{{ guest_info['instance']['instance_uuid'] }}"
- use_instance_uuid: True
- register: vmtools_info
- - debug: var=vmtools_info
- - name: assert VMware tools info returned
- assert:
- that:
- - "vmtools_info.vmtools_info.vm_tools_install_status != ''"
-
- - name: get VMware tools info of virtual machine by name
- vmware_guest_tools_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- datacenter: "{{ dc1 }}"
- register: vmtools_info
- - debug: var=vmtools_info
- - name: assert VMware tools info returned
- assert:
- that:
- - "vmtools_info.vmtools_info.vm_tools_install_status != ''" \ No newline at end of file
diff --git a/test/integration/targets/vmware_guest_tools_wait/aliases b/test/integration/targets/vmware_guest_tools_wait/aliases
deleted file mode 100644
index 316ccc9e4e..0000000000
--- a/test/integration/targets/vmware_guest_tools_wait/aliases
+++ /dev/null
@@ -1,6 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
-# the test fails randomly in the CI
-disabled
diff --git a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml b/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml
deleted file mode 100644
index 1c8e3ffc53..0000000000
--- a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Test code for the vmware_guest_tools_wait module.
-# Copyright: (c) 2017 Philippe Dellaert <philippe@dellaert.org>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_dvs_portgroup: true
- setup_dvswitch: true
-
- - name: Create VMs
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- folder: '/DC0/vm/F0'
- name: test_vm1
- state: poweredon
- guest_id: centos7_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- version: latest
- memory_mb: 1024
- num_cpus: 1
- scsi: paravirtual
- cdrom:
- type: iso
- iso_path: "[{{ ro_datastore }}] fedora.iso"
- networks:
- - name: VM Network
-
- - vmware_guest_tools_wait:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- timeout: 800
- validate_certs: no
- name: test_vm1
diff --git a/test/integration/targets/vmware_host/aliases b/test/integration/targets/vmware_host/aliases
deleted file mode 100644
index 7f95a0d344..0000000000
--- a/test/integration/targets/vmware_host/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_2esxi
diff --git a/test/integration/targets/vmware_host/tasks/main.yml b/test/integration/targets/vmware_host/tasks/main.yml
deleted file mode 100644
index ad9755d916..0000000000
--- a/test/integration/targets/vmware_host/tasks/main.yml
+++ /dev/null
@@ -1,179 +0,0 @@
-# Test code for the vmware_host module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-# Testcase: Add Host
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- # NOTE: prepare_vmware_tests should have already done that
- - name: Add first ESXi Host to vCenter
- vmware_host:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter_name: '{{ dc1 }}'
- cluster_name: '{{ ccr1 }}'
- esxi_hostname: '{{ esxi1 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- state: present
- validate_certs: no
- register: readd_host_result
-
- - name: Add first ESXi Host to vCenter (again)
- vmware_host:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter_name: '{{ dc1 }}'
- cluster_name: '{{ ccr1 }}'
- esxi_hostname: '{{ esxi1 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- state: present
- validate_certs: no
- register: readd_host_result
-
- - name: ensure precend task didn't changed anything
- assert:
- that:
- - not ( readd_host_result is changed)
-
- - name: add second host via add_or_reconnect
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- datacenter_name: "{{ dc1 }}"
- cluster_name: "{{ ccr1 }}"
- state: add_or_reconnect
- register: add_or_reconnect_host_result
- - name: ensure host system is present
- assert:
- that:
- - add_or_reconnect_host_result is changed
-
-- when: vcsim is not defined
- block:
- - name: disconnect host 2
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- datacenter_name: "{{ dc1 }}"
- cluster_name: "{{ ccr1 }}"
- fetch_ssl_thumbprint: False
- state: absent
-
- - name: remove host again
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- datacenter_name: "{{ dc1 }}"
- cluster_name: "{{ ccr1 }}"
- state: absent
- register: reremove_host_result
- - name: ensure precend task didn't changed anything
- assert:
- that:
- - not ( reremove_host_result is changed)
-
-
-## Testcase: Add Host to folder
-#
-# It's not possible to connect an ESXi host via vcsim.
-- when: vcsim is not defined
- block:
- - name: Create host folder
- vcenter_folder:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- folder_name: "Staging"
- folder_type: host
- state: present
- register: folder_results
-
- - debug: msg="{{ folder_results }}"
-
- - name: ensure folder is present
- assert:
- that:
- - folder_results.changed
-
- - name: Add host to folder in check mode
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- datacenter_name: "{{ dc1 }}"
- folder_name: "/{{ dc1 }}/host/Staging"
- state: present
- register: add_host_to_folder_result
- check_mode: yes
-
- - name: ensure host system is not present
- assert:
- that:
- - add_host_to_folder_result is changed
-
- - name: Add host to folder
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- datacenter_name: "{{ dc1 }}"
- folder_name: "/{{ dc1 }}/host/Staging"
- state: present
- register: add_host_to_folder_result
-
- - name: ensure host system is present
- assert:
- that:
- - add_host_to_folder_result is changed
-
- - name: reconnect host
- vmware_host:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi2 }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- datacenter_name: "{{ dc1 }}"
- cluster_name: "{{ ccr1 }}"
- state: reconnect
- register: reconnect_host_result
-
- - name: ensure host system has been reconnected
- assert:
- that:
- - reconnect_host_result is changed
- # it would be a good idea to check the events on the host to see the reconnect
- # https://github.com/vmware/govmomi/blob/master/govc/USAGE.md#events
- # "govc events ..." need to be callable from
- # https://github.com/ansible/vcenter-test-container/flask_control.py
diff --git a/test/integration/targets/vmware_host_acceptance/aliases b/test/integration/targets/vmware_host_acceptance/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_host_acceptance/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_acceptance/tasks/main.yml b/test/integration/targets/vmware_host_acceptance/tasks/main.yml
deleted file mode 100644
index c4f96ee88c..0000000000
--- a/test/integration/targets/vmware_host_acceptance/tasks/main.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-# Test code for the vmware_host_acceptance module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
-
- - name: Change acceptance level of given hosts
- vmware_host_acceptance:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- acceptance_level: community
- state: present
- register: host_acceptance_info
- - debug: var=host_acceptance_info
- - assert:
- that:
- - host_acceptance_info.facts is defined
-
- - name: Change acceptance level of given hosts in check mode
- vmware_host_acceptance:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- acceptance_level: community
- state: present
- register: host_acceptance_info_check_mode
- check_mode: yes
- - debug: var=host_acceptance_info_check_mode
- - assert:
- that:
- - host_acceptance_info_check_mode.facts is defined
diff --git a/test/integration/targets/vmware_host_active_directory/aliases b/test/integration/targets/vmware_host_active_directory/aliases
deleted file mode 100644
index 3eede2cbf0..0000000000
--- a/test/integration/targets/vmware_host_active_directory/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
diff --git a/test/integration/targets/vmware_host_active_directory/tasks/main.yml b/test/integration/targets/vmware_host_active_directory/tasks/main.yml
deleted file mode 100644
index 75be9c6d36..0000000000
--- a/test/integration/targets/vmware_host_active_directory/tasks/main.yml
+++ /dev/null
@@ -1,87 +0,0 @@
-# Test code for the vmware_host_active_directory module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Active Directory domain isn't available
-
-- when:
- - vcsim is not defined
- - active_directory_domain is defined
- block:
- - name: Join an AD domain in check mode
- vmware_host_active_directory:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ad_domain: '{{ active_directory_domain }}'
- ad_user: '{{ active_directory_user }}'
- ad_password: '{{ active_directory_password }}'
- ad_state: present
- validate_certs: no
- register: host_active_directory_info_check_mode
- check_mode: yes
-
- - debug: var=host_active_directory_info_check_mode
-
- - assert:
- that:
- - host_active_directory_info_check_mode is defined
- - host_active_directory_info_check_mode.changed
-
- - name: Join an AD domain
- vmware_host_active_directory:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ad_domain: example.local
- ad_user: adjoin
- ad_password: Password123$
- ad_state: present
- validate_certs: no
- register: host_active_directory_info
- ignore_errors: true
-
- - debug: var=host_active_directory_info
-
- - assert:
- that:
- - host_active_directory_info is defined
- - host_active_directory_info.changed
-
- - name: Leave AD domain in check mode
- vmware_host_active_directory:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ad_state: absent
- validate_certs: no
- register: host_active_directory_info_2_check_mode
- check_mode: yes
-
- - debug: var=host_active_directory_info_2_check_mode
-
- - assert:
- that:
- - host_active_directory_info_2_check_mode is defined
- - host_active_directory_info_2_check_mode.changed
-
- - name: Leave AD domain
- vmware_host_active_directory:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ad_state: absent
- validate_certs: no
- register: host_active_directory_info_2
- ignore_errors: true
-
- - debug: var=host_active_directory_info_2
-
- - assert:
- that:
- - host_active_directory_info_2 is defined
- - host_active_directory_info_2.changed
diff --git a/test/integration/targets/vmware_host_auto_start/aliases b/test/integration/targets/vmware_host_auto_start/aliases
deleted file mode 100644
index 5b4d23c89c..0000000000
--- a/test/integration/targets/vmware_host_auto_start/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-cloud/vcenter
-skip/python2.6
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_auto_start/tasks/esxi_auto_start_ops.yml b/test/integration/targets/vmware_host_auto_start/tasks/esxi_auto_start_ops.yml
deleted file mode 100644
index 409de97e67..0000000000
--- a/test/integration/targets/vmware_host_auto_start/tasks/esxi_auto_start_ops.yml
+++ /dev/null
@@ -1,368 +0,0 @@
-# Test code for the vmware_vmware_host_auto_start.
-# Copyright: (c) 2019, sky-joker <sky.jokerxx@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-
-- name: Update enabled param of autoStart defaults parameters for ESXi.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- system_defaults:
- enabled: yes
- register: changed_system_defaults_result
-
-- name: Check return parameters.
- assert:
- that:
- - changed_system_defaults_result.system_defaults_config.enabled is sameas true
- - changed_system_defaults_result.system_defaults_config.start_delay == 120
- - changed_system_defaults_result.system_defaults_config.stop_action == 'powerOff'
- - changed_system_defaults_result.system_defaults_config.start_delay == 120
- - changed_system_defaults_result.system_defaults_config.wait_for_heartbeat is sameas false
-
-- name: Gather facts for autoStart defaults parameters from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check system default parameters.
- assert:
- that:
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.enabled is sameas true
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.startDelay == 120
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopAction == 'powerOff'
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopDelay == 120
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.waitForHeartbeat is sameas false
-
-- name: Update all param of autoStart defaults parameters for ESXi.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- system_defaults:
- enabled: yes
- start_delay: 200
- stop_action: guestShutdown
- stop_delay: 300
- wait_for_heartbeat: yes
-
-- name: Gather facts for autoStart defaults parameters from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check system default parameters.
- assert:
- that:
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.enabled is sameas true
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.startDelay == 200
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopAction == 'guestShutdown'
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopDelay == 300
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.waitForHeartbeat is sameas true
-
-- name: Gather facts summary propertie from VM.
- vmware_guest_info:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- datacenter: ha-datacenter
- name: test_vm1
- schema: vsphere
- properties:
- - summary.vm
- register: vm_summary_result
-
-- name: Update start_action parameters of autoStart powerInfo parameters for VM.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm1
- power_info:
- start_action: powerOn
- register: changed_vm_power_info_result
-
-- name: Check return parameters.
- assert:
- that:
- - changed_vm_power_info_result.power_info_config.start_action == 'powerOn'
- - changed_vm_power_info_result.power_info_config.start_delay == -1
- - changed_vm_power_info_result.power_info_config.start_order == -1
- - changed_vm_power_info_result.power_info_config.stop_action == 'systemDefault'
- - changed_vm_power_info_result.power_info_config.stop_delay == -1
- - changed_vm_power_info_result.power_info_config.wait_for_heartbeat == 'systemDefault'
-
-- name: Gather facts for autoStart config of VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check VM powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == -1
- - item.startOrder == -1
- - item.stopAction == 'systemDefault'
- - item.stopDelay == -1
- - item.waitForHeartbeat == 'systemDefault'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Update all parameters of autoStart powerInfo parameters for VM.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm1
- power_info:
- start_action: powerOn
- start_delay: 200
- start_order: 1
- stop_action: suspend
- stop_delay: 250
- wait_for_heartbeat: "yes"
-
-- name: Gather facts for autoStart config of VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 200
- - item.startOrder == 1
- - item.stopAction == 'suspend'
- - item.stopDelay == 250
- - item.waitForHeartbeat == 'yes'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Gather facts summary propertie from VM.
- vmware_guest_info:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- datacenter: ha-datacenter
- name: test_vm2
- schema: vsphere
- properties:
- - summary.vm
- register: vm_summary_result
-
-- name: Update all parameters of autoStart powerInfo parameters for other VM.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm2
- power_info:
- start_action: powerOn
- start_delay: 100
- start_order: 2
- stop_action: suspend
- stop_delay: 20
- wait_for_heartbeat: "no"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 100
- - item.startOrder == 2
- - item.stopAction == 'suspend'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Check the operation of check_mode and diff.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm2
- power_info:
- start_action: powerOn
- start_delay: 100
- start_order: -1
- stop_action: suspend
- stop_delay: 20
- check_mode: yes
- diff: yes
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 100
- - item.startOrder == 2
- - item.stopAction == 'suspend'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Gather facts instanceUuid and moid propertie from VM.
- vmware_guest_info:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- name: test_vm2
- schema: vsphere
- properties:
- - config.instanceUuid
- - _moId
- register: vm_instanceUuid_and_moid_result
-
-- name: Update all parameters of autoStart powerInfo parameters for VM using instanceUuid via vCenter.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- uuid: "{{ vm_instanceUuid_and_moid_result.instance.config.instanceUuid }}"
- use_instance_uuid: yes
- power_info:
- start_action: powerOn
- start_delay: 300
- start_order: 1
- stop_action: none
- stop_delay: 20
- wait_for_heartbeat: "no"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 300
- - item.startOrder == 1
- - item.stopAction == 'none'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Update all parameters of autoStart powerInfo parameters for VM using moid via vCenter.
- vmware_host_auto_start:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- moid: "{{ vm_instanceUuid_and_moid_result.instance._moId }}"
- power_info:
- start_action: powerOn
- start_delay: 200
- start_order: 1
- stop_action: powerOff
- stop_delay: 300
- wait_for_heartbeat: "yes"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 200
- - item.startOrder == 1
- - item.stopAction == 'powerOff'
- - item.stopDelay == 300
- - item.waitForHeartbeat == 'yes'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
diff --git a/test/integration/targets/vmware_host_auto_start/tasks/main.yml b/test/integration/targets/vmware_host_auto_start/tasks/main.yml
deleted file mode 100644
index 54b96e3c16..0000000000
--- a/test/integration/targets/vmware_host_auto_start/tasks/main.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-# Test code for the vmware_host_auto_start Operations.
-# Copyright: (c) 2019, sky-joker <sky.jokerxx@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
-
- - name: Move the ESXi hosts out of the cluster
- vmware_host:
- datacenter_name: '{{ dc1 }}'
- esxi_hostname: '{{ item }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- folder: '/DC0/host'
- state: present
- with_items: "{{ esxi_hosts }}"
-
- - name: Disable the Maintenance Mode
- vmware_maintenancemode:
- esxi_hostname: '{{ item }}'
- state: absent
- with_items: "{{ esxi_hosts }}"
-
- - name: Create VM on esxi1
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: '{{ item }}'
- folder: vm
- esxi_hostname: "{{ esxi1 }}"
- state: present
- guest_id: centos7_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- version: latest
- memory_mb: 1024
- num_cpus: 1
- scsi: paravirtual
- with_items: ['test_vm1', 'test_vm2']
-
- - include_tasks: reset_auto_start_config.yml
- - include: vcenter_auto_start_ops.yml
- - include_tasks: reset_auto_start_config.yml
- - include: esxi_auto_start_ops.yml
- always:
- - include_tasks: reset_auto_start_config.yml
diff --git a/test/integration/targets/vmware_host_auto_start/tasks/reset_auto_start_config.yml b/test/integration/targets/vmware_host_auto_start/tasks/reset_auto_start_config.yml
deleted file mode 100644
index 7455408978..0000000000
--- a/test/integration/targets/vmware_host_auto_start/tasks/reset_auto_start_config.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# Test code for the vmware_host_auto_start Operations.
-# Copyright: (c) 2019, sky-joker <sky.jokerxx@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: "Reset powerInfo for autoStart parameters of {{ test_vm1 }}."
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm1
- power_info:
- start_action: none
-
-- name: "Reset powerInfo for autoStart parameters of {{ test_vm2 }}"
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm2
- power_info:
- start_action: none
-
-- name: Reset autoStart defaults parameters.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- system_defaults:
- enabled: no
diff --git a/test/integration/targets/vmware_host_auto_start/tasks/vcenter_auto_start_ops.yml b/test/integration/targets/vmware_host_auto_start/tasks/vcenter_auto_start_ops.yml
deleted file mode 100644
index 1936c11873..0000000000
--- a/test/integration/targets/vmware_host_auto_start/tasks/vcenter_auto_start_ops.yml
+++ /dev/null
@@ -1,367 +0,0 @@
-# Test code for the vmware_vmware_host_auto_start.
-# Copyright: (c) 2019, sky-joker <sky.jokerxx@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- name: Update enabled param of autoStart defaults parameters for ESXi via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- system_defaults:
- enabled: yes
- register: changed_system_defaults_result
-
-- name: Check return parameters.
- assert:
- that:
- - changed_system_defaults_result.system_defaults_config.enabled is sameas true
- - changed_system_defaults_result.system_defaults_config.start_delay == 120
- - changed_system_defaults_result.system_defaults_config.stop_action == 'powerOff'
- - changed_system_defaults_result.system_defaults_config.start_delay == 120
- - changed_system_defaults_result.system_defaults_config.wait_for_heartbeat is sameas false
-
-- name: Gather facts for autoStart defaults parameters from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check system default parameters.
- assert:
- that:
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.enabled is sameas true
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.startDelay == 120
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopAction == 'powerOff'
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopDelay == 120
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.waitForHeartbeat is sameas false
-
-- name: Update all param of autoStart defaults parameters for ESXi via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- system_defaults:
- enabled: yes
- start_delay: 200
- stop_action: guestShutdown
- stop_delay: 300
- wait_for_heartbeat: yes
-
-- name: Gather facts for autoStart defaults parameters from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check system default parameters.
- assert:
- that:
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.enabled is sameas true
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.startDelay == 200
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopAction == 'guestShutdown'
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.stopDelay == 300
- - auto_start_defaults_result.ansible_facts.config.autoStart.defaults.waitForHeartbeat is sameas true
-
-- name: Gather facts summary propertie from VM.
- vmware_guest_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- name: test_vm1
- schema: vsphere
- properties:
- - summary.vm
- register: vm_summary_result
-
-- name: Update start_action parameters of autoStart powerInfo parameters for VM via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm1
- power_info:
- start_action: powerOn
- register: changed_vm_power_info_result
-
-- name: Check return parameters.
- assert:
- that:
- - changed_vm_power_info_result.power_info_config.start_action == 'powerOn'
- - changed_vm_power_info_result.power_info_config.start_delay == -1
- - changed_vm_power_info_result.power_info_config.start_order == -1
- - changed_vm_power_info_result.power_info_config.stop_action == 'systemDefault'
- - changed_vm_power_info_result.power_info_config.stop_delay == -1
- - changed_vm_power_info_result.power_info_config.wait_for_heartbeat == 'systemDefault'
-
-- name: Gather facts for autoStart config of VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check VM powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == -1
- - item.startOrder == -1
- - item.stopAction == 'systemDefault'
- - item.stopDelay == -1
- - item.waitForHeartbeat == 'systemDefault'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Update all parameters of autoStart powerInfo parameters for VM via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm1
- power_info:
- start_action: powerOn
- start_delay: 200
- start_order: 1
- stop_action: suspend
- stop_delay: 250
- wait_for_heartbeat: "yes"
-
-- name: Gather facts for autoStart config of VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 200
- - item.startOrder == 1
- - item.stopAction == 'suspend'
- - item.stopDelay == 250
- - item.waitForHeartbeat == 'yes'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Gather facts summary propertie from VM.
- vmware_guest_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- name: test_vm2
- schema: vsphere
- properties:
- - summary.vm
- register: vm_summary_result
-
-- name: Update all parameters of autoStart powerInfo parameters for other VM via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm2
- power_info:
- start_action: powerOn
- start_delay: 100
- start_order: 2
- stop_action: suspend
- stop_delay: 20
- wait_for_heartbeat: "no"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 100
- - item.startOrder == 2
- - item.stopAction == 'suspend'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Check the operation of check_mode and diff.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- name: test_vm2
- power_info:
- start_action: powerOn
- start_delay: 100
- start_order: -1
- stop_action: suspend
- stop_delay: 20
- check_mode: yes
- diff: yes
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 100
- - item.startOrder == 2
- - item.stopAction == 'suspend'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Gather facts instanceUuid and moid propertie from VM.
- vmware_guest_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- datacenter: "{{ dc1 }}"
- name: test_vm2
- schema: vsphere
- properties:
- - config.instanceUuid
- - _moId
- register: vm_instanceUuid_and_moid_result
-
-- name: Update all parameters of autoStart powerInfo parameters for VM using instanceUuid via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- uuid: "{{ vm_instanceUuid_and_moid_result.instance.config.instanceUuid }}"
- use_instance_uuid: yes
- power_info:
- start_action: powerOn
- start_delay: 300
- start_order: 1
- stop_action: none
- stop_delay: 20
- wait_for_heartbeat: "no"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 300
- - item.startOrder == 1
- - item.stopAction == 'none'
- - item.stopDelay == 20
- - item.waitForHeartbeat == 'no'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
-
-- name: Update all parameters of autoStart powerInfo parameters for VM using moid via vCenter.
- vmware_host_auto_start:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- moid: "{{ vm_instanceUuid_and_moid_result.instance._moId }}"
- power_info:
- start_action: powerOn
- start_delay: 200
- start_order: 1
- stop_action: powerOff
- stop_delay: 300
- wait_for_heartbeat: "yes"
-
-- name: Gather facts for autoStart config of other VM from ESXi.
- vmware_host_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- schema: vsphere
- properties:
- - config.autoStart
- register: auto_start_defaults_result
-
-- name: After update parameters, check other VM all powerInfo parameters.
- assert:
- that:
- - item.startAction == 'powerOn'
- - item.startDelay == 200
- - item.startOrder == 1
- - item.stopAction == 'powerOff'
- - item.stopDelay == 300
- - item.waitForHeartbeat == 'yes'
- when: item.key == vm_summary_result.instance.summary.vm
- loop: "{{ auto_start_defaults_result.ansible_facts.config.autoStart.powerInfo }}"
diff --git a/test/integration/targets/vmware_host_capability_facts/aliases b/test/integration/targets/vmware_host_capability_facts/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_host_capability_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_capability_facts/tasks/main.yml b/test/integration/targets/vmware_host_capability_facts/tasks/main.yml
deleted file mode 100644
index 3b13971ca0..0000000000
--- a/test/integration/targets/vmware_host_capability_facts/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_host_capability_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support host system capabilities
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather capability facts for all ESXi host from given cluster
- vmware_host_capability_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
- - assert:
- that:
- - not (capability_0001_results is changed)
- - capability_0001_results.hosts_capability_facts is defined
-
- - name: Gather capability facts for ESXi host
- vmware_host_capability_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
- - assert:
- that:
- - not (capability_0002_results is changed)
- - capability_0002_results.hosts_capability_facts is defined
diff --git a/test/integration/targets/vmware_host_capability_info/aliases b/test/integration/targets/vmware_host_capability_info/aliases
deleted file mode 100644
index 62871ab8f0..0000000000
--- a/test/integration/targets/vmware_host_capability_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group1
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_capability_info/tasks/main.yml b/test/integration/targets/vmware_host_capability_info/tasks/main.yml
deleted file mode 100644
index 14a270156a..0000000000
--- a/test/integration/targets/vmware_host_capability_info/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_host_capability_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support host system capabilities
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather capability info for all ESXi host from given cluster
- vmware_host_capability_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
- - assert:
- that:
- - not (capability_0001_results is changed)
- - capability_0001_results.hosts_capability_info is defined
-
- - name: Gather capability info for ESXi host
- vmware_host_capability_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
- - assert:
- that:
- - not (capability_0002_results is changed)
- - capability_0002_results.hosts_capability_info is defined
diff --git a/test/integration/targets/vmware_host_config_facts/aliases b/test/integration/targets/vmware_host_config_facts/aliases
deleted file mode 100644
index dea29ccd8b..0000000000
--- a/test/integration/targets/vmware_host_config_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group1
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_config_facts/tasks/main.yml b/test/integration/targets/vmware_host_config_facts/tasks/main.yml
deleted file mode 100644
index ce1e059995..0000000000
--- a/test/integration/targets/vmware_host_config_facts/tasks/main.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-# Test code for the vmware_host_config_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-- name: gather facts about all hosts in given cluster
- vmware_host_config_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: all_hosts_result
-
-- debug:
- var: all_hosts_result
-
-- name: ensure facts are gathered for all hosts
- assert:
- that:
- - all_hosts_result.hosts_facts
-
-- name: gather facts about all hosts in given cluster in check mode
- vmware_host_config_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: all_hosts_result_check_mode
- check_mode: yes
-
-- name: ensure facts are gathered for all hosts
- assert:
- that:
- - all_hosts_result_check_mode.hosts_facts
-
-- when: vcsim is not defined
- block:
- - name: gather facts about a given host in check mode
- vmware_host_config_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- register: single_hosts_result_check_mode
- check_mode: yes
- - name: ensure facts are gathered for all hosts
- assert:
- that:
- - single_hosts_result_check_mode.hosts_facts
-
- - name: gather facts about a given host
- vmware_host_config_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- register: single_hosts_result
- - name: ensure facts are gathered for all hosts
- assert:
- that:
- - single_hosts_result.hosts_facts
diff --git a/test/integration/targets/vmware_host_config_info/aliases b/test/integration/targets/vmware_host_config_info/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_host_config_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_config_info/tasks/main.yml b/test/integration/targets/vmware_host_config_info/tasks/main.yml
deleted file mode 100644
index 061ab8c5d5..0000000000
--- a/test/integration/targets/vmware_host_config_info/tasks/main.yml
+++ /dev/null
@@ -1,68 +0,0 @@
-# Test code for the vmware_host_config_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-- name: gather info about all hosts in given cluster
- vmware_host_config_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: all_hosts_result
-
-- debug:
- var: all_hosts_result
-
-- name: ensure info are gathered for all hosts
- assert:
- that:
- - all_hosts_result.hosts_info
-
-- name: gather info about all hosts in given cluster in check mode
- vmware_host_config_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: all_hosts_result_check_mode
- check_mode: yes
-
-- name: ensure info are gathered for all hosts
- assert:
- that:
- - all_hosts_result_check_mode.hosts_info
-
-- when: vcsim is not defined
- block:
- - name: gather info about a given host in check mode
- vmware_host_config_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- register: single_hosts_result_check_mode
- check_mode: yes
- - name: ensure info are gathered for all hosts
- assert:
- that:
- - single_hosts_result_check_mode.hosts_info
-
- - name: gather info about a given host
- vmware_host_config_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- register: single_hosts_result
- - name: ensure info are gathered for all hosts
- assert:
- that:
- - single_hosts_result.hosts_info
diff --git a/test/integration/targets/vmware_host_config_manager/aliases b/test/integration/targets/vmware_host_config_manager/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_config_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_config_manager/tasks/main.yml b/test/integration/targets/vmware_host_config_manager/tasks/main.yml
deleted file mode 100644
index 2be119de92..0000000000
--- a/test/integration/targets/vmware_host_config_manager/tasks/main.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-# Test code for the vmware_host_config_manager module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-- name: Change an invalid key
- vmware_host_config_manager:
- validate_certs: no
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- options:
- 'This.Is.No.Where': 'verbose'
- failed_when: False
- register: invalid_key
-- debug: var=invalid_key
-- name: ensure we raise the correct error
- assert:
- that:
- - '"Unsupported option This.Is.No.Where" in invalid_key.msg'
-
-# TODO: vcsim does not support update host configuartion
-- when: vcsim is not defined
- block:
- - name: Change info about all hosts in given cluster
- vmware_host_config_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- options:
- 'Config.HostAgent.log.level': 'verbose'
- validate_certs: no
-
- - name: Change info about a given host
- vmware_host_config_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- options:
- 'Config.HostAgent.log.level': 'info'
- validate_certs: no
- register: host_result
-
- - debug: var=host_result
-
- - name: ensure change was applied
- assert:
- that:
- - host_result is changed
-
- - name: Change info about all hosts in given cluster in check mode
- vmware_host_config_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- options:
- 'Config.HostAgent.log.level': 'verbose'
- validate_certs: no
- register: all_hosts_result_check_mode
- check_mode: yes
-
- - name: ensure changes are done to all hosts
- assert:
- that:
- - all_hosts_result_check_mode.changed
-
- - name: Change info about a given host in check mode
- vmware_host_config_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- options:
- 'Config.HostAgent.log.level': 'info'
- validate_certs: no
- register: host_result_check_mode
- check_mode: yes
-
- - name: ensure changes are done to given hosts
- assert:
- that:
- - all_hosts_result_check_mode.changed
diff --git a/test/integration/targets/vmware_host_datastore/aliases b/test/integration/targets/vmware_host_datastore/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_datastore/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_datastore/tasks/main.yml b/test/integration/targets/vmware_host_datastore/tasks/main.yml
deleted file mode 100644
index b4eda3bdb3..0000000000
--- a/test/integration/targets/vmware_host_datastore/tasks/main.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Mount NFS (ro_datastore) datastores without esxi_hostname
- vmware_host_datastore:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datastore_name: '{{ ro_datastore }}'
- datastore_type: '{{ infra.datastores[ro_datastore].type }}'
- nfs_server: '{{ infra.datastores[ro_datastore].server }}'
- nfs_path: '{{ infra.datastores[ro_datastore].path }}'
- nfs_ro: '{{ infra.datastores[ro_datastore].ro }}'
- state: present
- validate_certs: no
- ignore_errors: true
- register: mount_vmware_host_datastore
- - debug: var=mount_vmware_host_datastore
- - assert:
- that:
- - mount_vmware_host_datastore is failed
- - mount_vmware_host_datastore.msg == "esxi_hostname is mandatory with a vcenter"
-
- - name: Mount NFS (ro_datastore) datastores with non existing host in esxi_hostname
- vmware_host_datastore:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: 'nohost'
- datastore_name: '{{ ro_datastore }}'
- datastore_type: '{{ infra.datastores[ro_datastore].type }}'
- nfs_server: '{{ infra.datastores[ro_datastore].server }}'
- nfs_path: '{{ infra.datastores[ro_datastore].path }}'
- nfs_ro: '{{ infra.datastores[ro_datastore].ro }}'
- state: present
- validate_certs: no
- ignore_errors: true
- register: mount_vmware_host_datastore
- - debug: var=mount_vmware_host_datastore
- - assert:
- that:
- - mount_vmware_host_datastore is failed
- - mount_vmware_host_datastore.msg == "Failed to find ESXi hostname nohost"
-
- - name: Mount NFS (ro_datastore) datastores on esxi1 using esxi_hostname
- vmware_host_datastore:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- datastore_name: '{{ ro_datastore }}'
- datastore_type: '{{ infra.datastores[ro_datastore].type }}'
- nfs_server: '{{ infra.datastores[ro_datastore].server }}'
- nfs_path: '{{ infra.datastores[ro_datastore].path }}'
- nfs_ro: '{{ infra.datastores[ro_datastore].ro }}'
- state: present
- validate_certs: no
- register: mount_vmware_host_datastore
- - debug: var=mount_vmware_host_datastore
- - assert:
- that:
- - mount_vmware_host_datastore is changed
-
- - name: Mount NFS (ro_datastore) datastores to ESXi directly
- vmware_host_datastore:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- datastore_name: '{{ ro_datastore }}'
- datastore_type: '{{ infra.datastores[ro_datastore].type }}'
- nfs_server: '{{ infra.datastores[ro_datastore].server }}'
- nfs_path: '{{ infra.datastores[ro_datastore].path }}'
- nfs_ro: '{{ infra.datastores[ro_datastore].ro }}'
- state: present
- validate_certs: no
- register: mount_vmware_host_datastore
- - debug: var=mount_vmware_host_datastore
- - assert:
- that:
- - not (mount_vmware_host_datastore is changed)
diff --git a/test/integration/targets/vmware_host_dns/aliases b/test/integration/targets/vmware_host_dns/aliases
deleted file mode 100644
index 0c2e2cb9bd..0000000000
--- a/test/integration/targets/vmware_host_dns/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
diff --git a/test/integration/targets/vmware_host_dns/tasks/dhcp.yml b/test/integration/targets/vmware_host_dns/tasks/dhcp.yml
deleted file mode 100644
index 627580fca9..0000000000
--- a/test/integration/targets/vmware_host_dns/tasks/dhcp.yml
+++ /dev/null
@@ -1,303 +0,0 @@
-- name: Tests when the hosts have a DHCP DNS config
- block:
- # Testcase 0001: Ensure DNS config directly on the host is idempotent for DHCP
- - name: Ensure DHCP config is idempotent when done directly on the host
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'dhcp'
- device: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['virtual_nic_device'] }}"
- register: vmware_host_dns_result_0001
-
- - name: Ensure DNS config wasn't changed
- assert:
- that:
- - vmware_host_dns_result_0001 is not changed
-
- # Testcase 0002: Change DNS config directly on the host from DHCP to static
- - name: Change DNS config from DHCP to static directly on the host
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['host_name'] }}"
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0002
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0002 is changed
-
- # Testcase 0003: Ensure DNS config directly on the host is idempotent for static
- - name: Ensure static DNS config is idempotent when done directly on the host
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['host_name'] }}"
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0003
-
- - name: Ensure DNS config wasn't changed
- assert:
- that:
- - vmware_host_dns_result_0003 is not changed
-
- # Testcase 0004: Ensure changing the hostname directly on the host works
- - name: Ensure changing the hostname directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0004
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0004 is changed
-
- # Testcase 0005: Ensure changing the domain directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0005
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0005 is changed
-
- # Testcase 0006: Ensure changing the DNS servers directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0006
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0006 is changed
-
- # Testcase 0007: Ensure changing the search domain directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains:
- - subdomain.example.local
- - example.local
- register: vmware_host_dns_result_0007
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0007 is changed
-
- # Testcase 0008: Change DNS config directly on the host from static to DHCP
- - name: Change DNS config from static to DHCP directly on the host
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'dhcp'
- device: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['virtual_nic_device'] }}"
- register: vmware_host_dns_result_0008
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0008 is changed
-
- # Testcase 0009: Ensure DNS config on the cluster is idempotent for DHCP
- - name: Ensure DHCP config is idempotent when done on the cluster
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'dhcp'
- device: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['virtual_nic_device'] }}"
- register: vmware_host_dns_result_0009
-
- - name: Ensure DNS config wasn't changed
- assert:
- that:
- - vmware_host_dns_result_0009 is not changed
-
- # Testcase 0010: Ensure changing DNS config on the cluster from DHCP to static works
- - name: Ensure changing DNS config on the cluster from DHCP to static works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0010
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0010 is changed
-
- # Testcase 0011: Ensure DNS config on the cluster is idempotent for static
- - name: Ensure static DNS config is idempotent when done on the cluster
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0011
-
- - name: Ensure DNS config wasn't changed
- assert:
- that:
- - vmware_host_dns_result_0011 is not changed
-
- # Testcase 0012: Ensure changing the domain on the cluster works
- - name: Ensure changing the domain on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0012
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0012 is changed
-
- # Testcase 0013: Ensure changing the DNS servers on the cluster works
- - name: Ensure changing the DNS servers on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0013
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0013 is changed
-
- # Testcase 0014: Ensure changing the search domains on the cluster works
- - name: Ensure changing the search domains on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains:
- - subdomain.example.local
- - example.local
- register: vmware_host_dns_result_0014
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0014 is changed
-
- # Testcase 0015: Ensure changing DNS config on the cluster from static to DHCP works
- - name: Ensure changing DNS config on the cluster from static to DHCP works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'dhcp'
- device: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['virtual_nic_device'] }}"
- register: vmware_host_dns_result_0015
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0015 is changed
-
- always:
- # Revert to original DNS configuration
- - name: Revert to original DNS configuration
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- esxi_hostname: "{{ item }}"
- validate_certs: False
- type: 'dhcp'
- device: "{{ dns['results'][index]['hosts_dns_info'][esxi1]['virtual_nic_device'] }}"
- loop: "{{ esxi_hosts }}"
- loop_control:
- index_var: index
diff --git a/test/integration/targets/vmware_host_dns/tasks/main.yml b/test/integration/targets/vmware_host_dns/tasks/main.yml
deleted file mode 100644
index 2c247c515d..0000000000
--- a/test/integration/targets/vmware_host_dns/tasks/main.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Test code for the vmware_host_dns module.
-# Copyright: (c) 2019, Mario Lenz <m@riolenz.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# This tests assume that all ESXi hosts either have a static or a dynamic DNS
-# configuration. They probably will fail if on host is 'static' and the other
-# is 'dhcp' configured.
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather DNS facts about ESXi Host
- vmware_host_dns_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- esxi_hostname: "{{ item }}"
- validate_certs: False
- loop: "{{ esxi_hosts }}"
- register: dns
-
- - include_tasks: dhcp.yml
- when: dns['results'][0]['hosts_dns_info'][esxi1]['dhcp']
- - include_tasks: static.yml
- when: not dns['results'][0]['hosts_dns_info'][esxi1]['dhcp']
diff --git a/test/integration/targets/vmware_host_dns/tasks/static.yml b/test/integration/targets/vmware_host_dns/tasks/static.yml
deleted file mode 100644
index e69f50ac11..0000000000
--- a/test/integration/targets/vmware_host_dns/tasks/static.yml
+++ /dev/null
@@ -1,225 +0,0 @@
-- name: Tests when the hosts have a static DNS config
- block:
- # Testcase 0001: Ensure DNS config directly on the host is idempotent for static
- - name: Ensure static DNS config is idempotent when done directly on the host
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['host_name'] }}"
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0001
-
- - name: Ensure DNS config wasn't changed
- assert:
- that:
- - vmware_host_dns_result_0001 is not changed
-
- # Testcase 0002: Ensure changing the hostname directly on the host works
- - name: Ensure changing the hostname directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0002
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0002 is changed
-
- # Testcase 0003: Ensure changing the domain directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0003
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0003 is changed
-
- # Testcase 0004: Ensure changing the DNS servers directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0004
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0004 is changed
-
- # Testcase 0005: Ensure changing the search domain directly on the host works
- - name: Ensure changing the domain directly on the host works
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: newname
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains:
- - subdomain.example.local
- - example.local
- register: vmware_host_dns_result_0005
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0005 is changed
-
- # Revert to original DNS configuration with a different search_domains
- - name: Revert to original DNS configuration
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['host_name'] }}"
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
-
- # Testcase 0006: Ensure DNS config on the cluster is idempotent for static
- - name: Apply configuration on a cluster
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- search_domains: "different-search-domain"
- register: vmware_host_dns_result_0006
-
- - name: Ensure configuration has changed
- assert:
- that:
- - vmware_host_dns_result_0006 is changed
-
- - name: Revert to original DNS configuration
- vmware_host_dns:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['host_name'] }}"
- domain: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['domain_name'] }}"
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
-
- # Testcase 0007: Ensure changing the domain on the cluster works
- - name: Ensure changing the domain on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['ip_address'] }}"
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0007
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0007 is changed
-
- # Testcase 0008: Ensure changing the DNS servers on the cluster works
- - name: Ensure changing the DNS servers on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains: "{{ dns['results'][0]['hosts_dns_info'][esxi1]['search_domain'] }}"
- register: vmware_host_dns_result_0008
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0008 is changed
-
- # Testcase 0009: Ensure changing the search domains on the cluster works
- - name: Ensure changing the search domains on the cluster works
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- type: 'static'
- domain: new.domain
- dns_servers:
- - 1.2.3.4
- - 5.6.7.8
- search_domains:
- - subdomain.example.local
- - example.local
- register: vmware_host_dns_result_0009
-
- - name: Ensure DNS config was changed
- assert:
- that:
- - vmware_host_dns_result_0009 is changed
-
- always:
- # Revert to original DNS configuration
- - name: Revert to original DNS configuration
- vmware_host_dns:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- esxi_hostname: "{{ item }}"
- validate_certs: False
- type: 'static'
- host_name: "{{ dns['results'][index]['hosts_dns_info'][item]['host_name'] }}"
- domain: "{{ dns['results'][index]['hosts_dns_info'][item]['domain_name'] }}"
- dns_servers: "{{ dns['results'][index]['hosts_dns_info'][item]['ip_address'] }}"
- search_domains: "{{ dns['results'][index]['hosts_dns_info'][item]['search_domain'] }}"
- loop: "{{ esxi_hosts }}"
- loop_control:
- index_var: index
diff --git a/test/integration/targets/vmware_host_dns_facts/aliases b/test/integration/targets/vmware_host_dns_facts/aliases
deleted file mode 100644
index 527c737768..0000000000
--- a/test/integration/targets/vmware_host_dns_facts/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_dns_facts/tasks/main.yml b/test/integration/targets/vmware_host_dns_facts/tasks/main.yml
deleted file mode 100644
index 09865d05db..0000000000
--- a/test/integration/targets/vmware_host_dns_facts/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Test code for the vmware_host_dns_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: gather DNS facts about all hosts in given cluster
- vmware_host_dns_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: all_hosts_dns_result
-
-- name: ensure DNS facts are gathered for all hosts in given cluster
- assert:
- that:
- - all_hosts_dns_result.hosts_dns_facts
- - not all_hosts_dns_result.changed
-
-- name: gather DNS facts about host system
- vmware_host_dns_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: all_hosts_dns_result
-
-- name: ensure DNS facts are gathered about host system
- assert:
- that:
- - all_hosts_dns_result.hosts_dns_facts
- - not all_hosts_dns_result.changed
-
-- name: gather DNS facts about all hosts in given cluster in check mode
- vmware_host_dns_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: all_hosts_dns_result_check_mode
- check_mode: yes
-
-- name: ensure DNS facts are gathered for all hosts in given cluster
- assert:
- that:
- - all_hosts_dns_result_check_mode.hosts_dns_facts
- - not all_hosts_dns_result_check_mode.changed
-
-- name: gather DNS facts about host system in check mode
- vmware_host_dns_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: all_hosts_dns_result_check_mode
- check_mode: yes
-
-- name: ensure DNS facts are gathered about host system
- assert:
- that:
- - all_hosts_dns_result_check_mode.hosts_dns_facts
- - not all_hosts_dns_result_check_mode.changed
diff --git a/test/integration/targets/vmware_host_dns_info/aliases b/test/integration/targets/vmware_host_dns_info/aliases
deleted file mode 100644
index 527c737768..0000000000
--- a/test/integration/targets/vmware_host_dns_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_dns_info/tasks/main.yml b/test/integration/targets/vmware_host_dns_info/tasks/main.yml
deleted file mode 100644
index cc732ff220..0000000000
--- a/test/integration/targets/vmware_host_dns_info/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Test code for the vmware_host_dns_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: gather DNS info about all hosts in given cluster
- vmware_host_dns_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: all_hosts_dns_result
-
-- name: ensure DNS info are gathered for all hosts in given cluster
- assert:
- that:
- - all_hosts_dns_result.hosts_dns_info
- - not all_hosts_dns_result.changed
-
-- name: gather DNS info about host system
- vmware_host_dns_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: all_hosts_dns_result
-
-- name: ensure DNS info are gathered about host system
- assert:
- that:
- - all_hosts_dns_result.hosts_dns_info
- - not all_hosts_dns_result.changed
-
-- name: gather DNS info about all hosts in given cluster in check mode
- vmware_host_dns_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: all_hosts_dns_result_check_mode
- check_mode: yes
-
-- name: ensure DNS info are gathered for all hosts in given cluster
- assert:
- that:
- - all_hosts_dns_result_check_mode.hosts_dns_info
- - not all_hosts_dns_result_check_mode.changed
-
-- name: gather DNS info about host system in check mode
- vmware_host_dns_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: all_hosts_dns_result_check_mode
- check_mode: yes
-
-- name: ensure DNS info are gathered about host system
- assert:
- that:
- - all_hosts_dns_result_check_mode.hosts_dns_info
- - not all_hosts_dns_result_check_mode.changed
diff --git a/test/integration/targets/vmware_host_facts/aliases b/test/integration/targets/vmware_host_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_facts/tasks/main.yml b/test/integration/targets/vmware_host_facts/tasks/main.yml
deleted file mode 100644
index aba1bbccf1..0000000000
--- a/test/integration/targets/vmware_host_facts/tasks/main.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- - name: get host facts through a vcenter
- vmware_host_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- register: facts
- - debug: var=facts
- - name: verify some data,like ansible_processor
- assert:
- that:
- - "'ansible_hostname' in facts['ansible_facts']"
- - "'ansible_processor' in facts['ansible_facts']"
- - "'ansible_in_maintenance_mode' in facts['ansible_facts']"
- - "'ansible_uptime' in facts['ansible_facts']"
- - "'ansible_uuid' in facts['ansible_facts']"
-
- - name: get host facts through from a host
- vmware_host_facts:
- validate_certs: False
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- register: facts
- - debug: var=facts
- - name: verify some data,like ansible_processor
- assert:
- that:
- - "'ansible_hostname' in facts['ansible_facts']"
- - "'ansible_processor' in facts['ansible_facts']"
- - "'ansible_in_maintenance_mode' in facts['ansible_facts']"
- - "'ansible_uptime' in facts['ansible_facts']"
- - "'ansible_uuid' in facts['ansible_facts']"
-
- - name: get host properties facts through a vcenter
- vmware_host_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- schema: vsphere
- properties:
- - hardware.memorySize
- - hardware.cpuInfo.numCpuCores
- - config.product.apiVersion
- - overallStatus
- register: facts
- - debug: var=facts
- - name: verify some data,like ansible_processor
- assert:
- that:
- - "'hardware' in facts['ansible_facts']"
- - "'config' in facts['ansible_facts']"
- - "'overallStatus' in facts['ansible_facts']"
- - "'memorySize' in facts['ansible_facts']['hardware']"
- - "'cpuInfo' in facts['ansible_facts']['hardware']"
- - "'numCpuCores' in facts['ansible_facts']['hardware']['cpuInfo']"
- - "'product' in facts['ansible_facts']['config']"
- - "'apiVersion' in facts['ansible_facts']['config']['product']"
-
- - name: get host properties facts through from a host
- vmware_host_facts:
- validate_certs: False
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- schema: vsphere
- properties:
- - hardware.memorySize
- - hardware.cpuInfo.numCpuCores
- - config.product.apiVersion
- - overallStatus
- register: facts
- - debug: var=facts
- - name: verify some data,like ansible_processor
- assert:
- that:
- - "'hardware' in facts['ansible_facts']"
- - "'config' in facts['ansible_facts']"
- - "'overallStatus' in facts['ansible_facts']"
- - "'memorySize' in facts['ansible_facts']['hardware']"
- - "'cpuInfo' in facts['ansible_facts']['hardware']"
- - "'numCpuCores' in facts['ansible_facts']['hardware']['cpuInfo']"
- - "'product' in facts['ansible_facts']['config']"
- - "'apiVersion' in facts['ansible_facts']['config']['product']"
diff --git a/test/integration/targets/vmware_host_feature_facts/aliases b/test/integration/targets/vmware_host_feature_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_feature_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_feature_facts/tasks/main.yml b/test/integration/targets/vmware_host_feature_facts/tasks/main.yml
deleted file mode 100644
index cfc85db0b3..0000000000
--- a/test/integration/targets/vmware_host_feature_facts/tasks/main.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-# Test code for the vmware_host_feature_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support host feature capabilities
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
-
-- name: Gather feature capability facts for all ESXi host from given cluster
- vmware_host_feature_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
-
-- debug: var=capability_0001_results
-
-- assert:
- that:
- - "not capability_0001_results.changed"
- - "capability_0001_results.hosts_feature_facts is defined"
-
-- name: Gather feature capability facts for all ESXi host from given cluster in check mode
- vmware_host_feature_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
- check_mode: yes
-
-- debug: var=capability_0001_results
-
-- assert:
- that:
- - "not capability_0001_results.changed"
- - "capability_0001_results.hosts_feature_facts is defined"
-
-- name: Gather feature capability facts for ESXi host
- vmware_host_feature_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
-
-- debug: var=capability_0002_results
-
-- assert:
- that:
- - "not capability_0002_results.changed"
- - "capability_0002_results.hosts_feature_facts is defined"
-
-
-- name: Gather feature capability facts for ESXi host in check mode
- vmware_host_feature_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
- check_mode: yes
-
-- debug: var=capability_0002_results
-
-- assert:
- that:
- - "not capability_0002_results.changed"
- - "capability_0002_results.hosts_feature_facts is defined"
diff --git a/test/integration/targets/vmware_host_feature_info/aliases b/test/integration/targets/vmware_host_feature_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_feature_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_feature_info/tasks/main.yml b/test/integration/targets/vmware_host_feature_info/tasks/main.yml
deleted file mode 100644
index 3b57020815..0000000000
--- a/test/integration/targets/vmware_host_feature_info/tasks/main.yml
+++ /dev/null
@@ -1,77 +0,0 @@
-# Test code for the vmware_host_feature_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support host feature capabilities
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
-
-- name: Gather feature capability info for all ESXi host from given cluster
- vmware_host_feature_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
-
-- debug: var=capability_0001_results
-
-- assert:
- that:
- - "not capability_0001_results.changed"
- - "capability_0001_results.hosts_feature_info is defined"
-
-- name: Gather feature capability info for all ESXi host from given cluster in check mode
- vmware_host_feature_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: capability_0001_results
- check_mode: yes
-
-- debug: var=capability_0001_results
-
-- assert:
- that:
- - "not capability_0001_results.changed"
- - "capability_0001_results.hosts_feature_info is defined"
-
-- name: Gather feature capability info for ESXi host
- vmware_host_feature_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
-
-- debug: var=capability_0002_results
-
-- assert:
- that:
- - "not capability_0002_results.changed"
- - "capability_0002_results.hosts_feature_info is defined"
-
-
-- name: Gather feature capability info for ESXi host in check mode
- vmware_host_feature_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: capability_0002_results
- check_mode: yes
-
-- debug: var=capability_0002_results
-
-- assert:
- that:
- - "not capability_0002_results.changed"
- - "capability_0002_results.hosts_feature_info is defined"
diff --git a/test/integration/targets/vmware_host_firewall_facts/aliases b/test/integration/targets/vmware_host_firewall_facts/aliases
deleted file mode 100644
index 527c737768..0000000000
--- a/test/integration/targets/vmware_host_firewall_facts/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml b/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml
deleted file mode 100644
index e58e8f1fc9..0000000000
--- a/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Test code for the vmware_host_firewall_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-- name: Gather firewall facts for a given ESXi
- vmware_host_firewall_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: firewall_0004_results
- check_mode: yes
-
-- assert:
- that:
- - "not firewall_0004_results.changed"
- - "firewall_0004_results.hosts_firewall_facts is defined"
-
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather firewall facts for all ESXi host from given cluster
- vmware_host_firewall_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: firewall_0001_results
-
- - assert:
- that:
- - "not firewall_0001_results.changed"
- - "firewall_0001_results.hosts_firewall_facts is defined"
-
- - name: Gather firewall facts for ESXi host
- vmware_host_firewall_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: firewall_0002_results
-
- - assert:
- that:
- - "not firewall_0002_results.changed"
- - "firewall_0002_results.hosts_firewall_facts is defined"
-
- - name: Gather firewall facts for all ESXi host from given cluster in check mode
- vmware_host_firewall_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: firewall_0003_results
- check_mode: yes
-
- - assert:
- that:
- - "not firewall_0003_results.changed"
- - "firewall_0003_results.hosts_firewall_facts is defined"
diff --git a/test/integration/targets/vmware_host_firewall_info/aliases b/test/integration/targets/vmware_host_firewall_info/aliases
deleted file mode 100644
index 527c737768..0000000000
--- a/test/integration/targets/vmware_host_firewall_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_firewall_info/tasks/main.yml b/test/integration/targets/vmware_host_firewall_info/tasks/main.yml
deleted file mode 100644
index 29a8b610d0..0000000000
--- a/test/integration/targets/vmware_host_firewall_info/tasks/main.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Test code for the vmware_host_firewall_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-- name: Gather firewall info for a given ESXi
- vmware_host_firewall_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: firewall_0004_results
- check_mode: yes
-
-- assert:
- that:
- - "not firewall_0004_results.changed"
- - "firewall_0004_results.hosts_firewall_info is defined"
-
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather firewall info for all ESXi host from given cluster
- vmware_host_firewall_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: firewall_0001_results
-
- - assert:
- that:
- - "not firewall_0001_results.changed"
- - "firewall_0001_results.hosts_firewall_info is defined"
-
- - name: Gather firewall info for ESXi host
- vmware_host_firewall_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: firewall_0002_results
-
- - assert:
- that:
- - "not firewall_0002_results.changed"
- - "firewall_0002_results.hosts_firewall_info is defined"
-
- - name: Gather firewall info for all ESXi host from given cluster in check mode
- vmware_host_firewall_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: firewall_0003_results
- check_mode: yes
-
- - assert:
- that:
- - "not firewall_0003_results.changed"
- - "firewall_0003_results.hosts_firewall_info is defined"
diff --git a/test/integration/targets/vmware_host_firewall_manager/aliases b/test/integration/targets/vmware_host_firewall_manager/aliases
deleted file mode 100644
index 25f9cd8975..0000000000
--- a/test/integration/targets/vmware_host_firewall_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_2esxi
diff --git a/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml b/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml
deleted file mode 100644
index f96acb9841..0000000000
--- a/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml
+++ /dev/null
@@ -1,222 +0,0 @@
-# Test code for the vmware_host_firewall_manager module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Enable vvold rule set on all hosts of {{ ccr1 }}
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- rules:
- - name: vvold
- enabled: True
- register: all_hosts_result
- - debug: msg="{{ all_hosts_result }}"
- - name: ensure everything is changed for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_result.changed
- - all_hosts_result.rule_set_state is defined
-
- - name: ensure info are gathered for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_result.rule_set_state[item]['vvold']['current_state'] == True
- - all_hosts_result.rule_set_state[item]['vvold']['desired_state'] == True
- - all_hosts_result.rule_set_state[item]['vvold']['previous_state'] == False
- with_items:
- - '{{ esxi1 }}'
- - '{{ esxi2 }}'
-
- - name: Disable vvold for {{ host1 }}
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- rules:
- - name: vvold
- enabled: False
- register: host_result
- - debug: msg="{{ host_result }}"
- - name: ensure vvold is disabled for {{ host1 }}
- assert:
- that:
- - host_result.changed
- - host_result.rule_set_state is defined
-
- - name: ensure info are gathered for {{ host1 }}
- assert:
- that:
- - host_result.rule_set_state[item]['vvold']['current_state'] == False
- - host_result.rule_set_state[item]['vvold']['desired_state'] == False
- - host_result.rule_set_state[item]['vvold']['previous_state'] == True
- with_items:
- - '{{ esxi1 }}'
-
- - name: Enable vvold rule set on all hosts of {{ ccr1 }} in check mode
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- rules:
- - name: vvold
- enabled: True
- register: all_hosts_result_check_mode
- check_mode: yes
- - debug: var=all_hosts_result_check_mode
- - name: ensure everything is changed for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_result_check_mode.changed
- - all_hosts_result_check_mode.rule_set_state is defined
-
- - name: ensure info are gathered for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_result_check_mode.rule_set_state[esxi1]['vvold']['current_state'] == True
- - all_hosts_result_check_mode.rule_set_state[esxi2]['vvold']['current_state'] == True
- - all_hosts_result_check_mode.rule_set_state[esxi2]['vvold']['desired_state'] == True
-
- - name: Disable vvold for {{ host1 }} in check mode
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- rules:
- - name: vvold
- enabled: False
- register: host_result_check_mode
- check_mode: yes
- - debug: msg="{{ host_result_check_mode }}"
- - name: ensure vvold is disabled for {{ host1 }}
- assert:
- that:
- - host_result_check_mode.changed == False
- - host_result_check_mode.rule_set_state is defined
-
- - name: ensure info are gathered for {{ host1 }}
- assert:
- that:
- - host_result_check_mode.rule_set_state[item]['vvold']['current_state'] == False
- - host_result_check_mode.rule_set_state[item]['vvold']['desired_state'] == False
- - host_result_check_mode.rule_set_state[item]['vvold']['previous_state'] == False
- with_items:
- - '{{ esxi1 }}'
-
- - name: Configure CIMHttpServer rule set on all hosts of {{ ccr1 }}
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- rules:
- - name: CIMHttpServer
- enabled: True
- allowed_hosts:
- all_ip: False
- ip_address:
- - "192.168.100.11"
- - "192.168.100.12"
- ip_network:
- - "192.168.200.0/24"
- register: all_hosts_ip_specific
- - debug: var=all_hosts_ip_specific
- - name: ensure everything is changed for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_ip_specific.changed
- - all_hosts_ip_specific.rule_set_state is defined
-
- - name: ensure CIMHttpServer is configured for all hosts in {{ ccr1 }}
- assert:
- that:
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['current_state'] == True
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['desired_state'] == True
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['previous_state'] == True
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['current_allowed_all'] == False
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['previous_allowed_all'] == True
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['desired_allowed_all'] == False
- - "'192.168.100.11' in all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['current_allowed_ip']"
- - "'192.168.100.12' in all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['current_allowed_ip']"
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['previous_allowed_ip'] == []
- - "'192.168.100.11' in all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['desired_allowed_ip']"
- - "'192.168.100.12' in all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['desired_allowed_ip']"
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['current_allowed_networks'] == ["192.168.200.0/24"]
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['previous_allowed_networks'] == []
- - all_hosts_ip_specific.rule_set_state[item]['CIMHttpServer']['allowed_hosts']['desired_allowed_networks'] == ["192.168.200.0/24"]
- with_items:
- - '{{ esxi1 }}'
- - '{{ esxi2 }}'
-
- - name: Configure the NFC firewall rule to only allow traffic from one IP on one ESXi host
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- rules:
- - name: NFC
- enabled: True
- allowed_hosts:
- all_ip: False
- ip_address:
- - "192.168.100.11"
- register: single_host_ip_specific
- - set_fact:
- nfc_state: "{{ single_host_ip_specific.rule_set_state[esxi1]['NFC'] }}"
- - debug: var=single_host_ip_specific
- - debug: var=nfc_state
- - name: ensure NFC is configured on that host
- assert:
- that:
- - nfc_state.current_state == true
- - nfc_state.desired_state == true
- - nfc_state.previous_state == true
- - nfc_state.allowed_hosts.current_allowed_all == False
- - nfc_state.allowed_hosts.previous_allowed_all == True
- - nfc_state.allowed_hosts.desired_allowed_all == False
- - nfc_state.allowed_hosts.current_allowed_ip == ["192.168.100.11"]
- - nfc_state.allowed_hosts.previous_allowed_all == True
- - nfc_state.allowed_hosts.desired_allowed_ip == ["192.168.100.11"]
- - nfc_state.allowed_hosts.current_allowed_networks == []
- - nfc_state.allowed_hosts.previous_allowed_networks == []
- - nfc_state.allowed_hosts.desired_allowed_networks == []
-
- - name: Ensure we can still pass the allowed_hosts configuration through a list for compat
- vmware_host_firewall_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: "{{ esxi1 }}"
- rules:
- - name: NFC
- enabled: True
- allowed_hosts:
- - all_ip: False
- ip_address:
- - "1.2.3.4"
- register: using_list
- - debug: var=using_list
- - set_fact:
- nfc_state: "{{ using_list.rule_set_state[esxi1]['NFC'] }}"
- - name: ensure the correct host is set
- assert:
- that:
- - nfc_state.allowed_hosts.current_allowed_ip == ["1.2.3.4"]
diff --git a/test/integration/targets/vmware_host_hyperthreading/aliases b/test/integration/targets/vmware_host_hyperthreading/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_hyperthreading/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml b/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml
deleted file mode 100644
index f3f4cd8edf..0000000000
--- a/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-# Test code for the vmware_host_hyperthreading module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Hyperthreading optimization is not available for hosts in vcsim
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
-
-- name: Enable Hyperthreading everywhere
- vmware_host_hyperthreading:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- state: disabled
- register: enable_hyperthreading_everywhere
- ignore_errors: true
-
-- when: enable_hyperthreading_everywhere is succeeded
- block:
-
- - name: Disable Hyperthreading for a given host
- vmware_host_hyperthreading:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- state: disabled
- register: host_hyperthreading_info
-
- - debug: var=host_hyperthreading_info
-
- - assert:
- that:
- - host_hyperthreading_info is defined
- - host_hyperthreading_info.changed
-
- - name: Disable Hyperthreading for a given host in check mode
- vmware_host_hyperthreading:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- state: disabled
- register: host_hyperthreading_info_check_mode
- check_mode: yes
-
- - debug: var=host_hyperthreading_info_check_mode
-
- - assert:
- that:
- - host_hyperthreading_info_check_mode is defined
-
- - name: Disable Hyperthreading for all hosts in given cluster
- vmware_host_hyperthreading:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: disabled
- register: host_hyperthreading_info
-
- - debug: var=host_hyperthreading_info
-
- - assert:
- that:
- - host_hyperthreading_info is defined
- - host_hyperthreading_info is changed
-
- - name: Enable Hyperthreading for all hosts in given cluster in check mode
- vmware_host_hyperthreading:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: enabled
- register: host_hyperthreading_info_check_mode
- check_mode: yes
-
- - debug: var=host_hyperthreading_info_check_mode
-
- - assert:
- that:
- - host_hyperthreading_info_check_mode is defined
- - host_hyperthreading_info_check_mode.changed
diff --git a/test/integration/targets/vmware_host_ipv6/aliases b/test/integration/targets/vmware_host_ipv6/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_host_ipv6/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ipv6/tasks/main.yml b/test/integration/targets/vmware_host_ipv6/tasks/main.yml
deleted file mode 100644
index 95184b44c2..0000000000
--- a/test/integration/targets/vmware_host_ipv6/tasks/main.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-# Test code for the vmware_host_ipv6 module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Ensure IPv6 is off
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: disabled
- register: host_ipv6_info
-
- - name: Enable IPv6 support for a given host
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- state: enabled
- register: host_ipv6_info
- - debug: var=host_ipv6_info
- - assert:
- that:
- - host_ipv6_info is defined
- - host_ipv6_info.changed
-
- - name: Enable IPv6 support for a given host in check mode
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- state: enabled
- register: host_ipv6_info_check_mode
- check_mode: yes
- - debug: var=host_ipv6_info_check_mode
- - assert:
- that:
- - host_ipv6_info_check_mode is defined
- - not (host_ipv6_info_check_mode is changed)
-
- - name: Reset the status again
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: disabled
- register: host_ipv6_info
-
- - name: Enable IPv6 support for all hosts in given cluster
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: enabled
- register: hosts_ipv6_info
- - debug: var=hosts_ipv6_info
- - assert:
- that:
- - hosts_ipv6_info is defined
- - hosts_ipv6_info.changed
-
- - name: Enable IPv6 support for all hosts in given cluster in check mode
- vmware_host_ipv6:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: enabled
- register: hosts_ipv6_info_check_mode
- check_mode: yes
- - debug: var=hosts_ipv6_info_check_mode
- - assert:
- that:
- - hosts_ipv6_info_check_mode is defined
- - not (hosts_ipv6_info_check_mode is changed)
diff --git a/test/integration/targets/vmware_host_kernel_manager/aliases b/test/integration/targets/vmware_host_kernel_manager/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_kernel_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml b/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml
deleted file mode 100644
index 5204e0d061..0000000000
--- a/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# test code for the vmware_host_kernel_manager module
-# Copyright: (c) 2019, Aaron Longchamps <a.j.longchamps@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
-
- - name: First, set ipv6=0, for consistency
- vmware_host_kernel_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- kernel_module_name: "tcpip4"
- kernel_module_option: "ipv6=0"
-
- - name: host connected, module exists, options exist, arguments different
- vmware_host_kernel_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- kernel_module_name: "tcpip4"
- kernel_module_option: "ipv6=0"
- register: my_results_01
- - debug: var=my_results_01
- - name: Check that the provided kernel_module_name has kernel_module_option set
- assert:
- that:
- - "'original_options' in my_results_01['host_kernel_status']['{{ esxi1 }}']"
- - "my_results_01['host_kernel_status']['{{ esxi1 }}'].original_options == 'ipv6=0'"
-
- - name: host connected, module exists, same options for idempotence test
- vmware_host_kernel_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- kernel_module_name: "tcpip4"
- kernel_module_option: "ipv6=0"
- register: my_results_02
- - name: Check that changed is false
- assert:
- that:
- - not (my_results_02 is changed)
diff --git a/test/integration/targets/vmware_host_ntp/aliases b/test/integration/targets/vmware_host_ntp/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_ntp/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ntp/tasks/main.yml b/test/integration/targets/vmware_host_ntp/tasks/main.yml
deleted file mode 100644
index 79a959b29f..0000000000
--- a/test/integration/targets/vmware_host_ntp/tasks/main.yml
+++ /dev/null
@@ -1,168 +0,0 @@
-# Test code for the vmware_host_ntp module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support update host NTP configuration
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Add NTP server to a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: present
- ntp_servers:
- - 0.pool.ntp.org
- validate_certs: no
- register: present
- - debug: var=present
-
- - name: Add another NTP server to a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: present
- ntp_servers:
- - 1.pool.ntp.org
- validate_certs: no
- register: present
- - debug: var=present
-
- - name: Remove NTP server from a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: absent
- ntp_servers:
- - 1.pool.ntp.org
- validate_certs: no
- register: absent_one
- - debug: var=absent_one
-
- - name: Remove NTP server from a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: present
- ntp_servers:
- - 1.pool.ntp.org
- validate_certs: no
- register: present
- - debug: var=present
-
- - name: Add more NTP servers to a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: present
- ntp_servers:
- - 2.pool.ntp.org
- - 3.pool.ntp.org
- - 4.pool.ntp.org
- validate_certs: no
- register: present
- - debug: var=present
-
- - name: Remove all NTP servers from a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: absent
- ntp_servers:
- - 0.pool.ntp.org
- - 1.pool.ntp.org
- - 2.pool.ntp.org
- - 3.pool.ntp.org
- - 4.pool.ntp.org
- - 6.pool.ntp.org
- validate_certs: no
- register: absent_all
- - debug: var=absent_all
-
- - name: Configure NTP servers for a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ntp_servers:
- - 0.pool.ntp.org
- - 1.pool.ntp.org
- - 2.pool.ntp.org
- validate_certs: no
- register: ntp_servers
- - debug: var=ntp_servers
-
- - name: Configure NTP servers for a host
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ntp_servers:
- - 3.pool.ntp.org
- - 4.pool.ntp.org
- - 5.pool.ntp.org
- verbose: true
- validate_certs: no
- register: ntp_servers
- - debug: var=ntp_servers
-
- - name: Add NTP server to a host in check mode
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: present
- ntp_servers:
- - 0.pool.ntp.org
- validate_certs: no
- register: present
- check_mode: yes
- - debug: var=present
-
- - name: Remove NTP server to a host in check mode
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- state: absent
- ntp_servers:
- - 0.pool.ntp.org
- validate_certs: no
- register: present
- check_mode: yes
- - debug: var=present
-
- - name: Configure NTP servers for a host in check mode
- vmware_host_ntp:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- ntp_servers:
- - 0.pool.ntp.org
- - 1.pool.ntp.org
- - 2.pool.ntp.org
- validate_certs: no
- register: ntp_servers
- check_mode: yes
- - debug: var=ntp_servers
diff --git a/test/integration/targets/vmware_host_ntp_facts/aliases b/test/integration/targets/vmware_host_ntp_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_ntp_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml b/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml
deleted file mode 100644
index 9dc0309eaa..0000000000
--- a/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware_host_ntp_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support NTP Manager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather NTP facts about all hosts in given host
- vmware_host_ntp_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_ntp
- - debug: var=host_ntp
- - assert:
- that:
- - host_ntp.hosts_ntp_facts is defined
diff --git a/test/integration/targets/vmware_host_ntp_info/aliases b/test/integration/targets/vmware_host_ntp_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_ntp_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ntp_info/tasks/main.yml b/test/integration/targets/vmware_host_ntp_info/tasks/main.yml
deleted file mode 100644
index 16d240e9f7..0000000000
--- a/test/integration/targets/vmware_host_ntp_info/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware_host_ntp_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support NTP Manager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather NTP info about all hosts in given host
- vmware_host_ntp_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_ntp
- - debug: var=host_ntp
- - assert:
- that:
- - host_ntp.hosts_ntp_info is defined
diff --git a/test/integration/targets/vmware_host_package_facts/aliases b/test/integration/targets/vmware_host_package_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_package_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_package_facts/tasks/main.yml b/test/integration/targets/vmware_host_package_facts/tasks/main.yml
deleted file mode 100644
index b5f8270f0d..0000000000
--- a/test/integration/targets/vmware_host_package_facts/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware_host_package_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support Package Manager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather facts about all hosts in given cluster
- vmware_host_package_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_packages
- - debug: var=host_packages
- - assert:
- that:
- - host_packages.hosts_package_facts is defined
diff --git a/test/integration/targets/vmware_host_package_info/aliases b/test/integration/targets/vmware_host_package_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_package_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_package_info/tasks/main.yml b/test/integration/targets/vmware_host_package_info/tasks/main.yml
deleted file mode 100644
index c4482efc6c..0000000000
--- a/test/integration/targets/vmware_host_package_info/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware_host_package_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support Package Manager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather info about all hosts in given cluster
- vmware_host_package_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_packages
- - debug: var=host_packages
- - assert:
- that:
- - host_packages.hosts_package_info is defined
diff --git a/test/integration/targets/vmware_host_powermgmt_policy/aliases b/test/integration/targets/vmware_host_powermgmt_policy/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_powermgmt_policy/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml b/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml
deleted file mode 100644
index c899e7a668..0000000000
--- a/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml
+++ /dev/null
@@ -1,103 +0,0 @@
-# Test code for the vmware_host_powermgmt_policy module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Reset all the hosts to balanced
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- policy: balanced
- validate_certs: no
-
- # The following test cases aren't supported by vcsim
- - name: Set the Power Management Policy for esxi1
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- policy: high-performance
- validate_certs: no
- register: host_result
- - debug: var=host_result
- - name: Ensure Power Management Policy for esxi1
- assert:
- that:
- - host_result.result['{{ esxi1 }}'].current_state == "high-performance"
-
- - name: Reset all the hosts to balanced
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- policy: balanced
- validate_certs: no
- register: all_hosts_result
- - debug: var=all_hosts_result
- - name: Ensure Power Management Policy is changed for all hosts of {{ ccr1 }}
- assert:
- that:
- - all_hosts_result is changed
- - all_hosts_result.result is defined
-
- - name: Reset all the hosts to balanced
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- policy: balanced
- validate_certs: no
-
- - name: Set the Power Management Policy for esxi1 in check mode
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- policy: high-performance
- validate_certs: no
- register: host_result
- check_mode: yes
- - debug: var=host_result
- - name: Ensure Power Management Policy for esxi1 in check mode
- assert:
- that:
- - host_result is changed
- - host_result.result is defined
-
- - name: Set the Power Management Policy on all hosts of {{ ccr1 }}
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- policy: balanced
- validate_certs: no
- register: all_hosts_result
- check_mode: yes
- - debug: var=all_hosts_result
- - name: Ensure we are still using the 'balanced' mode
- assert:
- that:
- - not (all_hosts_result is changed)
- - "all_hosts_result.result['{{ esxi1 }}'].current_state == 'balanced'"
- always:
- - name: Reset all the hosts to balanced
- vmware_host_powermgmt_policy:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- policy: balanced
- validate_certs: no
diff --git a/test/integration/targets/vmware_host_powerstate/aliases b/test/integration/targets/vmware_host_powerstate/aliases
deleted file mode 100644
index 0c2e2cb9bd..0000000000
--- a/test/integration/targets/vmware_host_powerstate/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
diff --git a/test/integration/targets/vmware_host_powerstate/tasks/main.yml b/test/integration/targets/vmware_host_powerstate/tasks/main.yml
deleted file mode 100644
index ae89113412..0000000000
--- a/test/integration/targets/vmware_host_powerstate/tasks/main.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Test code for the vmware_host_powerstate module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support Powerstate related to operations
-- when: False
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
-
- # https://kb.vmware.com/s/article/2001651?lang=en_US
- # It seems like we need a Power managment interface to be able to run the
- # module.
- # I currently get:
- # "Failed to power down '192.168.123.7' to standby as host system due to : ('The operation is not supported on the object.', None)"
- - name: Restart Host
- vmware_host_powerstate:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- state: power-down-to-standby
- esxi_hostname: '{{ esxi1 }}'
- force: True
- register: host_powerstate
-
- - debug: var=host_powerstate
-
- - assert:
- that:
- - host_powerstate.results is changed
diff --git a/test/integration/targets/vmware_host_scanhba/aliases b/test/integration/targets/vmware_host_scanhba/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_host_scanhba/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_scanhba/tasks/main.yml b/test/integration/targets/vmware_host_scanhba/tasks/main.yml
deleted file mode 100644
index 2701b10473..0000000000
--- a/test/integration/targets/vmware_host_scanhba/tasks/main.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Test code for the vmware_host_scanhba module.
-# Copyright: (c) 2019, Michael Eaton <me@michaeleaton.me>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Recan HBA's for an entire cluster (there should be at least one host as above)
- vmware_host_scanhba:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: '{{ ccr1 }}'
- refresh_storage: false
- register: host_scan_results
- - debug: msg="{{ host_scan_results }}"
- - name: ensure a change occured (as in the scan happened) and the task didnt fail
- assert:
- that:
- - host_scan_results.changed
- - not host_scan_results.failed
diff --git a/test/integration/targets/vmware_host_service_facts/aliases b/test/integration/targets/vmware_host_service_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_service_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_service_facts/tasks/main.yml b/test/integration/targets/vmware_host_service_facts/tasks/main.yml
deleted file mode 100644
index 1f3f9e854f..0000000000
--- a/test/integration/targets/vmware_host_service_facts/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# Test code for the vmware_host_service_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support service related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - &host_srv_facts
- name: Check facts about all hosts in given cluster
- vmware_host_service_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_services
-
- - debug:
- var: host_services
-
- - assert:
- that:
- - host_services.host_service_facts is defined
-
- - <<: *host_srv_facts
- name: Check facts about all hosts in given cluster in check mode
- check_mode: yes
-
- - debug:
- var: host_services
-
- - assert:
- that:
- - host_services.host_service_facts is defined
diff --git a/test/integration/targets/vmware_host_service_info/aliases b/test/integration/targets/vmware_host_service_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_service_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_service_info/tasks/main.yml b/test/integration/targets/vmware_host_service_info/tasks/main.yml
deleted file mode 100644
index 60f8725075..0000000000
--- a/test/integration/targets/vmware_host_service_info/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# Test code for the vmware_host_service_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support service related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - &host_srv_info
- name: Check info about all hosts in given cluster
- vmware_host_service_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_services
-
- - debug:
- var: host_services
-
- - assert:
- that:
- - host_services.host_service_info is defined
-
- - <<: *host_srv_info
- name: Check info about all hosts in given cluster in check mode
- check_mode: yes
-
- - debug:
- var: host_services
-
- - assert:
- that:
- - host_services.host_service_info is defined
diff --git a/test/integration/targets/vmware_host_service_manager/aliases b/test/integration/targets/vmware_host_service_manager/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_service_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_service_manager/tasks/main.yml b/test/integration/targets/vmware_host_service_manager/tasks/main.yml
deleted file mode 100644
index 7098675ef4..0000000000
--- a/test/integration/targets/vmware_host_service_manager/tasks/main.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-# Test code for the vmware_host_service_manager module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support service management
-# commenting this testcase till the time.
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Start ntpd service on all hosts in given cluster
- vmware_host_service_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- service_name: ntpd
- state: present
- register: all_hosts_result
- - debug: var=all_hosts_result
-
- - name: Stop ntpd service on a given host
- vmware_host_service_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- service_name: ntpd
- state: absent
- register: single_hosts_result
- - name: ensure info are gathered
- assert:
- that:
- - single_hosts_result is changed
-
- - name: Start ntpd service on all hosts in given cluster in check mode
- vmware_host_service_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- service_name: ntpd
- state: present
- register: all_hosts_result_check_mode
- check_mode: yes
- - name: ensure info are gathered for all hosts
- assert:
- that:
- - all_hosts_result_check_mode is changed
-
- - name: Stop ntpd service on a given host in check mode
- vmware_host_service_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- service_name: ntpd
- state: absent
- register: single_hosts_result_check_mode
- check_mode: yes
- - name: ensure info are gathered
- assert:
- that:
- - not (single_hosts_result_check_mode is changed)
-
- - name: Start ntpd service on all hosts in given cluster
- vmware_host_service_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- service_name: ntpd
- state: present
- register: all_hosts_result_check_mode
- - name: finally, ensure ntp is running on the cluster
- assert:
- that:
- - all_hosts_result_check_mode is changed
diff --git a/test/integration/targets/vmware_host_snmp/aliases b/test/integration/targets/vmware_host_snmp/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_snmp/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_snmp/tasks/main.yml b/test/integration/targets/vmware_host_snmp/tasks/main.yml
deleted file mode 100644
index 45f73e48b8..0000000000
--- a/test/integration/targets/vmware_host_snmp/tasks/main.yml
+++ /dev/null
@@ -1,56 +0,0 @@
-# Test code for the vmware_host_snmp.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- # SNMP works only with standalone ESXi server
- - name: Enable and configure SNMP community in check mode
- vmware_host_snmp:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- community: [ test ]
- state: enabled
- validate_certs: no
- register: snmp_enabled_check_mode
- check_mode: yes
- - debug: var=snmp_enabled_check_mode
- - assert:
- that:
- - snmp_enabled_check_mode is defined
- - snmp_enabled_check_mode.changed
-
- - name: Enable and configure SNMP community
- vmware_host_snmp:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- community: [ test ]
- state: enabled
- validate_certs: no
- register: snmp_enabled
- - debug: var=snmp_enabled
- - assert:
- that:
- - snmp_enabled is defined
- - snmp_enabled.changed
-
- - name: Disable SNMP
- vmware_host_snmp:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- state: disabled
- validate_certs: no
- register: snmp_disabled
- - debug: var=snmp_enabled
- - assert:
- that:
- - snmp_enabled is defined
- - snmp_enabled.changed
diff --git a/test/integration/targets/vmware_host_ssl_facts/aliases b/test/integration/targets/vmware_host_ssl_facts/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_host_ssl_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml b/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml
deleted file mode 100644
index b04b36f715..0000000000
--- a/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Test code for the vmware_host_ssl_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: Gather SSL facts about ESXi machine
- vmware_host_ssl_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: ssl_facts
-
-- debug: var=ssl_facts
-
-- assert:
- that:
- - ssl_facts.host_ssl_facts is defined
-
-- name: Gather facts about all hostsystem in given cluster
- vmware_host_ssl_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: ssl_facts
-
-- debug: var=ssl_facts
-
-- assert:
- that:
- - ssl_facts.host_ssl_facts is defined
-
-- name: Gather SSL facts about ESXi machine in check mode
- vmware_host_ssl_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- check_mode: yes
- register: ssl_facts
-
-- debug: var=ssl_facts
-
-- assert:
- that:
- - ssl_facts.host_ssl_facts is defined
-
-- name: Gather facts about all hostsystem in given cluster in check mode ee
- vmware_host_ssl_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- check_mode: yes
- register: ssl_facts
-
-- debug: var=ssl_facts
-
-- assert:
- that:
- - ssl_facts.host_ssl_facts is defined
diff --git a/test/integration/targets/vmware_host_ssl_info/aliases b/test/integration/targets/vmware_host_ssl_info/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_host_ssl_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_ssl_info/tasks/main.yml b/test/integration/targets/vmware_host_ssl_info/tasks/main.yml
deleted file mode 100644
index f2eb77112b..0000000000
--- a/test/integration/targets/vmware_host_ssl_info/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-# Test code for the vmware_host_ssl_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: Gather SSL info about ESXi machine
- vmware_host_ssl_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: ssl_info
-
-- debug: var=ssl_info
-
-- assert:
- that:
- - ssl_info.host_ssl_info is defined
-
-- name: Gather info about all hostsystem in given cluster
- vmware_host_ssl_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- register: ssl_info
-
-- debug: var=ssl_info
-
-- assert:
- that:
- - ssl_info.host_ssl_info is defined
-
-- name: Gather SSL info about ESXi machine in check mode
- vmware_host_ssl_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- check_mode: yes
- register: ssl_info
-
-- debug: var=ssl_info
-
-- assert:
- that:
- - ssl_info.host_ssl_info is defined
-
-- name: Gather info about all hostsystem in given cluster in check mode ee
- vmware_host_ssl_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- check_mode: yes
- register: ssl_info
-
-- debug: var=ssl_info
-
-- assert:
- that:
- - ssl_info.host_ssl_info is defined
diff --git a/test/integration/targets/vmware_host_vmhba_facts/aliases b/test/integration/targets/vmware_host_vmhba_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_vmhba_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml b/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml
deleted file mode 100644
index 0fcc5e3cc5..0000000000
--- a/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# Test code for the vmware_host_vmhba_facts module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support networkConfig related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - &vmhba_data
- name: Gather vmhba facts
- vmware_host_vmhba_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmhbas
-
- - debug:
- var: host_vmhbas
-
- - assert:
- that:
- - host_vmhbas.hosts_vmhbas_facts is defined
-
- - <<: *vmhba_data
- name: Gather vmhba facts in check mode
- check_mode: yes
-
- - debug:
- var: host_vmhbas
-
- - assert:
- that:
- - host_vmhbas.hosts_vmhbas_facts is defined
diff --git a/test/integration/targets/vmware_host_vmhba_info/aliases b/test/integration/targets/vmware_host_vmhba_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_vmhba_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_vmhba_info/tasks/main.yml b/test/integration/targets/vmware_host_vmhba_info/tasks/main.yml
deleted file mode 100644
index bfb014cfe3..0000000000
--- a/test/integration/targets/vmware_host_vmhba_info/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# Test code for the vmware_host_vmhba_info module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support networkConfig related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - &vmhba_data
- name: Gather vmhba info
- vmware_host_vmhba_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmhbas
-
- - debug:
- var: host_vmhbas
-
- - assert:
- that:
- - host_vmhbas.hosts_vmhbas_info is defined
-
- - <<: *vmhba_data
- name: Gather vmhba info in check mode
- check_mode: yes
-
- - debug:
- var: host_vmhbas
-
- - assert:
- that:
- - host_vmhbas.hosts_vmhbas_info is defined
diff --git a/test/integration/targets/vmware_host_vmnic_facts/aliases b/test/integration/targets/vmware_host_vmnic_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_vmnic_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml b/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml
deleted file mode 100644
index 865705d3b9..0000000000
--- a/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Test code for the vmware_host_vmnic_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support networkConfig related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather vmnic facts about a host
- vmware_host_vmnic_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmnics
- - debug: var=host_vmnics
- - assert:
- that:
- - host_vmnics.hosts_vmnics_facts is defined
-
- - name: Gather extended vmnic facts about a host
- vmware_host_vmnic_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- capabilities: true
- directpath_io: true
- sriov: true
- register: host_vmnics_extended
- - debug: var=host_vmnics_extended
- - assert:
- that:
- - host_vmnics_extended.hosts_vmnics_facts is defined
diff --git a/test/integration/targets/vmware_host_vmnic_info/aliases b/test/integration/targets/vmware_host_vmnic_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_host_vmnic_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_host_vmnic_info/tasks/main.yml b/test/integration/targets/vmware_host_vmnic_info/tasks/main.yml
deleted file mode 100644
index 722bd61701..0000000000
--- a/test/integration/targets/vmware_host_vmnic_info/tasks/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Test code for the vmware_host_vmnic_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support networkConfig related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather vmnic info about a host
- vmware_host_vmnic_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmnics
- - debug: var=host_vmnics
- - assert:
- that:
- - host_vmnics.hosts_vmnics_info is defined
-
- - name: Gather extended vmnic info about a host
- vmware_host_vmnic_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- capabilities: true
- directpath_io: true
- sriov: true
- register: host_vmnics_extended
- - debug: var=host_vmnics_extended
- - assert:
- that:
- - host_vmnics_extended.hosts_vmnics_info is defined
diff --git a/test/integration/targets/vmware_local_role_facts/aliases b/test/integration/targets/vmware_local_role_facts/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_local_role_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_local_role_facts/tasks/main.yml b/test/integration/targets/vmware_local_role_facts/tasks/main.yml
deleted file mode 100644
index 45db965647..0000000000
--- a/test/integration/targets/vmware_local_role_facts/tasks/main.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# Test code for the vmware_local_role_facts module
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Set list of Roles in fact
- set_fact:
- role_list:
- - Admin
-# With govcsim, NoCryptoAdmin has no privilege.
-# - NoCryptoAdmin
- - Anonymous
- - ReadOnly
-
-- &role_data
- name: Gather Role facts
- vmware_local_role_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: role_details
-
-- &list_to_dict
- name: List to dict
- set_fact:
- role_dict: "{{ dict(role_details.local_role_facts|map(attribute='role_name')|zip(role_details.local_role_facts)) }}"
-
-- name: Test if NoAccess has no privilege
- assert:
- that: "{{ role_dict['NoAccess']['privileges'] | list | length == 0 }}"
-
-- &role_test
- name: Test if role id is present for role
- assert:
- that: "{{ role_dict[item]['privileges'] | list | length > 0 }}"
- with_items: "{{ role_list }}"
-
-- <<: *role_data
- name: Gather Role facts in check mode
- check_mode: yes
-
-- <<: *role_test
- name: Test if role id is present for role in check mode
diff --git a/test/integration/targets/vmware_local_role_info/aliases b/test/integration/targets/vmware_local_role_info/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_local_role_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_local_role_info/tasks/main.yml b/test/integration/targets/vmware_local_role_info/tasks/main.yml
deleted file mode 100644
index cff8b57151..0000000000
--- a/test/integration/targets/vmware_local_role_info/tasks/main.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# Test code for the vmware_local_role_info module
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Set list of Roles in fact
- set_fact:
- role_list:
- - Admin
- # NoCryptoAdmin has no privilege with govcsim
- # - NoCryptoAdmin
- - Anonymous
- - ReadOnly
-
-- &role_data
- name: Gather Role info
- vmware_local_role_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: role_details
-
-- &list_to_dict
- name: List to dict
- set_fact:
- role_dict: "{{ dict(role_details.local_role_info|map(attribute='role_name')|zip(role_details.local_role_info)) }}"
-
-- name: Test if NoAccess has no privilege
- assert:
- that: "{{ role_dict['NoAccess']['privileges'] | list | length == 0 }}"
-
-- &role_test
- name: Test if role id is present for role
- assert:
- that: "{{ role_dict[item]['privileges'] | list | length > 0 }}"
- with_items: "{{ role_list }}"
-
-- <<: *role_data
- name: Gather Role info in check mode
- check_mode: yes
-- <<: *list_to_dict
-- <<: *role_test
- name: Test if role id is present for role in check mode
diff --git a/test/integration/targets/vmware_local_role_manager/aliases b/test/integration/targets/vmware_local_role_manager/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_local_role_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_local_role_manager/tasks/main.yml b/test/integration/targets/vmware_local_role_manager/tasks/main.yml
deleted file mode 100644
index 86daa5921b..0000000000
--- a/test/integration/targets/vmware_local_role_manager/tasks/main.yml
+++ /dev/null
@@ -1,162 +0,0 @@
-# Test code for the vmware_local_role_manager module
-# Copyright: (c) 2017-2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Create a role without privileges in check mode
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- state: present
- register: role_creation
- check_mode: yes
-
-- name: Verify if role was created
- assert:
- that:
- - role_creation.changed
-
-- &create_role_data
- name: Create a role without privileges
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- state: present
- register: role_creation_0001
-
-- name: Verify if role was created
- assert:
- that:
- - role_creation_0001.changed
-
-- <<: *create_role_data
- name: Again create a role without privileges
-
-- name: verify if role is not created again
- assert:
- that:
- - not role_creation_0001.changed
-
-- &delete_role_data
- name: Delete a role
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- state: absent
- register: role_creation_0001
-
-- name: Verify if role is not present
- assert:
- that:
- - role_creation_0001.changed
-
-- <<: *delete_role_data
- name: Delete role again
-
-- name: Verify if role is absent again
- assert:
- that:
- - not role_creation_0001.changed
-
-- name: Create a role with privileges
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- local_privilege_ids: ['VirtualMachine.State.RenameSnapshot']
- state: present
- register: role_creation_0001
-
-- name: Verify if role is created with privileges
- assert:
- that:
- - role_creation_0001.changed
-
-- &exist_role_data
- name: Add a privilege to existing privileges
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- local_privilege_ids: ['Folder.Create']
- action: add
- state: present
- register: role_add
-
-- name: Verify if role is updated with updated privileges
- assert:
- that:
- - role_add.changed
-
-- <<: *exist_role_data
- name: Again add a privilege to existing privileges
-
-- name: Verify if role is not updated
- assert:
- that:
- - not role_add.changed
-
-- &remove_role_data
- name: Remove a privilege from existing privileges
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- local_privilege_ids: ['Folder.Create']
- action: remove
- register: role_remove
-
-- name: verify if role is updated with privileges
- assert:
- that:
- - role_remove.changed
-
-- <<: *remove_role_data
- name: Again remove a privilege from existing privileges
-
-- name: Verify if role is not updated
- assert:
- that:
- - not role_remove.changed
-
-- &set_priv_role_data
- name: Set a privilege to an existing role
- vmware_local_role_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- local_role_name: SampleRole_0001
- validate_certs: no
- local_privilege_ids: ['Folder.Create']
- action: set
- register: role_set
-
-- name: Verify if role is updated with privileges
- assert:
- that:
- - role_set.changed
-
-- <<: *set_priv_role_data
- name: Again set a privilege to an existing role
-
-- name: verify if role is not updated
- assert:
- that:
- - not role_set.changed
diff --git a/test/integration/targets/vmware_local_user_facts/aliases b/test/integration/targets/vmware_local_user_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_local_user_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_local_user_facts/tasks/main.yml b/test/integration/targets/vmware_local_user_facts/tasks/main.yml
deleted file mode 100644
index f0f1b56018..0000000000
--- a/test/integration/targets/vmware_local_user_facts/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_local_user_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Commenting local user testcases as older vcsim docker image
-# does not support this.
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_esxi_instance: true
-
- # Local user manager works only with standalone ESXi server
- - &user_fact_data
- name: Gather facts about users
- vmware_local_user_facts:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: False
- register: all_user_facts
-
- - name: ensure user facts are gathered
- assert:
- that:
- - not all_user_facts.changed
- - all_user_facts.local_user_facts is defined
-
- - <<: *user_fact_data
- name: Gather facts about users in check mode
- check_mode: yes
-
- - name: ensure user facts are gathered
- assert:
- that:
- - not all_user_facts.changed
- - all_user_facts.local_user_facts is defined
diff --git a/test/integration/targets/vmware_local_user_info/aliases b/test/integration/targets/vmware_local_user_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_local_user_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_local_user_info/tasks/main.yml b/test/integration/targets/vmware_local_user_info/tasks/main.yml
deleted file mode 100644
index f1985cca89..0000000000
--- a/test/integration/targets/vmware_local_user_info/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_local_user_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Commenting local user testcases as older vcsim docker image
-# does not support this.
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_esxi_instance: true
-
- # Local user manager works only with standalone ESXi server
- - &user_info_data
- name: Gather info about users
- vmware_local_user_info:
- hostname: "{{ esxi1 }}"
- username: "{{ esxi_user }}"
- password: "{{ esxi_password }}"
- validate_certs: False
- register: all_user_info
-
- - name: ensure user info are gathered
- assert:
- that:
- - not all_user_info.changed
- - all_user_info.local_user_info is defined
-
- - <<: *user_info_data
- name: Gather info about users in check mode
- check_mode: yes
-
- - name: ensure user info are gathered
- assert:
- that:
- - not all_user_info.changed
- - all_user_info.local_user_info is defined
diff --git a/test/integration/targets/vmware_local_user_manager/aliases b/test/integration/targets/vmware_local_user_manager/aliases
deleted file mode 100644
index 3431786750..0000000000
--- a/test/integration/targets/vmware_local_user_manager/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_local_user_manager/tasks/main.yml b/test/integration/targets/vmware_local_user_manager/tasks/main.yml
deleted file mode 100644
index f918d4a32f..0000000000
--- a/test/integration/targets/vmware_local_user_manager/tasks/main.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-- import_role:
- name: prepare_vmware_tests
-
-# Testcase 0003: Add Local user in vCenter server
-- name: add local user
- vmware_local_user_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- local_user_name: testuser_0003
- local_user_password: "SamplePassword!"
- state: present
- register: user_add_0003
- ignore_errors: yes
-
-- name: ensure user is created
- assert:
- that:
- - user_add_0003.changed == false
- - "{{ 'Failed to get local account manager settings' in user_add_0003.msg }}"
-
-# Testcase 0003: Delete Local user in vCenter server
-- name: Delete local user
- vmware_local_user_manager:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- local_user_name: testuser_0003
- state: absent
- register: user_delete_0004
- ignore_errors: yes
-
-- name: ensure user is deleted
- assert:
- that:
- - user_delete_0004.changed == false
- - "{{ 'Failed to get local account manager settings' in user_delete_0004.msg }}"
diff --git a/test/integration/targets/vmware_maintenancemode/aliases b/test/integration/targets/vmware_maintenancemode/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_maintenancemode/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_maintenancemode/tasks/main.yml b/test/integration/targets/vmware_maintenancemode/tasks/main.yml
deleted file mode 100644
index 2fa681927f..0000000000
--- a/test/integration/targets/vmware_maintenancemode/tasks/main.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-# Test code for the vmware_guest_maintenancemode module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: Enter maintenance mode
- vmware_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: test_result_0001
-
-- debug: var=test_result_0001
-
-- name: assert that changes were made
- assert:
- that:
- - test_result_0001 is changed
-
-- name: Enter maintenance mode again
- vmware_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: present
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: test_result_0002
-
-- debug: var=test_result_0002
-
-- name: assert that no changes were made
- assert:
- that:
- - not (test_result_0002 is changed)
-
-- name: Exit maintenance mode
- vmware_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: test_result_0003
-
-- debug: var=test_result_0003
-
-- name: assert that changes were made
- assert:
- that:
- - test_result_0003 is changed
-
-- name: Exit maintenance mode again
- vmware_maintenancemode:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- state: absent
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: test_result_0004
-
-- debug: var=test_result_0004
-
-- name: assert that no changes were made
- assert:
- that:
- - not (test_result_0004 is changed)
diff --git a/test/integration/targets/vmware_portgroup/aliases b/test/integration/targets/vmware_portgroup/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_portgroup/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_portgroup/tasks/main.yml b/test/integration/targets/vmware_portgroup/tasks/main.yml
deleted file mode 100644
index 081b9c792f..0000000000
--- a/test/integration/targets/vmware_portgroup/tasks/main.yml
+++ /dev/null
@@ -1,73 +0,0 @@
-# Test code for the vmware_portgroup module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
-
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_datacenter: true
- setup_attach_host: true
- setup_cluster: true
- setup_switch: true
-
- - name: Create portgroup without Portgroup and vSwitch
- vmware_portgroup:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- ignore_errors: yes
- register: no_pg_vs
-
- - assert:
- that:
- - '"missing" in no_pg_vs.msg'
-
- - name: Create portgroup without Portgroup
- vmware_portgroup:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- vswitch: ''
- validate_certs: no
- ignore_errors: yes
- register: no_vs
-
- - assert:
- that:
- - '"missing" in no_vs.msg'
-
- - name: Create portgroup without cluster
- vmware_portgroup:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- vswitch: '{{ switch1 }}'
- portgroup: 'pg_03'
- validate_certs: no
- ignore_errors: yes
- register: no_cluster
-
- - assert:
- that:
- - '"cluster_name" in no_cluster.msg'
-
- - name: Create portgroup
- vmware_portgroup:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- vswitch: '{{ switch1 }}'
- portgroup: 'pg_03'
- cluster_name: "{{ ccr1 }}"
- validate_certs: no
- state: present
- ignore_errors: yes
- register: pg_info
-
- - assert:
- that:
- - pg_info.changed
diff --git a/test/integration/targets/vmware_portgroup_facts/aliases b/test/integration/targets/vmware_portgroup_facts/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_portgroup_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_portgroup_facts/tasks/main.yml b/test/integration/targets/vmware_portgroup_facts/tasks/main.yml
deleted file mode 100644
index 83c96dfdae..0000000000
--- a/test/integration/targets/vmware_portgroup_facts/tasks/main.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-# Test code for the vmware_portgroup_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: Gather portgroup facts for all ESXi host from given cluster
- vmware_portgroup_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: portgroup_0001_results
-
-- assert:
- that:
- - "not portgroup_0001_results.changed"
- - "portgroup_0001_results.hosts_portgroup_facts is defined"
-
-- name: Gather portgroup facts for an ESXi host
- vmware_portgroup_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: portgroup_0002_results
-
-- assert:
- that:
- - "not portgroup_0002_results.changed"
- - "portgroup_0002_results.hosts_portgroup_facts is defined"
-
-- name: Gather all portgroup facts for an ESXi host
- vmware_portgroup_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- policies: true
- register: portgroup_0003_results
-
-- assert:
- that:
- - "not portgroup_0003_results.changed"
- - "portgroup_0003_results.hosts_portgroup_facts is defined"
-
-- name: Gather all portgroup facts for an ESXi host in check mode
- vmware_portgroup_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- policies: true
- register: portgroup_0004_results
- check_mode: yes
-
-- assert:
- that:
- - "not portgroup_0004_results.changed"
- - "portgroup_0004_results.hosts_portgroup_facts is defined"
diff --git a/test/integration/targets/vmware_portgroup_info/aliases b/test/integration/targets/vmware_portgroup_info/aliases
deleted file mode 100644
index 527c737768..0000000000
--- a/test/integration/targets/vmware_portgroup_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_portgroup_info/tasks/main.yml b/test/integration/targets/vmware_portgroup_info/tasks/main.yml
deleted file mode 100644
index f79ff9a673..0000000000
--- a/test/integration/targets/vmware_portgroup_info/tasks/main.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-# Test code for the vmware_portgroup_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-
-- name: Gather portgroup info for all ESXi host from given cluster
- vmware_portgroup_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- cluster_name: "{{ ccr1 }}"
- register: portgroup_0001_results
-
-- assert:
- that:
- - "not portgroup_0001_results.changed"
- - "portgroup_0001_results.hosts_portgroup_info is defined"
-
-- name: Gather portgroup info for an ESXi host
- vmware_portgroup_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- register: portgroup_0002_results
-
-- assert:
- that:
- - "not portgroup_0002_results.changed"
- - "portgroup_0002_results.hosts_portgroup_info is defined"
-
-- name: Gather all portgroup info for an ESXi host
- vmware_portgroup_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- policies: true
- register: portgroup_0003_results
-
-- assert:
- that:
- - "not portgroup_0003_results.changed"
- - "portgroup_0003_results.hosts_portgroup_info is defined"
-
-- name: Gather all portgroup info for an ESXi host in check mode
- vmware_portgroup_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- esxi_hostname: '{{ esxi1 }}'
- policies: true
- register: portgroup_0004_results
- check_mode: yes
-
-- assert:
- that:
- - "not portgroup_0004_results.changed"
- - "portgroup_0004_results.hosts_portgroup_info is defined"
diff --git a/test/integration/targets/vmware_resource_pool/aliases b/test/integration/targets/vmware_resource_pool/aliases
deleted file mode 100644
index e96093f00c..0000000000
--- a/test/integration/targets/vmware_resource_pool/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_resource_pool/tasks/main.yml b/test/integration/targets/vmware_resource_pool/tasks/main.yml
deleted file mode 100644
index 91f21a13be..0000000000
--- a/test/integration/targets/vmware_resource_pool/tasks/main.yml
+++ /dev/null
@@ -1,99 +0,0 @@
-# Test code for the vmware_resource_pool module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
- setup_datastore: true
-
-# Testcase 0001: Add Resource pool
-- name: add resource pool
- vmware_resource_pool:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: test_resource_0001
- mem_shares: normal
- mem_limit: -1
- mem_reservation: 0
- mem_expandable_reservations: True
- cpu_shares: normal
- cpu_limit: -1
- cpu_reservation: 0
- cpu_expandable_reservations: True
- state: present
- register: resource_result_0001
-
-- name: ensure a resource pool is present
- assert:
- that:
- - "{{ resource_result_0001.changed == true }}"
-
-
-# Testcase 0002: Add Resource pool again
-- name: add resource pool again
- vmware_resource_pool:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: test_resource_0001
- mem_shares: normal
- mem_limit: -1
- mem_reservation: 0
- mem_expandable_reservations: True
- cpu_shares: normal
- cpu_limit: -1
- cpu_reservation: 0
- cpu_expandable_reservations: True
- state: present
- register: resource_result_0002
-
-- name: check if nothing is changed
- assert:
- that:
- - "{{ resource_result_0002.changed == false }}"
-
-
-# Testcase 0003: Remove Resource pool
-- name: add resource pool again
- vmware_resource_pool:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: test_resource_0001
- state: absent
- register: resource_result_0003
-
-- name: check if resource pool is removed
- assert:
- that:
- - "{{ resource_result_0003.changed == true }}"
-
-# Testcase 0004: Remove Resource pool again
-- name: add resource pool again
- vmware_resource_pool:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- cluster: "{{ ccr1 }}"
- resource_pool: test_resource_0001
- state: absent
- register: resource_result_0004
-
-- name: check if resource pool is already removed
- assert:
- that:
- - "{{ resource_result_0004.changed == false }}"
diff --git a/test/integration/targets/vmware_resource_pool_facts/aliases b/test/integration/targets/vmware_resource_pool_facts/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_resource_pool_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml b/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml
deleted file mode 100644
index 44e419e136..0000000000
--- a/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Test code for the vmware_resource_pool_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Gather facts about resource pool
- vmware_resource_pool_facts:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: resource_result_0001
-
-- name: ensure a resource pool is present
- assert:
- that:
- - "{{ resource_result_0001.changed == false }}"
- - "{{ resource_result_0001.resource_pool_facts is defined }}"
diff --git a/test/integration/targets/vmware_resource_pool_info/aliases b/test/integration/targets/vmware_resource_pool_info/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_resource_pool_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_resource_pool_info/tasks/main.yml b/test/integration/targets/vmware_resource_pool_info/tasks/main.yml
deleted file mode 100644
index 51efa23944..0000000000
--- a/test/integration/targets/vmware_resource_pool_info/tasks/main.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Test code for the vmware_resource_pool_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
-
-- name: Gather info about resource pool
- vmware_resource_pool_info:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: resource_result_0001
-
-- name: ensure a resource pool is present
- assert:
- that:
- - "{{ resource_result_0001.changed == false }}"
- - "{{ resource_result_0001.resource_pool_info is defined }}"
diff --git a/test/integration/targets/vmware_tag/aliases b/test/integration/targets/vmware_tag/aliases
deleted file mode 100644
index 9cc67c4113..0000000000
--- a/test/integration/targets/vmware_tag/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-unsupported
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_tag/tasks/main.yml b/test/integration/targets/vmware_tag/tasks/main.yml
deleted file mode 100644
index 8961c6916a..0000000000
--- a/test/integration/targets/vmware_tag/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Test code for the vmware_tag Operations.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- include: tag_crud_ops.yml
-- include: tag_manager_ops.yml
-- include: tag_manager_duplicate_tag_cat.yml
diff --git a/test/integration/targets/vmware_tag/tasks/tag_crud_ops.yml b/test/integration/targets/vmware_tag/tasks/tag_crud_ops.yml
deleted file mode 100644
index 189e8a9809..0000000000
--- a/test/integration/targets/vmware_tag/tasks/tag_crud_ops.yml
+++ /dev/null
@@ -1,112 +0,0 @@
-# Test code for the vmware_tag CRUD Operations.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - &cat_create
- name: Create Category
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- category_name: Sample_Cat_0006
- category_description: Sample Description
- category_cardinality: 'multiple'
- state: present
- register: category_create
-
- - name: Check Category is created
- assert:
- that:
- - category_create.changed
-
- - <<: *cat_create
- name: Create category again
-
- - name: Check if no changes are made
- assert:
- that:
- - not category_create.changed
-
- - name: Set Cat_ID Paramter. Required for Tag creation
- set_fact: Cat_ID={{ category_create['category_results']['category_id'] }}
-
- # Testcase Create Tag
- - &tag_create
- name: Create a tag
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: Sample_Tag_0001
- category_id: "{{ Cat_ID }}"
- tag_description: Sample Description
- state: present
- register: tag_creation
-
- - name: Check tag is created
- assert:
- that:
- - tag_creation.changed
-
- - <<: *tag_create
- name: Create a tag again
-
- - name: Check if no changes are made
- assert:
- that:
- - not tag_creation.changed
-
- # Testcase Update Tag Description (reconfig)
- - &tag_update
- name: Update Tag Description
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: Sample_Tag_0001
- tag_description: Some fancy description
- state: present
- register: update_tag_desc
-
- - name: Check tag description updated
- assert:
- that:
- - update_tag_desc.changed
-
- - <<: *tag_update
- name: Update tag description again
-
- - name: Check if no changes are made
- assert:
- that:
- - not update_tag_desc.changed
-
- # Testcase Delete the Tag
- - &tag_delete
- name: Delete Tag
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: Sample_Tag_0001
- state: absent
- register: delete_tag
-
- - name: Check Tag is Deleted
- assert:
- that:
- - delete_tag.changed
- - <<: *tag_delete
- name: Delete tag again
-
- - name: Check if no changes are made
- assert:
- that:
- - not delete_tag.changed
diff --git a/test/integration/targets/vmware_tag/tasks/tag_manager_duplicate_tag_cat.yml b/test/integration/targets/vmware_tag/tasks/tag_manager_duplicate_tag_cat.yml
deleted file mode 100644
index e6ccb044ab..0000000000
--- a/test/integration/targets/vmware_tag/tasks/tag_manager_duplicate_tag_cat.yml
+++ /dev/null
@@ -1,163 +0,0 @@
-# Test code for the vmware_tag_manager
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: Create first category
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- category_name: "{{ cat_one }}"
- category_cardinality: 'multiple'
- state: present
- register: category_one_create
-
- - name: Create second category
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- category_name: "{{ cat_two }}"
- category_cardinality: 'multiple'
- state: present
- register: category_two_create
-
- - name: Check categories are created
- assert:
- that:
- - category_two_create.changed
- - category_one_create.changed
-
- - name: Set category one id
- set_fact: cat_one_id={{ category_one_create['category_results']['category_id'] }}
-
- - name: Set category two id
- set_fact: cat_two_id={{ category_two_create['category_results']['category_id'] }}
-
- - name: Create duplicate tags in two different categories
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ tag_one }}"
- category_id: "{{ cat_one_id }}"
- state: present
- register: tag_one_create
-
- - name: Check tag is created
- assert:
- that:
- - tag_one_create.changed
-
- - name: Create duplicate tags in two different categories
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ tag_one }}"
- category_id: "{{ cat_two_id }}"
- state: present
- register: tag_two_create
-
- - name: Check tag is created
- assert:
- that:
- - tag_two_create.changed
-
- - name: Create duplicate tags in two different categories
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ tag_two }}"
- category_id: "{{ cat_one_id }}"
- state: present
- register: tag_one_create
-
- - name: Check tag is created
- assert:
- that:
- - tag_one_create.changed
-
- - name: Create duplicate tags in two different categories
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ tag_two }}"
- category_id: "{{ cat_two_id }}"
- state: present
- register: tag_two_create
-
- - name: Check tag is created
- assert:
- that:
- - tag_two_create.changed
-
- - name: Get VM Facts
- vmware_vm_facts:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- register: vm_facts
-
- - set_fact: vm_name="{{ vm_facts['virtual_machines'][0]['guest_name'] }}"
-
- - name: Assign tags to given virtual machine
- vmware_tag_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_names:
- - "{{ cat_one }}:{{ tag_one }}"
- object_name: "{{ vm_name }}"
- object_type: VirtualMachine
- state: add
- delegate_to: localhost
- register: vm_tag_info
-
- - name: Check if we assigned correct tags
- assert:
- that:
- - vm_tag_info.changed
-
- - name: Delete Tags
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ item }}"
- state: absent
- register: delete_tag
- with_items:
- - "{{ tag_one }}"
- - "{{ tag_two }}"
-
- - name: Delete Categories
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- category_name: "{{ item }}"
- state: absent
- register: delete_categories
- with_items:
- - "{{ cat_one }}"
- - "{{ cat_two }}"
- vars:
- cat_one: category_1001
- cat_two: category_1002
- tag_one: tag_1001
- tag_two: tag_1002
diff --git a/test/integration/targets/vmware_tag/tasks/tag_manager_ops.yml b/test/integration/targets/vmware_tag/tasks/tag_manager_ops.yml
deleted file mode 100644
index 14158cfca0..0000000000
--- a/test/integration/targets/vmware_tag/tasks/tag_manager_ops.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-# Test code for the vmware_tag Manager Operations.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.com>
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - name: Get VM Facts
- vmware_vm_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- register: vm_info
-
- - set_fact: vm_name="{{ vm_info['virtual_machines'][0]['guest_name'] }}"
-
- # Get Tagname
- - &tag_info
- name: Get info about tag
- vmware_tag_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- register: tag_info
-
- - <<: *tag_info
- name: Get info about tag in check mode
- check_mode: yes
-
- - set_fact: Tag_Name={{ tag_info['tag_facts'].keys() | list }}
-
- - debug: var=Tag_Name
-
- # Testcase Assign tag to virtual Machine
- - &tag_assign
- name: Add tags to a virtual machine
- vmware_tag_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_names:
- - "{{ Tag_Name[0] }}"
- object_name: "{{ vm_name }}"
- object_type: VirtualMachine
- state: add
- register: tag_manager_ops
-
- - name: Check tag is assign to virtual machine
- assert:
- that:
- - tag_manager_ops.changed
-
- - <<: *tag_assign
- name: Add tags to a virtual machine again
-
- - name: Check tag is not assigned to virtual machine again
- assert:
- that:
- - not tag_manager_ops.changed
diff --git a/test/integration/targets/vmware_tag_info/aliases b/test/integration/targets/vmware_tag_info/aliases
deleted file mode 100644
index 9cc67c4113..0000000000
--- a/test/integration/targets/vmware_tag_info/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-unsupported
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_tag_info/tasks/main.yml b/test/integration/targets/vmware_tag_info/tasks/main.yml
deleted file mode 100644
index c7b0209a92..0000000000
--- a/test/integration/targets/vmware_tag_info/tasks/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Test code for the vmware_tag_info.
-# Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- include: tag_info.yml \ No newline at end of file
diff --git a/test/integration/targets/vmware_tag_info/tasks/tag_info.yml b/test/integration/targets/vmware_tag_info/tasks/tag_info.yml
deleted file mode 100644
index 819faaad34..0000000000
--- a/test/integration/targets/vmware_tag_info/tasks/tag_info.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test code for the vmware_tag_info.
-# Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - &tag_info
- name: Get info about tag
- vmware_tag_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- register: tag_info
-
- - <<: *tag_info
- name: Get info about tag in check mode
- check_mode: yes
-
- - name: Check if facts exists
- assert:
- that:
- - tag_info['tag_facts'] is defined
- - tag_info['tag_info'] is defined
diff --git a/test/integration/targets/vmware_tag_manager/aliases b/test/integration/targets/vmware_tag_manager/aliases
deleted file mode 100644
index 9cc67c4113..0000000000
--- a/test/integration/targets/vmware_tag_manager/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-cloud/vcenter
-unsupported
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_tag_manager/tasks/main.yml b/test/integration/targets/vmware_tag_manager/tasks/main.yml
deleted file mode 100644
index 54d2fa665f..0000000000
--- a/test/integration/targets/vmware_tag_manager/tasks/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Test code for the vmware_tag_manger Operations.
-# Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- include: tag_manager_dict.yml
diff --git a/test/integration/targets/vmware_tag_manager/tasks/tag_manager_dict.yml b/test/integration/targets/vmware_tag_manager/tasks/tag_manager_dict.yml
deleted file mode 100644
index 0b414552ae..0000000000
--- a/test/integration/targets/vmware_tag_manager/tasks/tag_manager_dict.yml
+++ /dev/null
@@ -1,113 +0,0 @@
-# Test code for the vmware_tag_manager Operations.
-# Copyright: (c) 2020, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# Testcase for https://github.com/ansible/ansible/issues/65765
-- when: vcsim is not defined
- block:
- - name: Create first category
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- category_name: "{{ cat_one }}"
- category_cardinality: 'multiple'
- state: present
- register: category_one_create
-
- - name: Set category one id
- set_fact: cat_one_id={{ category_one_create['category_results']['category_id'] }}
-
- - name: Create tag with colon in name
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ tag_one }}"
- category_id: "{{ cat_one_id }}"
- state: present
- register: tag_one_create
-
- - name: Check tag is created
- assert:
- that:
- - tag_one_create.changed
-
- - name: Get VM Facts
- vmware_vm_info:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: False
- register: vm_info
-
- - set_fact: vm_name="{{ vm_info['virtual_machines'][0]['guest_name'] }}"
-
- - name: Assign tag to given virtual machine
- vmware_tag_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_names:
- - category: "{{ cat_one }}"
- tag: "{{ tag_one }}"
- object_name: "{{ vm_name }}"
- object_type: VirtualMachine
- state: add
- delegate_to: localhost
- register: vm_tag_info
-
- - name: Check if we assigned correct tags
- assert:
- that:
- - vm_tag_info.changed
-
- - name: Remove tag to given virtual machine
- vmware_tag_manager:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_names:
- - category: "{{ cat_one }}"
- tag: "{{ tag_one }}"
- object_name: "{{ vm_name }}"
- object_type: VirtualMachine
- state: remove
- delegate_to: localhost
- register: vm_tag_info
-
- - name: Check if we removed correct tag
- assert:
- that:
- - vm_tag_info.changed
-
- - name: Delete Tags
- vmware_tag:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- tag_name: "{{ item }}"
- state: absent
- register: delete_tag
- with_items:
- - "{{ tag_one }}"
-
- - name: Delete Categories
- vmware_category:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- category_name: "{{ item }}"
- state: absent
- register: delete_categories
- with_items:
- - "{{ cat_one }}"
- vars:
- cat_one: category_1003
- tag_one: tag:1003
diff --git a/test/integration/targets/vmware_target_canonical_facts/aliases b/test/integration/targets/vmware_target_canonical_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_target_canonical_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml b/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml
deleted file mode 100644
index 45ac3bda84..0000000000
--- a/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_target_canonical_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support SCSI target releated operations
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
-
-- name: Gather target facts for all ESXi host from given cluster
- vmware_target_canonical_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: target_0001_results
-
-- assert:
- that:
- - "not target_0001_results.changed"
- - "target_0001_results.scsi_tgt_facts is defined"
-
-- name: Gather target facts for ESXi host
- vmware_target_canonical_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- register: target_0002_results
-
-- assert:
- that:
- - "not target_0002_results.changed"
- - "target_0002_results.scsi_tgt_facts is defined"
diff --git a/test/integration/targets/vmware_target_canonical_info/aliases b/test/integration/targets/vmware_target_canonical_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_target_canonical_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_target_canonical_info/tasks/main.yml b/test/integration/targets/vmware_target_canonical_info/tasks/main.yml
deleted file mode 100644
index a30abab45b..0000000000
--- a/test/integration/targets/vmware_target_canonical_info/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_target_canonical_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support SCSI target releated operations
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
-
-- name: Gather target info for all ESXi host from given cluster
- vmware_target_canonical_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- cluster_name: "{{ ccr1 }}"
- register: target_0001_results
-
-- assert:
- that:
- - "not target_0001_results.changed"
- - "target_0001_results.scsi_tgt_info is defined"
-
-- name: Gather target info for ESXi host
- vmware_target_canonical_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- esxi_hostname: '{{ esxi1 }}'
- register: target_0002_results
-
-- assert:
- that:
- - "not target_0002_results.changed"
- - "target_0002_results.scsi_tgt_info is defined"
diff --git a/test/integration/targets/vmware_vcenter_settings/aliases b/test/integration/targets/vmware_vcenter_settings/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_vcenter_settings/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_vcenter_settings/tasks/main.yml b/test/integration/targets/vmware_vcenter_settings/tasks/main.yml
deleted file mode 100644
index e2930e6206..0000000000
--- a/test/integration/targets/vmware_vcenter_settings/tasks/main.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-# Test code for the vmware_vcenter_settings module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- import_role:
- name: prepare_vmware_tests
-
-- name: Configure general settings in check mode
- vmware_vcenter_settings:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- database:
- max_connections: 50
- task_cleanup: true
- task_retention: 180
- event_cleanup: true
- event_retention: 180
- runtime_settings:
- unique_id: 7
- managed_address: 192.168.1.0
- vcenter_server_name: "{{ inventory_hostname }}"
- user_directory:
- timeout: 120
- query_limit: true
- query_limit_size: 100000
- validation: true
- validation_period: 1440
- mail:
- server: mail.example.local
- sender: vcenter@{{ inventory_hostname }}
- snmp_receivers:
- snmp_receiver_1_url: localhost
- snmp_receiver_1_enabled: true
- snmp_receiver_1_port: 162
- snmp_receiver_1_community: public
- timeout_settings:
- normal_operations: 30
- long_operations: 120
- logging_options: info
- validate_certs: no
- register: all_settings_results_check_mode
- check_mode: yes
-
-- debug: var=all_settings_results_check_mode
-
-- name: Configure general settings
- vmware_vcenter_settings:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- database:
- max_connections: 50
- task_cleanup: true
- task_retention: 180
- event_cleanup: true
- event_retention: 180
- runtime_settings:
- unique_id: 7
- managed_address: 192.168.1.0
- vcenter_server_name: "{{ inventory_hostname }}"
- user_directory:
- timeout: 120
- query_limit: true
- query_limit_size: 100000
- validation: true
- validation_period: 1440
- mail:
- server: mail.example.local
- sender: vcenter@{{ inventory_hostname }}
- snmp_receivers:
- snmp_receiver_1_url: localhost
- snmp_receiver_1_enabled: true
- snmp_receiver_1_port: 162
- snmp_receiver_1_community: public
- timeout_settings:
- normal_operations: 30
- long_operations: 120
- logging_options: info
- validate_certs: no
- register: all_settings_results
-
-- debug: var=all_settings_results
diff --git a/test/integration/targets/vmware_vcenter_statistics/aliases b/test/integration/targets/vmware_vcenter_statistics/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_vcenter_statistics/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml b/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml
deleted file mode 100644
index 446f84a35d..0000000000
--- a/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml
+++ /dev/null
@@ -1,133 +0,0 @@
-# Test code for the vmware_vcenter_statistics module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- import_role:
- name: prepare_vmware_tests
-
-- name: Disable all the statistics
- vmware_vcenter_statistics:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- interval_past_day:
- enabled: false
- interval_past_week:
- enabled: false
- interval_past_month:
- enabled: false
- interval_past_year:
- enabled: false
- validate_certs: no
- register: statistics_results_check_mode
-
-- name: Configure statistics in check mode
- vmware_vcenter_statistics: &stats
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- interval_past_day:
- enabled: true
- interval_minutes: 5
- save_for_days: 3
- level: 2
- interval_past_week:
- enabled: true
- interval_minutes: 30
- save_for_weeks: 1
- level: 2
- interval_past_month:
- enabled: true
- interval_hours: 2
- save_for_months: 1
- level: 1
- interval_past_year:
- enabled: true
- interval_days: 1
- save_for_years: 1
- level: 1
- validate_certs: no
- register: statistics_results_check_mode
- check_mode: yes
-
-- debug: var=statistics_results_check_mode
-
-- name: ensure statistics were configured
- assert:
- that:
- # Doesn't really work with vcsim. No matter which settings are used; they are always shown as already configured!?
- - statistics_results_check_mode is changed
- when: vcsim is not defined
-
-- name: Configure statistics
- vmware_vcenter_statistics:
- <<: *stats
- register: statistics_results
-
-- debug: var=statistics_results
-
-- name: ensure statistics were configured
- assert:
- that:
- - statistics_results is changed
- when: vcsim is not defined
-
-- name: Configure statistics (again)
- vmware_vcenter_statistics:
- <<: *stats
- register: statistics_results
-
-- debug: var=statistics_results
-
-- name: ensure statistics were configured
- assert:
- that:
- - not (statistics_results is changed)
- when: vcsim is not defined
-
-- name: Configure statistics intervall to level 2 for later check
- vmware_vcenter_statistics:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- interval_past_day:
- enabled: true
- level: 2
- interval_past_week:
- enabled: true
- level: 2
- interval_past_month:
- enabled: true
- level: 2
- interval_past_year:
- enabled: true
- level: 2
- validate_certs: no
- when: vcsim is not defined
-
-- name: Increase daily and weekly while decrease monthly and yearly
- vmware_vcenter_statistics:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- interval_past_day:
- enabled: true
- level: 3
- interval_past_week:
- enabled: true
- level: 3
- interval_past_month:
- enabled: true
- level: 1
- interval_past_year:
- enabled: true
- level: 1
- validate_certs: no
- register: statistics_results_mixed_increase_decrease
- when: vcsim is not defined
-
-- name: Ensure statistics were configured
- assert:
- that:
- - statistics_results_mixed_increase_decrease is changed
- when: vcsim is not defined
diff --git a/test/integration/targets/vmware_vm_facts/aliases b/test/integration/targets/vmware_vm_facts/aliases
deleted file mode 100644
index c2c1343eac..0000000000
--- a/test/integration/targets/vmware_vm_facts/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-shippable/vcenter/smoketest
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vm_facts/tasks/main.yml b/test/integration/targets/vmware_vm_facts/tasks/main.yml
deleted file mode 100644
index 948c9005ad..0000000000
--- a/test/integration/targets/vmware_vm_facts/tasks/main.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the vmware_vm_facts module
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# Copyright, (c) 2018, Fedor Vompe <f.vompe@comptek.ru>
-# 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_datastore: true
- setup_virtualmachines: true
-
-- when: vcsim is not defined
- block:
- - name: Get facts from a given ESXi
- vmware_vm_facts:
- validate_certs: false
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
-
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- &vm_data
- name: Get facts about available vms
- vmware_vm_facts:
- validate_certs: false
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: vm_facts
-
-- &set_vm_by_name
- set_fact:
- vm_by_name: "{{ dict(vm_facts.virtual_machines|map(attribute='guest_name')|zip(vm_facts.virtual_machines)) }}"
-
-- set_fact:
- my_vm1: "{{ vm_by_name['DC0_H0_VM1'] }}"
-- &vm_fact_check
- name: Verify if VM facts exist
- assert:
- that:
- - "my_vm1.esxi_hostname is defined"
- - "my_vm1.guest_fullname is defined"
- - "my_vm1.ip_address is defined"
- - "my_vm1.mac_address is defined"
- - "my_vm1.power_state is defined"
- - "my_vm1.uuid is defined"
- - "my_vm1.vm_network is defined"
-
-- <<: *vm_data
- name: Get facts about available vms in check mode
- check_mode: yes
-
-- <<: *vm_fact_check
- name: Verify if VM facts exist in check mode
-
-- name: Get folder name from VM
- vmware_guest_find:
- validate_certs: false
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- register: folder_path_info
-
-- set_fact:
- folder_path: "{{ folder_path_info.folders[0] }}"
- when: folder_path_info.folders is defined
-
-- name: Gather facts about VM using folder
- vmware_vm_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- folder: "{{ folder_path }}"
- register: vm_facts
- when: folder_path_info.folders is defined
-- debug: var=vm_facts
-
-- <<: *set_vm_by_name
-
-- set_fact:
- my_vm0: "{{ vm_by_name['DC0_H0_VM0'] }}"
-
-- name: Check if facts are returned for VM with folder specified
- assert:
- that:
- - "my_vm0.esxi_hostname is defined"
- - "my_vm0.guest_fullname is defined"
- - "my_vm0.ip_address is defined"
- - "my_vm0.mac_address is defined"
- - "my_vm0.power_state is defined"
- - "my_vm0.uuid is defined"
- - "my_vm0.vm_network is defined"
diff --git a/test/integration/targets/vmware_vm_host_drs_rule/aliases b/test/integration/targets/vmware_vm_host_drs_rule/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vm_host_drs_rule/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml b/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml
deleted file mode 100644
index 41ac2560a0..0000000000
--- a/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-# Test code for the vmware_vm_vm_drs_rule module.
-# Copyright: (c) 2017, Karsten Kaj Jakobsen <kj@patientsky.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - name: Create DRS VM group
- vmware_drs_group:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- # Options
- cluster_name: '{{ ccr1 }}'
- datacenter_name: '{{ dc1 }}'
- group_name: DC0_C0_VM_GR1
- vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}"
- state: present
- register: drs_vm_group_01_results
- - debug: var=drs_vm_group_01_results
-
- - name: Create DRS Host group
- vmware_drs_group:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- # Options
- cluster_name: '{{ ccr1 }}'
- datacenter_name: '{{ dc1 }}'
- group_name: DC0_C0_HOST_GR1
- hosts: '{{ esxi_hosts }}'
- state: present
- register: drs_host_group_01_results
- - debug: var=drs_host_group_01_results
-
- - name: Create mandatory DRS Affinity rule for VM/Host
- vmware_vm_host_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_host_aff_0001
- vm_group_name: DC0_C0_VM_GR1
- host_group_name: DC0_C0_HOST_GR1
- cluster_name: "{{ ccr1 }}"
- enabled: True
- affinity_rule: True
- mandatory: True
- register: drs_rule_host_0001_results
- - debug: var=drs_rule_host_0001_results
- - assert:
- that:
- - "{{ drs_rule_host_0001_results.changed }}"
-
- # TODO: create host/vm group when vcsim supports this
- - name: Create non-mandatory DRS Anti-Affinity rule for VM/Host
- vmware_vm_host_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_host_aff_0001
- vm_group_name: DC0_C0_VM_GR1
- host_group_name: DC0_C0_HOST_GR1
- cluster_name: "{{ ccr1 }}"
- enabled: True
- affinity_rule: False
- mandatory: False
- register: drs_rule_host_0002_results
- - debug: var=drs_rule_host_0002_results
- - assert:
- that:
- - "{{ drs_rule_host_0001_results.changed }}"
diff --git a/test/integration/targets/vmware_vm_info/aliases b/test/integration/targets/vmware_vm_info/aliases
deleted file mode 100644
index c2c1343eac..0000000000
--- a/test/integration/targets/vmware_vm_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/vcenter/group2
-shippable/vcenter/smoketest
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vm_info/tasks/main.yml b/test/integration/targets/vmware_vm_info/tasks/main.yml
deleted file mode 100644
index 93236581b4..0000000000
--- a/test/integration/targets/vmware_vm_info/tasks/main.yml
+++ /dev/null
@@ -1,100 +0,0 @@
-# Test code for the vmware_vm_info module
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# Copyright, (c) 2018, Fedor Vompe <f.vompe@comptek.ru>
-# 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_datastore: true
- setup_virtualmachines: true
-
-- when: vcsim is not defined
- block:
- - name: Get info from a given ESXi
- vmware_vm_info:
- validate_certs: false
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
-
-- import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
-- &vm_data
- name: Get info about available vms
- vmware_vm_info:
- validate_certs: false
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- register: vm_info
-
-- &set_vm_by_name
- set_fact:
- vm_by_name: "{{ dict(vm_info.virtual_machines|map(attribute='guest_name')|zip(vm_info.virtual_machines)) }}"
-
-- set_fact:
- my_vm1: "{{ vm_by_name['DC0_H0_VM1'] }}"
-- &vm_fact_check
- name: Verify if VM info exist
- assert:
- that:
- - "my_vm1.esxi_hostname is defined"
- - "my_vm1.guest_fullname is defined"
- - "my_vm1.ip_address is defined"
- - "my_vm1.mac_address is defined"
- - "my_vm1.power_state is defined"
- - "my_vm1.uuid is defined"
- - "my_vm1.vm_network is defined"
-
-- <<: *vm_data
- name: Get info about available vms in check mode
- check_mode: yes
-
-- <<: *vm_fact_check
- name: Verify if VM info exist in check mode
-
-- name: Get folder name from VM
- vmware_guest_find:
- validate_certs: false
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- name: "{{ virtual_machines[0].name }}"
- register: folder_path_info
-
-- set_fact:
- folder_path: "{{ folder_path_info.folders[0] }}"
- when: folder_path_info.folders is defined
-
-- name: Gather info about VM using folder
- vmware_vm_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- folder: "{{ folder_path }}"
- register: vm_info
- when: folder_path_info.folders is defined
-- debug: var=vm_info
-
-- <<: *set_vm_by_name
-
-- set_fact:
- my_vm0: "{{ vm_by_name['DC0_H0_VM0'] }}"
-
-- name: Check if info are returned for VM with folder specified
- assert:
- that:
- - "my_vm0.esxi_hostname is defined"
- - "my_vm0.guest_fullname is defined"
- - "my_vm0.ip_address is defined"
- - "my_vm0.mac_address is defined"
- - "my_vm0.power_state is defined"
- - "my_vm0.uuid is defined"
- - "my_vm0.vm_network is defined"
diff --git a/test/integration/targets/vmware_vm_storage_policy_info/aliases b/test/integration/targets/vmware_vm_storage_policy_info/aliases
deleted file mode 100644
index 900b4c2c3c..0000000000
--- a/test/integration/targets/vmware_vm_storage_policy_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-shippable/vcenter/group2
-cloud/vcenter
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_vm_storage_policy_info/tasks/main.yml b/test/integration/targets/vmware_vm_storage_policy_info/tasks/main.yml
deleted file mode 100644
index 25bba2a857..0000000000
--- a/test/integration/targets/vmware_vm_storage_policy_info/tasks/main.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-# Test code for the vmware_vm_storage_policy_info module.
-# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - &spbm_data
- name: Get information about vSphere SPBM info
- vmware_vm_storage_policy_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: no
- register: spbm_data
-
- - &spbm_check
- assert:
- that:
- - spbm_data.spbm_profiles is defined
-
- - <<: *spbm_data
- name: Get information about vSphere SPBM info in check mode
- check_mode: yes
-
- - <<: *spbm_check \ No newline at end of file
diff --git a/test/integration/targets/vmware_vm_vm_drs_rule/aliases b/test/integration/targets/vmware_vm_vm_drs_rule/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vm_vm_drs_rule/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml b/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml
deleted file mode 100644
index 8f049f7002..0000000000
--- a/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml
+++ /dev/null
@@ -1,144 +0,0 @@
-# Test code for the vmware_vm_vm_drs_rule module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support manage DRS rule
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_datastore: true
- setup_virtualmachines: true
-
- - &create_drs_rule
- name: Create a DRS Affinity rule for vms
- vmware_vm_vm_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_0001
- cluster_name: "{{ ccr1 }}"
- vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}"
- enabled: True
- affinity_rule: True
- mandatory: True
- register: drs_rule_0001_results
-
- - debug: var=drs_rule_0001_results
-
- - name: Check if changes are made
- assert:
- that:
- - drs_rule_0001_results.changed
-
- - <<: *create_drs_rule
- name: Create a DRS Affinity rule for vms again
-
- - name: Check if no changes are made if drs rule is created again
- assert:
- that:
- - not drs_rule_0001_results.changed
-
- - &update_drs_rule
- name: Update a DRS Affinity rule for vms
- vmware_vm_vm_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_0001
- cluster_name: "{{ ccr1 }}"
- vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}"
- enabled: False
- affinity_rule: True
- mandatory: False
- register: drs_rule_0001_results
-
- - name: Check if changes are made if drs rule is created
- assert:
- that:
- - drs_rule_0001_results.changed
-
- - <<: *update_drs_rule
- name: Update a DRS Affinity rule for vms again
-
- - name: Check if no changes are made if drs rule is created again
- assert:
- that:
- - not drs_rule_0001_results.changed
-
- - &delete_drs_rule
- name: Delete a DRS Affinity rule for vms
- vmware_vm_vm_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_0001
- cluster_name: "{{ ccr1 }}"
- state: absent
- register: drs_rule_0001_results
-
- - name: Check if DRS rule is delete
- assert:
- that:
- - drs_rule_0001_results.changed
-
- - <<: *delete_drs_rule
- name: Delete a DRS Affinity rule for vms again
-
- - name: Check if DRS rule is not delete again
- assert:
- that:
- - not drs_rule_0001_results.changed
-
- - &create_anti_drs_rule
- name: Create a DRS Anti-Affinity rule for vms
- vmware_vm_vm_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_0002
- cluster_name: "{{ ccr1 }}"
- vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}"
- enabled: True
- affinity_rule: False
- mandatory: False
- register: drs_rule_0002_results
-
- - debug: var=drs_rule_0002_results
-
- - name: Check if DRS Anti-Affinity rule is created
- assert:
- that:
- - drs_rule_0002_results.changed
-
- - <<: *create_anti_drs_rule
- name: Create a DRS Anti-Affinity rule for vms again
-
- - debug: var=drs_rule_0002_results
-
- - name: Check if no changes are made if DRS Anti-Affinity rule is created again
- assert:
- that:
- - not drs_rule_0002_results.changed
-
- - name: Delete a DRS Anti-Affinity rule for vms
- vmware_vm_vm_drs_rule:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- drs_rule_name: drs_rule_0002
- cluster_name: "{{ ccr1 }}"
- state: absent
- register: drs_rule_0002_results
-
- - name: Check if DRS rule is not delete
- assert:
- that:
- - drs_rule_0002_results.changed
diff --git a/test/integration/targets/vmware_vmkernel/aliases b/test/integration/targets/vmware_vmkernel/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vmkernel/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vmkernel/tasks/main.yml b/test/integration/targets/vmware_vmkernel/tasks/main.yml
deleted file mode 100644
index 88f159e457..0000000000
--- a/test/integration/targets/vmware_vmkernel/tasks/main.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Test code for the vmware_vmkernel module.
-# Copyright: (c) 2018, Christian Kotte <christian.kotte@gmx.de>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-- when: vcsim is not defined
- block:
-# TODO: vcsim does not support HostVirtualNicManager-related operations
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
- setup_switch: true
-
- - name: create basic portgroup
- vmware_portgroup:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- switch_name: "{{ switch1 }}"
- cluster_name: "{{ ccr1 }}"
- portgroup_name: vMotion
- vlan_id: 0
- state: present
- register: dvs_pg_result_0001
-
- - debug: var=dvs_pg_result_0001
- - name: Create VMkernel adapter with vMotion TCP/IP stack
- vmware_vmkernel: &new_vmkernel
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- vswitch: "{{ switch1 }}"
- portgroup: vMotion
- mtu: 9000
- network:
- type: static
- ip_address: 192.168.100.100
- subnet_mask: 255.255.255.0
- tcpip_stack: vmotion
- state: present
- validate_certs: no
- register: host_vmkernel
- - debug: var=host_vmkernel
-
- - name: Create VMkernel adapter in check mode
- vmware_vmkernel:
- <<: *new_vmkernel
- register: host_vmkernel
- check_mode: yes
- - debug: var=host_vmkernel
-
- - name: Delete VMkernel adapter
- vmware_vmkernel:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- vswitch: "{{ switch1 }}"
- device: '{{ host_vmkernel.device }}'
- portgroup: vMotion
- state: absent
- validate_certs: no
- register: host_vmkernel
- - debug: var=host_vmkernel
diff --git a/test/integration/targets/vmware_vmkernel_facts/aliases b/test/integration/targets/vmware_vmkernel_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vmkernel_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml b/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml
deleted file mode 100644
index cf70a6e6f5..0000000000
--- a/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_vmkernel_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support HostVirtualNicManager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather VMkernel facts for a given host
- vmware_vmkernel_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmkernel
- - debug: var=host_vmkernel
- - assert:
- that:
- - host_vmkernel.host_vmk_facts is defined
-
- - name: Gather VMkernel facts for a given host in check mode
- vmware_vmkernel_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmkernel_check_mode
- check_mode: yes
- - debug: var=host_vmkernel
- - assert:
- that:
- - host_vmkernel_check_mode.host_vmk_facts is defined
diff --git a/test/integration/targets/vmware_vmkernel_info/aliases b/test/integration/targets/vmware_vmkernel_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vmkernel_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vmkernel_info/tasks/main.yml b/test/integration/targets/vmware_vmkernel_info/tasks/main.yml
deleted file mode 100644
index 8c11359f88..0000000000
--- a/test/integration/targets/vmware_vmkernel_info/tasks/main.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-# Test code for the vmware_vmkernel_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# TODO: vcsim does not support HostVirtualNicManager related to operations
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- - name: Gather VMkernel info for a given host
- vmware_vmkernel_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmkernel
- - debug: var=host_vmkernel
- - assert:
- that:
- - host_vmkernel.host_vmk_info is defined
-
- - name: Gather VMkernel info for a given host in check mode
- vmware_vmkernel_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: host_vmkernel_check_mode
- check_mode: yes
- - debug: var=host_vmkernel
- - assert:
- that:
- - host_vmkernel_check_mode.host_vmk_info is defined
diff --git a/test/integration/targets/vmware_vmotion/aliases b/test/integration/targets/vmware_vmotion/aliases
deleted file mode 100644
index 1e26bda5d0..0000000000
--- a/test/integration/targets/vmware_vmotion/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_2esxi
diff --git a/test/integration/targets/vmware_vmotion/tasks/main.yml b/test/integration/targets/vmware_vmotion/tasks/main.yml
deleted file mode 100644
index 37617ab556..0000000000
--- a/test/integration/targets/vmware_vmotion/tasks/main.yml
+++ /dev/null
@@ -1,133 +0,0 @@
-# Test code for the vmware_vmotion module.
-# Copyright: (c) 2019, Pavan Bidkar <pbidkar@vmware.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_attach_host: true
- setup_datastore: true
- setup_resource_pool: true
-
-- when: vcsim is not defined
- block:
- - name: Add ESXi Hosts to vCenter
- vmware_host:
- datacenter_name: '{{ dc1 }}'
- esxi_hostname: '{{ item }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- folder: '/DC0/host'
- state: present
- with_items: "{{ esxi_hosts }}"
-
- - name: Disable the Maintenance Mode
- vmware_maintenancemode:
- esxi_hostname: '{{ item }}'
- state: absent
- with_items: "{{ esxi_hosts }}"
-
-- name: Create VM
- vmware_guest:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter: "{{ dc1 }}"
- validate_certs: no
- name: test_vm1
- folder: vm
- esxi_hostname: "{{ esxi1 }}"
- state: present
- guest_id: centos7_64Guest
- disk:
- - size_gb: 1
- type: thin
- datastore: '{{ rw_datastore }}'
- hardware:
- version: latest
- memory_mb: 1024
- num_cpus: 1
- scsi: paravirtual
- register: vm_create
-
-- name: Perform vMotion of non-existing VM
- vmware_vmotion:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- vm_name: not_a_thing
- destination_host: '{{ esxi2 }}'
- destination_datastore: '{{ rw_datastore }}'
- register: vm_vmotion
- ignore_errors: true
-
-- assert:
- that:
- - vm_vmotion.msg == "Failed to find the virtual machine with not_a_thing"
-
-
-- name: Perform vMotion of virtual machine
- vmware_vmotion:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- vm_name: test_vm1
- destination_host: '{{ esxi2 }}'
- destination_datastore: '{{ rw_datastore }}'
- register: vm_vmotion
-
-- name: assert that changes were made
- assert:
- that:
- - vm_vmotion is changed
-
-
-- name: Add ESXi Hosts to a cluster
- vmware_host:
- datacenter_name: '{{ dc1 }}'
- cluster_name: '{{ ccr1 }}'
- esxi_hostname: '{{ item }}'
- esxi_username: '{{ esxi_user }}'
- esxi_password: '{{ esxi_password }}'
- state: present
- with_items: "{{ esxi_hosts }}"
-
-- name: Disable the Maintenance Mode
- vmware_maintenancemode:
- esxi_hostname: '{{ item }}'
- state: absent
- with_items: "{{ esxi_hosts }}"
-
-- name: Perform vMotion of virtual machine to resource_pool
- vmware_vmotion:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- vm_name: test_vm1
- destination_host: '{{ esxi1 }}'
- destination_resourcepool: DC0_C0_RP1
- register: vm_vmotion_to_rp
-
-- name: assert that changes were made
- assert:
- that:
- - vm_vmotion_to_rp is changed
-
-- name: Perform storage vMotion of virtual machine
- vmware_vmotion:
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- validate_certs: no
- vm_name: test_vm1
- destination_host: '{{ esxi2 }}'
- destination_datastore: '{{ rw_datastore }}'
- register: vm_vmotion_to_datastore
-
-- name: assert that changes were made
- assert:
- that:
- - vm_vmotion_to_datastore is changed
diff --git a/test/integration/targets/vmware_vsan_health_info/aliases b/test/integration/targets/vmware_vsan_health_info/aliases
deleted file mode 100644
index b3bf7b222c..0000000000
--- a/test/integration/targets/vmware_vsan_health_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-unsupported
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_only
diff --git a/test/integration/targets/vmware_vsan_health_info/tasks/main.yml b/test/integration/targets/vmware_vsan_health_info/tasks/main.yml
deleted file mode 100644
index e456f8bd56..0000000000
--- a/test/integration/targets/vmware_vsan_health_info/tasks/main.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Test code for the vmware_vsan_health_info module.
-# Copyright: (c) 2019, OVH SAS
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- import_role:
- name: prepare_vmware_tests
-
-- when: vcsim is not defined
- block:
- - name: Gather health info from a vSAN's cluster
- vmware_vsan_health_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- cluster_name: "{{ ccr1 }}"
- validate_certs: False
- fetch_from_cache: False
- register: info
- - debug: var=info
- - assert:
- that:
- - info.vsan_health_info is defined
diff --git a/test/integration/targets/vmware_vspan_session/aliases b/test/integration/targets/vmware_vspan_session/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vspan_session/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vspan_session/tasks/main.yml b/test/integration/targets/vmware_vspan_session/tasks/main.yml
deleted file mode 100644
index 24566bd3c1..0000000000
--- a/test/integration/targets/vmware_vspan_session/tasks/main.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-# Test code for the vmware_vspan_session module.
-# Copyright: (c) 2018, Peter Gyorgy <gyorgy.peter@edu.bme.hu>
-# 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_attach_host: true
-
-
-- name: add distributed vSwitch
- vmware_dvswitch:
- validate_certs: False
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- datacenter_name: "{{ dc1 }}"
- state: present
- switch_name: dvswitch_0001
- mtu: 9000
- uplink_quantity: 2
- discovery_proto: lldp
- discovery_operation: both
- register: dvs_result_0001
-- debug: var=dvs_result_0001
-- name: ensure distributed vswitch is present
- assert:
- that:
- - "{{ dvs_result_0001.changed == true }}"
-
-- name: Create vlan portgroup with all security and port policies
- vmware_dvs_portgroup:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- portgroup_name: vlan-123-portrgoup
- switch_name: dvswitch_0001
- vlan_id: 123
- num_ports: 120
- portgroup_type: earlyBinding
- state: present
- network_policy:
- promiscuous: yes
- forged_transmits: yes
- mac_changes: yes
- port_policy:
- block_override: yes
- ipfix_override: yes
- live_port_move: yes
- network_rp_override: yes
- port_config_reset_at_disconnect: yes
- security_override: yes
- shaping_override: yes
- traffic_filter_override: yes
- uplink_teaming_override: yes
- vendor_config_override: yes
- vlan_override: yes
- register: portgroup_create_result
-
-- name: ensure portgroup was created
- assert:
- that:
- - portgroup_create_result.changed
-
-- when: vcsim is not defined
- block:
- - name: create a session.
- vmware_vspan_session:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- switch: dvswitch_0001
- name: "session_0001"
- state: "present"
- enabled: True
- description: "basic_description"
- source_port_transmitted: 13
- source_port_received: 13
- destination_port: 12
- register: vspan_session_create_result
- - debug: var=vspan_session_create_result
- - name: ensure session was created
- assert:
- that:
- - vspan_session_create_result.changed
-
- - name: delete a session.
- vmware_vspan_session:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- switch: dvswitch_0001
- name: "session_0001"
- state: "absent"
- register: vspan_session_delete_result
- - name: ensure session was deleted
- assert:
- that:
- - vspan_session_delete_result.changed
diff --git a/test/integration/targets/vmware_vswitch/aliases b/test/integration/targets/vmware_vswitch/aliases
deleted file mode 100644
index 1e26bda5d0..0000000000
--- a/test/integration/targets/vmware_vswitch/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_2esxi
diff --git a/test/integration/targets/vmware_vswitch/tasks/main.yml b/test/integration/targets/vmware_vswitch/tasks/main.yml
deleted file mode 100644
index be19e88cc7..0000000000
--- a/test/integration/targets/vmware_vswitch/tasks/main.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-# Test code for the vmware_vswitch module.
-# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-- when: vcsim is not defined
- block:
- - import_role:
- name: prepare_vmware_tests
- vars:
- setup_attach_host: true
-
- # TODO: akasurde: VCSIM does not suport network manager system
- - name: Ensure the vswitch is not already here
- include_tasks: teardown.yml
-
- - name: Add a nic to a switch
- vmware_vswitch:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: no
- switch: vmswitch_0001
- nics: vmnic1
- state: present
- register: add_nic_run
- - debug: var=add_nic_run
- - assert:
- that:
- - add_nic_run.changed == true
-
- - name: Add a nic to a switch again
- vmware_vswitch:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: no
- switch: vmswitch_0001
- nics: vmnic1
- state: present
- register: add_nic_again_run
- - assert:
- that:
- - add_nic_again_run.changed == false
-
- - name: Remove a switch
- vmware_vswitch:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: no
- switch: vmswitch_0001
- state: absent
- register: remove_nic_run
- - assert:
- that:
- - remove_nic_run is changed
-
- - name: Remove a switch again
- vmware_vswitch:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- validate_certs: no
- switch: vmswitch_0001
- state: absent
- register: remove_nic_again_run
- - assert:
- that:
- - not (remove_nic_again_run is changed)
-
- - name: Add vswitch to a specific host system
- vmware_vswitch:
- validate_certs: False
- hostname: '{{ vcenter_hostname }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- switch: vmswitch_0002
- nics: vmnic1
- esxi_hostname: '{{ esxi2 }}'
- register: add_vswitch_with_host_system
- - debug: var=add_vswitch_with_host_system
- - assert:
- that:
- - add_vswitch_with_host_system is changed
- always:
- - include_tasks: teardown.yml
diff --git a/test/integration/targets/vmware_vswitch/tasks/teardown.yml b/test/integration/targets/vmware_vswitch/tasks/teardown.yml
deleted file mode 100644
index fb590664fe..0000000000
--- a/test/integration/targets/vmware_vswitch/tasks/teardown.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-- name: Remove the vSwitches (ESXi1)
- vmware_vswitch:
- hostname: '{{ esxi1 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- switch_name: vmswitch_0001
- state: absent
-
-- name: Remove the vSwitches (ESXi2)
- vmware_vswitch:
- hostname: '{{ esxi2 }}'
- username: '{{ esxi_user }}'
- password: '{{ esxi_password }}'
- switch_name: vmswitch_0002
- state: absent
- when: esxi2 is defined
diff --git a/test/integration/targets/vmware_vswitch_facts/aliases b/test/integration/targets/vmware_vswitch_facts/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vswitch_facts/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vswitch_facts/tasks/main.yml b/test/integration/targets/vmware_vswitch_facts/tasks/main.yml
deleted file mode 100644
index f0bc95ed6d..0000000000
--- a/test/integration/targets/vmware_vswitch_facts/tasks/main.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Test code for the vmware_vswitch_facts module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-# TODO: vcsim does not support networkConfig related to operations
-
-- name: Gather vswitch facts about all hosts in given cluster
- vmware_vswitch_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: switch_facts
-
-- debug: var=switch_facts
-
-- assert:
- that:
- - switch_facts.hosts_vswitch_facts is defined
-
-- name: Gather vswitch facts about all hosts in given cluster in check mode
- vmware_vswitch_facts:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: switch_facts_check_mode
- check_mode: yes
-
-- debug: var=switch_facts_check_mode
-
-- assert:
- that:
- - switch_facts_check_mode.hosts_vswitch_facts is defined
diff --git a/test/integration/targets/vmware_vswitch_info/aliases b/test/integration/targets/vmware_vswitch_info/aliases
deleted file mode 100644
index fa0e18d454..0000000000
--- a/test/integration/targets/vmware_vswitch_info/aliases
+++ /dev/null
@@ -1,4 +0,0 @@
-cloud/vcenter
-shippable/vcenter/group2
-needs/target/prepare_vmware_tests
-zuul/vmware/vcenter_1esxi
diff --git a/test/integration/targets/vmware_vswitch_info/tasks/main.yml b/test/integration/targets/vmware_vswitch_info/tasks/main.yml
deleted file mode 100644
index 87658f0a9b..0000000000
--- a/test/integration/targets/vmware_vswitch_info/tasks/main.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Test code for the vmware_vswitch_info module.
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_attach_host: true
-
-# TODO: vcsim does not support networkConfig related to operations
-
-- name: Gather vswitch info about all hosts in given cluster
- vmware_vswitch_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: switch_info
-
-- debug: var=switch_info
-
-- assert:
- that:
- - switch_info.hosts_vswitch_info is defined
-
-- name: Gather vswitch info about all hosts in given cluster in check mode
- vmware_vswitch_info:
- hostname: "{{ vcenter_hostname }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- esxi_hostname: '{{ esxi1 }}'
- validate_certs: no
- register: switch_info_check_mode
- check_mode: yes
-
-- debug: var=switch_info_check_mode
-
-- assert:
- that:
- - switch_info_check_mode.hosts_vswitch_info is defined
diff --git a/test/integration/targets/vsphere_file/aliases b/test/integration/targets/vsphere_file/aliases
deleted file mode 100644
index ad7ccf7ada..0000000000
--- a/test/integration/targets/vsphere_file/aliases
+++ /dev/null
@@ -1 +0,0 @@
-unsupported
diff --git a/test/integration/targets/vsphere_file/tasks/main.yml b/test/integration/targets/vsphere_file/tasks/main.yml
deleted file mode 100644
index d3b0284b32..0000000000
--- a/test/integration/targets/vsphere_file/tasks/main.yml
+++ /dev/null
@@ -1,369 +0,0 @@
-- set_fact:
- file: '/ansible_test_file.txt'
- directory: '/ansible_test_directory/'
- vsphere_connection: &vsphere_conn
- host: '{{ vcenter_ipaddress }}'
- username: '{{ vcenter_username }}'
- password: '{{ vcenter_password }}'
- datacenter: '{{ vcenter_datacenter }}'
- datastore: '{{ vcenter_datastore }}'
- validate_certs: false
-
-- set_fact:
- vsphere_conection_file: &vsphere_conn_file
- <<: *vsphere_conn
- path: '{{ file }}'
- vsphere_conection_dir: &vsphere_conn_dir
- <<: *vsphere_conn
- path: '{{ directory }}'
-
-# Clean up environment
-- name: Delete file
- vsphere_file:
- <<: *vsphere_conn_file
- state: absent
- ignore_errors: true
-
-- name: Delete directory
- vsphere_file:
- <<: *vsphere_conn_dir
- state: absent
- ignore_errors: true
-
-# Test file operations
-- name: Test file at start (check_mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- check_mode: true
- ignore_errors: true
- register: cm_test_file_start
-
-- name: Verify cm_test_file_start
- assert:
- that:
- - cm_test_file_start is failed
- - cm_test_file_start.state == 'absent'
- - cm_test_file_start.status == 404
-
-- name: Test file at start (normal mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- register: nm_test_file_start
- ignore_errors: true
-
-- name: Verify nm_test_file_start
- assert:
- that:
- - nm_test_file_start is failed
- - nm_test_file_start.state == 'absent'
- - nm_test_file_start.status == 404
-
-- name: Touch file (check_mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: touch
- check_mode: true
- register: cm_touch_file
-
-- name: Verify cm_touch_file
- assert:
- that:
- - cm_touch_file is success
- - cm_touch_file is changed
- - cm_touch_file.reason == 'Created'
- - cm_touch_file.size == 0
- #- cm_touch_file.state == 'file' # FIXME
- - cm_touch_file.status == 201
-
-- name: Touch file (normal mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: touch
- register: nm_touch_file
-
-- name: Verify nm_touch_file
- assert:
- that:
- - nm_touch_file is success
- - nm_touch_file is changed
- - nm_touch_file.reason == 'Created'
- - nm_touch_file.size == 0
- #- nm_touch_file.state == 'file' # FIXME
- - nm_touch_file.status == 201
-
-- name: Test file after touch (check_mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- check_mode: true
- register: cm_test_file_touch
-
-- name: Verify cm_test_file_touch
- assert:
- that:
- - cm_test_file_touch is success
- - cm_test_file_touch is not changed
- - cm_test_file_touch.size == 0
- #- cm_test_file_touch.state == 'file' # FIXME
- - cm_test_file_touch.status == 200
-
-- name: Test file after touch (normal mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- register: nm_test_file_touch
-
-- name: Verify nm_test_file_touch
- assert:
- that:
- - nm_test_file_touch is success
- - nm_test_file_touch is not changed
- - nm_test_file_touch.size == 0
- #- nm_test_file_touch.state == 'file' # FIXME
- - nm_test_file_touch.status == 200
-
-- name: Delete file (check_mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: absent
- check_mode: true
- register: cm_delete_file
-
-- name: Verify cm_delete_file
- assert:
- that:
- - cm_delete_file is success
- - cm_delete_file is changed
- - cm_delete_file.reason == 'No Content'
- - cm_delete_file.size == None
- - cm_delete_file.state == 'absent'
- - cm_delete_file.status == 204
-
-- name: Delete file (normal mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: absent
- register: nm_delete_file
-
-- name: Verify nm_delete_file
- assert:
- that:
- - nm_delete_file is success
- - nm_delete_file is changed
- - nm_delete_file.reason == 'No Content'
- - nm_delete_file.size == None
- - nm_delete_file.state == 'absent'
- - nm_delete_file.status == 204
-
-- name: Test file after delete (check_mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- check_mode: true
- ignore_errors: true
- register: cm_test_file_delete
-
-- name: Verify cm_test_file_delete
- assert:
- that:
- - cm_test_file_delete is failed
- - cm_test_file_delete.size == None
- - cm_test_file_delete.state == 'absent'
- - cm_test_file_delete.status == 404
-
-- name: Test file after delete (normal mode)
- vsphere_file:
- <<: *vsphere_conn_file
- state: file
- ignore_errors: true
- register: nm_test_file_delete
-
-- name: Verify nm_test_file_delete
- assert:
- that:
- - nm_test_file_delete is failed
- - nm_test_file_delete.size == None
- - nm_test_file_delete.state == 'absent'
- - nm_test_file_delete.status == 404
-
-# Test directory operations
-- name: Test directory at start (check_mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- state: file
- check_mode: true
- ignore_errors: true
- register: cm_test_dir_start
-
-- name: Verify cm_test_dir_start
- assert:
- that:
- - cm_test_dir_start is failed
- - cm_test_dir_start.size == None
- - cm_test_dir_start.state == 'absent'
- - cm_test_dir_start.status == 404
-
-- name: Test directory at start (normal mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- state: file
- ignore_errors: true
- register: nm_test_dir_start
-
-# NOTE: Deleting directories is not implemented.
-- name: Verify nm_test_dir_start
- assert:
- that:
- - nm_test_dir_start is failed
- - nm_test_dir_start.size == None
- - nm_test_dir_start.state == 'absent'
- - nm_test_dir_start.status == 404
-
-- name: Create directory (check_mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: directory
- check_mode: true
- register: cm_create_dir
-
-- name: Verify cm_create_dir
- assert:
- that:
- - cm_create_dir is success
- - cm_create_dir is changed
- - cm_create_dir.reason == 'Created'
- - cm_create_dir.size == None
- #- cm_create_dir.state == 'directory' # FIXME
- - cm_create_dir.status == 201
-
-- name: Create directory (normal mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: directory
- register: nm_create_dir
-
-- name: Verify nm_create_dir
- assert:
- that:
- - nm_create_dir is success
- - nm_create_dir is changed
- - nm_create_dir.reason == 'Created'
- - nm_create_dir.size == None
- #- nm_create_dir.state == 'directory' # FIXME
- - nm_create_dir.status == 201
-
-- name: Test directory after create (check_mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: file
- check_mode: true
- register: cm_test_dir_create
-
-- name: Verify cm_test_dir_create
- assert:
- that:
- - cm_test_dir_create is success
- - cm_test_dir_create is not changed
- #- cm_test_dir_create.size == 0
- #- cm_test_dir_create.state == 'file' # FIXME
- - cm_test_dir_create.status == 200
-
-- name: Test directory after create (normal mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: file
- register: nm_test_dir_create
-
-- name: Verify nm_test_dir_create
- assert:
- that:
- - nm_test_dir_create is success
- - nm_test_dir_create is not changed
- #- nm_test_dir_create.size == 0
- #- nm_test_dir_create.state == 'file' # FIXME
- - nm_test_dir_create.status == 200
-
-- name: Delete directory (check_mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- state: absent
- check_mode: true
- ignore_errors: true
- register: cm_delete_dir
-
-- name: Verify cm_delete_dir
- assert:
- that:
- - cm_delete_dir is success
- - cm_delete_dir is changed
- - cm_delete_dir.reason == 'No Content'
- - cm_delete_dir.size == None
- - cm_delete_dir.state == 'absent'
- - cm_delete_dir.status == 204
-
-- name: Delete directory (normal mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: absent
- ignore_errors: true
- register: nm_delete_dir
-
-# NOTE: Deleting directories is not implemented
-- name: Verify nm_delete_dir
- assert:
- that:
- - nm_delete_dir is failed # FIXME
- #- nm_delete_dir is success
- #- nm_delete_dir is changed
- - nm_delete_dir.reason == 'Method Not Allowed' # FIXME
- #- cm_delete_dir.reason == 'No Content'
- #- nm_delete_dir.size == None
- #- cm_delete_dir.state == 'absent'
- - nm_delete_dir.status == 405 # FIXME
- #- cm_delete_dir.status == 204
-
-- name: Test directory after delete (check_mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: file
- check_mode: true
- ignore_errors: true
- register: cm_test_dir_delete
-
-- name: Verify cm_test_dir_delete
- assert:
- that:
- - cm_test_dir_delete is success # FIXME
- - cm_test_dir_delete is not changed #FIXME
- #- cm_test_dir_delete is failed
- #- cm_test_dir_delete.size == None
- #- cm_test_dir_delete.state == 'file'
- - cm_test_dir_delete.status == 200 # FIXME
- #- nm_test_dir_delete.status == 404
-
-- name: Test directory after delete (normal mode)
- vsphere_file:
- <<: *vsphere_conn_dir
- path: '{{ directory }}'
- state: file
- ignore_errors: true
- register: nm_test_dir_delete
-
-- name: Verify nm_test_dir_delete
- assert:
- that:
- - nm_test_dir_delete is success # FIXME
- - nm_test_dir_delete is not changed #FIXME
- #- nm_test_dir_delete is failed
- #- nm_test_dir_delete.size == None
- #- nm_test_dir_delete.state == 'file'
- - nm_test_dir_delete.status == 200 # FIXME
- #- nm_test_dir_delete.status == 404
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index cd22ba8e57..a290c597a1 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -1,7 +1,3 @@
-contrib/inventory/vmware.py future-import-boilerplate
-contrib/inventory/vmware.py metaclass-boilerplate
-contrib/inventory/vmware_inventory.py future-import-boilerplate
-contrib/inventory/vmware_inventory.py metaclass-boilerplate
docs/bin/find-plugin-refs.py future-import-boilerplate
docs/bin/find-plugin-refs.py metaclass-boilerplate
docs/docsite/_extensions/pygments_lexer.py future-import-boilerplate
@@ -235,8 +231,6 @@ lib/ansible/module_utils/urls.py future-import-boilerplate
lib/ansible/module_utils/urls.py metaclass-boilerplate
lib/ansible/module_utils/urls.py pylint:blacklisted-name
lib/ansible/module_utils/urls.py replace-urlopen
-lib/ansible/module_utils/vca.py future-import-boilerplate
-lib/ansible/module_utils/vca.py metaclass-boilerplate
lib/ansible/module_utils/yumdnf.py future-import-boilerplate
lib/ansible/module_utils/yumdnf.py metaclass-boilerplate
lib/ansible/modules/cloud/amazon/aws_netapp_cvs_FileSystems.py validate-modules:parameter-list-no-elements
@@ -1540,132 +1534,6 @@ lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py metaclass-boilerplate
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py validate-modules:parameter-list-no-elements
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile_info.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/_vmware_dns_config.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/_vmware_drs_group_facts.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:doc-missing-type
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vca_fw.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:doc-missing-type
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vca_nat.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vca_vapp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vca_vapp.py validate-modules:doc-missing-type
-lib/ansible/modules/cloud/vmware/vca_vapp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vca_vapp.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/cloud/vmware/vca_vapp.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_category.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/cloud/vmware/vmware_category.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/cloud/vmware/vmware_cfg_backup.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_cluster.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/cloud/vmware/vmware_cluster.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_cluster_drs.py validate-modules:invalid-ansiblemodule-schema
-lib/ansible/modules/cloud/vmware/vmware_cluster_ha.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/cloud/vmware/vmware_content_library_manager.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_datastore_info.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py use-argspec-type-path
-lib/ansible/modules/cloud/vmware/vmware_deploy_ovf.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_drs_group.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_drs_group.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_drs_group_info.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_dvs_host.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_dvs_portgroup_find.py validate-modules:required_if-requirements-type
-lib/ansible/modules/cloud/vmware/vmware_dvswitch.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_dvswitch.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_dvswitch.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_lacp.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_nioc.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_pvlans.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_dvswitch_uplink_pg.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_guest.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_guest.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_guest.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_controller.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attribute_defs.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_guest_custom_attributes.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_guest_disk.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_guest_file_operation.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_guest_info.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_network.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_sendkey.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_serial_port.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py validate-modules:parameter-state-invalid-choice
-lib/ansible/modules/cloud/vmware/vmware_host_datastore.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_host_dns.py validate-modules:mutually_exclusive-unknown
-lib/ansible/modules/cloud/vmware/vmware_host_dns.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_host_facts.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_host_lockdown.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_host_ntp.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_host_snmp.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_local_role_manager.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_portgroup.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_portgroup.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_portgroup.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_portgroup.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_portgroup.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_tag_manager.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_vcenter_settings.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_vcenter_settings.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_vcenter_settings.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_vcenter_settings.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_vcenter_statistics.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_vcenter_statistics.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_vcenter_statistics.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_vcenter_statistics.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_vcenter_statistics.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/vmware/vmware_vm_host_drs_rule.py validate-modules:required_if-is_one_of-type
-lib/ansible/modules/cloud/vmware/vmware_vm_shell.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_vm_vm_drs_rule.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:mutually_exclusive-unknown
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_vmkernel.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_vspan_session.py validate-modules:missing-suboption-docs
-lib/ansible/modules/cloud/vmware/vmware_vspan_session.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/vmware/vmware_vspan_session.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/vmware/vmware_vswitch.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/vmware/vsphere_copy.py validate-modules:undocumented-parameter
lib/ansible/modules/commands/command.py validate-modules:doc-missing-type
lib/ansible/modules/commands/command.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/commands/command.py validate-modules:parameter-list-no-elements
@@ -4201,7 +4069,6 @@ lib/ansible/plugins/action/normal.py action-plugin-docs # default action plugin
lib/ansible/plugins/action/nxos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/cache/base.py ansible-doc!skip # not a plugin, but a stub for backwards compatibility
-lib/ansible/plugins/connection/vmware_tools.py yamllint:unparsable-with-libyaml
lib/ansible/plugins/doc_fragments/asa.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/asa.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/aws.py future-import-boilerplate
@@ -4282,12 +4149,6 @@ lib/ansible/plugins/doc_fragments/url.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/url.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/validate.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/validate.py metaclass-boilerplate
-lib/ansible/plugins/doc_fragments/vca.py future-import-boilerplate
-lib/ansible/plugins/doc_fragments/vca.py metaclass-boilerplate
-lib/ansible/plugins/doc_fragments/vmware.py future-import-boilerplate
-lib/ansible/plugins/doc_fragments/vmware.py metaclass-boilerplate
-lib/ansible/plugins/doc_fragments/vmware_rest_client.py future-import-boilerplate
-lib/ansible/plugins/doc_fragments/vmware_rest_client.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/vyos.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/vyos.py metaclass-boilerplate
lib/ansible/plugins/lookup/sequence.py pylint:blacklisted-name
@@ -4510,9 +4371,6 @@ test/support/windows-integration/plugins/modules/win_security_policy.ps1 pslint!
test/support/windows-integration/plugins/modules/win_shell.ps1 pslint!skip
test/support/windows-integration/plugins/modules/win_wait_for.ps1 pslint!skip
test/units/config/manager/test_find_ini_config_file.py future-import-boilerplate
-test/units/contrib/inventory/test_vmware_inventory.py future-import-boilerplate
-test/units/contrib/inventory/test_vmware_inventory.py metaclass-boilerplate
-test/units/contrib/inventory/test_vmware_inventory.py pylint:blacklisted-name
test/units/executor/test_play_iterator.py pylint:blacklisted-name
test/units/inventory/test_group.py future-import-boilerplate
test/units/inventory/test_group.py metaclass-boilerplate
diff --git a/test/units/contrib/inventory/test_vmware_inventory.py b/test/units/contrib/inventory/test_vmware_inventory.py
deleted file mode 100644
index 8ecc8efcb6..0000000000
--- a/test/units/contrib/inventory/test_vmware_inventory.py
+++ /dev/null
@@ -1,102 +0,0 @@
-import json
-import os
-import pytest
-import sys
-
-BASIC_INVENTORY = {
- 'all': {
- 'hosts': ['foo', 'bar']
- },
- '_meta': {
- 'hostvars': {
- 'foo': {'hostname': 'foo'},
- 'bar': {'hostname': 'bar'}
- }
- }
-}
-
-
-class FakeArgs(object):
- debug = False
- write_dumpfile = None
- load_dumpfile = None
- host = False
- list = True
-
-
-@pytest.fixture
-def vmware_inventory():
- inventory_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', 'contrib', 'inventory'))
-
- sys.path.append(inventory_dir)
-
- try:
- import vmware_inventory
- except BaseException as ex:
- pytest.skip(ex)
- finally:
- sys.path.remove(inventory_dir)
-
- return vmware_inventory
-
-
-def test_host_info_returns_single_host(vmware_inventory):
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.inventory = BASIC_INVENTORY
- foo = vmw.get_host_info('foo')
- bar = vmw.get_host_info('bar')
- assert foo == {'hostname': 'foo'}
- assert bar == {'hostname': 'bar'}
-
-
-def test_show_returns_serializable_data(vmware_inventory):
- fakeargs = FakeArgs()
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.args = fakeargs
- vmw.inventory = BASIC_INVENTORY
- showdata = vmw.show()
- json.loads(showdata)
-
-
-def test_show_list_returns_serializable_data(vmware_inventory):
- fakeargs = FakeArgs()
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.args = fakeargs
- vmw.args.list = True
- vmw.inventory = BASIC_INVENTORY
- showdata = vmw.show()
- json.loads(showdata)
-
-
-def test_show_list_returns_all_data(vmware_inventory):
- fakeargs = FakeArgs()
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.args = fakeargs
- vmw.args.list = True
- vmw.inventory = BASIC_INVENTORY
- showdata = vmw.show()
- expected = json.dumps(BASIC_INVENTORY, indent=2)
- assert showdata == expected
-
-
-def test_show_host_returns_serializable_data(vmware_inventory):
- fakeargs = FakeArgs()
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.args = fakeargs
- vmw.args.host = 'foo'
- vmw.inventory = BASIC_INVENTORY
- showdata = vmw.show()
- json.loads(showdata)
-
-
-def test_show_host_returns_just_host(vmware_inventory):
- fakeargs = FakeArgs()
- vmw = vmware_inventory.VMWareInventory(load=False)
- vmw.args = fakeargs
- vmw.args.list = False
- vmw.args.host = 'foo'
- vmw.inventory = BASIC_INVENTORY
- showdata = vmw.show()
- expected = BASIC_INVENTORY['_meta']['hostvars']['foo']
- expected = json.dumps(expected, indent=2)
- assert showdata == expected
diff --git a/test/units/module_utils/test_vmware.py b/test/units/module_utils/test_vmware.py
deleted file mode 100644
index 375e78de07..0000000000
--- a/test/units/module_utils/test_vmware.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright: (c) 2018, Ansible Project
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-from __future__ import absolute_import, division, print_function
-__metaclass__ = type
-
-import ssl
-import sys
-import pytest
-
-pyvmomi = pytest.importorskip('pyVmomi')
-
-from units.compat import mock
-
-import ansible.module_utils.vmware as vmware_module_utils
-
-
-test_data = [
- (
- dict(
- username='Administrator@vsphere.local',
- password='Esxi@123$%',
- hostname=False,
- validate_certs=False,
- ),
- "Hostname parameter is missing. Please specify this parameter in task or"
- " export environment variable like 'export VMWARE_HOST=ESXI_HOSTNAME'"
- ),
- (
- dict(
- username=False,
- password='Esxi@123$%',
- hostname='esxi1',
- validate_certs=False,
- ),
- "Username parameter is missing. Please specify this parameter in task or"
- " export environment variable like 'export VMWARE_USER=ESXI_USERNAME'"
- ),
- (
- dict(
- username='Administrator@vsphere.local',
- password=False,
- hostname='esxi1',
- validate_certs=False,
- ),
- "Password parameter is missing. Please specify this parameter in task or"
- " export environment variable like 'export VMWARE_PASSWORD=ESXI_PASSWORD'"
- ),
- (
- dict(
- username='Administrator@vsphere.local',
- password='Esxi@123$%',
- hostname='esxi1',
- validate_certs=True,
- ),
- "Unknown error while connecting to vCenter or ESXi API at esxi1:443"
- ),
- (
- dict(
- username='Administrator@vsphere.local',
- password='Esxi@123$%',
- hostname='esxi1',
- proxy_host='myproxyserver.com',
- proxy_port=80,
- validate_certs=False,
- ),
- " [proxy: myproxyserver.com:80]"
- ),
-]
-
-test_ids = [
- 'hostname',
- 'username',
- 'password',
- 'validate_certs',
- 'valid_http_proxy',
-]
-
-
-class FailJsonException(BaseException):
- pass
-
-
-@pytest.fixture
-def fake_ansible_module():
- ret = mock.Mock()
- ret.params = test_data[3][0]
- ret.tmpdir = None
- ret.fail_json.side_effect = FailJsonException()
- return ret
-
-
-def fake_connect_to_api(module, return_si=None):
- return None, mock.Mock(),
-
-
-testdata = [
- ('HAS_PYVMOMI', 'PyVmomi'),
- ('HAS_REQUESTS', 'requests'),
-]
-
-
-@pytest.mark.parametrize("key,libname", testdata)
-def test_lib_loading_failure(monkeypatch, fake_ansible_module, key, libname):
- """ Test if Pyvmomi is present or not"""
- monkeypatch.setattr(vmware_module_utils, key, False)
- with pytest.raises(FailJsonException):
- vmware_module_utils.PyVmomi(fake_ansible_module)
- error_str = 'Failed to import the required Python library (%s)' % libname
- assert fake_ansible_module.fail_json.called_once()
- assert error_str in fake_ansible_module.fail_json.call_args[1]['msg']
-
-
-@pytest.mark.skipif(sys.version_info < (2, 7), reason="requires python2.7 and greater")
-@pytest.mark.parametrize("params, msg", test_data, ids=test_ids)
-def test_required_params(request, params, msg, fake_ansible_module):
- """ Test if required params are correct or not"""
- fake_ansible_module.params = params
- with pytest.raises(FailJsonException):
- vmware_module_utils.connect_to_api(fake_ansible_module)
- assert fake_ansible_module.fail_json.called_once()
- assert msg in fake_ansible_module.fail_json.call_args[1]['msg']
-
-
-def test_validate_certs(monkeypatch, fake_ansible_module):
- """ Test if SSL is required or not"""
- fake_ansible_module.params = test_data[3][0]
-
- monkeypatch.setattr(vmware_module_utils, 'ssl', None)
- with pytest.raises(FailJsonException):
- vmware_module_utils.PyVmomi(fake_ansible_module)
- msg = 'pyVim does not support changing verification mode with python < 2.7.9.' \
- ' Either update python or use validate_certs=false.'
- assert fake_ansible_module.fail_json.called_once()
- assert msg in fake_ansible_module.fail_json.call_args[1]['msg']
-
-
-def test_vmdk_disk_path_split(monkeypatch, fake_ansible_module):
- """ Test vmdk_disk_path_split function"""
- fake_ansible_module.params = test_data[0][0]
-
- monkeypatch.setattr(vmware_module_utils, 'connect_to_api', fake_connect_to_api)
- pyv = vmware_module_utils.PyVmomi(fake_ansible_module)
- v = pyv.vmdk_disk_path_split('[ds1] VM_0001/VM0001_0.vmdk')
- assert v == ('ds1', 'VM_0001/VM0001_0.vmdk', 'VM0001_0.vmdk', 'VM_0001')
-
-
-def test_vmdk_disk_path_split_negative(monkeypatch, fake_ansible_module):
- """ Test vmdk_disk_path_split function"""
- fake_ansible_module.params = test_data[0][0]
-
- monkeypatch.setattr(vmware_module_utils, 'connect_to_api', fake_connect_to_api)
- with pytest.raises(FailJsonException):
- pyv = vmware_module_utils.PyVmomi(fake_ansible_module)
- pyv.vmdk_disk_path_split('[ds1]')
- assert fake_ansible_module.fail_json.called_once()
- assert 'Bad path' in fake_ansible_module.fail_json.call_args[1]['msg']
-
-
-@pytest.mark.skipif(sys.version_info < (2, 7), reason="requires python2.7 and greater")
-def test_connect_to_api_validate_certs(monkeypatch, fake_ansible_module):
- monkeypatch.setattr(vmware_module_utils, 'connect', mock.Mock())
-
- def MockSSLContext(proto):
- ssl_context.proto = proto
- return ssl_context
-
- # New Python with SSLContext + validate_certs=True
- vmware_module_utils.connect.reset_mock()
- ssl_context = mock.Mock()
- monkeypatch.setattr(vmware_module_utils.ssl, 'SSLContext', MockSSLContext)
- fake_ansible_module.params['validate_certs'] = True
- vmware_module_utils.connect_to_api(fake_ansible_module)
- assert ssl_context.proto == ssl.PROTOCOL_SSLv23
- assert ssl_context.verify_mode == ssl.CERT_REQUIRED
- assert ssl_context.check_hostname is True
- vmware_module_utils.connect.SmartConnect.assert_called_once_with(
- host='esxi1',
- port=443,
- pwd='Esxi@123$%',
- user='Administrator@vsphere.local',
- sslContext=ssl_context)
-
- # New Python with SSLContext + validate_certs=False
- vmware_module_utils.connect.reset_mock()
- ssl_context = mock.Mock()
- monkeypatch.setattr(vmware_module_utils.ssl, 'SSLContext', MockSSLContext)
- fake_ansible_module.params['validate_certs'] = False
- vmware_module_utils.connect_to_api(fake_ansible_module)
- assert ssl_context.proto == ssl.PROTOCOL_SSLv23
- assert ssl_context.verify_mode == ssl.CERT_NONE
- assert ssl_context.check_hostname is False
- vmware_module_utils.connect.SmartConnect.assert_called_once_with(
- host='esxi1',
- port=443,
- pwd='Esxi@123$%',
- user='Administrator@vsphere.local',
- sslContext=ssl_context)
-
- # Old Python with no SSLContext + validate_certs=True
- vmware_module_utils.connect.reset_mock()
- ssl_context = mock.Mock()
- ssl_context.proto = None
- monkeypatch.delattr(vmware_module_utils.ssl, 'SSLContext')
- fake_ansible_module.params['validate_certs'] = True
- with pytest.raises(FailJsonException):
- vmware_module_utils.connect_to_api(fake_ansible_module)
- assert ssl_context.proto is None
- fake_ansible_module.fail_json.assert_called_once_with(msg=(
- 'pyVim does not support changing verification mode with python '
- '< 2.7.9. Either update python or use validate_certs=false.'))
- assert not vmware_module_utils.connect.SmartConnect.called
-
- # Old Python with no SSLContext + validate_certs=False
- vmware_module_utils.connect.reset_mock()
- ssl_context = mock.Mock()
- ssl_context.proto = None
- monkeypatch.delattr(vmware_module_utils.ssl, 'SSLContext', raising=False)
- fake_ansible_module.params['validate_certs'] = False
- vmware_module_utils.connect_to_api(fake_ansible_module)
- assert ssl_context.proto is None
- vmware_module_utils.connect.SmartConnect.assert_called_once_with(
- host='esxi1',
- port=443,
- pwd='Esxi@123$%',
- user='Administrator@vsphere.local')
diff --git a/test/units/modules/cloud/vmware/test_data/test_vmware_guest_with_parameters.json b/test/units/modules/cloud/vmware/test_data/test_vmware_guest_with_parameters.json
deleted file mode 100644
index ce5e27c776..0000000000
--- a/test/units/modules/cloud/vmware/test_data/test_vmware_guest_with_parameters.json
+++ /dev/null
@@ -1,106 +0,0 @@
-[
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local",
- "password": "Secret@123$%",
- "validate_certs": "True"
- },
- {
- "failed": "True",
- "msg": "Unknown error while connecting to vCenter or ESXi API"
- }
- ],
- [
- {
- "name": "sample_vm_001"
- },
- {
- "failed": "True",
- "msg": "Hostname parameter is missing."
- }
- ],
- [
- {
- "uuid": "52f7b088-357e-bb81-59ec-9d9389c7d89e"
- },
- {
- "failed": "True",
- "msg": "Hostname parameter is missing."
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com"
- },
- {
- "failed": "True",
- "msg": "Username parameter is missing."
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local"
- },
- {
- "failed": "True",
- "msg": "Password parameter is missing."
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local",
- "password": "Secret@123$%"
- },
- {
- "failed": "True",
- "msg": "Unknown error while connecting to vCenter or ESXi API"
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local",
- "password": "Secret@123$%",
- "validate_certs": "False"
- },
- {
- "failed": "True",
- "msg": "Unknown error while connecting to vCenter or ESXi API"
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local",
- "password": "Secret@123$%",
- "port": "8443"
- },
- {
- "failed": "True",
- "msg": "8443"
- }
- ],
- [
- {
- "name": "sample_vm_001",
- "hostname": "esxi01.example.com",
- "username": "administrator@vsphere.local",
- "password": "Secret@123$%",
- "validate_certs": "True"
- },
- {
- "test_ssl_context": "True",
- "failed": "True",
- "msg": "pyVim does not support changing verification mode with python < 2.7.9. Either update python or use validate_certs=false."
- }
- ]
-]
diff --git a/test/units/modules/cloud/vmware/test_vmware_guest.py b/test/units/modules/cloud/vmware/test_vmware_guest.py
deleted file mode 100644
index 613d680eeb..0000000000
--- a/test/units/modules/cloud/vmware/test_vmware_guest.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright: (c) 2018, Ansible Project
-# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-from __future__ import absolute_import, division, print_function
-__metaclass__ = type
-
-import os
-import sys
-import pytest
-import json
-
-pyvmomi = pytest.importorskip('pyVmomi')
-
-if sys.version_info < (2, 7):
- pytestmark = pytest.mark.skip("vmware_guest Ansible modules require Python >= 2.7")
-
-
-from ansible.modules.cloud.vmware import vmware_guest
-
-curr_dir = os.path.dirname(__file__)
-test_data_file = open(os.path.join(curr_dir, 'test_data', 'test_vmware_guest_with_parameters.json'), 'r')
-TEST_CASES = json.loads(test_data_file.read())
-test_data_file.close()
-
-
-@pytest.mark.parametrize('patch_ansible_module', [{}], indirect=['patch_ansible_module'])
-@pytest.mark.usefixtures('patch_ansible_module')
-def test_vmware_guest_wo_parameters(capfd):
- with pytest.raises(SystemExit):
- vmware_guest.main()
- out, err = capfd.readouterr()
- results = json.loads(out)
- assert results['failed']
- assert "one of the following is required: name, uuid" in results['msg']
-
-
-@pytest.mark.parametrize('patch_ansible_module, testcase', TEST_CASES, indirect=['patch_ansible_module'])
-@pytest.mark.usefixtures('patch_ansible_module')
-def test_vmware_guest_with_parameters(mocker, capfd, testcase):
- if testcase.get('test_ssl_context', None):
- class mocked_ssl:
- pass
- mocker.patch('ansible.module_utils.vmware.ssl', new=mocked_ssl)
-
- with pytest.raises(SystemExit):
- vmware_guest.main()
- out, err = capfd.readouterr()
- results = json.loads(out)
- assert str(results['failed']) == testcase['failed']
- assert testcase['msg'] in results['msg']