Commit graph

7792 commits

Author SHA1 Message Date
Toshio Kuratomi
e3451be457 Update submodule refs 2016-09-19 11:53:32 -07:00
Peter Sprygada
b38181116b Merge pull request #17638 from privateip/fix-netcli
fixes issue where netcli would cause exception with an invalid conditional
2016-09-19 14:46:13 -04:00
Toshio Kuratomi
5e9a8d9202 Fix password lookup py3 plus alikins unittest additions refactoring (#17626)
* Improve unit testing of 'password' lookup

The tests showed some UnicodeErrors for the
cases where the 'chars' param include unicode,
causing the 'getattr(string, c, c)' to fail.
So the candidate char generation code try/excepts
UnicodeErrors there now.

Some refactoring of the password.py module to make
it easier to test, and some new tests that cover more
of the password and salt generation.

* More refactoring and fixes.

* manual merge of text enc fixes from pr17475

* moving methods to module scope

* more refactoring

* A few more text encoding fixes/merges

* remove now unused code

* Add test cases and data for _gen_candidate_chars

* more test coverage for password lookup

* wip

* More text encoding fixes and test coverage

* cleanups

* reenable text_type assert

* Remove unneeded conditional in _random_password

* Add docstring for _gen_candidate_chars

* remove redundant to_text and list comphenesion

* Move set of 'chars' default in _random_password

on py2, C.DEFAULT_PASSWORD_CHARS is a regular str
type, so the assert here fails. Move setting the
default into the method and to_text(DEFAULT_PASSWORD_CHARS)
if it's needed.

* combine _random_password and _gen_password

* s/_create_password_file/_create_password_file_dir

* native strings for exception msgs

* move password to_text to _read_password_file

* move to_bytes(content) to _write_password_file

* add more test assertions about genned pw's

* Some cleanups to alikins and abadger's password lookup refactoring:

* Make DEFAULT_PASSWORD_CHARS into a text string in constants.py
  - Move this into the nonconfigurable section of constants.
* Make utils.encrypt.do_encrypt() return a text string because all the
  hashes in passlib should be returning ascii-only strings and they are
  text strings in python3.
* Make the split up of functions more sane:
   - Don't split such that conditionals have to occur in two separate functions.
   - Don't go overboard: Good to split file system manipulation from parsing
     but we don't need to do every file manipulation in a separate
     function.
  - Don't split so that creation of the password store happens in two
    parts.
  - Don't split in such a way that no decisions are made in run.
* Organize functions by when it gets called from run().
* Run all potential characters through the gen_candidate_chars function
  because it does both normalization and validation.
* docstrings for functions
* Change when we store salt slightly.  Store it whenever it was already
  present in the file as well as when encrypt is requested.  This will
  head of potential idempotence bugs where a user has two playbook tasks
  using the same password and in one they need it encrypted but in the
  other they need it plaintext.
* Reorganize tests to follow the order of the functions so it's easier
  to figure out if/where a function has been tested.
* Add tests for the functions that read and write the password file.
* Add tests of run() when the password has already been created.
* Test coverage currently at 100%
2016-09-19 11:37:57 -07:00
Peter Sprygada
1a8ad2a20f fixes issue where netcli would cause exception with an invalid conditional
The Conditional instance will cause a stack trace if the provided conditional
does not map properly to the response.  This fixes that issue so that the
Conditional instance will now raise a FailedConditionalError with the
conditional that caused the failure.

Modules *_command modules (and any other modules that create an instance
of Conditional) should be updated to catch the FailedConditionalError
exception.
2016-09-19 14:14:43 -04:00
Brian Coca
a87a239124 draft of return common fields
(cherry picked from commit da2da568a051d51edd8c25a4d324089f8bd616eb)
2016-09-19 12:35:59 -04:00
fallencliff
06d46a1ecc update facts.py for aix (#17539)
* update facts.py for aix

add product_serial ,lpar_info,product_name and pv/vg info into facts

10.223.219.10 | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
            "77.77.77.1", 
            "10.223.219.10"
        ], 
        "ansible_all_ipv6_addresses": [
            "::1%1/0"
        ], 
        "ansible_architecture": "chrp", 
        "ansible_date_time": {
            "date": "2016-09-13", 
            "day": "13", 
            "epoch": "1473760269", 
            "hour": "17", 
            "iso8601": "2016-09-13T09:51:09Z", 
            "iso8601_basic": "20160913T175109568670", 
            "iso8601_basic_short": "20160913T175109", 
            "iso8601_micro": "2016-09-13T09:51:09.569251Z", 
            "minute": "51", 
            "month": "09", 
            "second": "09", 
            "time": "17:51:09", 
            "tz": "BEIST", 
            "tz_offset": "BEIST", 
            "weekday": "Tuesday", 
            "weekday_number": "2", 
            "weeknumber": "37", 
            "year": "2016"
        }, 
        "ansible_default_ipv4": {
            "address": "10.223.219.10", 
            "broadcast": "10.223.219.127", 
            "device": "en3", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "gateway": "10.223.219.1", 
            "interface": "en3", 
            "macaddress": "00:11:25:be:4b:75", 
            "mtu": "1400", 
            "netmask": "255.255.255.128", 
            "network": "10.223.219.0", 
            "type": "unknown"
        }, 
        "ansible_default_ipv6": {}, 
        "ansible_distribution": "AIX", 
        "ansible_distribution_release": "1", 
        "ansible_distribution_version": "6", 
        "ansible_dns": {}, 
        "ansible_domain": "", 
        "ansible_en0": {
            "device": "en0", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "77.77.77.1", 
                    "broadcast": "77.77.77.127", 
                    "netmask": "255.255.255.128", 
                    "network": "77.77.77.0"
                }
            ], 
            "ipv6": [], 
            "macaddress": "00:14:5e:b8:cd:a6", 
            "mtu": "1500", 
            "type": "unknown"
        }, 
        "ansible_en3": {
            "device": "en3", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "10.223.219.10", 
                    "broadcast": "10.223.219.127", 
                    "netmask": "255.255.255.128", 
                    "network": "10.223.219.0"
                }
            ], 
            "ipv6": [], 
            "macaddress": "00:11:25:be:4b:75", 
            "mtu": "1400", 
            "type": "unknown"
        }, 
        "ansible_env": {
            "AUTHSTATE": "compat", 
            "CLCMD_PASSTHRU": "1", 
            "HOME": "/home/yd_hzj", 
            "LANG": "C", 
            "LC_ALL": "C", 
            "LC_MESSAGES": "C", 
            "LC__FASTMSG": "true", 
            "LOCPATH": "/usr/lib/nls/loc", 
            "LOGIN": "yd_hzj", 
            "LOGNAME": "yd_hzj", 
            "MAIL": "/var/spool/mail/yd_hzj", 
            "NLSPATH": "/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat", 
            "ODMDIR": "/etc/objrepos", 
            "PATH": "/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin", 
            "PWD": "/home/yd_hzj", 
            "PYTHONPATH": "", 
            "SHELL": "/usr/bin/ksh", 
            "SSH_CLIENT": "10.223.172.41 33369 22", 
            "SSH_CONNECTION": "10.223.172.41 33369 10.223.219.10 22", 
            "SSH_TTY": "/dev/pts/12", 
            "TERM": "vt100", 
            "TZ": "BEIST-8", 
            "USER": "yd_hzj", 
            "_": "/usr/bin/python"
        }, 
        "ansible_fips": false, 
        "ansible_firmware_version": "SF240_358", 
        "ansible_fqdn": "test1", 
        "ansible_gather_subset": [
            "hardware", 
            "network", 
            "virtual"
        ], 
        "ansible_hostname": "test1", 
        "ansible_interfaces": [
            "en0", 
            "lo0", 
            "en3"
        ], 
        "ansible_kernel": "1", 
        "ansible_lo0": {
            "device": "lo0", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "LOOPBACK", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "127.0.0.1", 
                    "broadcast": "127.255.255.255", 
                    "netmask": "255.0.0.0", 
                    "network": "127.0.0.0"
                }
            ], 
            "ipv6": [
                {
                    "address": "::1%1/0"
                }
            ], 
            "macaddress": "unknown", 
            "mtu": "16896", 
            "type": "unknown"
        }, 
        "ansible_lpar_info": "1 test1", 
        "ansible_machine": "00CE5FA34C00", 
        "ansible_memfree_mb": 9992, 
        "ansible_memtotal_mb": 98304, 
        "ansible_nodename": "test1", 
        "ansible_os_family": "AIX", 
        "ansible_pkg_mgr": "svr4pkg", 
        "ansible_processor": "PowerPC_POWER5", 
        "ansible_processor_cores": 2, 
        "ansible_processor_count": 12, 
        "ansible_product_name": "IBM,9119-595", 
        "ansible_product_serial": "02E5FA3", 
        "ansible_python": {
            "executable": "/usr/bin/python", 
            "has_sslcontext": false, 
            "type": "CPython", 
            "version": {
                "major": 2, 
                "micro": 5, 
                "minor": 7, 
                "releaselevel": "final", 
                "serial": 0
            }, 
            "version_info": [
                2, 
                7, 
                5, 
                "final", 
                0
            ]
        }, 
        "ansible_python_version": "2.7.5", 
        "ansible_selinux": false, 
        "ansible_service_mgr": "src", 
        "ansible_ssh_host_key_dsa_public": "AAAAE23Nzav1hVVTNNoYvp7eokKbwY", 
        "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYvp7eokKbwY=", 
        "ansible_ssh_host_key_rsa_public": "AAAAB3Nzav1hVVTNfKiM4W1j9mcw==", 
        "ansible_swapfree_mb": 16558, 
        "ansible_swaptotal_mb": 16896, 
        "ansible_system": "AIX", 
        "ansible_user_dir": "/home/yd_hzj", 
        "ansible_user_gecos": "", 
        "ansible_user_gid": 7, 
        "ansible_user_id": "yd_hzj", 
        "ansible_user_shell": "/usr/bin/ksh", 
        "ansible_user_uid": 263, 
        "ansible_userspace_bits": "32", 
        "ansible_vgs": {
            "realsyncvg": [
                {
                    "free_pps": "6", 
                    "pp_size": "128 megabyte(s)", 
                    "pv_name": "hdisk74", 
                    "pv_state": "active", 
                    "total_pps": "1999"
                }
            ], 
            "rootvg": [
                {
                    "free_pps": "0", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk0", 
                    "pv_state": "active", 
                    "total_pps": "546"
                }, 
                {
                    "free_pps": "113", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk1", 
                    "pv_state": "active", 
                    "total_pps": "546"
                }
            ], 
            "testvg": [
                {
                    "free_pps": "838", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk105", 
                    "pv_state": "active", 
                    "total_pps": "999"
                }, 
                {
                    "free_pps": "599", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk106", 
                    "pv_state": "active", 
                    "total_pps": "999"
                }
            ]
        }, 
        "module_setup": true
    }, 
    "changed": false
}

