Commit graph

2390 commits

Author SHA1 Message Date
Abhijeet Kasurde
0694aca2a0
VMware: refactor configure disk logic (#36617)
This fix corrects logic related to disk parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-01 09:36:54 +05:30
Ed Costello
645952c139 Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml

This removes the dependency on having the command line AWS tools
installed.
2018-02-28 16:30:34 +10:00
saichint
db43fe6a76 nxos_facts fix and integration tests (#36796)
* fix nxos_facts ipv6 error

* time_range not supported for N35
2018-02-28 10:45:50 +05:30
Abhijeet Kasurde
8d49bb6eee
VMware: new module: vmware_host_capability_facts (#36497)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-28 09:54:52 +05:30
Abhijeet Kasurde
87d6bdaf98
VMware: Re-enable VM poweroff testcases (#36734)
This testcases were failing due to vcsim version.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-27 09:04:42 +05:30
nwsparks
e15a903bdf Win lineinfile fix (#35100)
* win_lineinfile: fix #33858. Removed conversion from \r\n

* win_lineinfile: added test for #33858

* win_lineinfile: added documentation and more tests for change

* win_lineinfile: fixed wrong hash in testing
2018-02-26 19:34:44 -05:00
René Moser
cdb2969703
cs_sshkeypair: fix ssh key rename (#36726)
* tests: cs_sshkeypair: add reproducer for failed key rename

* cs_sshkeypair: fix rename ssh key
2018-02-26 13:43:40 +01:00
Martin Krizek
54e9096950
Add integration test for #36534 (#36581) 2018-02-26 09:49:25 +01:00
Abhijeet Kasurde
d94a1ef4cc
VMware: refactor vmware_datastore_facts (#36423)
This fix adds datastore cluster details about datastore in returning
facts. Updated documentation and tests.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-26 13:23:22 +05:30
Trishna Guha
44332bda78
fix nxos_vlan aggregate (#36710)
* fix nxos_vlan aggregate

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

* Add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-26 12:29:49 +05:30
Ganesh Nalawade
5a6b893240
Decouple config and state check in vlan and vrf network modules (#36386)
* Decouple config and state check in {network_os }_vlan and { network_os }_vrf modules

Fixes #35567
Fixes #34754

`interfaces` option is used for configuration as well as operational state
check. If interface is configured to given vlan or vrf but if
operational state of interface is disabled it results in module failure.

Fix is to decouple same option usage for config and state.
With this fix `interfaces` is used as config option and a new
option named `associated_interfaces` will be used for intent check
for assigned interfaces.

* Fix CI failures

* Fix review comment

* Fixed integration test failure
2018-02-26 09:23:54 +05:30
Matt Clay
f283edcb19 Temporarily disable subversion test on osx. 2018-02-24 13:46:40 -08:00
Chris Houseknecht
53cfd70b7d
Adds k8s_raw, openshift_raw tests (#36228) 2018-02-23 10:13:09 -05:00
Jordan Borean
ef4f8851dc
win_feature: better error handling to make it easier to debug issues (#36491)
* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed
2018-02-22 11:33:48 +10:00
Dag Wieers
430088c6f0
aci_interface_policy_leaf_policy_group: Fix test (#36551) 2018-02-21 23:48:10 +01:00
Sam Doran
723daf3e3a
Check for regexp match when using insertbefore or insertafter (#36474)
Add tests to cover this scenario
Fixes #36156
2018-02-21 17:03:38 -05:00
Bruno
afdd748f4c changed cisco mail to normail hotmail (#36546) 2018-02-21 23:01:26 +01:00
Bruno
53125d37d1 add aci_static_binding_to_epg integration tests (#36542) 2018-02-21 21:45:38 +01:00
Dag Wieers
51ba115dea
aci_domain_to_encap_pool: Remove integration tests (#36535) 2018-02-21 20:33:23 +01:00
Toshio Kuratomi
03a6d72633 Revert "remove query/q (#36315)"
This reverts commit b47d2e07e1.

query is a feature for 2.5.  We're not reverting it now.
2018-02-21 10:37:51 -08:00
Dag Wieers
7435e115e0
ACI: Various changes to module documentation and guide (#36516)
* ACI: Various changes to module documentation and guide

This PR includes:
- We moved the object class information to the notes
- Add version information to guide chapters
- Add generic note to modules with reference to ACI guide
- Reference known issues in aci_rest documentation
- Remove module_utils function docs from modules
- Indicate which parameters are not required for querying all objects
- Added missing RETURN information

* Fix copyright strings

* Remove aci_domain_to_encap_pool.py for v2.5

* More updates

* PEP8 fix

* Improve listings of parameters/return values
2018-02-21 19:35:59 +01:00
Brian Coca
b47d2e07e1
remove query/q (#36315)
* remove query/q

remove and fixed tests for removed func

* paren fix
2018-02-21 10:42:54 -05:00
Martin Krizek
9fced4f0a9
Add integration test for #36430 (#36432) 2018-02-21 16:16:02 +01:00
Sloane Hertel
f7d79d4789 [cloud] Retry WAF actions on WAFStaleDataException (#36405)
Add a util to run functions with AWSRetry to retry on WAFStaleDataExceptions and update ChangeToken for each attempt
2018-02-21 08:14:17 -05:00
mikedlr
52f2057472 aws ssm parameter lookup - change to return Nones for missing variables (#36456)
* aws ssm parameter lookup - change to return Nones for missing variables

* aws ssm parameter lookup - fix error case message to dump response

* aws ssm parameter lookup - fix integration test cases
2018-02-21 06:50:00 -05:00
Jordan Borean
df8a5d7a4f
fetch: set fail_on_missing: True as default as per docs (#36469)
* fetch: set fail_on_missing: True as default as per docs

* Updated docs for fetch to say behaviour was changed in 2.5 and updated tests
2018-02-21 18:10:23 +10:00
goshkis
abb956d9eb vApp properties support (#32579)
* Adding support for vApp properties.
* vm specification updated only if changes have to be applied. I.e. subsequent updates with the same data will not trigger changed state
* Auxiliary variables renamed, hope this makes the code more readable
* Integration tests changed - re-adding the same properties test not implemented, but tested on real vCenter deployment
* fixing documentation "version_added" for the feature
* Addressing reviewers comments #2:
* documentation updated with the only meaningful value for "option" attribute - "remove"
* Fixed improperly handled case when user requested "add" operation for existent property
* vApp configuration is updated only with properties that contains changes, not with all properties requested by user
2018-02-21 11:59:13 +05:30
saichint
47a92386c9 fix nxos_bgp_neighbor_af issues (#36472) 2018-02-21 10:20:24 +05:30
Dag Wieers
5635c50f9b
aci_iplpg: Various fixes to integration tests/module (#36460) 2018-02-21 00:20:38 +01:00
Dag Wieers
1720a210e9
aci_spvpg: Various fixes to integration tests/modules (#36458)
* aci_spvpg: Various fixes to integration tests/modules

This PR includes:
- A fix in module_utils aci.py
- Various fixes in integration tests

* Fix typo
2018-02-20 22:49:55 +01:00
Bruno
7143cf54bc added aci_vpc_protection_group integration test (#36448)
added aci_switch_policy_vpc_protection_group integration test
2018-02-20 20:42:08 +01:00
Trishna Guha
3d06ce245a
fix vyos_l3_interface adding multiple addresses to interface (#36377)
* fix vyos_l3_interface adding multiple addresses to interface

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

* add test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-20 20:54:27 +05:30
Bruno
4a6d837879 added aci_fabric_node integration test (#36422)
* added aci_fabric_node integration test

* Update main.yml
2018-02-20 15:06:41 +01:00
Deepak Agrawal
0bbea9a579
vyos_config IndexError in sanitize_config (#36375)
* Bug in del(list) logic. Say you have a list of 4 elements a[0-3]
and you have to remove index 1 and 3, if you remove index 1 first
then list is cut short a[0-2] and does not have index 3

Fix: Remove indexes in reverse sorted order e.g. 3 and 1 in above
example so that order of indexes remain preserved even after deleting

fix is to remove indexes in reverse sorted order

* Add test cases for failed case
2018-02-20 18:29:34 +05:30
Jiri Tyr
000387ac23 Fix default value of gpgcheck in doc (PR #36267) 2018-02-20 13:47:12 +01:00
saichint
80d19e6af3 fix nxos_bgp_neighbor issues (#36318) 2018-02-20 10:08:17 +05:30
Dag Wieers
cac6c19a63
aci_encap_pool: Fix vxlan integration tests (#36418)
Missing cleanup would cause subsequent runs to fail when interrupted.
2018-02-20 04:45:09 +01:00
Dag Wieers
6534e6a450
ACI: Add missing examples to module docs (#36417)
This PR includes:
- A cleanup of documentation examples for ACI modules
- A small fix in aci_rest integration test
2018-02-20 03:27:17 +01:00
Dag Wieers
fb9af72b48
aci_aep: Add missing integration tests (#36414)
This PR includes:
- Add missing aci_aep integration tests
- Fix small aci_rest issue
2018-02-20 03:04:17 +01:00
Dag Wieers
32dc936c20
aci_rest: Remove test data from validation test (#36381)
Oops
2018-02-19 13:27:42 +01:00
Dag Wieers
79d00adc52
aci_rest: Fix error handling and improve documentation (#36295)
This PR includes:
- A fix for a recently introduced issue wrt. error handling
- Added integration tests for provoked errors
- Influence standard return values using aci library for aci_rest
- Add proxy support documentation
- Documentation update related to #34175
2018-02-19 12:01:14 +01:00
Trishna Guha
eb7f4460c8
Set hostname to 'switch' on nxos_system (#36373)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-19 10:57:16 +05:30
Trishna Guha
a5654bd63c
nxos_system test fix inventory_hostname_short (#36359)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-18 10:32:44 +05:30
rahushen
e24c547a3a Fixes for the N3500 platform that uses the A8 image (#36261)
* fix nxos_l3_interface tests as n35 doesn't support ipv6

* add terminal dont-ask to nxos_feature and nxos_lldp

* put interfaces in L2 mode for N35

* fix nxos_feature unit-tests
2018-02-17 10:16:03 +05:30
Mike Wiebe
5b5d24631a Fix nxos_system tests (#36201)
* Fix nxos_system tests

* Add debug connection plugin info

* Move sanity test under common
2018-02-17 10:14:50 +05:30
David Newswanger
a7c2f6d092
re enabled tests that were fixed in ansible/ansible-modules-core#5008 (#36257) 2018-02-16 08:10:14 -05:00
Dag Wieers
d86c5aee3c aci_domain_to_encap_pool: Add integration tests (#36217) 2018-02-15 23:47:39 -08:00
Abhijeet Kasurde
3ecf2d5ba2
VMware: New module: vmware_guest_snapshot_facts (#36002)
This module gathers facts about VM's snapshots.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 11:52:03 +05:30
Abhijeet Kasurde
55d117458a
VMware: New module: vmware_guest_disk_facts (#36026)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:46:35 +05:30
Abhijeet Kasurde
a377302d6b
VMware: Fix DVPG idempotency issue (#35837)
This fixes, cloning operation where template or existing VM
does not have network or DVPG. Also, adds some strict type checking in
network parameters.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-16 10:32:27 +05:30
saichint
75a34f6668 fix nxos_bgp_af issues (#36147)
* fix nxos_bgp_af issues

* shippable fix

* review comments

* shippable error fix
2018-02-16 09:34:24 +05:30
Dag Wieers
334e405e6f
aci_taboo_contract: Add integration tests and examples (#36276)
This PR includes:
- Missing integration tests
- Missing examples
- Two typo's in other integration tests
2018-02-16 01:59:23 +01:00
Dag Wieers
e1b5bc049c
aci_firmware_source: Add integration tests (#36246)
This PR includes:
- Rename 'protocol' parameter to 'url_protocol'
- Add limited integration tests (as we have no public firmware access)
- Add missing examples
2018-02-16 00:20:41 +01:00
Toshio Kuratomi
06f73ad578
Normalize usage of temp and tmp on tmp (#36221)
* Normalize usage of temp and tmp on tmp
* Rename system_tmps system_tmpdirs
* Add ANSIBLE_REMOTE_TMP spelling of environment variables
2018-02-15 09:01:02 -08:00
Mike Wiebe
787114462e Fix nxos_linkagg tests (#36175) 2018-02-15 09:48:18 +05:30
Dag Wieers
e431d578da
aci_encap_pool: Standardize on 'pool_allocation_mode' (#36215) 2018-02-15 02:59:54 +01:00
Dag Wieers
dba561efa7
ACI: Avoid using 'previous' with query operations (#36181)
When ACI modules are being used for querying MOs, we should not return
the previous state, as there is no previous state, there's only the
current state.

This impacts a lot of tests that were used to testing the current state
as 'previous'.
2018-02-14 23:07:07 +01:00
Brian Coca
0cf70a8970
never tags docs and test (#35964)
* fufilling the promise

* moved changes

* Copy edit
2018-02-14 17:01:36 -05:00
Matt Clay
032dc1a7c5
Initial OpenShift integration test support. (#36207)
Based on integration tests from chouseknecht for openshift_raw.
2018-02-14 13:39:42 -08:00
Jordan Borean
f8d1c97279
win_uri: fix creates/removes option (#36016) 2018-02-15 06:17:23 +10:00
Jordan Borean
8fb66c18de
win_updates: fix regression when using string cat names (#36015) 2018-02-15 06:14:06 +10:00
Dag Wieers
3093285c94
aci_vlan_pool: Improve integration tests (#36173)
This PR includes:
- More elaborate integration tests
- Split static and dynamic VLAN pools in separate files
2018-02-14 16:09:20 +01:00
Dag Wieers
da5cf72236
ACI: Fixes to domain parameters dependencies (#36158)
We identified an incompleteness to parameter dependencies that affects
querying all domain-related objects.

This PR also includes:
- Improvements to integration tests
- Add missing vm_provider types
- Fix examples

This relates to #36131
2018-02-14 13:51:38 +01:00
Dag Wieers
7897558b95
aci_aep_to_domain: Fix query all objects (#36131)
This PR includes:
- A fix to the module where domain_type without domain caused havoc
- A fix to the integration tests when querying all binding objects
- Improvements to integration tests
2018-02-13 19:07:23 +01:00
David Newswanger
01bd9759e3
[WIP] Add ios smoke tests (#35972)
* added basic ios_smoke files

* added smoke tests for network.common.config

* added tests for network.common.utils

* added remainder of test cases
2018-02-13 11:53:50 -05:00
Abhijeet Kasurde
66743f33fa
VMware: re-enable vmware_guest_powerstate tests (#36092)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-13 14:28:40 +05:30
saichint
eab1b62cd2 fix nxos_interface_ospf issues (#35988)
* fix nxos_interface_ospf issues

* review comment
2018-02-13 09:27:22 +05:30
Matt Clay
1f80361bf9 Restore azure_rm_sqlserver test in CI. 2018-02-12 16:04:09 -08:00
Dag Wieers
9f028e9dea
aci_domain_to_vlan_pool: Add missing integration tests (#36079) 2018-02-12 23:54:30 +01:00
Dag Wieers
98a3059f7b
aci_aep_to_domain: Add missing integration tests (#36071) 2018-02-12 23:16:35 +01:00
Dag Wieers
30adc2f124
aci_domain: Add missing integration tests (#36051) 2018-02-12 21:37:25 +01:00
Stefan Horning
404f9260d9 [cloud][aws] Add metrics_collection options to ec2_asg module (#35180)
* Added metrics_collection management to ec2_asg module to switch ASG metrics on and off.

* Fixed typo in documentation of ec2_asg module

* Removed extra blank line in ec2_asg.py

* Docs fixes for ec2_asg module

* Added integration test for ec2_asg metrics flag

* Trying different syntax for ec2_asg test
2018-02-12 10:22:18 -05:00
Ganesh Nalawade
6a223d5576
Fix vrf parsing in eos_vrf and eos_eapi module (#35791)
* Fix vrf parsing in eos_vrf and eos_eapi module

Fixes #30250

Fix logic to parse vrf when interface value in `show vrf`
command output spans on multiple lines

* Add idempotent test case
2018-02-12 12:33:22 +05:30
Nathaniel Case
6cdf91fd35
Fix VyOS check mode (#35977)
* Revert "commented out check tests (#35788)"

This reverts commit 3df2561405.

* `discard_changes()` now uses `exit discard`

instead of just `discard`. Also a slight tweak to avoid a second `exit` after
`exit discard`
2018-02-11 11:40:33 -05:00
Matt Clay
a9a7d15698 Disable unstable Azure integration tests. 2018-02-10 19:33:02 -08:00
Matt Clay
e7b793c8c6
Move requirements into tests. (#35885) 2018-02-10 10:48:44 -08:00
Matt Clay
1d0fd49a33 Rebalance cloud tests into 5 groups. 2018-02-10 00:37:20 -08:00
Matt Clay
25ca0863c1 Disable unstable azure_rm_containerinstance test. 2018-02-09 22:54:04 -08:00
Matt Clay
1d419c737d Run each Windows version independently in CI. 2018-02-09 16:38:27 -08:00
Dag Wieers
01ba3a4efc
ACI: Fixes to recent change to parameter choices (#35968)
This PR includes:
- Fixes related to the recent merge of #31637 and #34537
- A generic fix for a reference for assignment issue
- Fixes to aci.boolean() in order to catch exception
2018-02-09 21:21:56 +01:00
Dag Wieers
d76db835ff
aci_interface_policy_leaf_policy_group: Fix tests (#35973) 2018-02-09 21:21:41 +01:00
Ryan Brown
f4d896c716 Tower callback fixes (#35927)
* Fix tower_callback script return code

* Add ec2_key parameter to integration tests
2018-02-09 14:28:52 -05:00
saichint
c7305393a3 fix nxos_evpn_vni issues (#35930) 2018-02-09 13:02:41 +05:30
Tomasz Kontusz
d73c3abb15 Copy tests: check the result of non-changing copy 2018-02-08 16:17:36 -08:00
Toshio Kuratomi
03c73e2bbb Rename var lookup to vars and add tests 2018-02-08 08:03:41 -08:00
Toshio Kuratomi
abbac1a2ff Revert "Temporarily comment out tests causing CI errors (#35883)"
This reverts commit 157a41c843.

Have a fix for the underlying issue so reenabling the tests
2018-02-08 06:57:09 -08:00
Toshio Kuratomi
d4b31afbc5 Test that transient failure in the middle of running async_status doesn't fail the task 2018-02-08 06:57:09 -08:00
saichint
80fcfdc0d1 fix nxos_vpc issues (#35868) 2018-02-08 18:50:37 +05:30
Felix Fontein
d1f19125a5 openssl_csr: added support for the OCSP Must Staple extension (#35082)
* Added support for the OCSP Must Staple extension.

* Trying to clean up magic constants a bit.
2018-02-08 12:03:28 +00:00
Yuwei Zhou
273a3d1d51 Fixes #34913: azure_rm_loadbalance should accpet a list of rules instead of one (#35592)
* azure_rm_loadbalance should accpet a list of rules instead of one

* fix lint

* fix

* fix

* hook up load balancer rules, doc fixes, test updates
2018-02-08 01:32:27 -08:00
Toshio Kuratomi
8a22b51755
Fix copy for implicit relative paths (#35016)
copy currently fails if you specify a destination without any directory
component.  This is because we take the dirname of the destination for
some processing and no dirname causes issues.

This corrects that by prepending "./" if there is no directory component
in dest.
2018-02-08 00:12:32 -08:00
Matt Clay
95f202a7e3 Disable hg test on Python 3 again. 2018-02-07 23:33:04 -08:00
Ryan Brown
e71c6d8e17 New module: ec2_instance (#35749)
New module: ec2_instance

Integration tests for ec2_instance
2018-02-08 01:50:41 -05:00
Matt Clay
75a285ded9
Enable hg test on Python 3. (#35884)
* Enable hg test on Python 3.
* Install/uninstall mercurial during test as needed.
2018-02-07 22:20:23 -08:00
Sloane Hertel
157a41c843
Temporarily comment out tests causing CI errors (#35883) 2018-02-08 00:08:36 -05:00
Maarten Bezemer
7225839bef [git] Fix switching branch of shallow clone (#18728)
* [git] Fix fetching branch of shallow clone

* Use absolute file:// paths to make sure git uses shallow clones

* Improve tests

* Fix sanity errors
* Match style according to other (depth) tests

* Improve tests

Now they will fail without the fix of this PR
2018-02-07 18:07:02 -05:00
Sloane Hertel
45ef6bdd40
Roll boto3_conn tests into ec2_asg (#35854)
* Roll boto3_conn tests into ec2_asg.
2018-02-07 14:24:40 -05:00
Rob
9451212855 [cloud] New AWS module - elb_target (#26483)
* New module - elb_target

* Work to add deregister functionality

* Add jurajseffer work on waiting for status change

* List the set of statuses as a choices list

* default target_status_timeout is 60

* Add 'unavailable' as a target status choice per API docs

* Add support to remove targets that are in unused state

* add support for availability zone selection

Fix deregistering targets from used target groups

Fix waiting for unused state for targets that have started deregistering
2018-02-07 07:45:35 -05:00
Will Thames
fcd09e2f02 New aws_waf_web_acl module (#33212)
* Add aws_waf_web_acl rule

* Add new aws_waf_web_acl to CHANGELOG
2018-02-07 07:06:15 -05:00
Jordan Borean
a0178b79f1
win_uri: fixes (#35487)
* win_uri: moved away from Invoke-WebRequest and fixed multiple issues

* fixes from review
2018-02-07 20:58:47 +11:00
Martin Krizek
63fdc3f08f
Fix jinja2>=2.9 nested include vars (#35099)
This fixes a bug when parent's local vars where not available in nested
includes. The bug can only be seen with jinja>=2.9 which changes
how the variable scopes work.

Fixes #34886
2018-02-07 10:58:29 +01:00
Trishna Guha
a8e14a35de
always remove interface after testing (#35822)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-07 12:48:02 +05:30
Ian Philpot
e62c1cd050 Az mod keyvault ops (#33606)
* keyvault_operations module init + template

* Created KeyVault Secrets Module. No Tests

* Passing 2.7/3.x sanity tests

* added intergration tests for keyvault secrets noop

* integration test pass/need keyvault module

* Added az env cleanup to intergration tests

* Updated auth to 0.3.6 ver

* fixed typo in integration tests

* Added check_mode

* Added tags

* Updated tags test, sanity + integration passed

* checked mode

* updated tests

* fixing sanity

* fix copyright
2018-02-06 20:40:15 -08:00
Ian Philpot
11382fac7a Az mod keyvault key (#33607)
* key module init

* Create/Delete pass sanity

* Integration tests passed

* Added check_mode

* Updated to support tags

* updated key tests

* fixed sanity

* added things that went missing during rebase

* fixed sanity

* fixed doc

* fix copyright
2018-02-06 20:40:00 -08:00
saichint
c9e0ce1d7d fix nxos_vpc_interface peer_link idempotence (#35737)
* fix peer_link idempotence

* review comment
2018-02-07 08:35:43 +05:30
mikedlr
d31ded47fb Aws ssm multiple fixes (#35569)
* aws ssm parameter lookup test case - fails demonstrating no exception when parameter missing

* aws ssm parameter lookup - fail in case parameter doesn't exist

* aws ssm parameter lookup test case - failing case for nice return from path lookup

* aws ssm parameter lookup - convert incoming taglist to a key-value dictionary

* aws ssm parameter lookup - pep8 / style clean up

* aws_ssm lookup plugin rewrite for more standard interface

* aws_ssm module and lookup - introduce integration test and fix:

* aws_ssm module and lookup - error case integraton test and many PEP8 and other cleanups

* aws ssm parameter lookup - Various fixes in response to review + recursive fix & test

* aws ssm parameter lookup - more in response to review - shertel/abadger

* aws ssm parameter lookup unit test - move to mocker according to abadger

* aws ssm parameter lookup - integrate with new documentation fragment

* aws ssm parameter lookup - accept either aws_profile or boto_profile

* aws ssm parameter lookup - eliminate lookup document fragment until env vars are fixed later
2018-02-06 17:41:46 -05:00
David Newswanger
3df2561405
commented out check tests (#35788) 2018-02-06 13:26:44 -05:00
Alex Stephen
9706abf685 [cloud] New GCP module: DNS Managed Zones (gcp_dns_managed_zone.py) (#35014) 2018-02-06 11:50:16 -05:00
Bruno
5278948e63 adding aci_interface_policy_leaf_policy_group integration tests (#35486)
* adding aci_interface_policy_leaf_policy_group integration tests

* Added more ACI options for testing
2018-02-06 12:36:16 +01:00
Kai
f30a08d049 Add vfat support for the filesystem module (#23527)
* Add fat filesystem support

fatresize is temporarily disabled

* Refactor Filesystem.get_dev_size

For more sharing with vFAT class

* Fix filesystem tests on some OSs

I think this is due to older mke2fs on those systems.

* Fix vFAT command on FreeBSD

newfs doesn't seem to work on image files

* Refactor filesystem.grow()

Split out grow_cmd generation and Device operations

* Use swap as unsupported filesystem

Except FreeBSD, which doesn't have mkswap

* Be consistent about str(dev) vs dev.path

Prefer str(dev), this works transparently with '%s' formatting.

* Enable vfat resize, only test fatresize >= 1.0.4

Lower versions have a segfault bug.

* Only install fatresize where available

FreeBSD, OpenSUSE, RHEL and CentOS < 7 don't ship it.
2018-02-06 11:56:43 +01:00
Artem Zinenko
56f640d874 influxdb_user: implement user password change (#35471)
* Added tests on user removing

* Implemented password changing

* Fix after review

* Added zhhuta changes
2018-02-06 11:01:51 +01:00
Mike Wiebe
358e63232f Minor updates to nxos_nxapi tests (#35750)
* Minor updates to nxos_nxapi tests

* Fixed duplicate yaml key issue

* Make rubocop happy
2018-02-06 12:52:42 +05:30
Andrew Gaffney
e9b0a4ccb4 Add support for defining index var for task loops 2018-02-05 22:14:05 -05:00
Abhijeet Kasurde
635036fb62
VMware: Add new module : vmware_host_firewall_manager (#35596)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-06 08:29:56 +05:30
Zim Kalinowski
86c62e228d [new module] azure_rm_keyvault (#35150)
* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* updates to azure_rm_keyvault

* fix update bugs, add update test
2018-02-05 16:08:22 -08:00
Abhijeet Kasurde
c33b02f71a
VMware: add new module vmware_vmkernel_facts (#35535)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-05 23:50:48 +05:30
Abhijeet Kasurde
e9e8151c6d
VMware: add new module vmware_host_dns_facts (#35708)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-05 23:42:47 +05:30
Abhijeet Kasurde
defff8ceb4
VMware: add new module : vcenter_folder (#35608)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-05 22:31:58 +05:30
Abhijeet Kasurde
8428f13bc1
VMware: add new module vmware_host_firewall_facts (#35467)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-05 22:24:28 +05:30
Mike Wiebe
0de810fdf7 Fix nxos_bgp tests and prepare_nxos_tests refactor (#35694) 2018-02-05 12:13:30 +05:30
saichint
109bc89bbe fix nxos_ospf_vrf issues (#35616) 2018-02-05 10:59:13 +05:30
René Moser
588cd749ac
cs_network: implement support acl (#35706) 2018-02-04 19:23:57 +01:00
Abhijeet Kasurde
367258507a
VMware: Provide verbose message about non-existent VM (#35682)
This fix adds a verbose message about non-existent VM when specified
with operation, due to idempotency we can not detect correct state.

Fixes: #27384

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-02-04 05:23:24 +05:30
René Moser
c6f397b160
cs_vpc: fix network_domain param ignored (#35690) 2018-02-03 21:21:24 +01:00
Mike Wiebe
5a198e1e6a Add minor conditional checks to nxos_bgp sanity test (#35476)
* Add minor conditional checks to nxos_bgp sanity test

* Make ansibot happy
2018-02-03 10:37:10 +05:30
Dag Wieers
bee765fa6b
ACI: Change RETURN output as discussed (#35617)
* ACI: Change result output as discussed

* Update all modules to use new aci.exit_json()

* Update output_level spec and docs

* Fix integration tests

* Small PEP8 fix

* Asorted fixes to tests and aci_rest

* More test fixes and support for ANSIBLE_DEBUG

* Fix another PEP8 issues

* Move response handling inside ACI module

* Reform of ACI error handling and error output

* Diff multiline json output

* Fix a few more tests

* Revert aci_bd tests

* Small correction

* UI change: existing->current, original->previous

* UI change: config->sent

* Update all modules with RETURN values

* Fix a few more tests

* Improve docstring and add 'raw' return value

* Fix thinko

* Fix sanity/pep8 issues

* Rewrite unit tests to comply with new design
2018-02-03 00:41:56 +01:00
Matt Clay
685dd5e8b4 Disable failing aws_waf_web_acl tests. 2018-02-02 15:21:14 -08:00
Will Thames
4e30eff651 [cloud][aws] New module: aws_waf_rule module (#33124)
Add a new module for managing AWS WAF rules

Preceded by aws_waf_condition and to be succeeded by aws_waf_web_acl
2018-02-02 17:54:27 -05:00
David Newswanger
69cd705634
Add vyos smoke integration tests. (#35456)
* added preliminary vyos smoke tests

* added comments, determined current tests are sufficient

* add tests for check mode in module_utils.network.vyos

* removed vyos_smoke from shippable

* added comment explaining why AWS/Shippable tests won't work
2018-02-02 16:04:19 -05:00
Sloane Hertel
7917e3c988
Fix syntax error so route table tests always try to clean up (#35663)
* Always try to clean up after route table tests

* Wait for a new VPC a chance to become available before attempting to get its current state
2018-02-02 15:38:47 -05:00
Pilou
d608eb9530 Check that AnsibleUndefinedVariable doesn't occur when an unused variable references an undefined variable (#35571)
* Check that AnsibleUndefinedVariable doesn't occur

* AnsibleUndefinedVariable exc.: don't modify type
2018-02-02 09:25:13 -08:00
Martin Krizek
c3199dca6c
Add any_errors_fatal in nested failed block test (#35499) 2018-02-02 16:25:55 +01:00
Nathaniel Case
f3337e1fba
ios test changes (#35510)
* Fix over-byte

* Update ios tests to call `provider`

To continue to support testing `connection: local`

* Fix command dict handling in ios_user

* Clean up unit tests, too
2018-02-02 09:50:15 -05:00
Trishna Guha
dc4a41a4af change testfiles for nxos_file_copy (#35641)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-02-02 12:54:53 +00:00
Will Thames
b5a1643e3d Add new aws_waf_condition module (#33110) 2018-02-01 18:16:27 -05:00
Sam Doran
f8f2b6d61d
Fix lineinfile to insert line when pattern exists elsewhere in the file. (#33393)
* Insert lines before or after when the regexp exists elsewhere in the file

* Correct filter syntax in lineinfile integration test

* Use multi-line YAML syntax on lineinfile tests

Unify indentation

* Add lineinfile tests for same line matched to different regexps

* Remove debug statement from test
2018-02-01 16:45:26 -05:00
Artem Zinenko
b9571eb4bf Integration tests for rabbitmq_user module (#35421) 2018-02-01 10:25:04 -08:00
Kedar Kekan
684e953b50 * adds commit replace with config file for iosxr (#35564)
* * adds commit replace with config file for iosxr
* fixes dci failure in iosxr_logging

* * review comment changes
2018-02-01 14:15:32 +00:00
Matt Clay
ea70b49b11 Fix pip integration test. 2018-01-31 23:26:16 -08:00
Zim Kalinowski
fef684d457 fixing mysql and postgresql test failures (#35587) 2018-02-01 17:00:05 +10:00
Dag Wieers
12b8b8dcf2
aci_aaa_user: Manage AAA users on ACI fabrics (#35543)
* aci_aaa_user: Manage AAA users on ACI fabrics

* Fix module documentation

* Ensure we allow to not set accountStatus and expires

* Added aaa_password_lifetime and aaa_password_update_required support

* Improvements to integration tests in light of issue 35544

* Fix ACI ISO 8601 formatted string

* Add HAS_DATEUTIL
2018-02-01 00:45:32 +01:00
Toshio Kuratomi
e8cfe05e37 Test behaviour of loop keyword plus lookup plugins
We introduced the new loop keyword as a replacement for with without
adding tests that it behaved as we expected.  This test asserts that
behaviour.

Incidentally, it also shows how to use parameters with lookups and loops
now.
2018-01-31 13:55:49 -08:00
Alicia Cozine
adf76b7d3f
Reflect new process for network integration tests (#35577)
With `ansible-test network-integration` we don't need the top level yaml files
except NXOS and Dell (for now)
2018-01-31 14:56:28 -06:00
Sloane Hertel
556bb7ab00 [cloud] Log more exception info to fix sts_assume_role integration tests (#35570) 2018-01-31 13:18:09 -05:00
kiorky
9001a8794f FIX: multiple nested tasks include levels (#35165)
* Test for include_tasks & include_role bug

Related to ansible/ansible:#21890

* Fix nested include_tasks called from role

This fixes the path of included files when you want
to call include_task inside a role's task file and this
role is itself called from multiple level of playbook include_tasks

Related to ansible/ansible:#21890
This fixes ansible/ansible:#35109
2018-01-31 07:35:06 -06:00
Kim Blomqvist
63639abb01 [cloud] Improve ipv6 and EC2 classic support in ec2_group integration tests (#32976)
* ec2_group: fix ipv6 tests to use an explicit VPC

* otherwise would fail on old AWS accounts supporting EC2-classic

* ec2_group: fix tests to use an explicit VPC

* Only run some tests if there is a default vpc associated with the account
2018-01-31 08:00:54 -05:00
saichint
dc35baa8db fix nxos_pim_interface issues (#35405)
* fix nxos_pim_interface issues

* add absent test for pim_interface
2018-01-31 10:51:11 +05:30
Ganesh Nalawade
ef34eb1a7d
Fix junos integration test failures (#35508)
* More integration testcase fixes for junos_facts
2018-01-31 00:07:01 +05:30
Adam Miller
6cc5e4c9df
galaxy remove incorrect check for role path before extraction (#35259)
* galaxy remove incorrect check for role path before extraction

Fixes #35217

Currently lib/ansible/galaxy/role.py checks roles_path and will
ignore paths that don't currently exist which it should not because
the path will attempt to be created by the role extraction process
(which is valid and expected behavior) and if unable to write at the
time of role extraction into the role_path, that error will be
handled properly at that point in the process.

Signed-off-by: Adam Miller <admiller@redhat.com>

* add test case for galaxy install with rolefile and rolepath

Verify we don't regress GitHub Issue #35217

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix the integration test

Signed-off-by: Adam Miller <admiller@redhat.com>

* double quote for shellcheck glob warning

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix galaxy install tests to not need remote resources

Signed-off-by: Adam Miller <admiller@redhat.com>

* make shellcheck sanity tests happy

Signed-off-by: Adam Miller <admiller@redhat.com>

* prep git global conf for running the galaxy install tests in docker

Signed-off-by: Adam Miller <admiller@redhat.com>

* move ansible-galaxy tests into their own target, make git conf non-global

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix up tests based on feedback

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove extra newline from aliases file

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-01-30 10:40:25 -06:00
John R Barker
a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
2018-01-30 12:23:52 +00:00