Commit graph

1957 commits

Author SHA1 Message Date
Matt Clay
18867847f4
Split up "code smell" sanity tests. (#60174)
* Relocate ansible-only sanity tests.

* Get "code smell" sanity tests from multiple dirs.

- `test/lib/ansible_test/_data/sanity/code-smell/` - General purpose tests used for both Ansible and Ansible Collections.
- `test/sanity/code-smell/` - Tests specific to Ansible, will not be used for Ansible Collections.
2019-08-06 17:17:57 -07:00
Matt Clay
d651bda123
Relocate ansible-test code. (#60147)
* Initial move of `test/runner/` content.

`test/runner/lib/` -> `test/lib/ansible_test/_internal/`
`test/runner/`     -> `test/lib/ansible_test/_internal/data/`

* Initial move of `test/sanity/` content.

`test/sanity/` -> `test/lib/ansible_test/_internal/data/sanity/` (except `test/sanity/ignore.txt`)

* Initial move of `test/units/pytest/` content.

`test/units/pytest/` -> `test/lib/ansible_test/_internal/data/pytest/`

* Follow-up move of `test/runner/unit/` content.

`test/lib/ansible_test/_internal/data/unit/` -> `test/lib/ansible_test/tests/unit/`

* Initial move of `ansible.cfg` content.

`test/units/ansible.cfg` -> `test/lib/ansible_test/_internal/data/units/ansible.cfg`
`test/env/ansible.cfg` -> `test/lib/ansible_test/_internal/data/env/ansible.cfg`

* Follow-up move of `data` directory.

`test/lib/ansible_test/_internal/data/` -> `test/lib/ansible_test/_data/`

* Update import statements.

* Add missing __init__.py for unit tests.

* Fix path references and miscellaneous issues.
2019-08-06 14:43:29 -07:00
Nilashish Chakraborty
2c432f8bc7
Add vyos_l3_interfaces resource module (#59929)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-08-06 19:30:58 +05:30
kfattig
dd7b9627ad Runas docs (#60082)
* Mention seclogon requirement in runas docs

* Mention seclogon requirement in Win become docs
2019-08-06 10:44:17 +10:00
Matt Clay
71e607dceb
Update docs references for ansible-test. (#60109)
* Remove outdated info from azure-requirements docs.
* Correct validate-modules usage.
2019-08-05 14:56:05 -07:00
Matt Clay
31c7a61f9d
Clean up old ansible-test references and code. (#60103)
* Remove obsolete ansible-test retry.py.
* Use ansible-test from bin/ intead of test/runner/.
2019-08-05 13:29:50 -07:00
Felix Fontein
aecdfd397e ecs_taskdefinition_facts: rename to ecs_taskdefinition_info (#60023)
* Rename ecs_taskdefinition_facts to ecs_taskdefinition_info.
2019-08-05 12:47:35 -07:00
Toshio Kuratomi
97d36881e2 Try to clarify the wording (#59956)
* Try to clarify the wording

People were confused by this paragraph.  They read it as Ansible won't
auto-detect the python interpreter until 2.12.  Tried to reword it so
that they'll see that Ansible will auto-detect it currently if
/usr/bin/python is not present and in the future will always autodetect.

* Format the other instances of /usr/bin/python using :command:
2019-08-02 12:50:02 -04:00
Felix Fontein
f3e20346cb
Google: gcpubsub_facts -> gcpubsub_info (#57668)
* Rename gcpubsub_facts -> gcpubsub_info.

* Update porting guide and add changelog fragment.
2019-08-02 17:27:28 +02:00
Matt Clay
2be2ae366e Remove obsolete docs on pep8 sanity test. 2019-08-01 22:34:09 -07:00
itercheng
eea46a0d1b Support Ericsson device management (#59277)
* Support Ericsson device management

* modify code

* modify error

* delete redundant file

* delete file

* modified error

* modify additional file name

* delete code

* add blank line

* delete redundant code

* add platform_eric_eccli.rst

* modify syntaxError

* modify document

* modify error

* modify maintaners

* modify document

* add end_string
2019-08-01 16:55:10 +05:30
Mario Lenz
3aa73cb6b8 VMware: Refactor vmware_cluster into several modules (#58468)
Refactor vmware_cluster into several modules (vmware_cluster, vmware_cluster_drs, vmware_cluster_ha and vmware_cluster_vsan) as discussed in #58023.

vmware_cluster lacks a lot of configuration options for DRS, HA and vSAN. Implementing them
all in vmware_cluster would make the module hard to maintain. Therefore, splitting it into several
modules and implementing the missing configuration options in them seems a good idea to me.

This is step one, refactoring vmware_cluster into several modules. Step two, implementing more
configuration options for DRS, HA and vSAN, will follow.
2019-08-01 10:35:29 +02:00
Nilashish Chakraborty
730fa78ca4
Add vyos_interfaces resource module (#58589)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-07-31 23:06:53 +05:30
Sandra McCann
9aa3130cd1
clarify what a namespace is or is not (#59809) 2019-07-31 10:58:16 -04:00
sushma-alethea
f2cb44633a Modules to manage ICX devices (#58969)
* new module

* new terminal

* new terminal

* new cliconf

* cliconf

* icx cliconf

* icx_cliconf

* icx test units module

* icx units module

* icx banner unit test

* PR changes resolved

* changes resolved

* Changes Resolved

* check_running_config changes resolved

* added notes

* removed icx rst

* new commit

* new changes

* deleted icx rst

* icx .rst

* modified platform_index.rst

* modified platform_index.rst

* changes resolved

* PR comments resolved

* Update platform_index.rst

PR comment resolved
2019-07-31 20:01:41 +05:30
Peter Mounce
24d8e82655 Windows Setup doc; offer 10x perf improvement (#58259)
* Windows Setup; document 10x perf improvement
2019-07-30 15:53:17 -04:00
Steven B
05c586e3ef #54195 List supported platforms for RH customers (#59654)
* #54195 List supported platforms for RH customers
2019-07-30 09:09:42 -04:00
Ganesh Nalawade
127bd67f6e
Render elements in module doc and sanity test for sub-options (#59244)
* Render elements in module doc and sanity test for suboptions

*  Add support to render module elements value in ansible-doc output
   module html
*  Add validate-module sanity test of sunoptions.

* Add current validate module failures to ignore list

* Fix CI failure

* fix rebase conflict

* Fix CI issues

* Fix review comments

* Add validate-modules failure in ignore list
2019-07-30 12:07:21 +05:30
Sandra McCann
fe3459ef86 add module_utils example (#59661)
* add module_utils example to collections docs
2019-07-28 15:40:17 -05:00
Sandra McCann
30c1d9754d Style end edit changes to collections doc (#59658)
* copy-edit of file
2019-07-26 14:18:49 -05:00
Matt Clay
b4494fa547 Remove redundant "Sanity Tests »" from page title.
The docs now have multi-level breadcrumbs so including "Sanity Tests »" in the title on a sanity test page is redundant.
2019-07-26 09:07:42 -07:00
Matt Clay
5ed469f6b7 Fix sanity docs page titles.
The titles are used to generate the index of sanity tests, so they should match the name of the test.
2019-07-26 08:39:34 -07:00
Gonéri Le Bouder
964783fbd2 vmware_guest: speed up vmware_guest tests
- Use predictable VM name during the tests (test_vm1, test_vm2 and
  test_vm2). This to simplify the teardown of the newly created resource
  before the next test.
- Update the documentation to explain the new requirement
- Avoid VM creation with `with_items` when it's not mandatory. This to:
    - speed up the test execution, our hypervisors have limited resources
    - simplify the teardown
- Remove `create_d1_c1_f0_env.yml`, the test was just testing how Ansible
  pass environment variables.
- Correct the name for the `f0` variable (`f1`)
- Fix the DVS tests, the hosts can now reach the dvswitch1 vswitch
- Provision the VM with a poweroff status, this to improve the
  idempotency and sleep up the tests
- Avoid the use of `prepare_vmware_tests` to prepare virtual machines
  when we just need one machine
2019-07-26 14:07:01 +02:00
Matt Clay
db7e9aa051
Use consolidated ignore.txt in ansible-test. (#59618) 2019-07-25 23:29:23 -07:00
Jordan Borean
9551528ba0 Replace Mazer references with ansible-galaxy (#59487)
* Replace Mazer references with ansible-galaxy
2019-07-25 11:45:00 -04:00
Matt Martz
95f4282c42
Verify package data in setup.py installs all files (#59537)
* Add sanity test to ensure all non-py files are installed

* Fix mode and regex

* Fix role skel inventory package_data

* Add docs

* Update package_data for inventory files

* Address pylint concerns

* Another tweak to package_data

* Address review feedback

* Change index to 1

* add to ansible-only.txt
2019-07-24 13:58:13 -05:00
Yannis100
8d1b82a26e Typo in the Warning block eneabled -> enabled (#59524)
* Typo in the Warning block eneabled -> enabled
2019-07-24 11:59:13 -04:00
Yannis100
0a081e14d5 Fix inconsistency nxos->ios role (#59521)
Chapter "Ansible supported network roles"
2019-07-24 11:57:34 -04:00
Sandra McCann
cb1dd6d77b remove molecule mentions (#59441) 2019-07-23 13:12:13 -05:00
Trishna Guha
3bad4d6a50
Add nxos_lag_interfaces resource module (#59031)
* Add nxos_lag_interfaces resource module

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

* ix CI failure

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

* module_utils nxos transport-provider fix

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

* CI failure

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

* nxos_lag_interfaces tests

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

* Integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-07-23 11:11:37 +05:30
Jordan Borean
65049620ee
Generate galaxy.yml based on single source of truth (#59170)
* Generate galaxy.yml based on single source of truth

* Fix up tests and align file names

* Minor Makefile tweak

* Remove link in galaxy.yml file and make it a template file

* Moved collections docs to dev_guide

* change Makefile clean path

* Added readme to example meta file

* review fixes

* Use newer style for doc generation script

* Fix mistake in dev_guide index

* removed uneeded file, fixed links and added preview banner

* Moved banner for sanity test
2019-07-23 06:50:46 +10:00
Tomáš Pospíšek
28b9f71640 remove ambiguity: use "my_test" as module name (#59335)
Naming a module "something_module" is misleading (see below). Let's drop the "_module" part of the module name on the developing_modules_general page.
2019-07-22 14:58:12 -05:00
n3pjk
6531819172 snow: Fix token reference in basic authentication (#59315)
* Fix OAUTHClient logic
* Add Env variable support for snow modules

Fixes: #59299

Signed-off-by: Paul Knight <paul.knight@state.de.us>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-22 19:31:04 +05:30
Jordan Borean
015119df8c
Windows - Add common util for web requests (#54759)
* Windows - Add common util for web requests

* Use different method of retrieving options from module arg spec

* Added proper version_added for module options

* Fix linting errors

* Fix proxy issues and updated cred docs

* Fix FTP usage with proxy settings

* Removed uneeded function added in bad rebase

* Fix up client certificate auth

* fix new sanity checks

* Edit http agent code and update porting guide
2019-07-22 08:42:24 +10:00
Jordan Borean
1f3a3fdd3e
win_firewall_rule - removed deprecated force option (#59358) 2019-07-22 08:24:57 +10:00
Sandra McCann
00699735e9 add eol banner (#59254) 2019-07-18 14:15:43 -05:00
pratikgadiya12
393e4a41d0 Added support to create and delete multiple databases in MySQL (#58602)
* Added support to create/delete mulitiple databases in MySQL

Fixes: #58370

* Added additional tests cases and fixed documentation changes

* Code refactoring and added tests for better test coverage

- Removed db_exists usage from most of the code. Used existence_list
 and non_existence_list instead

- Added additional tests to cover all scenarios w.r.t creation and deletion
 on multiple databases

- Added tests for dump operations

* Minor fix

* Minor fix - create check mode test

* Added dump tests for better dump tests coverage

* Removed minor database connection details

* fixed error

* Added test case for import operations

* Code refactoring and review fixes

- Added dump all test case

* Fixed review comments

* Minor review comment fixes

* Altered db_create return value

* Removed db_list and altered "does exist" to just "exist"

* Kept db and db_list in module.exit_json

* Refactored tests

- Added removal of dump2 file

* Moved import tests to state_dump_import file

* Removed import tests from multi_db_create_delete

* Updated porting guide, added RETURN block

* Minor identation fix

* Added validation to check if databases are dumped
2019-07-18 16:56:32 +02:00
Toshio Kuratomi
5392d8697d
Docs scripts cleanup (#59169)
* Fix dump_keywords to require attribute docs

* Change the documentation commands to make definition files positional

Since the definition files are mandatory, make them positional
parameters instead of options.
2019-07-17 12:01:07 -07:00
Brian Coca
48d4d6ec69
Stop ignoring merge hash behaviour in inventory (#58460)
* stop ignoring merge hash behaviour in inventory

fixes #58120

* added porting note

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
2019-07-17 11:16:56 -04:00
Toshio Kuratomi
019d078a5a
Move common build code from _build_helpers (#55986)
We have some common code used by several docs scripts.  Migrate that
into the build-only shared code repository.

* Move lib/ansible/utils/_build_helpers.py to the directory for common
  build code
* Migrate docs/bin/dump_config.py to a build-ansible subcommand
* Migrate dump_keywords to the build-ansible framework
  * Make the script more maintainable by using functions and good
    variable names
  * Port to Python3 idioms
  * Fix bug so that private attributes will be undocumented
* Move generate_man to a build-ansible subcommand
* Port plugin_formatter to a build-ansible subcommand
* Rework command_plugins so that docs scripts can target Python-3.4+ and
  releng-only subcommands can use more recent versions of Python.
  The architecture is now that command_plugins/* need to be importable
  on Python-3.4.  The init_parsers() method needs to run on Python-3.4.
  But the main() method can utilize features of more recent Python as
  long as it fits within those parameters.
* Update docs build requirements

Port the plugin_formatter to build-ansible framework
2019-07-16 12:19:01 -07:00
Rémy Léone
30206d3066 Add an example for the debugging module (#50197)
+label: docsite_pr
2019-07-15 12:00:36 -04:00
d-little
11d61cc01e Swap ordering to ensure Dynamic always first (#58998) 2019-07-12 15:52:06 -05:00
Alicia Cozine
0dd3fb82eb get rid of Sphinx 2.1.2 errors (#59001) 2019-07-12 16:19:08 -04:00
Martin Krizek
aea5b795c0 Make ansible_index_var accessible as a magic var (#59030) 2019-07-12 08:50:19 -04:00
Toshio Kuratomi
33d2728879 Rename python files in hacking/ directory to have .py suffix
ansible-test only passes files which have the .py suffix for sanity
tests on python files.  This change will allow sanity tests to run on
the Python files in hacking/

* Rename test-module to test-module.py
* Symlink test-module for backwards compat since end users may be using
  test-module
* Fix test-module sanity errors that are now triggered
* Rename ansible_profile to ansible-profile.py
* Rename build-ansible
2019-07-10 22:17:35 -07:00
Toshio Kuratomi
146a7f8ff6 Split the metaclass == type and from future boilerplate code.
The metaclass boilerplate is safe to apply en masse.  The future import
boilerplate needs code to be inspected to be sure that there aren't any
py2isms that need to be fixed.  Split these two checks so that we can
fix them independently

Be explicit about which files are grandfathered so we can fix them up one by one
2019-07-10 22:17:35 -07:00
Gonéri Le Bouder
13de8686e5 vmware: vmware_guidelines.rst
VMware specific documentation that explains:

- how to run the functional tests
- and the conventions.
- clarify the difference between govcsim and vcsim

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
2019-07-10 09:40:17 +02:00
Samy Coenen
0befccbeb9 Update intro_inventory.rst (#58732) 2019-07-09 15:56:21 -05:00
Jordan Borean
b6791e6ae3
ansible-galaxy: add collection sub command (#57106)
* ansible-galaxy: add collection init sub command

* Fix changelog and other sanity issues

* Slim down skeleton structure, fix encoding issue on template

* Fix doc generation code to include sub commands

* Added build step

* Tidy up the build action

* Fixed up doc changes and slight testing tweaks

* Re-organise tests to use pytest

* Added publish step and fixed up issues after working with Galaxy

* Unit test improvments

* Fix unit test on 3.5

* Add remaining build tests

* Test fixes, make the integration tests clearer to debug on failures

* Removed unicode name tests until I've got further clarification

* Added publish unit tests

* Change expected length value

* Added collection install steps, tests forthcoming

* Added unit tests for collection install entrypoint

* Added some more tests for collection install

* follow proper encoding rules and added more tests

* Add remaining tests

* tidied up tests and code based on review

* exclude pre-release versions from galaxy API
2019-07-10 05:47:25 +10:00
Sandra McCann
e5a1d85092 clarify FQCN needs for plugins (#58870)
* clarify FQCN requirement, fix example
2019-07-09 12:25:06 -05:00