Commit graph

51 commits

Author SHA1 Message Date
chris93111
7c8b5a407d VMware: Add option to modify disk type while cloning template (#47859)
* Add parameters to module vmware_guest for conversion of disk to thin or thick when vm is cloned or deployed with template

* unit test for convert clone vm

Co-Authored-By: chris93111 <christopheferreira@ymail.com>
2018-12-05 15:50:23 +05:30
jctanner
ab133def0b vmware_guest test - Use the cluster name instead of the path (#45368) 2018-09-08 04:06:16 +05:30
Pieter Avonts
1a810f8f11 VMware: Rewrite get_resource_pool method for correct resource_pool selection (#39792)
* rewrite get_resource_pool method for correct resource_pool selection
* only keep name if path is given for cluster, esxi_hostname or resource_pool
* Revert "only keep name if path is given for cluster, esxi_hostname or resource_pool"
* This reverts commit 50293ec763c024b0eaceac5d775ccc0ad3ff8bd7.
* if the name argument contains a path, only use the last part for matching
* remove path from cluster argument in tests
* remove find_objs in favour of reusing find_obj with an extra folder argument
* fix find_obj ignoring first if name is not given
2018-09-07 18:23:26 +05:30
Abhijeet Kasurde
fd985db72d
VMware: Refactor disc logic (#39285)
* Refactoring related to network device
* Assign unique random temporary key while creating SCSI or/and IDE controller devices
* Add testcase for this change

Fixes: #38679

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-09-07 17:04:02 +05:30
Abhijeet Kasurde
604fcb55ae
VMware: add support for boot option firmware (#42730)
This fix adds support for the boot option 'firmware'

Fixes: #42541

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-27 09:18:04 +05:30
Matt Clay
4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
2018-07-23 20:46:22 -07:00
Abhijeet Kasurde
cadbd6ea9c
VMWare: update documentation for linked_clone (#42881)
linked_clone requires snapshot_src parameter. This fix makes them required_together
and update documentation. Also, testcase is added.

Fixes: #42349

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-07-20 10:34:26 +05:30
Abhijeet Kasurde
c021fd8e84 VMware: Allow user to select disk_mode (#38951)
* VMware: Allow user to select disk_mode

This fix allows user to select disk modes for given disk configuration
in the given VM.

Fixes: #37749

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-06-10 22:37:30 -04:00
Deric Crago
ba848e018c bump version of 'vcenter-test-container' to '1.3.0' (govmomi v0.18.0) (#41151)
* leave vmware_guest_powerstate tests enabled, but revert changes from: 66743f33
* leave VM poweroff tests enabled, but revert changes from: 87d6bdaf
* bumped 'vcenter-test-container' version to '1.3.0'
* updated test task names based on PR feedback
2018-06-06 08:24:21 -07:00
Abhijeet Kasurde
79c7d462c1
VMware: Check device type explicitly (#38729)
Check datatype of device instead of comparing them directly in
vmware_guest. Also, added testcases to check this behavior.

DPVG is not supported in current version vcsim

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-05-14 16:12:31 +05:30
Matt Clay
6a1cb25c99 Remove unnecessary destructive aliases. 2018-05-09 07:29:31 -07:00
Matt Clay
a5b8085113 Move pyvmomi install into cloud test plugin. 2018-05-08 10:09:35 -07:00
Tim Steinbach
f61172e6c7 vmware: Add portgroup_portkey and portgroup_key (#38958)
* VMware: apply correct value for datacenter in TC

Signed-off-by: Tim Steinbach <tim@nequissimus.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-23 14:04:35 +05:30
Abhijeet Kasurde
9b139baacb
VMware: Set default network type as 'dhcp' (#38518)
If user does not specify any network type then set network type
to dhcp. There are additional checks around 'ip', 'netmask' and
'type' in network spec.

Fixes: #38466

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-04-13 23:21:39 +05:30
Abhijeet Kasurde
4edcbeb62d
VMware: Gather facts when powerstate is specified (#37908)
This fix adds additional facts after VM powerstate management.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-28 00:19:33 +05:30
Abhijeet Kasurde
0ae7a0e88c
VMware: Use environment variable for connection (#37726)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 13:31:24 -04:00
Sebastian Gumprich
16c564c4b4 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes
2018-03-12 11:00:19 +01:00
Abhijeet Kasurde
0694aca2a0
VMware: refactor configure disk logic (#36617)
This fix corrects logic related to disk parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-01 09:36:54 +05:30
Abhijeet Kasurde
87d6bdaf98
VMware: Re-enable VM poweroff testcases (#36734)
This testcases were failing due to vcsim version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-27 09:04:42 +05:30
goshkis
abb956d9eb vApp properties support (#32579)
* Adding support for vApp properties.
* vm specification updated only if changes have to be applied. I.e. subsequent updates with the same data will not trigger changed state
* Auxiliary variables renamed, hope this makes the code more readable
* Integration tests changed - re-adding the same properties test not implemented, but tested on real vCenter deployment
* fixing documentation "version_added" for the feature
* Addressing reviewers comments #2:
* documentation updated with the only meaningful value for "option" attribute - "remove"
* Fixed improperly handled case when user requested "add" operation for existent property
* vApp configuration is updated only with properties that contains changes, not with all properties requested by user
2018-02-21 11:59:13 +05:30
Abhijeet Kasurde
a377302d6b
VMware: Fix DVPG idempotency issue (#35837)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:32:27 +05:30
Abhijeet Kasurde
367258507a
VMware: Provide verbose message about non-existent VM (#35682)
This fix adds a verbose message about non-existent VM when specified
with operation, due to idempotency we can not detect correct state.

Fixes: #27384

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-04 05:23:24 +05:30
Abhijeet Kasurde
c65842b9d8
Add check mode support in vmware_guest (#32858)
This fix adds check mode support in vmware_guest

Fixes: #32439

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 21:16:19 +05:30
Abhijeet Kasurde
912729b6a7
VMware: Check if VM is poweredoff before destroy (#35151)
This fix checks if VM is poweredoff before it can be destroyed.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-22 20:17:11 +05:30
Matt Clay
3c72161da5 Enable tests which pass on Python 3. 2018-01-12 00:48:47 -08:00
Abhijeet Kasurde
9879aa0382
VMware: Add support for resource allocation info (#33990)
This fix adds support for Virtual Machine resource allocation
information. This information is related to limit and reserve CPU and Memory
of virtual machine.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-03 21:13:56 +05:30
Abhijeet Kasurde
8d5c8b252d
VMware: Add support for cpuHotRemoveEnabled (#33962)
This fix adds support for cpuHotRemoveEnabled in vmware_guest module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-20 19:15:55 +05:30
Abhijeet Kasurde
dd9ed09fa6
Revert to stable vcsim docker image. (#33952)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-15 21:32:22 +05:30
Abhijeet Kasurde
b5318e2c34
VMware: Add NIC configuration option (#33851)
This fix adds following configurable parameters to virtual network card
of virtual machine.
* WakeOnLanEnabled
* StartConnected
* AllowGuestControl

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-15 17:54:52 +05:30
Abhijeet Kasurde
29d3505cb4
VMware: check for ESXi server while creating user (#33061)
This fix check for ESXi server instance before proceeding
with managing local user. Also, adds integration tests for
this change.

Fixes: #32465

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-15 16:26:19 +05:30
tchernomax
a09fd80bba VMware: fix vmPathName on VM creation (#33315)
* VMware: fix vmPathName on VM creation
* vmware_guest: enable unit tests disk_type_d1_c1_f0
2017-12-14 18:41:09 +05:30
jglf
74a7cc7130 vmware_guest: option to enable nested virtualization (#28149)
Signed-off-by: Julien Le Foll <jlefoll@percallgroup.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-12 11:02:56 +05:30
Abhijeet Kasurde
09b3b5305a
VMware: Add vmware guest param - maxMkConnections (#33220)
This fix adds functionality to configure vmware guest parameter called
'maxMkconnections'. Also, added integration test for this change.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-05 22:33:50 +05:30
Abhijeet Kasurde
94019e7050
VMware: add support for memory_reservation (#33080)
This fix adds functionality to support memory_reservation and
memory_reservation_lock while managing Virtual Machine.

Fixes: #20407

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-05 21:07:36 +05:30
Abhijeet Kasurde
1ca7929f96 VMware: Add support for numCoresPerSocket (#33149)
This fix adds support for hardware parameter 'numCoresPerSocket'
in vmware_guest module. Also, adds integration tests for this change.

Fixes: #20406

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-30 08:44:31 -05:00
Matt Clay
2ece86fba1 Split up cloud tests to avoid 1 hour CI limit. 2017-11-23 02:33:56 -08:00
Abhijeet Kasurde
fbe946719e
VMware: Add fix for setting manual MAC address (#32885)
This fix adds ability to set MAC address maunally. Before adding
any MAC address, the value is validated. If value is not valid, then
MAC address is set to vCenter generated MAC address.
Also, added integration tests for this change.

Fixes: #21161

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-21 09:47:05 +00:00
Steve Jacobs
400d821fdb Added eagerzeroedthick disk option to disk spec for vmware_guest (#28121)
* Added eagerzeroedthick disk option to disk spec
* Updated docstrings for vmware_guest disk
* VMware: Integration test for disk type

Signed-off-by: Steve Jacobs <sjacobs@brokencrew.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-21 03:11:28 +00:00
Abhijeet Kasurde
e61bcc3438
Provide clear error message after failure (#32928) 2017-11-16 06:42:27 +00:00
Dario Zanzico
8a21fa2c07 remove cpuHotAddEnabled, memoryHotAddEnabled defaults from configSpec (#25202)
* add hardware.hotadd_cpu, hardware.hotadd_memory parameters
* use hotadd_{cpu,memory} paramters on create integration tests
2017-11-10 13:09:30 +00:00
Tim Rightnour
4756b392ea Apply fix to allow the root resource pool of a cluster to be chosen (#31641)
Whitespace cleanup
2017-11-10 13:51:36 +01:00
Abhijeet Kasurde
c11c882345 Update vmware integration tests (#31273)
* Boilerplat fixed
* Standardized vcsim variables in all modules

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-06 11:28:15 -05:00
Jim Gu
d23da2e494 add support to vmware_guest for template => vm conversion (#31607)
* add support to vmware_guest for template => vm conversion

While the vmware_guest currently supports conversion of VMs to templates
using the is_template argument, it does not support the inverse:
converting templates back into VMs.  This change adds that
functionality.

When converting a template back into a VM, the extra config option
"uuid.action" is also set so that VMware will automatically create a new
UUID for the converted VM.  If the "uuid.action" setting is already
configured, it will not be modified.  Setting this prevents an
interactive question from being raised when attempting to boot the VM.

* Add integration tests for vmware_guest is_template

* Add additional idempotency test for vmware_guest is_template
2017-10-31 09:12:40 -04:00
Philippe Dellaert
9580a6569e Fix #21112 : Adding support for configuring a CD-rom iso image (#28155)
* Initial CD-ROM support

* create cdrom bugfix

* Improving CDROM change detection and fixing template creation bug
Running MarkAsTemplate on an existing template will fail with an error

* Better change detection for guest ID
Should only mark a change in case it actually changes

* Adding integration tests

* Pep8 compliance fixes

* Adding CDROM support, including iso, client and none types

* Updating added release version for CDROM option
2017-10-11 14:29:13 +02:00
jctanner
0dd3a61a75 vmware_guest: tests for createvm+modifyvm tasks (#30959)
* Save the serialized values instead of their types
* Add tests for creating and modifying VMs without using a template
* Remove blank line
* Add tests for vm deletion
2017-09-27 18:10:08 -04:00
Matt Clay
55fb18b85c Split cloud tests into two CI groups. 2017-09-01 17:33:54 -07:00
Matt Clay
84295e6124 Mark destructive tests as such. 2017-08-31 12:11:43 -07:00
Abhijeet Kasurde
e244deedbd Add wait for vcsim to come online (#27887)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-08 09:15:51 -04:00
jctanner
245a4d30b9 vmware_guest: fix datastore selection on equal sized disks and add tests (#26774)
* Fix datastore selection on equal sized disks and add tests
2017-07-13 22:02:33 -04:00
jctanner
df507ca9c4 vmware_guest: fixes for cache objects and datacenter association (#26719)
* vmware_guest: fixes for cache objects and datacenter association
* find_all_objs was only looking for datastores
* Clear the result if it's datacenter is not correct.
* Re-enable pyvmomi installation

Addresses #25011
Addresses #26511
2017-07-12 17:10:48 -04:00