Commit graph

3117 commits

Author SHA1 Message Date
Toshio Kuratomi
44935a5db6 Add a (disabled) code-smell test for detecting _ variables
We are reserving the _ identifier for i18n work.  Code should use the
identifier dummy for dummy variables instead.

This test is currently skipped as someone needs to generate the list of
files which are currently out of compliance before this can be turned
on.
2017-08-07 11:11:31 -07:00
Mike Wiebe
65cf31e1ce Fix nxos_interface_ospf idempotence issue (#27783)
* Add tests and fix 27167

* Add modify test
2017-08-07 13:54:31 -04:00
Dag Wieers
3a86579b69 vcenter_license: New module to manage vCenter licenses (#25143)
This module supports check-mode and diff output.
It also includes basic integration tests.

This PR fixes #24971
2017-08-07 12:49:29 -04:00
Dag Wieers
71163d4d61 vmware_cluster: PEP8, imports, cosmetics (#25140)
This PR includes:
- Documentation improvements (mostly related to boolean defaults)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
2017-08-07 12:44:27 -04:00
Nathaniel Case
b9e80b6117 nxos_vrf_interface cleanup (#27642)
* Update RETURN, results, & execute_show_command
2017-08-07 10:57:45 -04:00
Jordan Borean
0b69f3e40d win_stat: removed file in use test as it is too tempormental (#27832) 2017-08-07 14:23:01 +10:00
Jordan Borean
107e177658 win_stat: add explicit error message when file is in use (#27826)
* win_stat: add explicit error message when file is in use

* make the lock last a bit longer
2017-08-07 12:04:42 +10:00
Ricardo Carrillo Cruz
0343ac1a9d Fix asserts of junos_command netconf_json notequal and lessthanorequal (#27818) 2017-08-06 10:06:53 +02:00
Matt Clay
f7bfa96caf Use 0 instead of None for line and offset. 2017-08-05 23:12:02 -07:00
Matt Clay
af9b0ba47b Replace opensuse42.1 with opensuse42.3 in CI. 2017-08-05 12:56:31 -07:00
Ricardo Carrillo Cruz
99e92f4bca Fix junos_command netconf_json lessthanorequal (#27808) 2017-08-05 20:55:11 +02:00
Ricardo Carrillo Cruz
0e4cbb4bf1 Remove inventory_hostname assert on junos_command netconf_text contains (#27807)
CI nodes have UUIDs as hostnames, not Ansible inventory hostnames.
2017-08-05 19:44:25 +02:00
Ricardo Carrillo Cruz
6a6bcb6749 Fix junos_command netconf_xml notequal asserts (#27806) 2017-08-05 17:49:48 +02:00
Ricardo Carrillo Cruz
2ad56c0700 Add a timeout to force socket creation on re-setting netconf port (#27801) 2017-08-05 15:28:06 +02:00
René Moser
fdaa803cca cloudstack: cs_vmsnapshot: fix pep8 (#27792) 2017-08-05 10:34:17 +02:00
René Moser
f1ef61da4e cloudstack: cs_domain: tests: add update tests (#27791) 2017-08-05 10:33:01 +02:00
Matt Clay
e1cfcdbbc6 Add opensuse42.3 docker image. 2017-08-05 00:03:11 -07:00
Matt Clay
c59e32469f Add Fedora Python 3 Docker images and fix tests. (#27794)
* Add new Fedora docker images with Python 3.
* Use consistent env var for lookup test.
* Fix testing of virtualenv with Python 3.
* Fix docker_secret tests on Fedora 26.
* Add Python 3 support to Fedora postgresql test.
* Add Python 3 support to Fedora mysql tests.
* Fix uri test server for Python 3 on Fedora.
* Fix iso_extract test for Python 3 on Fedora.
* Add Python 3 support for Fedora to openssl tests.
* Fix dnf group test for Python 3 on Fedora.
* Use force with user deletion in become test.
2017-08-04 21:12:35 -07:00
Dag Wieers
941738a686 ansible-test: Fix environments with LD_LIBRARY_PATH 2017-08-04 13:53:52 -07:00
Matt Clay
bf17cb6edd Test iso_extract on OS X. 2017-08-04 13:46:05 -07:00
Matt Clay
2cafb934eb Update vcenter-simulator base to fedora:26 image.
This is required because govmomi now requires go 1.8+ to be installed.
2017-08-04 13:44:25 -07:00
Ganesh Nalawade
634327c5f6 Fix ios_fact integration test issue (#27771)
Fixes #27563
2017-08-05 00:47:53 +05:30
Ganesh Nalawade
02bcd7c0ed Fix for junos_netconf test failures in dci (#27776) 2017-08-05 00:47:32 +05:30
Dag Wieers
25e67d804c iso_extract: Reimplement using 7zip (not requiring root) (#24937)
* Reimplement iso_extract using 7zip (not requiring root)

So one of the drawbacks of the original implementation is that it required root for mounting/unmount the ISO image.
This is now no longer needed as we use 7zip for extracting files from the ISO.

* Fall back to using mount/umount if 7zip not found

As discussed with others.

Also improved integration tests.
2017-08-04 14:38:42 -04:00
Ricardo Carrillo Cruz
8e9fe76434 Replace mtu for for local-index on junos_command lessthan (#27772) 2017-08-04 17:56:41 +02:00
Dag Wieers
a98e3fb81f Add RETURN information, doc improvements and PEP8
This PR includes:
- RETURN information (since the difference between status_code and
  status was confusing)
- Improvements to parameter definition (and docs)
- PEP8 compliancy
2017-08-04 08:21:50 -07:00
Ganesh Nalawade
0f261964f7 Make junos integration test checks platform independent (#27768) 2017-08-04 17:18:57 +02:00
Pilou
b57af4428d rhn_register: fix broken imports, add unit tests (#26878)
Fix 'module' object is not callable

* rhn_register: fix Python 3 compatibility
* rhn_register: update requirements
* rhn_register: add unit tests
* Add missing method name
* use a dedicated line for XML related requirements
* rhn_register: drop support for Python 2.4
* rhn_register unit tests: fix Python 3 compatibility
* refactor in order to check order of the requests
2017-08-04 10:12:27 -04:00
Dag Wieers
0342760f5b sefcontext: PEP8 compliancy (#27742) 2017-08-04 10:01:17 -04:00
Ganesh Nalawade
3c09f69765 change netconf test port from 8080 to 22 (#27761) 2017-08-04 19:30:00 +05:30
Philippe Dellaert
6d33e59ca1 Fix for subspec options validation issue #27715 (#27728)
* Fix for issue ansible/ansible#27715

* Also fixing mutually exclusive check

* Updating subspec checks
These changes take into account a spec with all features enabled and do
the following tests for subspecs:
1. Test proper specs
2. Test Alias
3. Test missing required param
4. Test mutually exclusive params
5. Test required if params
6. Test required one of params
7. Test required together params
8. Test required if params with a default value
9. Test basis subspec params
10. Test invalid subsec params
2017-08-04 19:10:38 +05:30
Ganesh Nalawade
181b31e282 junos integration test fixes for dci (#27759) 2017-08-04 18:46:57 +05:30
René Moser
5700b09610 cloudstack: new module cs_instance_nic_secondaryip, replaces cs_nic (#26491) 2017-08-04 15:01:12 +02:00
Ricardo Carrillo Cruz
c4c99d66fc Replace fxp0 for lo0 on junos_command equal and notequal tests (#27758)
The nodes in the CI do not use fxp nomenclature, but em.
Use lo0, as that's common for nodes in our CI and our test lab.
2017-08-04 14:46:59 +02:00
Peter Sprygada
7b604368d3 adds new filter plugins for network use cases (#27695)
* adds new filter plugins for network use cases

* adds parse_cli filter
* adds parse_cli_textfsm filter
* adds Template class to network_common
* adds conditional function to network_common

* fix up PEP8 issues
2017-08-04 07:47:12 -04:00
Ricardo Carrillo Cruz
19b1361184 Remove assert that junos command xml contains inventory_hostname_short (#27754)
The test assumes the node has the hostname set as the inventory_hostname_short.
That's not the case in our CI, we the inventory_hostname is a UUID, returned
by the openstack dynamic inventory.
2017-08-04 13:38:59 +02:00
Ricardo Carrillo Cruz
623235857f Change tx delay to 2 on the rest of junos_lldp tests (#27753) 2017-08-04 12:57:36 +02:00
Ricardo Carrillo Cruz
3acd192843 Fix assert on junos_lldp tx delay (#27752) 2017-08-04 12:46:35 +02:00
Ricardo Carrillo Cruz
a904f9c047 Change the transmit delay on junos_lldp test (#27750)
We are getting this error message:
"Advertisement-interval should be greater than or equal to four times the tx-delay".
Changing transmit delay to 2 meets that constraint.
2017-08-04 12:04:42 +02:00
Dag Wieers
a34ef12d73 hpilo modules: PEP8 fixes (#27739) 2017-08-04 11:52:31 +02:00
Ganesh Nalawade
d3e5d30f7c Add aggregate for junos modules and sub spec validation (#27726)
* Add aggregate for junos modules and sub spec validation

*  aggregate support of junos modules
*  aggregate sub spec validation
*  relevant changes to junos integration test
*  junos module boilerplate changes

* Add new boilerplate for junos modules

* Fix CI issues
2017-08-04 14:55:58 +05:30
Dag Wieers
bcb3e33adb command: PEP8 compliancy (#27740) 2017-08-04 08:39:13 +02:00
Toshio Kuratomi
fbf6cb8fff Add boilerplate to fetch.py
This completes the modules/files directory so we can now check it for
regressions.
2017-08-03 13:15:12 -07:00
Toshio Kuratomi
f4d7b9a596 code-smell test changes
* Create get_exception and wildcard import code-smell tests
* Add more detail to boilerplate and no-basestring descriptions
* Remove the no-list-cmp test as the pylint undefined-variable test covers it
2017-08-03 13:15:12 -07:00
Pierre-Louis Bonicoli
33e8c83fde vca_nat: 'import' test is successful 2017-08-03 13:12:25 -07:00
Sloane Hertel
467a1f54a3 s3_bucket: fix python3 sorting incompatibility (#27502)
* s3_bucket: fix policy sorting for python3 so strings are evaluated as less than tuples.

Add tests to ensure this behavior is maintained.

* Fix s3_bucket comparison function to work on both Python 3.5 and 3.6

* s3_bucket: document that cmp_to_key is used for python 2.7.

Add another test for s3_bucket to compare policies of different sizes.

* fix pep8

* Work around code-smell grepping by not using the word 'cmp'.
2017-08-03 15:41:26 -04:00
Sloane Hertel
dbbad16385 [cloud] New module: Add module for managing AWS Datapipelines (cloud/amazon/data_pipeline) (#22878)
* New module for managing AWS Datapipelines

* Supports create/activate/deactivate and deletion
* Handles idempotent creation by embeding the version in the
uniqueId field
* Waits for requested state to be reached, as Botocore doesn't
have waiters yet for datapipelines

* rename module, fix imports, add tags option, improve exit_json results, fix a couple bugs, add a TODO so I don't forget

fix pep8

allow timeout to be used for pipeline creation

make .format syntax uniform

fix pep8

fix exception handling

allow pipeline to be modified, refactor, add some comments, remove unnecessary imports

pipeline activation may not be in the activated state long

remove datapipeline version option

change a loop to a list comprehension

create idempotence by hashing the options given to the module minus the objects (which can be modified)

small bugfix

* data_pipeline unittests

make unittests pep8

fix bug in unittests

* remove exception handling that serves no purpose

* Fix python3 incompatibilities in datapipeline tests and add placebo fixture maybe_sleep for faster tests

Fix python3 incompatibilities in data_pipeline build_unique_id()

Don't delete a pipeline in diff_pipeline() because it's unexpected

Don't use time.time() because it causes an issue with placebo testing

re-recorded tests

fix pep8 in data_pipeline

Remove disable_rollback from tests

Make sure unique identifier is a string

re-record tests

* improve documentation and add another example

* use a placebo fixture instead of redundant code in tests

fix tests for PLACEBO_RECORD=false

* Fix data_pipeline docs

use isinstance instead of type()

fix documentation

* fix documentation

* Remove use of undefined variable from data_pipeline module and fix license

* fix copyright header
2017-08-03 15:04:10 -04:00
Abhijeet Kasurde
97240a9ebc Fix for missing import and boilerplate
Fix adds missing imports and boilerplate for proxysql.
It also remove get_exception calls in-favor of native exception.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-03 09:40:44 -07:00
George Nikolopoulos
31b4ae2e6a New module: manage Citrix Netscaler GSLB site configuration (network/netscaler/netscaler_gslb_site) (#27639)
* Add netscaler_gslb_site

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
2017-08-03 15:26:17 +01:00
George Nikolopoulos
d88c07a037 New module: manage Citrix Netscaler GSLB service configuration (network/netscaler/netscaler_gslb_service)) (#27638)
* Add netscaler_gslb_service

* Lowercase enabled, disabled option values

* Add fixes in netscaler module utils needed for unit test success
2017-08-03 15:26:05 +01:00