Commit graph

885 commits

Author SHA1 Message Date
Toshio Kuratomi
d7189a442e ziploader currently needs absolute imports to know whether to include another module 2016-04-23 07:25:21 -07:00
Yannig Perre
72f17f3ff3 New get_all_subclasses function in basic modules and use it in fact modules. 2016-04-23 07:24:26 -07:00
Yannig Perre
eb18767f91 Visit all network class not just direct sub classes.
Fix for https://github.com/ansible/ansible/issues/15446
2016-04-23 07:24:26 -07:00
chouseknecht
a79e9182e1
Set the name of the user_agent in each mangement client. 2016-04-21 17:51:28 -04:00
Kei Nohguchi
9d5b4fe212 openswitch.py: Use new ops.dc declarative Config(DC) module (#15489)
Instead of using the old OpenSwitch runconfig, we'll use
Mir's new ops.dc declarative config for the DC interaction
with OpenSwitch.  This gives us the clearer separation between
ansible and the OpenSwitch, as well as the performance
improvement done inside the ops.dc module itself.

Squashed the original Mir's change into single commit.

Tested-by: Kei Nohguchi <kei@nohguchi.com>
2016-04-21 17:23:43 -04:00
Toshio Kuratomi
ee18af48ef Merge pull request #15385 from bjne/mysql_unix_socket
mysql_*: enable mysql connection via unix socket
2016-04-19 10:09:12 -07:00
Toshio Kuratomi
7b5d2d3bec Make sure that args are interpreted as utf8 on python3 2016-04-19 09:37:17 -07:00
nitzmahone
5b336832af add _load_params debug overrides for module args/file passed on cmdline
Updated python module wrapper explode method to drop 'args' file next to module.
Both execute() and excommunicate() debug methods now pass the module args via file to enable debuggers that are picky about stdin.
Updated unit tests to use a context manager for masking/restoring default streams and argv.
2016-04-18 11:06:46 -07:00
James Cammarata
ed35e8bce2 Don't override the http status code when successful in urls.py 2016-04-18 13:20:24 -04:00
Toshio Kuratomi
7833b5bec4 Merge pull request #15420 from robinro/distribution_version_tests
Distribution version tests
2016-04-18 10:05:55 -07:00
Brian Coca
621b98668f fixed boto.ec2 import
alternative to #15224 and fixes #11755
2016-04-18 10:34:44 -04:00
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
2016-04-17 19:10:24 +02:00
chouseknecht
ea07afe67b
Add missing AD user params. 2016-04-17 01:43:39 -04:00
chouseknecht
47620737fb Adding common utils module for new Azure modules. 2016-04-16 01:13:19 -04:00
Matt Martz
a985bf6a31 Don't pass context to urlopen, instead add it to the handlers. Fixes https://github.com/ansible/ansible-modules-core/issues/3437 2016-04-15 16:10:54 -05:00
Robin Roth
37188ea336 cleanup tests
* use nose test generator
* more comments
* move facts import inside the skipped function, fix python3 warning
2016-04-15 17:14:14 +02:00
Robin Roth
2b104fe6ad fix tests for SLES and CoreOS
* include #15230
2016-04-15 17:13:59 +02:00
Brian Coca
7062e086d4 made paging marker configurable as boto differs 2016-04-15 10:37:32 -04:00
Patrick Ogenstad
6c5ea685a2 Allow timeout to be configurable (#14973) 2016-04-14 09:35:07 -04:00
Toshio Kuratomi
78365e206f Merge pull request #15059 from willthames/remove_boto_ec2_requirement
Remove need for unnecessary boto.ec2 import
2016-04-13 19:37:56 -07:00
Brian Coca
a5a6bcfbbf updated capabilities to new way of module ref 2016-04-13 14:54:34 -04:00
Michael Scherer
74c83a91ed Add caps facts, fix #10360 (#15292) 2016-04-13 14:13:45 -04:00
Wolfgang Karall
7a9b8e43da get_mount_facts -- find bind mounts and add info to options field (#12036)
* get_mount_facts -- find bind mounts and add info to options field

* get_mount_facts -- only run findmnt if get_bin_path() finds the binary
2016-04-13 14:05:50 -04:00
Toshio Kuratomi
55bb24fb7d Reenable unicode=>byte conversion for module parameters to fix integration tests 2016-04-12 08:01:07 -07:00
Toshio Kuratomi
75546678d9 Fix unittests 2016-04-12 08:01:07 -07:00
Toshio Kuratomi
b571ecdfec Move module arg passing from the environment to stdin (from the wrapper to the module) 2016-04-12 08:01:07 -07:00
Nathaniel Case
7290b6282d Update IOS, IOSXR, JUNOS, & OpenSwitch for environment vars. 2016-04-12 08:55:15 -04:00
Nathaniel Case
dbc49ad95b First implementation of 'fallback' parameter
Implemented & documented for EOS & NXOS
2016-04-12 08:55:15 -04:00
Bjørnar Ness
d868cdc7b8 enable mysql connection via unix socket 2016-04-12 14:16:18 +02:00
Matt Martz
dd39f57ae7 Merge pull request #15289 from sivel/sni-urllib3-contrib-try2
Optional Use of urllib3 for SNI verification
2016-04-08 11:26:49 -05:00
Toshio Kuratomi
a57a32adcc Revert "Make the 'path' param type also use abspath on the value"
This reverts commit 1ffadbcc80.

Some modules seem to have path listed for things that are "commands"  --
something that may be a path to a command or a bare command that should
be looked up in PATH.  With this change, if they were formerly looked up
inPATH they are now being made into an absolute path in the cwd.
Reverting this until we can think more about whether to do this and
change those modules to not use path for those parameters.
2016-04-06 14:07:48 -07:00
James Cammarata
1ffadbcc80 Make the 'path' param type also use abspath on the value 2016-04-06 15:58:49 -04:00
Nathaniel Case
77e3dc9e6a Fix network modules for ziploader changes 2016-04-06 11:54:47 -07:00
Matt Martz
398218b6ea More intelligent building of the SSLValidationError message based on capabilities 2016-04-06 11:04:04 -05:00
Matt Martz
6e9c09d7f7 Utilize urllib3.contrib.pyopenssl functionality for SNI capability in python versions lacking SNI support
Also add SNI tests, move test_uri to destructive since we are messing with packages for SNI testing
2016-04-06 10:14:13 -05:00
Peter Sprygada
72ce1e8f14 bugfix eos shared module handling config replace
fixes an issue with doing a config replace using eapi where the configuration
wasn't being replaced.
2016-04-05 22:54:23 -04:00
Peter Sprygada
b97c8ce8e7 bugfix netcfg return config as str
fixes issue where netcfg would return out of order configuration
2016-04-05 22:53:44 -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
Peter Sprygada
cca084c89d enhancement to ios shared module connection
this enhancement will cause the module to connect to the remote ios device
the first time a command wants to run instead of building a connection
immediately
2016-04-04 21:53:05 -04:00
Peter Sprygada
c2fac6c808 enhancement to iosxr shared module to lazy connect to device
this update will only connect to the remote device when the first request
is made to run a command instead of building the connection immediately
2016-04-04 21:52:55 -04:00
Peter Sprygada
39a576697d feature to localize prompt search login to iosxr shared module
this localizes the cli prompt search logic to the iosxr shared module
instead of using the common regexp list in shell.py
2016-04-04 16:07:45 -04:00
Peter Sprygada
73c3f35112 fixes ansible/ansible-modules-core#3304 2016-04-04 16:03:13 -04:00
Peter Sprygada
17f4db19ea adds additional details in exception handling in shell shared module 2016-04-04 08:20:59 -04:00
Peter Sprygada
f5bcd38380 adds additional details in exception handling to ios shared module 2016-04-04 08:20:51 -04:00
Peter Sprygada
008395eda2 bugfix for nxos shared module to not immediately send \n
this fixes a bug in nxos shared module to not immediately send a \n when
the connection is made.  this commit also localizes the prompt handling
to the nxos module
2016-04-04 08:20:41 -04:00
Peter Sprygada
4e497b10b0 bugfix in netcfg to handle multilevel commands
this fixes a bug where netcfg would not properly find a statement that was
more than one level deep
2016-04-04 08:11:32 -04:00
Peter Sprygada
c0230e6f12 refactors netcfg to pull common functions into shared library
The network config and template modules share a set of common functions that
have been pulled into the netcfg shared module.  This is backwards compatible
with the current implemention in the modules.
2016-04-02 21:48:03 -04:00
Peter Sprygada
437beb001b adds commands key to fail message in eos shared module
The commands the lists the set of commands it tried to configure when
using eapi as a transport
2016-04-02 21:47:08 -04:00
Brian Coca
e1461ef792 Merge pull request #15200 from wimnat/feature/handle_lists_in_snake_dict_creation
Handle lists during dict recursion
2016-03-31 06:25:11 -07:00
René Moser
c0618794a2 Merge pull request #15213 from resmo/fix/cloudstack-api-secret-arg
cloudstack: fix bug, api_secret always None
2016-03-31 10:05:33 +02:00