Commit graph

2390 commits

Author SHA1 Message Date
Zim Kalinowski
0b828ee830 azure_rm_virtualmachine: adding possibility of disabling public ip address (#36766)
* adding possibility of disabling public ip address

* fixed indent

* fixed whitespace

* fixed mistake

* try to create test with vm without public ip address

* try to fix test

* another attempt for test

* fixing test

* create vm with no ip with different name and delete it immediately

* a few additional fixes

* another attempt to pass test

* must be deleted

* simplified no ip test

* reorganised tests

* Wrapped choice in C()
2018-03-22 09:30:42 +10:00
Zim Kalinowski
89401f13f7 azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)
* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt
2018-03-22 09:16:32 +10:00
Matt Clay
aee01564a9 Clean up non-standard module shebangs. 2018-03-21 11:04:55 -07:00
Abhijeet Kasurde
0ae7a0e88c
VMware: Use environment variable for connection (#37726)
This fix adds environment variables for connection in vmware_*
modules.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-21 13:31:24 -04:00
Matt Clay
8daa80e5bb Move var precedence check to integration tests. 2018-03-21 09:43:32 -07:00
Julien Vey
ec2e027980 cloudfront_distribution: fix the order of headers to avoid updates again and again (#37340)
* Fix python2/3 compatibilities issues

* Sort cloudfront_distribution headers to avoid useless updates
2018-03-21 22:16:42 +10:00
zikalino
fa2ff6ceaa enabling storage blob as it seems that test is stable 2018-03-20 22:53:36 -07:00
Im0
8c4f349743 Test include role with items in name #36372 (#37001)
* Tests for #36372

* Tests for #36372

* Tests for #36372
2018-03-20 15:39:16 -05:00
Aleksander Kovtunenko
f51a6ea832 implemented installroot option (#33613)
* fix

* move version to 2.6
2018-03-20 10:41:50 +00:00
Matt Clay
1fd9a616a4 Fix uri test on Python 2.6. 2018-03-19 23:11:38 -07:00
Julien Vey
26d9de6f3e apt_repository: check attribute repo for None value (#36944) 2018-03-19 10:16:43 -04:00
Ryan Petrello
872a7b4a7a add some Tower module integration tests (and fix a bug or two) (#37421)
* add additional test coverage for tower modules

* add test coverage for the tower_credential module

* add test coverage for the tower_user module

* fix a bug in py3 for tower_credential when ssh_key_data is specified

* add test coverage for tower_host, tower_label, and tower_project

* add test coverage for tower_inventory and tower_job_template

* add more test coverage for tower modules

- tower_job_launch
- tower_job_list
- tower_job_wait
- tower_job_cancel

* add a check mode/version assertion for tower module integration tests

* add test coverage for the tower_role module

* add test coverage for the tower_group module

* add more integration test edge cases for various tower modules

* give the job_wait module more time before failing

* randomize passwords in the tower_user and tower_group tests
2018-03-16 13:28:19 -04:00
Matt Clay
58eb2e849d Disable unstable azure_rm_virtualmachine test. 2018-03-15 13:48:03 -07:00
Martin Krizek
a6d31b6fb1
apt: better error msg when update_cache fails (#37410) 2018-03-15 17:32:25 +01:00
Trishna Guha
957ab02e52
Ensure network_cli nxos test is run only once - remove unnecessary files (#37462)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-15 17:52:54 +05:30
saichint
05b266cc66 fix nxos_udld issues (#37418) 2018-03-15 15:37:46 +05:30
Trishna Guha
dd37857884
fix ios_l2_interface (#37389)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-15 11:33:59 +05:30
Pilou
4378542ac7 Connection error messages are unsafe: wrap them (#37329)
* Check that connection error msg are not unsafe

* Connection error messages are unsafe: wrap them

For example, in case of error, docker connection plugin returns exception
message containing Go template. These messages weren't tagged as unsafe
and were consequently rendered:

The conditional check 'result is failed' failed. The error was:
{
  'msg': u'Docker version check ([\'/usr/bin/docker\', \'version\', \'--format\', "\'{{.Server.Version}}\'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied\n',
  'failed': True
}:
template error while templating string: unexpected '.'.
String: Docker version check (['/usr/bin/docker', 'version', '--format', "'{{.Server.Version}}'"]) failed: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/version: dial unix /var/run/docker.sock: connect: permission denied
2018-03-13 16:20:24 -07:00
Matt Clay
30bb70cf2d Disable failing github_issue integration test. 2018-03-13 15:50:10 -07:00
Deepak Agrawal
a1026dbce5
Eos :do not push config to device if check_mode is enabled (#37287)
* eos can not check config without config session support

* add testcase for check_mode without config session

* fix eos eapi to read use_session env var
2018-03-13 17:13:23 +05:30
saichint
dc61f4c6b1 Fix nxos_vrf issues (#37092)
* fix nxos_vrf issues

* fix doc
2018-03-13 17:08:37 +05:30
Trishna Guha
ba5e562c76
Fix nxos_l2_interface and test typo (#37336)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-13 13:36:38 +05:30
Mike Wiebe
ff57fd0bb4 Fix nxos_switchport (#37328) 2018-03-13 12:03:05 +05:30
Julien Vey
099d8f0b56 route53_zone: enable check mode (#37201) 2018-03-12 14:43:43 -04:00
Ganesh Nalawade
c1008d693c
Fix eos_facts eapi integration test failures (#37301) 2018-03-12 20:12:44 +05:30
Sebastian Gumprich
16c564c4b4 fix spelling mistakes in several modules (#36296)
* fix more spelling mistakes

* fix spelling mistakes
2018-03-12 11:00:19 +01:00
mikedlr
c2a063a5c0 aws ssm parameter lookup - testing and documentation around negative and failure cases (#36550) 2018-03-09 12:30:33 -05:00
David Newswanger
5e827f4cc4
added nxos_smoke tests (#36647)
* added nxos_smoke tests

* add connection information, check length of output

* updated name of task
2018-03-09 09:03:33 -05:00
Ganesh Nalawade
b440544e73
eos_config module exit session gracefully (#37244)
Fixes #36979
If `abort` is not issued in the top level session prompt
the existing session goes to pending state.
The fix is to come out of config mode by issuing `end` command
and again to same config session and execute `abort` which
`abort` is issued at the top level session prompt.
2018-03-09 19:24:23 +05:30
Trishna Guha
2501834c42
add nxos_snapshot test for missing required param (#37248)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-09 17:47:14 +05:30
saichint
74e79d9f5e fix nxos_vrf_af issues (#37211) 2018-03-09 12:20:27 +05:30
Abhijeet Kasurde
c25a42bef6 VMware: New module : vmware_datastore_cluster (#36365)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-08 23:44:15 -05:00
Jordan Borean
708869edd6
win: handle non string as an environment value (#37215)
* win: handle non string as an environment value

* Changed powershell environment handler to use .net function instead for special chars
2018-03-09 08:02:54 +10:00
René Moser
0130490faa
cs_instance: fix py3 user_data base64 (#37135)
* cs_instance: tests: reproduce py3 user_data base64 issue

* cs_instance: fix base64 encoding with py3
2018-03-08 17:05:57 +01:00
Trishna Guha
02999b77a4
fix nxos_switchport/l2_interface trunk_vlans state absent (#37180)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-03-08 18:10:04 +05:30
Jordan Borean
c1f5e11cdf
win_uri: return response info on non 200 responses, convert DateTime values to ISO 8601 (#37104) 2018-03-08 09:43:42 +10:00
Matt Clay
b4bf502268 Initial Tower module integration test support. 2018-03-07 14:21:55 -08:00
Julien Vey
7c07877b1b s3_bucket: add integration tests (#36941)
Also update testing-policies/storage
2018-03-07 11:25:24 -05:00
Julien Vey
51d491f8f0 route53_zone: move to boto3, and enable comment update (#36641) 2018-03-07 11:16:04 -05:00
rahushen
b7bc61c7df fix nxos_l2_interface tests for fretta (#37086) 2018-03-07 10:15:56 +05:30
saichint
4ed0e5072d fix nxos_vrrp issues (#36930) 2018-03-06 13:36:50 +05:30
Ganesh Nalawade
ba3201cd2f
Fix eos integration test failures (#37020)
Fixes #36919

Fix other eos modules integration test failure in dci
2018-03-06 10:04:40 +05:30
msven
a2b3120e85 ec2_asg: fix #28087 and #35993 (#36679)
Fixes #35993 - Changes to update_size in commit eb4cc31 made it so
the group dict passed into update_size was not modified. As a result,
the 'replace' call does not see an updated min_size like it previously
did and doesn't pause to wait for any new instances to spin up. Instead,
it moves straight into terminating old instances. Fix is to add batch_size
to min_size when calling wait_for_new_inst.

Fixes #28087 - Make replace_all_instances and replace_instances behave
exactly the same by setting replace_instances = current list of instances
when replace_all_instances used. Root cause of issue was that without lc_check
terminate_batch will terminate all instances passed to it and after updating
the asg size we were querying the asg again for the list of instances - so terminate batch
saw the list including new ones just spun up.

When creating new asg with replace_all_instances: yes and lc_check: false
the instances that are initially created are then subsequently replaced.
This change makes it so replace only occurs if the asg already existed.

Add integration tests for #28087 and #35993.
2018-03-05 11:47:31 -05:00
Guillaume Coré
daeec920b0 ini_file: add allow_no_value param (#24442) 2018-03-05 17:05:41 +01:00
Nathaniel Case
7016b3b9ca
ios_static_route idempotence fix (#35912)
* Remove default admin_distance and fix the idempotence thereof

Fixes #33290

* Fix tests and use yaml anchors to shorten tests

* Add test for undefined admin_distance

* Read config from `show run` if `show ip static route` fails

* Restore flags to ios.get_config &  use get_config where appropriate
2018-03-05 09:28:37 -05:00
René Moser
6578403288
cs_zone_facts: implement return facts as ansible returns (#36993) 2018-03-05 11:42:38 +01:00
Abhijeet Kasurde
d1eb4fe58c
VMware: Refactor vmware_target_canonical_facts (#36964)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-04 10:20:47 +05:30
Abhijeet Kasurde
3a161fa157
VMware: new module : vmware_datastore_maintenancemode (#36436)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-03-02 23:35:53 +05:30
Ganesh Nalawade
83c3561ee5
Enable eapi integration test for eos modules (#36934) 2018-03-02 12:39:00 +05:30
Ganesh Nalawade
5c2a1a6124
Fix eos_vrf integration test failures (#36893) 2018-03-01 13:05:39 +05:30
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