Commit Graph

18 Commits (48bdb6187033dc72612d13c5db1b2fd42ca3b7b7)

Author SHA1 Message Date
Abhijeet Kasurde 09cabaf702 Use response.content instead of response object (#25772)
vca module utility uses response object instead of
response.content which raises exception in while fail_json
call. Use content attribute from response object instead which
is exact description of HTTP Response error.

Fixes #25378

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-14 12:40:06 -04:00
Dag Wieers 5553b20828 Collated PEP8 fixes (#25293)
- Make PEP8 compliant
2017-06-02 12:14:11 +01:00
Abhijeet Kasurde 211d0656f8 Misc Typo correction (#25025)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-05-25 16:14:39 +02:00
Ruslan Tumarkin 9d8fc7afce Fux bug 18584 (#18718) 2016-12-04 10:46:41 +00:00
Edward Marshall 1ec9ac4b70 Defined children for get_vm (#15904) 2016-09-08 08:41:32 -07:00
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.
2016-05-16 08:04:43 -04:00
camradal 4bb4c7e68e vCloud module utils error handling bug fixes (#15859)
* Fix AttributeError that hides login errors

* Typo fixes for vca error messages
2016-05-13 23:57:08 -07:00
camradal be87cd8c26 Fix logging into vCloud Director and expose verify_certs argument (#15533) 2016-05-05 09:48:54 -04:00
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
2016-04-05 11:06:17 -07:00
Charles Paul a65543bbaf adding password no_log and cleaning up argument spec 2016-01-05 14:52:22 -06:00
Charles Paul a6a58d6947 fix default host for non vcd service types 2015-12-10 16:39:27 -05:00
Toshio Kuratomi 1bc75374dc Add imports for stdlib modules that are used.
This is cleanup that will aid us when we get ziploader implemented for 2.1
2015-11-02 12:02:26 -08:00
Charles Paul 3d533cb423 fixing calls to fail_json 2015-10-12 08:50:18 -05:00
Brian Coca 50372eecc9 Merge pull request #12455 from privateip/devel
added methods for retrieving vapp and vm
2015-10-12 09:37:47 -04:00
soarpenguin 5efa4d29e3 fix some warning of undefined name. 2015-10-09 12:43:42 +08:00
Peter Sprygada ab3239ecd7 added methods for retrieving vapp and vm 2015-10-02 18:01:35 -04:00
Peter Sprygada e45b71d6cd added new module object to vca 2015-09-18 13:45:37 -04:00
Peter Sprygada 8f43d222c0 initial add of vca common module 2015-09-17 14:41:53 -04:00