* Update facts.py

* Update facts.py
2016-09-19 12:20:29 -04:00
Michael Scherer
968101f611 Fix #17624 (#17627)
Even if the size of the network is 0, it should have a netmask.
2016-09-19 11:58:20 -04:00
Nathaniel Case
881da2b3f1 Fix call to axapi_call_v3() (#17637)
Closes #17584
2016-09-19 16:42:23 +01:00
René Moser
6247e7bc38 cloudstack: move common code to module_utils (#17635) 2016-09-19 14:47:03 +02:00
René Moser
3f6f4617dc cloudstack: fix has_changed dict values comparsion (#17632)
In some rare situations, the CloudStack API returns string for numbers
when we expected int.

With this fix, we ensure we compare the types expected.
2016-09-19 14:02:29 +02:00
Peter Sprygada
ff52e01a11 Merge pull request #17625 from skg-net/dellos6_template
Added support for template module for Dell Networking OS6 devices
2016-09-18 22:26:20 -04:00
Peter Sprygada
8f8eb84ebf Merge pull request #17613 from Qalthos/pyez_check
Add simple checks for libraries to junos
2016-09-18 22:25:13 -04:00
Peter Sprygada
79d1b51dfb Merge pull request #17623 from dgjustice/nxos_fixes
Fixed transport issues when calling self.execute from Cli
2016-09-18 22:24:01 -04:00
Joshua Elsasser
fa5f8a7543 Fix slaac filter (#17551) 2016-09-17 23:52:10 +02:00
d3justi
261666a01b Removed checks from Nxapi class. D\'oh\! 2016-09-17 14:40:00 -05:00
d3justi
07f3b27351 added a couple more checks 2016-09-17 14:32:03 -05:00
Senthil Kumar Ganesan
463349c0d1 Added support template module for Dell Networking OS6 devices 2016-09-17 10:55:40 -07:00
d3justi
d34f7c24d9 Fixed transport issues when calling self.execute from Cli 2016-09-17 10:38:24 -05:00
James Cammarata
5a57c66e3c Moving result reading to a background thread 2016-09-17 08:12:52 -05:00
Toshio Kuratomi
2989527cd9 Fix dataloader using deprecated version of is_encrypted (#17615) 2016-09-17 00:45:29 -07:00
Peter Sprygada
6826ed3879 Merge pull request #17622 from privateip/network-plugin-fix
fixes AttributeError: 'Task' object has no attribute '_block'
2016-09-16 22:31:34 -04:00
Peter Sprygada
353f6be273 Merge pull request #17545 from privateip/asa
removes filter attribute from asa
2016-09-16 22:06:19 -04:00
Peter Sprygada
2a7c87a3b7 fixes AttributeError: 'Task' object has no attribute '_block'
This addresses a problem when *_config or *_template network modules are
being used in roles.  The module will error with the above message.  This
fixes that problem

fixed ansible/ansible-modules-core#4840
2016-09-16 22:04:22 -04:00
Matt Clay
07a76bece1 Update submodule refs. 2016-09-16 16:25:47 -07:00
Toshio Kuratomi
ce4c0fd644 Use text strings when using display() to avoid UnicodeError tracebacks 2016-09-16 16:24:19 -07:00
Senthil Kumar Ganesan
bb9ed50441 Renamed the Modules from dnos* -> dellos*, updated copyright, removed… (#17617)
* Renamed the Modules from dnos* -> dellos*, updated copyright, removed dnos6_template

* Addressed @gundalow comments
2016-09-16 22:45:08 +01:00
ftigeot
9df8a2565f Fix distribution fact on DragonFly (#17619)
* By default, ansible_distribution is not set on DragonFly systems,
  preventing some distribution-specific tests from being written

* This commit fixes the issue by returning the quite logical value
  of "DragonFly" when appropriate
2016-09-16 17:32:54 -04:00
nvigot
10f840e80d include_vars now properly deals with hash_behaviour (#15895) 2016-09-16 15:40:38 -04:00
Adrian Likins
3e754086b6 Fix error using jsonfile with incomplete config (#17567)
If 'fact_caching=jsonfile' was configured, but
'fact_caching_connection' was not configured, jsonfile
would fail and ansible-playbook would exit with a traceback.

Fixes #17566
2016-09-16 15:08:02 -04:00
jctanner
29fda4be1e copy action plugin: recurse into sub folders of the source (#17614)
* copy action plugin: recurse into sub folders of the source

Fixes #13013

* Fix python3 bytes/strings

* Fix py3 again

* test
2016-09-16 14:26:19 -04:00
Brian Coca
4e60f23198 remove bare variable support from loops (#17519)
* remove bare variable support from loops

* Added new 'removed deprecated' section to changelg

also added removed items from this PR and others
2016-09-16 12:54:52 -04:00
Toshio Kuratomi
d9c0773609 Update submodule refs 2016-09-16 09:18:19 -07:00
Nathaniel Case
b753e8dc48 Add simple checks for libraries to junos 2016-09-16 11:30:19 -04:00
Andrea Tartaglia
e0a77bb8d5 Pass the absolute path to dirname when assigning basedir (#17457)
* Pass the absolute path to dirname when assigning basedir

If no path is specified when calling the playbook, os.path.dirname(playbook_path) returns ''
This will cause failure when creating the retry file.

Fixes #17456

* Updated to use os.pathdirname(os.path.abspath())
2016-09-16 08:19:43 -07:00
Peter Sprygada
697888965e Merge pull request #17603 from skg-net/dnos10_facts
Added support for facts module for Dell Networking OS10 device.
2016-09-16 08:02:44 -04:00
Toshio Kuratomi
8af8eec789 Merge pull request #17590 from abadger/vault-fixes
Vault fixes
2016-09-15 18:39:34 -07:00
Senthil Kumar Ganesan
769fa1c2d7 Support for dnos10_facts module 2016-09-15 16:16:17 -07:00
Toshio Kuratomi
e70066a6f7 Many Cleanups to vault
* Make is_encrypted_file handle both files opened in text and binary mode
  On python3, by default files are opened in text mode.  Since we know
  the encoding of vault files (and especially the header which is the
  first set of bytes) we can decide whether the file is an encrypted
  vault file in either case.
* Fix is_encrypted_file not resetting the file position
* Update is_encrypted_file to check that all the data in the file is ascii
* For is_encrypted_file(), add start_pos and count parameters
  This allows callers to specify reading vaulttext from the middle of
  a file if necessary.
* Combine VaultLib.encrypt() and VaultLib.encrypt_bytestring()
* Change vault's is_encrypted() to take either text or byte strings and to return False if any part of the data is non-ascii.
* Remove unnecessary use of six.b
* Vault Cipher: mark a few methods as private.
* VaultAES256._is_equal throws a TypeError if given non byte strings
* Make VaultAES256 methods that don't need self staticmethods and classmethods
* Mark VaultAES and is_encrypted as deprecated
* Get rid of VaultFile (unused and feature implemented in a different way)
* Normalize variable and parameter names on plaintext, ciphertext, vaulttext
* Normalize variable and parameter names on "b_" prefix when dealing with bytes
* Test changes:
  * Remove redundant tests( both checking the same byte string)
  * Fix use of format string without format operator
  * Enable vault editor tests on python3
  * Initialize the vault_cipher for VaultAES256 testing in setUp()
  * Make assertTrue and assertFalse take the actual method calls for
    better error messages.
  * Test that non-ascii byte strings compare correctly.
  * Test that unicode strings and ints raise TypeError

* Test-specific:
  * Removed test_methods_exist().  We only have one VaultLib so the
    implementation is the assurance that the methods exist. (Can use an abc for
    this if it changes).
  * Add tests for both byte string and text string input where the API takes either.
  * Convert "assert" to unittest assert functions or add a custom message where
    that will make failures easier to debug.
  * Move instantiating the VaultLib into setUp().
2016-09-15 15:22:06 -07:00
James Cammarata
dfb1c0647e Revert "Move queuing tasks to a background thread"
This reverts commit b71957d6e6.
2016-09-15 17:00:06 -05:00
jctanner
b93de25204 During initial argument evaluation, cast args to string. (#17595)
Later in the stack, further code will check and inform the user that var names must start with a letter
or underscore, so this fix only allows us to get to that previously existing policy.

Fixes #16008
2016-09-15 16:41:11 -04:00
Adrian Likins
2c54a8471f Improve inventory script error messages. (#17589)
When an inventory file looks executable (with a #!) but
isn't, the error message could be confusing. Especially
if the inventory file was named something like 'inventory'
or 'hosts'. Add some context and quote the filename.

This is based on https://github.com/ansible/ansible/pull/15758
2016-09-15 15:42:57 -04:00
Matt Davis
f497d771c8 win_shell/win_command changes + tests (#17557) 2016-09-15 11:25:56 -07:00
Senthil Kumar Ganesan
81072fcba1 Added support OS9 facts (#17591) 2016-09-15 19:22:23 +01:00
Toshio Kuratomi
ebc4d577de Update submodule refs 2016-09-15 09:58:59 -07:00
Brian Coca
cb071e043c updated subrefs 2016-09-15 11:43:50 -04:00
Monty Taylor
cd6e01349e Ensure parent tempdir's existence (#17585)
While doing evil things with action plugins, I hit a code path in which
the mkdir here was failing due to lack of parent dir. Changing this to
makedirs made everything happy. Now, I'd obviously like to understand
why the parent dir exists in some places and not others - but I could
not find anywhere that C.DEFAULT_LOCAL_TMP is ensured to be created.
2016-09-15 09:57:15 -04:00
Toshio Kuratomi
70e63ddf6c Fix cow mode to work with unicode task and play names (#17576)
Fixes #17560
2016-09-14 20:02:35 -07:00
Matt Clay
6787fc70a6 Update submodule refs. 2016-09-14 13:28:34 -07:00
Senthil Kumar Ganesan
68f1705d18 Add action plugin for dnos6_config module (#17553) 2016-09-14 20:55:45 +01:00
Senthil Kumar Ganesan
7d9b07382b Add action pluging for dnos9_template module (#17549) 2016-09-14 20:40:55 +01:00
Senthil Kumar Ganesan
564e02c3c3 Add action plugin for dnos6_template module (#17554) 2016-09-14 20:37:56 +01:00
Senthil Kumar Ganesan
daba7fa057 Moved the dnos10_template.py action plugin to the correct directory (#17550) 2016-09-14 20:28:01 +01:00
Toshio Kuratomi
f4cd1c6321 Fix galaxy's parsing of the command line. (#17569)
Also make the parsing of the action in both galaxy and vault more
robust.

Fixes #17534
May Fix #17563
2016-09-14 11:49:54 -07:00
Adrian Likins
8438da2a34 Make jsonfile cache plugin errors less vague. (#17568) 2016-09-14 14:10:12 -04:00
Adrian Likins
c633022fca [wip] Let jsonfile and memcached cache plugins understand fact_caching_timeout=0 (#17565)
* Add support for no-expiration to jsonfile cache

* Let memcached cache use fact_caching_timeout=0

If fact_cache=memcached and fact_caching_timeout=0
memcached would hit a NameError on _expire_keys
2016-09-14 13:27:42 -04:00
Ryan S. Brown
0bda419f66 Allow AWSRetry class to be created without boto3/botocore installed 2016-09-14 11:34:10 -04:00
Brian Coca
4656b6a846 added msg info to unreachable for oneline callback
fixes #17367
2016-09-14 11:33:01 -04:00
Adam Reznechek
23930d799f Fix cpu facts for hosts missing fields in cpuinfo (16533) (#16535)
Change linux fact gathering to correctly gather ansible_processor_count
and ansible_processor_vcpus on systems without vendor_id/model_name in
/proc/cpuinfo (for ex, ppc64/POWER)
2016-09-13 17:19:33 -04:00
Allen Sanabria
b510abce17 CloudRetry/AWSRetry backoff decorator with unit tests (#17039)
* Added aws_retry decorator function with unit tests

* Restructured the code to be used with a base class.

This base class CloudRetry can be reused by any other cloud provider.
This decorator should be used in situations, where you need to implement
a backoff algorithm and want to retry based on the status code from the
exception.

* updated documentation

* fixed tabs

* added botocore and boto3 to requirements.txt

* removed cloud.py from py24 tests, as it depends on boto3

* fix relative imports

* updated test to be 2.6 compat

* updated method name from retry to backoff

* readded lxd

* Updated default backoff from 2 seconds to 1.1s.

This will be about a total of 48 seconds in 10 tries. This is
configurable.
2016-09-13 16:46:59 -04:00
Brian Coca
60706cc12e doas update (#16997)
hopefully fixes #15597
2016-09-13 16:17:24 -04:00
Peter Sprygada
760fff8564 Merge pull request #17546 from skg-net/dnos9_config
Added support for dnos9_config module
2016-09-13 15:01:10 -04:00
Brian Coca
db8c952ee3 added new ksu method to man page
removed runas refrences, because it was never implemented
2016-09-13 14:40:41 -04:00
Nathaniel Case
5331dd482c Cleanup eos (#17548) 2016-09-13 14:29:06 -04:00
Senthil Kumar Ganesan
c6acf44a7c Added support for dnos9_config module 2016-09-13 10:42:12 -07:00
Nathaniel Case
8b3ae1e806 Cleanup netcfg.py (#17531)
Closes #17412
2016-09-13 13:40:32 -04:00
Peter Sprygada
c9d74e9a6e removes filter attribute from asa
This removes the filter attribute from the asa shared module and moves
the function to the asa_acl module where it was used.
2016-09-13 13:38:41 -04:00
Brian Coca
7450629733 better display for free strategy (#17355) 2016-09-13 12:59:32 -04:00
John R Barker
e326da28ff eos: cmd should be item (#17540)
Was changed during
7fe64ef9b8
however not all look variables were updated.
2016-09-13 17:17:35 +01:00
Abhijit Menon-Sen
07756a4265 Remove extraneous . from VALID_FILE_EXTENSIONS
Otherwise if you «include_vars: vars.json», you get this error:

    "message": "/path/to/vars.json does not have a valid extension: yaml, yml, .json"
2016-09-13 19:41:26 +05:30
Toshio Kuratomi
b0d81a43d7 Update submodule refs 2016-09-13 07:07:12 -07:00
Brian Coca
8ebd8ca259 updated solaris virtualization detection (#17464)
avoid prtdiag since it seems to hang and require service restarts
hopefully fixes #4583
2016-09-13 09:03:05 -04:00
Nathaniel Case
036650cb09 Cleanup junos (#17530)
Closes #17411
2016-09-12 17:42:26 -04:00
Peter Sprygada
076a821821 Merge pull request #17468 from skg-net/dnos9_command
dnos9_command (new module)
2016-09-12 17:04:17 -04:00
Nathaniel Case
bfe341177b Cleanup netcli (#17529)
This honestly mostly amounts to Python 3 fixes.
2016-09-12 16:08:21 -04:00
Toshio Kuratomi
bf29961947 Fixes to the controller text model (#17527)
* Fixes to the controller text model

* Change command line args to text type
* Make display replace undecodable bytes with replacement chars.  This
  is only a problem on pyhton3 where surrogates can enter into the msg
  but sys.stdout doesn't know how to handle them.
* Remove a deprecated playbook syntax in unicode.yml

* Fix up run_cmd to change its parameters to byte string at appropriate times.
2016-09-12 12:57:41 -07:00
Toshio Kuratomi
9868117d1f Update submodule ref for core to fix broken service module 2016-09-12 11:55:39 -07:00
Toshio Kuratomi
499b13d649 Update submodule refs 2016-09-12 11:32:08 -07:00
Senthil Kumar Ganesan
1c7c3cc878 Addressed review comments from @gundalow 2016-09-12 11:26:22 -07:00
Senthil Kumar Ganesan
3e18676af4 Addded support for dnos9_command module 2016-09-12 11:26:22 -07:00
Nathaniel Case
060ed665f6 Cleanup nxos
closes #17414
2016-09-12 14:20:50 -04:00
Peter Sprygada
5aa83041bf Merge pull request #17474 from skg-net/dnos6_command
Add module_utils/dnos6.py
2016-09-12 13:40:56 -04:00
Peter Sprygada
cc45506006 Merge pull request #17521 from privateip/fix-4797
raise exception when src file is not found in net_config
2016-09-12 13:40:01 -04:00
Nathaniel Case
fcd4be28ee Cleanup openswitch
Also bump get_config in vyos, to pick up the addition of **kwargs

Closes #17415
2016-09-12 13:35:57 -04:00
Senthil Kumar Ganesan
05e016e4aa Addressed @gundalow review comments 2016-09-12 10:08:10 -07:00
Senthil Kumar Ganesan
94df740ca3 Added support for dnos6_command module 2016-09-12 10:08:10 -07:00
Toshio Kuratomi
6117e1946e Check controlpersist (#17443)
* Add a new config option to cache the check for controlpersist on the
control machine.

Fixes #15844

* Remove the option and make the behavior the default

* Make the check for controlpersist cache its status per-ssh executable
2016-09-12 08:27:39 -07:00
Nathaniel Case
2077e32ddd Vyos cleanup
Addresses #17416
2016-09-12 11:19:09 -04:00
Peter Sprygada
16d6274276 raise exception when src file is not found in net_config
This will now raise an exception if the file path specified in src is not
found and the module will gracefully error.

ref #4797
2016-09-12 10:00:35 -04:00
Peter Sprygada
4e325274d6 Merge pull request #17512 from privateip/nxos
roll up of updates to nxos shared module
2016-09-12 09:44:07 -04:00
Peter Sprygada
7777c38b95 Merge pull request #17508 from privateip/sros
updates sros shared module
2016-09-12 09:43:55 -04:00
Peter Sprygada
e83567a8ec Merge pull request #17509 from privateip/vyos
roll up of updates to vyos shared module
2016-09-12 09:43:47 -04:00
Peter Sprygada
560984d282 Merge pull request #17511 from privateip/junos
updates junos shared module methods
2016-09-12 09:43:30 -04:00
Peter Sprygada
7c4dad4275 Merge pull request #17513 from privateip/eos
cleans up load_config() in eos shared module
2016-09-12 09:42:30 -04:00
Peter Sprygada
ebe2400af8 Merge pull request #17510 from privateip/iosxr
clean up iosxr shared module
2016-09-12 09:42:11 -04:00
John R Barker
8a3b520f70 Add missing space in loop variable reuse message (#17516) 2016-09-12 08:35:23 -04:00
Peter Sprygada
f4af154bef Merge pull request #17506 from privateip/openswitch
minor clean of openswitch shared module
2016-09-11 23:57:13 -04:00
Peter Sprygada
db744e1233 Merge pull request #17507 from privateip/netcfg
removes unneeded message in netcfg
2016-09-11 23:57:03 -04:00
nitzmahone
8d1f96dd82 bump core submodule ref for win_user fixes 2016-09-11 20:45:46 -07:00
Peter Sprygada
d2e4ddf0b0 roll up of updates to nxos shared module
* combine same functions into NxapiConfigMixin class
* update Cli and Nxapi to use mixin
2016-09-11 23:40:31 -04:00
Peter Sprygada
e9f804614d removes unneeded message in netcfg
removes old warning message in netcfg that is no longer used
2016-09-11 23:38:44 -04:00