Commit Graph

20247 Commits (8bbbe16d31d68e097a9748c7563bbea18cfdd87b)
 

Author SHA1 Message Date
Adrian Likins 8bbbe16d31 try/except xmltodict import, misc cleanups (#16287)
The 'import xmltodict' was causing import
errors when generating documentation. Since
xmltodict is a required but not stdlib module,
throw AnsibleError if unable to import.

Remove unused combine_vars.

Replace a use of 'stdin_iterator == None' with
idiomatic 'stdin_iterat is None'

Misc pep8 cleanups.
8 years ago
Adrian Likins 71118b2720 Show where plugins were loaded in vvv/vvvv (#15757)
Make the plugin loading info displayed by callback plugins
match.

In debug mode (ANSIBLE_DEBUG=1 env), log all requests for
plugins including already cached plugins and class_only
requests.
8 years ago
Adrian Likins 57a911e098 Use sys.exit(msg) i/o print() and sys.exit() (#15465)
Any non-0 exits should be showing an error message
to stderr instead of to stdout.
8 years ago
Toshio Kuratomi 76f9935634 Add some missing imports from last night's py3 fixes (#17196) 8 years ago
Adrian Likins 0b070a04d0 Fix docstring for GenericBsdIfconfogNetwork. (#17008)
default_ipv4/default_ipv6 and type/mtu/network
were listed as not defined, but they are usually
defined now.
8 years ago
Toshio Kuratomi f4f84639bb Update submodule refs 8 years ago
Michael Scherer b2476e7d99 Fix errors when using -vvvv with python 3 (#17186)
Traceback (most recent call last):
      File "/tmp/ansible_tpehdgt7/ansible_module_setup.py", line 134, in <module>
        main()
      File "/tmp/ansible_tpehdgt7/ansible_module_setup.py", line 124, in main
        supports_check_mode = True,
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 696, in __init__
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 1670, in _log_invocation
      File "/tmp/ansible_tpehdgt7/ansible_modlib.zip/ansible/module_utils/basic.py", line 469, in heuristic_log_sanitize
    TypeError: 'str' does not support the buffer interface
8 years ago
Abhijit Menon-Sen 6f678e36d6 Merge pull request #17191 from mgedmin/fix-import-error-unicode
Fix trivial ImportErrors when trying to use with_fileglob
8 years ago
Marius Gedminas 73caff58e8 Add missing to_unicode import 8 years ago
Marius Gedminas 483c83b088 There's no ansible.module_utils_unicode 8 years ago
Toshio Kuratomi 313d4b2c9e Move a path being passed around as a byte string to being passed around as a text string. (#17190)
This is enough to get minimal copy module working on python3

We have t omodify dataloader's path_dwim_relative_stack and everything
that calls it to use text paths instead of byte string paths
8 years ago
Peter Sprygada 20bde8f549 Merge pull request #17189 from privateip/eos
updates eos shared module
8 years ago
Peter Sprygada b5bbac29e5 updates eos shared module
* adds support for netcli methods
* adds support for netcfg methods
* Cli class now derives from CliBase
* adds eos_config action plugin
8 years ago
Toshio Kuratomi 57701d7115 Give native strings to selinux library functions. (#17184)
* Give native strings to selinux library functions.

SELinux takes pathnames as native strings.  That means we need to
convert to bytes on python2 and convert to text on python3.

Fixes #17155

* Read kitchen documentation, make module_utils params more like kitchen API

* Remove none nonstring strategy and add strict
* Raise TypeError on invalid nonstring strategy

* Document to_native()

* Make unittests for testing module_utils.text
8 years ago
Toshio Kuratomi 384a01fcff Fix tmpfile misspelled as tmplfile (#17183) 8 years ago
Adrian Likins a4785c2691 Fix docker connection plugin version tests and py2.6 compat (#16841)
* Rm py2.7+ code in docker connection plugin

The docker connection plugin was using subprocess.check_output
which only exists in python 2.7 and later. Connection plugins
need to support python2.6 so this replaces it with Popen/communicate()

* Handle docker ver errors in docker connection

Add unit tests for DockerConnection

Fixes #16971
8 years ago
Peter Sprygada 7ce4165671 Merge pull request #17173 from privateip/ios
minor update to the ios shared module
8 years ago
Peter Sprygada 301495ddcc Merge pull request #17172 from privateip/nxos
updates nxos shared module refactor
8 years ago
Brian Coca 54c530a3ee more ways to detect lxc
thanks to @wAmpire for new method and pointing out limitations of existing
8 years ago
Peter Sprygada 1015f11428 minor update to the ios shared module
This completes the refactor for the ios shared module to change
the derived class from NetCli to CliBase.
8 years ago
Peter Sprygada 4ab4b6698d updates nxos shared module refactor
This commit updates the nxos transport shared plugins for
2.2.  This includes updates to both Cli and Nxapi.  This commit
also includes the nxos_config action plugin
8 years ago
Peter Sprygada 321d2e8cee Merge pull request #17168 from privateip/clibase
replaces NetCli in network with CliBase in shell
8 years ago
Toshio Kuratomi 3833b21ab5 Update python3 docs for some of the recent decisions about porting (#17169) 8 years ago
Peter Sprygada 044a0533db replaces NetCli in network with CliBase in shell
This doesn't change any of the behavior but moves NetCli to CliBase and
relcates the object to the shell module
8 years ago
Toshio Kuratomi d29a7c55fe Enable some basic.py tests on python3 (#17167) 8 years ago
Toshio Kuratomi 171a094805 Cleanup basic.py code now that six is available (#17158)
* Cleanup basic.py code now that six is available

We had some hacks in basic.py to allow us python2 and python3
compatibility.  Those can now be offloaded to the six library that we're
bundling.

* Cleanup basic.py code now that six is available

We had some hacks in basic.py to allow us python2 and python3
compatibility.  Those can now be offloaded to the six library that we're
bundling.
8 years ago
Peter Sprygada 959a5e5fd1 Merge pull request #17166 from privateip/ios
fix import statement in ios shared module
8 years ago
Peter Sprygada 388f98437e Merge pull request #17165 from privateip/network
fix broken import statement from netcli rename
8 years ago
Peter Sprygada 284e6cd365 Merge pull request #17164 from privateip/netcli
rename netcmd module to netcli
8 years ago
Peter Sprygada 53abcb23fa rename netcmd module to netcli
This is part of the 2.2 refactor to extract the Cli class into a
separate module.  This renames netcmd to netcli which is consistent
with the network shared modules implementations
8 years ago
Peter Sprygada 7cb2c31b1a fix import statement in ios shared module
This fixes the import statement when netcmd was renamed to netcli
8 years ago
Peter Sprygada ac8b8f0b8b fix broken import statement from netcli rename
The network module needed to be updated with the correct module name
when netcmd was renamed to netcli
8 years ago
Peter Sprygada 152fb29337 Merge pull request #17163 from privateip/network
removes Cli and Config objects from network into separate modules
8 years ago
Peter Sprygada f53dbec55a removes Cli and Config objects from network into separate modules
This completes the refactor of Cli and Config moving them into separate
modules netcmd and netcfg respectively.
8 years ago
Peter Sprygada 7cd682cc1a Merge pull request #17162 from privateip/ios
removes functions from ios module
8 years ago
Peter Sprygada 24c6443557 removes functions from ios module
This removes top level functions from the ios module and moves them
into the specific modules.  This update also includes some clean up
of the Cli transport
8 years ago
Peter Sprygada 90747e6d2f Merge pull request #17161 from privateip/netcmd
moves Cli and Command class from network to netcmd module
8 years ago
Peter Sprygada 7c928e878b moves Cli and Command class from network to netcmd module
This restructure moves the Cli object to netcmd and includes a roll up
of inor bugfix updates to CommandRunner

* CommandRunner now only allows one instance of a command in the stack and
  raise an exception if a duplidate command is detected
* CommandRunner now caches returns based on command and output
* CommandRunner is not responsible for creating Command instances
8 years ago
Adrian Likins 7d41f623dd Move py34 mock_open compat to compat/test/mock (#17157)
test/units/plugins/action/test_action.py had code
for handling a bug in python 3.4's mock_open that
causes errors when reading binary data.

Moved to compat/tests/mock.py so other tests can
use it by default.
8 years ago
scottb 235eab6609 Merge pull request #16316 from alikins/alikins_docsite_make
Fewer deps for 'make webdocs' from top level
8 years ago
scottb 5483528480 Merge pull request #16331 from coryfklein/devel
Add missing documentation about defaults/main.yml
8 years ago
Scott Butler 9abd20d49b Edited https://github.com/ansible/ansible/pull/17128 8 years ago
scottb 495589230b Merge pull request #17128 from bcoca/DONT
Thanks @bcoca; will merge and do some minor wordsmithing.
8 years ago
Matt Clay 04bd6a3619 Make tests more cross platform. (#17154) 8 years ago
Peter Sprygada fa395bee7b Merge pull request #17149 from privateip/plugin-net-config
action plugin net_config will now remove any private result key
8 years ago
Peter Sprygada 0c7f5f5be5 Merge pull request #17150 from privateip/netcfg
pull Config object out of network and into netcfg
8 years ago
Peter Sprygada d50ef4446f action plugin net_config will now remove any private result key
This update will now remove any keys from results that are created using
the private names.  Private names are identified as double underscore (__)
on either side of the key name
8 years ago
Peter Sprygada 112f14866a pull Config object out of network and into netcfg
This moves the Config class from network and into netcfg module with
no added features.  This is simply a reorganization of code.
8 years ago
jctanner a0a2e1509e vmware_inventory script improvements (#17142)
* vmware_inventory script improvements
* switch instance finding method to use containerview based searches
* overhaul the serialization method for objects
* Cleanup the debug outputs
* Add a warning about performance
8 years ago
Dusty Mabe b817f1f3ea actions/unarchive: fix unarchive from remote url (#17126)
* actions/unarchive: fix unarchive from remote url

Currently unarchive from remote url does not work because the core
unarchive module was updated to support 'remote_src' [1], but the
unarchive action plugin was not updated for this. This causes failures
because the action plugin assumes it needs to copy a file to the
remote server, but in the case of downloading a file from a remote
url a local file does not exist, so an error occurs when the file is
not found.

[1] https://github.com/ansible/ansible-modules-core/commit/467516e

* test_unarchive: fix test with wrong remote_src use

The non-ascii filenames test had improperly set remote_src=yes even
though it was actually copying the file from the local machine (i.e.
the file did not already exist remotely). This test was passing
until the remote_src behavior of unarchive was fixed in 276550f.
8 years ago