Commit Graph

21 Commits (dd63dfcf1ec50bade4eaf8925330d7c96e475cc5)

Author SHA1 Message Date
aperigault 1cdde216ec vmware_guest: Extend facts with vmware tools informations (#20860) 9 years ago
Dag Wieers 4f96ee5e27 Add missing iteritems definition (#21106)
Also moved most imports out of try-except block.
9 years ago
Loïc Blot b55d039f67 New modules: vmware_guest_facts & vmware_guest_snapshot (#20971)
* Move gather_facts action outside of vmware_guest module
* Move facts gathering method to vmware.py library
* vmware_guest use some vmware.py library methods
* vmware.py lib: fix some PEP 8 issues
* Move snapshot actions to vmware_guest_snapshot
* Move common snapshot facts to vmware.py library
9 years ago
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 9 years ago
Dag Wieers 20df62ab31 vmware_guest: Various fixes and changes
Changes missing from a poor merge probably, but also a few new things.
- Reordered the examples from important (often used) to less important
  (fewer used)
- Remove the new_name: option and replace it with the uuid/name
  combination for renaming + added example
- Added an example using the VM uuid instead of the VM name
- Also check whether the password is non-empty (rogue merge)
- Wait for all tasks to finish (to be sure the new facts reflect the
  state)
- Ensure that on failure we still set the change-bit
- Moved a set of functions that are unused (related to transfering
  files to guest, or running commands) to module_utils
9 years ago
Olivier Boukili b139a67c71 module_utils/vmware: added find_datastore_by_name helper function (#17538)
module_utils/vmware: exception catch for vcenter self-signed certificates
9 years ago
Alexey Kalinin 1d113c384e Fix issue with latest pyvmomi and certificate validation 10 years ago
Michael Scherer 127a37f67c Port the module snippet to python3 (#15870)
vca depend on pyvcloud, who depend on PyYAML 3.10, which
support python 2.5 as a minimum, cf https://github.com/vmware/pyvcloud/blob/master/requirements.txt
and http://pyyaml.org/wiki/PyYAML

vmware.py depend on PyVIM, who depend on python 2.6.

So we can use the modern syntax for both of them.
10 years ago
Ritesh Khadgaray 3608829b1b vmware.py: allow for better search functionality (#15053)
- search entity by path
 - search vm based on folder
 - search for a vm based on given id ( uuid/name/dns_name/ip/inventory_path)
 - search for a cluster by name, in a given datacenter (optionally)
 - search for objects of a given type in a folder

Note: instance uuid is unique to a VM
10 years ago
Toshio Kuratomi 4b0aa1214c Ziploader
* Ziploader proof of concept (jimi-c)

* Cleanups to proof of concept ziploader branch:

* python3 compatible base64 encoding
* zipfile compression (still need to enable toggling this off for
  systems without zlib support in python)
* Allow non-wildcard imports (still need to make this recusrsive so that
  we can have module_utils code that imports other module_utils code.)
* Better tracebacks: module filename is kept and module_utils directory
  is kept so that tracebacks show the real filenames that the errors
  appear in.

* Make sure we import modules that are used into the module_utils files that they are used in.

* Set ansible version in a more pythonic way for ziploader than we were doing in module replacer

* Make it possible to set the module compression as an inventory var

This may be necessary on systems where python has been compiled without
zlib compression.

* Refactoring of module_common code:

* module replacer only replaces values that make sense for that type of
  file (example: don't attempt to replace python imports if we're in
  a powershell module).
* Implement configurable shebang support for ziploader wrapper
* Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG)
  via environment variable.
* Remove strip_comments param as we're never going to use it (ruins line
  numbering)

* Don't repeat ourselves about detecting REPLACER

* Add an easy way to debug

* Port test-module to the ziploader-aware modify_module()

* strip comments and blank lines from the wrapper so we send less over the wire.

* Comments cleanup

* Remember to output write the module line itself in powershell modules

* for line in lines strips the newlines so we have to add them back in
10 years ago
Alexey Kalinin 9763e76f6f add find_host_portgroup_by_name function to vmware utils 10 years ago
Jay Jahns 3a1944edc1 add find_vm_by_name function to vmware utils 10 years ago
Kamil Szczygiel 9f1eea43fa support for python < 2.7 10 years ago
Kamil Szczygiel fa13aa8c00 rename param from skip_ssl to validate_certs 10 years ago
Kamil Szczygiel a381c1bbd6 added skip_ssl argument for VMware module to skip SSL verification (required when using self signed certificates) 10 years ago
James Cammarata 13b8a57d3d Undo previous travis/tox fixes and fix underlying issue 11 years ago
Joseph Callen 2f5ced8856 Moving VMware Utilites module
Moved `vmware.py` from v1 to `lib/ansible/module_utils/vmware.py`.

No other changes has been made since these two PRs:
https://github.com/ansible/ansible/pull/10812
https://github.com/ansible/ansible/pull/10760
11 years ago
James Cammarata ce3ef7f4c1 Making the switch to v2 11 years ago
Joseph Callen 87bc705806 Fixes VMware module utils
Resolves syntax errors in the `wait_for_tasks`
Removes throw from `find_datacenter_by_name`
11 years ago
Joseph Callen 9b317858c1 Modified per @bcoca
Removed try/except raises
Modified wait_for_task
Added api exception error message
11 years ago
Joseph Callen 986910be5d Adding a new VMware utilities module 11 years ago