Commit graph

2215 commits

Author SHA1 Message Date
John R Barker
89e4226051 add missing files (#22496) 2017-03-10 15:29:36 +00:00
John R Barker
5dac2ee00c Test eos_banner (#22201)
* eos_banner docs improvements

* run eos_banner tests

* basic eos_banner tests

* remove trailing newlines

* remove hack

* Various eos_banner fixes

No unicode tests, as the device doesn't support it
Correctly set provider
result.command should be empty list if no changes

* test eos_banner over eapi

* revert docs changes, moved to separate PR
2017-03-10 15:20:09 +00:00
Ricardo Carrillo Cruz
c57729944b Fix the eos_banner idempotency (#22413)
The map_config_to_obj calls the run_commands  helper function,
which returns a list of results.
However, the map_params_to_obj return a single string.
Therefore, the comparison between the two datasets could never be equal,
breaking idempotency.
Also, the 'no banner' command should be run on absent only if there's a banner
text set.

Fixes #22194
2017-03-09 12:43:54 +00:00
Matt Clay
cfd313bced Disable ansible color output on sanity tests. 2017-03-08 12:18:16 -08:00
John R Barker
41f5648c44 Test system (#22420)
* ios_system

* tests for ios_system

* tests for *_system

* working ios_system on cli

* Typo

* Loopback10 (single word, upeprcase)

* Revert docs changes

* Working iosxr_system tests

* eos, not nxos

* nxos_system
2017-03-08 12:21:45 -07:00
Dave Kasberg
8102e66425 Fixes for idempotent issue in cnos_vlan module and fixes for vlag/portchannel tests. (#22385)
* misc fixes for idempotent issue in cnos_vlan

* Fix up hyperlinks in module documentation

* spell correction
2017-03-08 17:09:17 +00:00
Matt Clay
a64665ae91 Fix error handling in CI other script. 2017-03-08 01:31:53 -08:00
Matt Clay
3ab344e8bd Use lint/junit output for compile test. (#22395)
* Refactor sanity classes for use in all tests.
* Use lint/junit output for compile test.
* Add missing options for compile test.
* Fix early bailout on requirements install.
2017-03-08 00:47:21 -08:00
Matt Clay
fbf55886ba Use lint friendly output for python syntax checks. (#22390) 2017-03-07 20:27:50 -08:00
Matt Clay
9acf551674 Run all other tests on Shippable before failing. 2017-03-07 20:26:10 -08:00
Matt Clay
8f463fcdd2 Create bot friendly sanity output. (#22381) 2017-03-07 14:59:50 -08:00
Alex Lo
8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
2017-03-07 20:55:17 +01:00
René Moser
e0d38fb137 composer: fix escape working_dir (#22363)
* composer: fix escaping of path working_dir

* composer: fix pep8
2017-03-07 20:51:04 +01:00
Lujeni
d942196666 Use a dedicated directory for the mongodb modules (#22187)
* Use a dedicated directory for the mongodb modules
* Missing the RETURN documentation in mongodb_user
2017-03-06 13:14:14 -08:00
Matt Clay
3e4be156d7 Pre-compile regexes to speed up target processing.
Without this, changing a large number of files results in target
processing taking a very long time due to repeatedly compiling
the same patterns in a loop over many targets.
2017-03-06 12:35:12 -08:00
Marius Gedminas
15c7288ab9 Show diff when file: state=link changes the symlink target (#22243)
* Show diff when file: state=link changes the symlink target

* Integration test for symlink target change

* Also check soft link idempotency
2017-03-06 11:29:20 -05:00
Michał Masłowski
228131d1cd lambda: Fix adding environment variables to functions previously not having any (#22313) 2017-03-06 11:10:40 -05:00
René Moser
c1730c21ce cloudstack: cs_sshkeypair: fix fingerprint not used as identifier (#22276)
* cloudstack: cs_sshkeypair: fix fingerprint not used as identifier

* remove from legacy

* fix for 2 keys, one with name and one with fingerprint
2017-03-05 22:47:19 +01:00
Pilou
addedb12cf Inventory default groups 'all' and 'ungrouped': add tests and documentation (#21728)
* inventory: test 'all' & 'ungrouped' groups created by default

* Mention default groups 'all' & 'ungrouped'

* Update intro_inventory.rst

Minor grammatical edit.
2017-03-05 01:24:41 -08:00
Matt Clay
72c96b3ac3 Fix encoding issue in shippable downloader. 2017-03-03 16:38:36 -08:00
Matt Clay
673bfc06b9 Support option renaming in validate-modules. 2017-03-03 16:37:12 -08:00
Matt Martz
293e624235 Support matching original path for a moved module location 2017-03-03 15:13:14 -08:00
Adrian Likins
694c57de2e add python version info to --version (#22089)
* add python info to ansible --version
* Add unit tests for cli.CLI.version
2017-03-03 16:41:54 -05:00
Matt Martz
958ce4a252 Create custom JSONEncoder to stringify Exceptions 2017-03-03 11:12:37 -08:00
Matt Martz
d34153a61e Re-enable ssh retry tests with isolation fixes (#22221)
* Re-enable ssh retry tests with isolation fixes
* Don't use mock, use monkeypatch instead
2017-03-02 20:09:06 -08:00
Peter Sprygada
6c8025ce5c adds eos_system integration tests (#22214)
* adds integration test cases
* updates eos_system with minor bug fixes
2017-03-02 21:20:17 -06:00
Matt Clay
30b6ed8377 Disable failing tests until they can be fixed. 2017-03-02 16:49:39 -08:00
James Cammarata
a2599cab79 Fix variable precedence of INI/script vars to be in-line with docs.
This commit also adds a new test script (ansible-var-precedence-check.py in code-smell/)
to provide us with another line of defense against precedence bugs going forward.

The precedence docs state that the INI vars have a lower precedence than group/host
vars files for inventory and playbooks, however that has not been the case since 2.0
was released. This change fixes that in one way, though not exactly as the docs say.
The rules are:

1) INI/script < inventory dir < playbook dir
2) "all" group vars < other group_vars < host_vars

So the new order will be (from the test script mentioned above):

8. pb_host_vars_file - var in playbook/host_vars/host
9. ini_host_vars_file - var in inventory/host_vars/host
10. ini_host - host var inside the ini
11. pb_group_vars_file_child - var in playbook/group_vars/child
12. ini_group_vars_file_child - var in inventory/group_vars/child
13. pb_group_vars_file_parent - var in playbook/group_vars/parent
14. ini_group_vars_file_parent - var in inventory/group_vars/parent
15. pb_group_vars_file_all - var in playbook/group_vars/all
16. ini_group_vars_file_all - var in inventory/group_vars/all
17. ini_child - child group var inside the ini
18. ini_parent - parent group var inside the ini
19. ini_all - all group var inside the ini

Fixes #21845
2017-03-02 17:07:00 -06:00
Matt Martz
1fe67f9f43 Extend SSH Retry to put_file and fetch_file (#20187)
* Move retry logic into _ssh_retry decorator, and apply to exec_command, put_file and fetch_file

* Update tests to reflect change

* Move _ssh_retry to _run, and update tests to reflect

* piped should use exec_command instead of removed _exec_command

* Rework tests to support selectors instead of select.select
2017-03-02 16:56:29 -06:00
Peter Sprygada
911600acf9 update junos_command integration tests (#22213)
fixes integration test to check for full rpc-reply string when
converted from xml.  This is a change from 2.2 as the rpc-reply tag
is no longer stripped off
2017-03-02 16:46:23 -06:00
Robin Roth
3afc993f3a Fix git clone tag with depth=1
* Fixes #21316, add testcase based on this
* Add option `--branch NAME` to git clone command in case of branch or
tag in combination with depth=1
  * This option should work back to at least git 1.8 and thus on all
  supported distributions
* Provide better warning if depth is dropped
2017-03-02 14:11:50 -08:00
Ryan Brown
fc0ae5ee6b [cloud][test] Use pytest conditional imports instead of nose/SkipTest (#22019) 2017-03-02 17:07:56 -05:00
Matt Clay
d66ce40ecb Overhaul ansible-test sanity implementation. (#22177)
- Tests are run to completion instead of stopping on first failure.
- Test results are now parsed instead of passing through to the console.
- Test results can be saved in junit xml format.
- Test results will show up on the Shippable "Tests" result tab.
- Added an experimental --lint option for easier integration with other tools.
- Code smell tests are now usable with the --list-tests, --test and --skip-test options.
- Code split out from executor.py into sanity.py.
- Rename download-logs to download.py and add support for test and coverage results.
- Miscellaneous improvements.
2017-03-02 12:36:46 -08:00
Dave Kasberg
3c44644c08 New module: cnos_vlag (#21535)
* VLAG module and tests

* Correct the link in the description of the module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:37 +00:00
Dave Kasberg
9258b62707 New module: cnos_conditional_template (#21794)
* Initial commit of cnos_conditional_template

* fix compile error in module, change module short description, move roles to integration/roles

* fix line length

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:19 +00:00
Dave Kasberg
059a0d07a4 New module: cnos_condition_command (#21793)
* Initial commit of cnos_condition_command

* fix pep8 error of line too long

* fix pep8 tab/space issue

* Move roles to integration/roles directory and remove aliases file.

* Update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:09 +00:00
Dave Kasberg
2f126829bf Initial cnos_image commit (#21789)
* Initial cnos_image commit

* corrected required/default values in documentaiton

* fixed choices for imgtype

* removed a colon

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:11:00 +00:00
Dave Kasberg
70af90436a New module: cnos_rollback (#21788)
* Initial commit for cnos_rollback

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:10:27 +00:00
Dave Kasberg
267cc0edfc New module: cnos_backup (#21787)
* Initial commit of cnos_backup

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change import cnos statement
2017-03-02 16:10:14 +00:00
Dave Kasberg
6549c70091 New module: cnos_template (#21786)
* Initial cnos_template commit

* fix compile errs, update short description, move roles to integration/roles

* now commit the module

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:10:04 +00:00
Dave Kasberg
c112539538 New module: cnos_command (#21785)
* Initial commit for cnos_command

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:45 +00:00
Dave Kasberg
d96aa55d4c New module: cnos_save (#21754)
* initial comment of cnos_save

* Move roles to integration/roles directory and remove aliases file.

* update the module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:33 +00:00
Dave Kasberg
2e6df415b6 New module: cnos_showrun (#21752)
* initial commit of cnos_showrun

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:09:00 +00:00
Dave Kasberg
e5ceb3a99c Fix for cnos.py utility file for Python3.5 (#21750)
* fix in cnos.py utility file

* fix compile errors in cnos.py, update module short description in cnos_vlan.py, move vlan roles under integration/roles

* corrections in readme

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:08:49 +00:00
Dave Kasberg
709b03d1c8 New module: cnos_facts (#21743)
* cnos_facts module commit

* fix options string

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:08:23 +00:00
Dave Kasberg
4bf20fb174 New module: cnos_interface (#21613)
* initial commit

* fix tab/space issue

* fix space issue in vars/main.yml

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* change module directory name to Lenovo and change import cnos statement
2017-03-02 16:07:21 +00:00
Dave Kasberg
14c2c787cb New module: cnos_portchannel (#21589)
* cnos_portchannel initial commit

* Fix line length issue in module

* fix whitespace on line 90

* correct yamllint space issue

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:07:01 +00:00
Dave Kasberg
3ed34032cd New module: cnos_bgp (#21587)
* cnos_bgp module

* Move roles to integration/roles directory and remove aliases file.

* update module short description

* Change module directory name to Lenovo

* change import cnos statement
2017-03-02 16:06:09 +00:00
mikedlr
710b6c7209 [cloud] bugfix for lambda module with empty environment (#22196)
* lambda module - failing test case: shows lambda create mishandles empty environment

* lambda module - fix lambda create with empty environment

* lambda module - fix lambda create with empty environment - style fixes
2017-03-02 09:25:39 -05:00
Matt Davis
a60d358e56 Revert "win_service_stat: Added module" (#22184) 2017-03-02 01:34:11 -08:00