Commit graph

4040 commits

Author SHA1 Message Date
Ganesh Nalawade
aaf22965db
Reset persistent connection in junos integration test (#33573) 2017-12-05 15:25:39 +05:30
Ganesh Nalawade
399e72abb0
Fix reconstructing socket path in network_cli (#33572)
*  Persistent connection socket path is hash of
   remote address, port, remote user and connection
   type.

*  Integration test fixes
2017-12-05 15:11:49 +05:30
Dag Wieers
aec8e7784a urpmi: PEP8 compliancy and documentation changes (#33560)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-12-05 03:32:58 -05:00
Ganesh Nalawade
95044d69c7
Fix unit test failure for netconf connection plugin (#33547) 2017-12-05 12:04:48 +05:30
ZhijunZhao
8506b7bfdc Fix azure_rm_acs due to Azure breaking API change (#33221)
* Fix azure_rm_acs due to Azure breaking API change

* resolve code review feedbacks

* resolve test failures

* better name

* ignore case for vm size

* reformat code

* resolve code review feedbacks
2017-12-04 15:41:34 -08:00
nwsparks
cf6f6d09db new windows module win_audit_policy_system (#31046)
* new windows module win_audit_policy_system

* removed the backup/restore functionality

adjusted to use run-command rather than running the command directly

adjusted testing appropriately for the above changes

* fixed issue with variable naming in testing
removed .psm1 from requires
fixed copyright

* Updated audit_type to list and added appropriate error handling
Updated testing accordingly
Fixed up documentation
2017-12-04 17:42:36 -05:00
Ryan S. Brown
5087ce9273 Remove botocore from top-level execution in lambda_policy tests
Even though the tests are skipped, the `ClientError` uses outside the
test cause a failure even though the tests never run
2017-12-04 10:14:32 -05:00
Dag Wieers
ff50b7893c
rpm_key: PEP8 compliancy and documentation changes (#33426)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-12-04 13:30:27 +01:00
Dag Wieers
fbfeeff6bf
apt_repository: PEP8 compliancy and documentation changes (#33429)
* apt_repository: PEP8 compliancy and documentation changes

This PR includes:
- PEP8 compliancy changes
- Documentation changes

* Fix merge issue
2017-12-04 13:29:23 +01:00
Dag Wieers
c4ef5bb922
apt_key: PEP8 compliancy and documentation changes (#33427)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-12-04 13:27:32 +01:00
Dag Wieers
2416a8806d apt: PEP8 compliancy and documentation changes (#33425)
This PR includes:
- PEP compliancy changes
- Documentation changes
2017-12-03 17:14:49 +01:00
Ganesh Nalawade
11c9ad23d5
Refactor common network shared and platform utils code into package (#33452)
* Refactor common network shared and platform specific code into package (part-1)

As per proposal #76 refactor common network shared and platform specific
code into sub-package.
https://github.com/ansible/proposals/issues/76

*  ansible.module_utils.network.common - command shared functions
*  ansible.module_utils.network.{{ platform }} - where platform is platform specific shared functions

*  Fix review comments

* Fix review comments
2017-12-03 21:42:30 +05:30
Tim Rupp
18aca48075
Various errors and formatting fixes (#33503)
* Various errors and formatting fixes

Mostly formatting fixes and small changes to better support debugging

* Fixes upstream errors
2017-12-02 22:33:18 -08:00
Tim Rupp
9f544cf926
Adds traffic group and fixes (#33502)
Adds the traffic group param. Adds conventions for updated f5
standards
2017-12-02 22:20:00 -08:00
Tim Rupp
00bf4ee210
routedomain fixes (#33501)
* routedomain fixes

Adds partition. Adds name. Makes name and id mutually exclusive.

* Fixes upstream errors
2017-12-02 22:10:04 -08:00
Tim Rupp
dd94cc8229
Various bigip_selfip fixes (#33500)
* Various bigip_selfip fixes

Minor optimizations. Fixes address regex

* Fixing upstream errors
2017-12-02 21:50:25 -08:00
Tim Rupp
df86d8f39e
Fixes ordered dict import (#33499)
Make it try to fallback to a pypi package if its not found in what
ships with python
2017-12-02 21:26:23 -08:00
Tim Rupp
07c9c28a06
Fixes for unit tests (#33498)
upstream unit tests broke downstream code. this rectifies that.
2017-12-02 21:17:53 -08:00
Tim Rupp
da2e20ef45
Fixes various http monitor things (#33497)
Added token cleanup. Refactored a small amount of code. formatting
and cleanup of code.
2017-12-02 21:10:34 -08:00
Tim Rupp
798de98b0c
Adds hostname to remote-syslog (#33496)
* Adds hostname to remote-syslog

Previously, only an IP address wa allowed. This removes that restriction

* Fixes upstream errors
2017-12-02 21:03:19 -08:00
Tim Rupp
a4aa00f556
Various bigip_user fixes (#33495)
There was a bit of refactoring that happened for coding standards.
Additionally, a bug fix was made for changing the root password
2017-12-02 20:43:24 -08:00
Tim Rupp
bcda0db7db
Fixes tcp monitors (#33494)
* Fixes tcp monitors

Formatting fixes and a missing default parent. This patch fixes
that.

* Fixes upstream errors
2017-12-02 20:35:06 -08:00
Tim Rupp
212340bf0c
Fixes bug converning filenames with dots (#33493)
The name detminator was incorrect. This fixes it and fixes unit
tests related things that were broken downstream
2017-12-02 20:17:14 -08:00
Tim Rupp
1f1f1c9d04
Refactors bigip_node (#33492)
* Refactors bigip_node

Includes a number of fixes and enhancements in addition to refactoring
the code to be inline with f5 standards

* Fixes upstream errors
2017-12-02 20:04:21 -08:00
Tim Rupp
4f8f99479a
Various bigip policy fixes (#33491)
Test fixes, formatting, and added a difference checking method
2017-12-02 19:32:28 -08:00
Tim Rupp
008e23dcd1
Refactors bigip_sys_db (#33490)
Bringing it up to speed with the other f5 modules.
2017-12-02 19:08:01 -08:00
Tim Rupp
277d416b5b
Refactors bigip_vlan (#33489)
This patch adds tests and refactors the code to be inline with current
f5 coding standards
2017-12-02 18:58:51 -08:00
Tim Rupp
914829f56b
Adds bigip_monitor_snmp_dca module (#33483)
This module is a flavor of monitor for SNMP DCA's
2017-12-01 23:34:25 -08:00
Tim Rupp
a2f19fbded
Adds bigip_policy_rule module (#33482)
* Adds bigip_policy_rule module

This module is the second component of managing LTM policies on
BIG-IP. This module lets you manage the rules of a policy

* Fixing upstream errors

* Correcting YAML errors
2017-12-01 22:47:05 -08:00
Tim Rupp
abca68f5ac
Adds the bigip_monitor_udp module (#33481)
This module can be used to manage UDP monitors on a BIG-IP
2017-12-01 22:07:58 -08:00
Tim Rupp
e3419fce87
Fixes and features for bigip_provision (#33480)
* Fixes and features for bigip_provision

Adds support for dedicated modules. Fixes bug in minimum name.
Adds wrappers around checking for up-ness so that they will contribute
to the watch loop

* Fixes upstream errors
2017-12-01 21:53:54 -08:00
Tim Rupp
2b1f056881
Fixes bugs in iapp template (#33478)
Fixes upstream bugs that broke downstream. Also fixes a name
matching error in the iApp's name
2017-12-01 21:30:13 -08:00
Tim Rupp
f60b8a3abb
Fixes various things in bigip tests (#33477)
an upstream change was introduced that broke downstream code. This
path rectifies that error
2017-12-01 21:16:11 -08:00
Tim Rupp
1c373c112f
Minor fixes for gtm facts (#33476)
Removed unused code and fixed upstream changes that broke downstream
2017-12-01 21:02:36 -08:00
Tim Rupp
e1062d1a7b
Refactors the gtm datacenter module (#33474)
* Refactors the gtm datacenter module

This module needed to be inline with current f5 coding standards.
This fixes that

* Fixes upstream errors
2017-12-01 20:44:39 -08:00
Tim Rupp
76135a500e
Refactors bigip device sshd (#33473)
* Refactors bigip device sshd

Fixes coding conventions for currect f5 conventions

* Fixes upstream errors
2017-12-01 20:27:41 -08:00
Tim Rupp
a3b3dbe220
Refactors bigip_device_ntp (#33472)
* Refactors bigip_device_ntp

To be inline with current f5 conventions

* Fixed incorrect key
2017-12-01 20:14:10 -08:00
Tim Rupp
929a1df91d
Adds fixes to various bigip tests (#33471)
upstream changes broke downstream code. this rectifies that
2017-12-01 19:57:02 -08:00
Tim Rupp
f6be12b5d8
Adds various fixes for bigip_config tests (#33470)
There were upstream changes that were incompatible with the downstream
code. This fixes those.
2017-12-01 19:45:37 -08:00
Samer Deeb
717b6e7c1a Add mlnxos_config module (#33356)
* Add new module mlnxos_config

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add unit-test for mlnxos_config module

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-01 17:03:02 +00:00
Abhijeet Kasurde
addb882138 VMware: make name and folder required parameter (#33135)
This fix makes name and folder as required together
parameters in vmware_guest_snapshot.
Update integration tests for vmware_guest_snapshot.

Fixes: #22644

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-01 10:51:45 -05:00
Abhijeet Kasurde
e4254da1b1
Add esxi_hostname as argument in vmware_vswitch (#30498)
Fix adds esxi_hostname as Ansible module argument for user
to define ESXi hostname to deploy VMware vSwitch.

Fixes: #24647

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-01 20:49:37 +05:30
Dag Wieers
5b5d767c0b apt_rpm: PEP8 compliancy and documentation changes (#33431)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-12-01 08:19:35 -05:00
Tim Rupp
5fa25a0288
Adds fixes to bigip_asm_policy (#33440)
Integrates some upstream changes that were made and fixes several
spacing and testing errors
2017-11-30 15:50:07 -08:00
Toshio Kuratomi
7bd0af15d2
Enhance empty __init__ code-smell to check module_utils (#33438)
Empty __init__ will allow us to use python namespaces with all of these
files.  That may be something we want to take advantage of for allowign
them to be expanded by user dirs.  Also might be needed for AnsiballZ or
other wrapper enhancements in the future.
2017-11-30 15:47:38 -08:00
Toshio Kuratomi
e499bccbaa
Port some tests away from nose as examples (#33437)
We don't need to use both nose and pytest.  Once we get rid of all uses
of nose we can remove the extra dependency
2017-11-30 14:04:09 -08:00
R. Francis Smith
e957760d52 updated pamd rule args regexp to match file paths also (#33432)
* Added . and / to rule args regexp

Things like pam_echo.so file=/etc/foo.txt weren't being matched and
causing incorrect change counts.  Adding / and . fixed that.

Fixes #33351

* pamd: test argument with value

Relates #33351
2017-11-30 15:32:02 -05:00
Dag Wieers
e0c94aa6a7 yum: PEP8 compliancy and documentation changes (#33424)
This PR includes:
- PEP8 compliancy changes
- documentation changes
2017-11-30 13:32:05 -05:00
Ganesh Nalawade
35acae7ea7
Fix eos integration test failure (#33407)
Fixes #33406
Fixes #33405

*  Fix typo in network_cli for sendonly
*  Send `abort` to remote device in case configuration fails
*  Fix indentation issue in eos_static_route integration test

*  Revert network_cli change
2017-11-30 20:47:05 +05:30
Abhijeet Kasurde
1ca7929f96 VMware: Add support for numCoresPerSocket (#33149)
This fix adds support for hardware parameter 'numCoresPerSocket'
in vmware_guest module. Also, adds integration tests for this change.

Fixes: #20406

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-30 08:44:31 -05:00
Abhijeet Kasurde
7209b7f060
VMware: Add integration test for vmware facts (#33404)
This fix adds integration tests for vmware_guest_facts.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-30 16:19:53 +05:30
Ricardo Carrillo Cruz
1b31e34d7c
Remove provider from iosxr user tests (#33394) 2017-11-29 22:36:51 +01:00
Anil Kumar Muraleedharan
bada3afee9 Adding module enos_config and its UT files (#33081)
* Adding module enos_config and its UT files

* Removing trailing line

* Removing trailing lines

* Editing enos_module.py to fix build errors

* Removing blank lines in end

* Updating enos_config.py based on review comments

* Adding one more blank line

* Removing training white space

* Removing test_enos_config_force method from UT

* Updating documentation

* Comments by John, Remove version_added: "2.5"
2017-11-29 15:17:04 +00:00
Toshio Kuratomi
aa7bd8bc11 Port AnsibleModule deprecate and warning tests to pytest (#33162) 2017-11-28 18:43:24 -05:00
Nathaniel Case
a1da3dc997
Auth to become (#33319)
* terminal.on_(de)?authorize -> terminal.on_(un)?become

* Update network_cli

* Readd on_(de)?authorize as wrappers

* Update tests
2017-11-28 16:28:58 -05:00
Matt Martz
3a2c1541ca
Fix tests as filters syntax in recently modified integration tests (#33346) 2017-11-28 12:26:45 -06:00
Martin Krizek
0592fd47bc selinux: check if policy exists before switching (#31834)
* selinux: check if policy exists before switching

* Check the policy dir
2017-11-28 11:09:24 -05:00
George Nikolopoulos
34f965addd New module: Issue NITRO requests to a Netscaler instance (network/netscaler/netscaler_nitro_request) (#33091)
* Add netscaler_nitro_request module

* Make changes as requested.

* Fix whitepsace in EXAMPLES block.

* Set module changed status according to operation performed.
2017-11-28 14:16:01 +00:00
Alex Monteiro
2114278947 DatacenterFactsModule for HPE OneView (#32701)
* Added support to Datacenter resources in HPE OneView

* Adjusting comments in oneview_datacenter_facts

* Adding no_log on the documentation

* Using Pytest to Oneview DatacenterFactsModule tests
2017-11-28 13:49:51 +00:00
Kedar K
717193b67f
Fix integration test failures due to wrong files paths to ficture and (#33329)
missing ssh port
2017-11-28 14:58:42 +05:30
Yanis Guenane
a773bd7ad5 openssl_publickey: Ensure format OpenSSH is idempotent (#33264)
Currently the check() method for idempotence only assumes the public
key is under the form of a PEM file when its not always the case.

The module openssl_publickey allows one to generate OpenSSH format
publickey. This leads to idempotence not being detected.
2017-11-28 14:08:47 +05:30
Vincent Bernat
e65001ee22 cloudstack: fix spelling of "affinity_type" (#33231)
The previous spelling, "affinty_type" is marked as deprecated and will
be removed in Ansible 2.9. Both spelling are mutually exclusives.
2017-11-28 07:46:43 +01:00
Trishna Guha
819f9ee8fa Add port arg to establish ssh connection in nxos_file_copy (#33304)
* Add port arg to establish ssh connection in nxos_file_copy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* resolve kedar's comment
2017-11-28 10:54:23 +05:30
Jordan Borean
8386201242 add deprecation for stat get_md5 (#33002) 2017-11-27 18:58:55 -05:00
Matt Martz
4fe08441be Deprecate tests used as filters (#32361)
* Warn on tests used as filters

* Update docs, add aliases for tests that fit more gramatically with test syntax

* Fix rst formatting

* Add successful filter, alias of success

* Remove renamed_deprecation, it was overkill

* Make directory alias for is_dir

* Update tests to use proper jinja test syntax

* Update additional documentation, living outside of YAML files, to reflect proper jinja test syntax

* Add conversion script, porting guide updates, and changelog updates

* Update newly added uses of tests as filters

* No underscore variable

* Convert recent tests as filter changes to win_stat

* Fix some changes related to rebasing a few integration tests

* Make tests_as_filters_warning explicitly accept the name of the test, instead of inferring the name

* Add test for tests_as_filters_warning

* Update tests as filters in newly added/modified tests

* Address recent changes to several integration tests

* Address recent changes in cs_vpc
2017-11-27 17:58:08 -05:00
Samer Deeb
cbf28c20cb Add Support for Mellanox switches: first module: mlnxos_command (#33121)
* Add Support for Mellanox switches: first module: mlnxos_command

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add cliconf support for mlnxos

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* 1- Fix short description, 2- remove waitfor

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* remove usage of check_args

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-11-27 20:55:08 +00:00
Trishna Guha
25a465ffcb
loopback doesn't support passive_interface (#33252)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-27 22:56:16 +05:30
Martin Krizek
3a2a1e054f Fix include in loop when stategy=free (#33094) 2017-11-27 11:02:47 -05:00
René Moser
1a546711e1
cs_vpc: add new argument clean_up (#33278)
* cs_vpc: add new argument clean_up

* docs cleanup
* extend tests and increase coverage

* change default for clean_up to None

* extend tests
2017-11-26 11:28:32 +01:00
René Moser
1f9e84fdd4
cs_serviceoffer: remove unused code and improve test coverage (#33276) 2017-11-25 11:58:38 +01:00
Yanis Guenane
32635577a3 openssl_publickey: Do not fail on empty existing file (#33255)
Currently during the check phase, the code considers the file to be
a public key if the file exist - which is not necessarily true.

This commits aims to ensure that the file is actually a publickey else
returns false for the check.
2017-11-25 03:29:06 +00:00
Ken Celenza
748107d369 Type manipulation (#28446)
* add type manipulation

* update for py3

* add tests for list to dict

* Add dict to list tests

* Update tests to search for regex in response

* pep8 clean up

* update Exception for py3

* update test to be py2/3 compat

* update for py26 compat

* potential fix for py3 and py26

* potential fix for py3 and py26 take2

* add new line to kick off shippable

* remove cache file created

* fix filter name

* add space for shipable
2017-11-24 15:26:29 -05:00
Ganesh Nalawade
3d63ecb6f3
Refactor junos modules to Use netconf and cliconf plugins (#32621)
* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin

* Fix junos integration test fixes as per connection refactor (#33050)

Refactor netconf connection plugin to work with netconf plugin
Fix CI failure
Fix unit test failure
Fix review comments
2017-11-24 12:04:47 +05:30
Matt Clay
2ece86fba1 Split up cloud tests to avoid 1 hour CI limit. 2017-11-23 02:33:56 -08:00
René Moser
7adf91997d
cloudstack: new module cs_serviceoffer (#33060) 2017-11-23 07:25:56 +01:00
Yuwei Zhou
e4194b20db Azure create virtual machine with an Availability Set associate (#32535)
* add availability set for vm

* add test

* add import

* fix

* add test assert and output

* fix lint and version added

* add null check

* fix mirror

* fix mirror
2017-11-22 20:53:53 -08:00
Matt Clay
b865ddedac Change the default ansible-test docker image. 2017-11-22 14:47:30 -08:00
Matt Clay
633119df75 Disable flakey win_msg integration test. 2017-11-22 14:47:01 -08:00
James Cammarata
d8ae4dfbf2 Adding aliases for field attributes and renaming async attribute (#33141)
* Adding aliases for field attributes and renaming async attribute

As of Python 3.7, the use of async raises an error, whereas before the use
of the reserved word was ignored. This adds an alias field for field attrs
so that both async and async_val (interally) work. This allows us to be
backwards-compatible with 3rd party plugins that may still reference Task.async,
but for the core engine to work on Py3.7+.

* Remove files fixed for 'async' usage from the python 3.7 skip list
2017-11-22 12:35:58 -08:00
Matt Clay
1ee511f82c Use an abspath for network inventory ssh key path. 2017-11-22 11:10:22 -08:00
Matt Clay
3a6fad38fa Update vyos completion in network.txt. 2017-11-22 10:07:30 -08:00
Matt Clay
887f227994 Use vyos/1.1.8 in CI. 2017-11-22 10:02:25 -08:00
jctanner
218987eac1
ANSIBLE_SSH_USETTY configuration option (#33148)
* Allow the user to circumvent adding -tt on ssh commands to help aid in
debugging ssh related problems.
* Move config to the plugin
* Set version_added
* Change yaml section to "connection"
* Fix ssh unit tests
2017-11-22 11:19:43 -05:00
Gaudenz Steinlin
4c94c6f9ba cloudscale_server: add timeout param and increase default timeout (#33088)
* Improve error message in cloudscale_server module

Fix punctuation and add the full contents of "info" to the output in
case of failed API calls. This is useful in case of connection timeouts
and other error conditions where there is no response body available.

* Increase timeouts in cloudscale_server module

Increase the timeouts to not fail in case the API calls take a bit
longer than usual. The default timeout of fetch_url is 10s which is
quite short. Increase it to 30s. The timeout for waiting for a server
change is increased as well as it calls the API in a loop. Therefore
this value should be larger than the API timeout.

* Send API parameters as JSON in cloudscale_server module

Use JSON to send the POST data to the API instead of an urlencoded
string. Urlencoding is not really a good match for some Python
datatypes.

This fixes an issue when submitting a list of SSH keys which did not get
translated properly.

* Fix typo in cloudscale_server documentation

* cloudscale_sever: Replace timeout const by api_timeout param

Replace the static TIMEOUT_API constant by a user configurable
api_timeout parameter. Also eliminate the TIMEOUT_WAIT constant by
2*api_timeout. This means that the timeout to wait for server changes is
always double the timeout for API calls.

* Use Debian 9 image for cloudscale_server tests
2017-11-22 10:30:31 +01:00
Matt Clay
c6bb6c72cc Fix anomalous backslashes and enable pylint test. 2017-11-21 23:22:51 -08:00
Yuwei Zhou
b6c401ccc8 Fixes #30863: support update source_address_prefix in azure_rm_securitygroup (#32614)
* compare source address prefix

* remove useless quote
2017-11-21 22:20:00 -05:00
Matt Clay
6f4731ef11 Force all tests to run on docker image updates. 2017-11-21 15:02:07 -08:00
Jordan Borean
0962a0d816 win_updates: removed scheduled task to use become instead (#33118)
* win_updates: removed scheduled task to use become instead

* updated docs to remove scheduled task info

* fix issue with only installing last update in group
2017-11-21 13:49:38 -08:00
Brian Coca
ebd08d2a01 jsonify inventory (#32990)
* jsonify inventory
* smarter import, dont pass kwargs where not needed
* added datetime
* Eventual plan for json utilities to migrate to common/json_utils when we split
  basic.py no need to move jsonify to another file now as we'll do that later.
* json_dict_bytes_to_unicode and json_dict_unicode_to_bytes will also
  change names and move to common/text.py at that time (not to json).
  Their purpose is to recursively change the elements of a container
  (dict, list, set, tuple) into text or bytes, not to json encode or
  decode (they could be a generic precursor to that but are not limited
  to that.)
* Reimplement the private _SetEncoder which changes sets and datetimes
  into objects that are json serializable into a private function
  instead.  Functions are more flexible, less overhead, and simpler than
  an object.
* Remove code that handled simplejson-1.5.x and earlier.  Raise an error
  if that's the case instead.
  * We require python-2.6 or better which has the json module builtin to
    the stdlib.  So this is only an issue if the stdlib json has been
    overridden by a third party module and the simplejson on the system
    is 1.5.x or less.  (1.5 was released on 2007-01-18)
2017-11-21 13:41:27 -08:00
Matt Clay
07bb7684b0 Add PS dependency analysis to ansible-test. 2017-11-21 12:30:16 -08:00
Matt Clay
e45c763b64 Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
Matt Clay
f9cd50411f Enable Python 3.7 in ansible-test. 2017-11-21 09:24:04 -08:00
Ricardo Carrillo Cruz
be7a3adeb7
Fix ovs integration tests initial setup (#33136) 2017-11-21 13:34:27 +01:00
Ricardo Carrillo Cruz
de1bfde2d8
Add very basic openvswitch_bridge integration test (#33134)
More to come on this module.
2017-11-21 13:24:48 +01:00
Abhijeet Kasurde
fbe946719e
VMware: Add fix for setting manual MAC address (#32885)
This fix adds ability to set MAC address maunally. Before adding
any MAC address, the value is validated. If value is not valid, then
MAC address is set to vCenter generated MAC address.
Also, added integration tests for this change.

Fixes: #21161

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-21 09:47:05 +00:00
Martin Krizek
3c1fb9b547
Use custom rpm repo script for dnf testing (#32737)
* Use custom rpm repo script for dnf testing

* Switch to a jinja2 test
2017-11-21 09:40:58 +01:00
Ganesh Nalawade
0ddf092ae3
Add new filter to parse xml output for network use cases (#31562)
* Add new filter to parse xml output for network use cases

Fixes #31026
*  Add parse_xml filter
*  Add documentation for parse_xml filter

* Edited for clarity.

* Fix review comment and add unit tests

* Fix unit test CI failure

* Fix CI issues

* Fix unit test failures

* Fix review comments

* More copy edits.
2017-11-21 12:16:18 +05:30
Matt Clay
5f5e150771 Limit paramiko to < 2.4.0 for python 2.6. 2017-11-20 21:19:11 -08:00
Corban Johnson
d9a52db17d Adding RPC attribute parameters to junos_rpc network module (#32649)
* Adding RPC attribute arguments to `junos_rpc` network module.

* Specifying module argument version.

* Fixing DOCUMENTATION block.

* First attempt at new test fixture.

* Updated RPC_CLI_MAP.

* Use `result` instead of `reply`.
2017-11-21 10:45:13 +05:30
Steve Jacobs
400d821fdb Added eagerzeroedthick disk option to disk spec for vmware_guest (#28121)
* Added eagerzeroedthick disk option to disk spec
* Updated docstrings for vmware_guest disk
* VMware: Integration test for disk type

Signed-off-by: Steve Jacobs <sjacobs@brokencrew.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-21 03:11:28 +00:00
Matt Clay
677aca1cc7 Add Python 3.7-dev to the default docker image. 2017-11-20 18:09:58 -08:00
Will Thames
0b128e2e29 Add tests for ec2_vpc_route_table (#32036)
* Add tests for ec2_vpc_route_table

Initial tests for ec2_vpc_route_table ready for boto3 porting

* Turn AWS connection information into a YAML block
2017-11-20 17:31:08 -05:00
Mike Wiebe
95a2140f4b Use show command to support wider platform set for nxos_interface module (#33037)
* Use show command to support wider platform set

* Fix unit tests
2017-11-20 18:59:09 +00:00
Arnaud
84117e57ba nxos: 32 bits AS in as-dot format not recognized by regexp asn_regex (#30569)
* added test for 32 bits AS

* Lint not happy.
2017-11-20 10:09:16 +00:00
Philippe Dellaert
0324d5e850 Updating parameter to match vmware_portgroup parameter (#33059) 2017-11-19 15:01:45 +00:00
Tim Rightnour
5962337332 Add additional facts to the fact gathering of vmware (#31632)
Adds facts about datastores, esxi_host, vm files, ha state, question, is_template, consolidation status and hw_files. Also, adds integration tests for vmware fact enhancement.
2017-11-19 14:52:38 +00:00
Ganesh Nalawade
ce04f6e961
Fix junos integration test fixes as per connection refactor (#33050) 2017-11-19 11:52:04 +05:30
Matt Clay
781219bcfd Fix and re-enable zypper* integration tests in CI. 2017-11-17 14:37:40 -08:00
Matt Clay
2ef438c962 Improve zypper refresh/clean for opensuse images. 2017-11-17 12:59:48 -08:00
Dag Wieers
b3e4a88b90 consul_session: PEP8 compliancy and documentation changes (#33000)
THis PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-17 21:48:36 +01:00
Tim Rupp
c94d57311c
Adds bigip_vcmp_guest module (#33024)
This module can be used to manage guests on a vCMP provisioned BIG-IP.
vCMP is a hardware-only feature, therefore this module cannot be used
on the VE editions of BIG-IP.
2017-11-17 12:11:52 -08:00
Dag Wieers
5f36932adf pacemaker_cluster: PEP8 compliancy and doc changes (#33001)
This PR includes:
- PEP8 compliancy changes
- DOcumentation changes
2017-11-17 20:34:29 +01:00
René Moser
a314faae0e
cs_firewall: use list type for cidr (#33020) 2017-11-17 20:17:42 +01:00
Pilou
a5c9726502 Unit tests: share common code (#31456)
* move set_module_args to units.modules.utils
* unit tests: reuse set_module_args
* unit tests: mock exit/fail_json in module.utils.ModuleTestCase
* unit tests: use module.utils.ModuleTestCase
* unit tests: fix 'import shadowed by loop variable'
2017-11-17 09:17:07 -08:00
Jacob McGill
5747bf34d1 Network ACI: Add integration tests for several module (#33016) 2017-11-17 16:19:13 +01:00
Jordan Borean
8c5ee3461e win_stat: simplified tests before next change (#32996) 2017-11-16 16:22:57 -05:00
Daniel Shepherd
cfbe9c8aee [cloud] Add IPv6 support for ec2_vpc_subnet module(#30444)
* Add integration test suite for ec2_vpc_subnet

* wrap boto3 connection in try/except

update module documentation and add RETURN docs

add IPv6 support to VPC subnet module

rename ipv6cidr to ipv6_cidr, use required_if for parameter testing, update some failure messages to be more descriptive

DryRun mode was removed from this function a while ago but exception handling was still checking for it, removed

add wait and timeout for subnet creation process

fixup the ipv6 cidr disassociation logic a bit per review

update RETURN values per review

added module parameter check

removed DryRun parameter from boto3 call since it would always be false here

fix subnet wait loop

add a purge_tags parameter, fix the ensure_tags function, update to use compare_aws_tags func

fix tags type error per review

remove **kwargs use in create_subnet function per review

* rebased on #31870, fixed merge conflicts, and updated error messages

* fixes to pass tests

* add test for failure on invalid ipv6 block and update tags test for purge_tags=true function

* fix pylint issue

* fix exception handling error when run with python3

* add ipv6 tests and fix module code

* Add permissions to hacking/aws_config/testing_policies/ec2-policy.json for adding IPv6 cidr blocks to VPC and subnets

* fix type in tests and update assert conditional to check entire returned value

* add AWS_SESSION_TOKEN into environment for aws cli commands to work in CI

* remove key and value options from call to boto3_tag_list_to_ansible_dict

* remove wait loop and use boto3 EC2 waiter

* remove unused register: result vars

* revert az argument default value to original setting default=None
2017-11-16 14:58:12 -05:00
Brian Coca
23b1dbacaf
Config continued (#31024)
* included inventory and callback in new config

allow inventory to be configurable
updated connection options settings
also updated winrm to work with new configs
removed now obsolete set_host_overrides
added notes for future bcoca, current one is just punting, it's future's problem
updated docs per feedback
added remove group/host methods to inv data
moved fact cache from data to constructed
cleaner/better options
fix when vars are added
extended ignore list to config dicts
updated paramiko connection docs
removed options from base that paramiko already handles
left the look option as it is used by other plugin types
resolve delegation
updated cache doc options
fixed test_script
better fragment merge for options
fixed proxy command
restore ini for proxy
normalized options
moved pipelining to class
updates for host_key_checking
restructured mixins

* fix typo
2017-11-16 13:49:57 -05:00
Will Thames
46c4f6311a [cloud] Add retries/backoff to ec2_vpc_subnet module (#31870)
* Allow backoff for describe_subnets

Improve exception handling to latest standards

* Add integration test suite for ec2_vpc_subnet

* Add test for creating subnet without AZ

Fix bug identified by test

Fixes #31905
2017-11-16 13:09:42 -05:00
Will Thames
60b29cf57d [cloud] Follow up on FIXMEs in ec2_ami & ec2_ami tests (#32337)
* Several tests were marked as FIXME and should have been fixed with
the boto3 move.

* Improved tags output. Add purge_tags option (default: no)

* Allow description and tags update

* Return launch_permissions

* Allow empty launch permissions for image creation

* Empty launch permissions should work the same way for image
creation as no launch permissions

* Cope with ephemeral devices in AMI block device mapping

* Ephemeral devices can appear in AMI block devices, and this information should be returned

* Fix notation for creating sets from comprehensions
2017-11-16 10:14:20 -05:00
saichint
aef50eaa40 Integration Tests only: nxos_udld, nxos_udld_interface, nxos_vxlan_vtep_vni (#29143)
* it cases for vxlan_vtep_vni, udld

* platform specific testing

* fix vxlan_vtep for n7k

* fix udld_intf setup

* skip udld tests on titanium n7k

* remove hardcoding

* fix udld tests for titanium
2017-11-16 07:39:59 +00:00
Ganesh Nalawade
ba0aade8f4
Fix ios_config integration test failures (#32959) 2017-11-16 12:37:47 +05:30
Abhijeet Kasurde
e61bcc3438
Provide clear error message after failure (#32928) 2017-11-16 06:42:27 +00:00
Abhijeet Kasurde
2d4c4e09db
Add vmware fact about 'Cores Per Socket' (#32881)
This fix adds new fact - 'Cores Per Socket' about vmware guest machine.
Also, adds integration test for this change.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-11-16 06:22:32 +00:00
Mike Wiebe
208208ab8f Fix nxos_snmp_host bug (#32916)
* Fix nxos_snmp_host bug

* Enable nxos_snmp_host tests
2017-11-16 06:17:42 +00:00
Tim Rupp
3f3c526026
Removes deprecated "append" param from snat pool (#32953)
This param was deprecated in 2.4 and slated for removal in 2.5. This
patch removes it.
2017-11-15 19:35:09 -08:00
Tim Rupp
0c1f493b6c
Adds module for managing bigip device connectivity (#32950)
This module is a critical part of the HA process for BIG-IPs.
2017-11-15 16:51:51 -08:00
Jordan Borean
1bc4940ee1
added powershell symlink util helper (#27153)
* Added symbolic link util for powershell

* updated module_util license to BSD
2017-11-16 10:12:02 +10:00
Jordan Borean
e16e6313c7 windows: fix for checking locked system files (#30665)
* fix for checking locked system files

* moved functions to share module util and created tests

* fixed windows-paths test based on win_stat changes
2017-11-15 19:04:03 -05:00
Jordan Borean
5e20fd0943 removed psobject to hashtables that were missed (#32710)
* removed psobject to hashtables that were missed

* fix up win_region change
2017-11-15 14:51:16 -08:00
Matt Clay
ef21038dd5 Fix ansible-test race calling get_coverage_path. 2017-11-15 12:57:18 -08:00
Dag Wieers
3089892e59 sl_vm: PEP8 compliancy and documentation changes (#32657)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
2017-11-15 15:22:32 -05:00
Adrian Likins
86dc3c09ac
Fix vault --ask-vault-pass with no tty (#31493)
* Fix vault --ask-vault-pass with no tty

2.4.0 added a check for isatty() that would skip setting up interactive
vault password prompts if not running on a tty.

But... getpass.getpass() will fallback to reading from stdin if
it gets that far without a tty. Since 2.4.0 skipped the interactive
prompts / getpass.getpass() in that case, it would never get a chance
to fall back to stdin.

So if 'echo $VAULT_PASSWORD| ansible-playbook --ask-vault-pass site.yml'
was ran without a tty (ie, from a jenkins job or via the vagrant
ansible provisioner) the 2.4 behavior was different than 2.3. 2.4
would never read the password from stdin, resulting in a vault password
error like:

        ERROR! Attempting to decrypt but no vault secrets found

Fix is just to always call the interactive password prompts based
on getpass.getpass() on --ask-vault-pass or --vault-id @prompt and
let getpass sort it out.

* up test_prompt_no_tty to expect prompt with no tty

We do call the PromptSecret class if there is no tty, but
we are back to expecting it to read from stdin in that case.

* Fix logic for when to auto-prompt vault pass

If --ask-vault-pass is used, then pretty much always
prompt.

If it is not used, then prompt if there are no other
vault ids provided and 'auto_prompt==True'.

Fixes vagrant bug https://github.com/hashicorp/vagrant/issues/9033

Fixes #30993
2017-11-15 14:01:32 -05:00
Pavel
c56dcb7afa module_utils: vmware.py. Incorrect chain of attributes to obtain snapshots from virtual machine (#32669)
* Update vmware.py
Incorrect chain of attributes to obtain snapshots from virtual machine. Module 'vmware_guest_facts' uses method 'gather_vm_facts' of vmware.py and always gets empty list of snapshots.
* Added test for module vmware_guest_facts. Checked VM snapshots.
* Fixed tests for vmware_guest_facts. Ignored certificate for vmware_guest_snapshot module.
2017-11-15 16:00:22 +00:00
Sebastiaan van Doesselaar
900abcddb3 Integrated publickey import and removal in iosxr_user (#32115)
* Integrated publickey import and removal in iosxr_user

* Fixed linting issues

* Added version added for publickeyfile option

* Added quotation marks to version, oops

* Added some integration tests, added some checks to prevent aggregate users with public keys.

* Added some integration test files

* Created mutually exclusive public_key and public_key_contents versions of config

* Modified tests to use both methods and test more logins

* Added supports for aggregates

* Incorporated provider auth

* Fixed some lint issues

* Fixed a YAML lint issue

* Implemented catches for unconfigured providers.

* Fixed catches, hopefully

* Another test

* Added groups support so you can add users to multiple groups

* Trailing whitespace
2017-11-15 07:34:36 -07:00
Prasad Katti
239464f804 ec2_key: add a test for the force option (#32748)
* ec2_key: test force option

* ec2_key: changes requested via review comments
2017-11-15 22:53:41 +10:00
Matt Clay
6472723ba8
Add missing ansible-test --remote-terminate support. (#32918)
* Expand ansible-test --remote-terminate support:

- windows-integration
- network-integration

These commands previously accepted the option, but did not support it.

* Terminate windows and network instances when done.
2017-11-14 17:08:48 -08:00
Gawain
fa764f6918 New Module vmware_host_facts (#26492)
Add new module  vmware_host_facts ,it can get remote vmware host system info like setup module

* modify ansible version
* optimized output for human readable
* add serial number get_system_facts() add ansible_product_serial
* fix pep8 issue and ansible module required format
* Use find_obj method instead get_obj
* add ansible_hostname ansible_distribution_build
* add integration test
* vmware_host_facts integration test add verify
* fix yamllint issue
* fix boilerplate test
* Update vmware_host_facts.py
* fix RETURN key's name
2017-11-14 15:41:55 +00:00
Trishna Guha
3ee2501c83
multiple fixes nxos (#32903)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-14 15:23:11 +00:00
Anil Kumar Muraleedharan
177a4fb3ec Adding enos_command module and unit test (#32782)
* Adding git_command module and its UT file

* Changing Author Name and removing 2 blank lines

* Removing blank lines

* Adding enos_config and its UT files

* Removing config module as I am allowed to have only module per PR

* Work on Ganesh's Review comments

* John Review Comments on enos_command.py

* Review comments of John
2017-11-14 15:09:29 +00:00
Trishna Guha
11de330372
change inventory_hostname to ansible_host to fix test (#32890)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-14 10:44:47 +00:00
Trishna Guha
c40de24e9c
fix mtu check nxos_interface (#32880)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-14 10:40:37 +00:00
Ganesh Nalawade
c3636108bc
Change netconf port in testcase as per test enviornment (#32883) 2017-11-14 15:11:44 +05:30
Trishna Guha
a17244f896
ios_vlan DI module (#32490)
* ios_vlan DI module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* comment out testcases since the image is not available in dci

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* add aggregate test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-14 05:50:17 +00:00
Prasad Katti
f891e92581 ec2_key: fix fingerprint generation in tests (#32817) 2017-11-14 14:40:55 +10:00
Sam Doran
ea3638b580 Add proper check mode support to the script module (#31852)
* Do not run script in check mode

Fixes #30676

* Reformat script integration test

* Add integration tests for check mode of script module

* Fix name on test

* Cleanup temp file

* win_script integration test syntaxt changes

* Add check mode tests for win_script

* Use proper variable in test

* Fail if source file does not exist

* Verify script is accessible and don't copy in check mode

Use shlex to properly split shell arguments, though a path with spaces in it still needs to be quoted in the playbook.
Add note to docs describing such.
Improve error message if file is not found indicating there may be a space in the path.

* Properly encode path now that path is split using shlex

* Allow for spaces in both path and script name

* Add unicode character test to Linux script tests

* Add Linux test for space in path to script
2017-11-13 15:33:44 -08:00
Matt Martz
99d4f5bab4 Remove uses of assert in production code (#32079)
* Remove uses of assert in production code

* Fix assertion

* Add code smell test for assertions, currently limited to lib/ansible

* Fix assertion

* Add docs for no-assert

* Remove new assert from enos

* Fix assert in module_utils.connection
2017-11-13 11:51:18 -05:00
Kellin
464ded80f5 Add link dest to synchronize module (#32746)
* Clean up after two recent synchronize tests

- add clean up after the last two tests in synchronize to make them
  match with the expectations in the previous tests

Signed-off-by: Robert Marshall <rmarshall@redhat.com>

* Add link-dest functionality to synchronize module

- add the link-dest option to the synchronize module code
- add tests for the link-dest option
- add documentation of the link_dest option to synchronize
- modify changed flag so it can properly work around rsync
  upstream not flagging hardlinks as a change properly in
  formatted output

Signed-off-by: Robert Marshall <rmarshall@redhat.com>

* Minor change to test
2017-11-13 11:13:25 -05:00
Trishna Guha
f49555d494
nxos_bgp_neighbor_af feature idea disable-peer-as-check (#32665)
* nxos_bgp_neighbor_af feature idea disable-peer-as-check

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-13 14:48:31 +00:00
Trishna Guha
e4052c1261
Add mtu option nxos_interface feature idea (#32680)
* Add mtu option nxos_interface feature idea

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Add unit test for mtu feature

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-11-13 14:48:04 +00:00