Commit graph

341 commits

Author SHA1 Message Date
Jill R
1d6bce961c VMware: Add writing new tests subsection to vmware_guidelines (#60163)
* Add writing new tests subsection to vmware_guidelines

Specifically address use of the prepare_vmware_tests role
Point to common vars for use by test writers

Co-Authored-By: Abhijeet Kasurde <akasurde@redhat.com>
2019-08-12 11:13:21 +02:00
Matt Clay
5a50fb35df Add sanity test for obsolete files.
This will help prevent accidental merging of content to recently obsoleted directories when adding new files.

It may also help contributors who have modified obsolete files understand where their changes should now be made.
2019-08-09 11:22:59 -07:00
Jeff Geerling
1405e48157 Fix documentation for collection build code example (#60156) 2019-08-09 11:05:05 -05:00
Matt Clay
df59f06d6a
Additional ansible-test path fixes. (#60300)
* Add missing ansible-test injector symlink.
* More ansible-test path fixes.
* Expand bin-symlinks docs.
2019-08-08 23:51:03 -07:00
Matt Clay
39b3fc0926 Update ansible-test layout and payload handling. 2019-08-08 21:34:38 -07:00
Sandra McCann
ed21aba442 add link to content collector tool (#59881) 2019-08-08 14:17:26 -05:00
Matt Clay
a93a0c8fd6
Relocate validate-modules for easier testing. (#60214)
* Relocate module validator code and tests.
* Fix validate-modules entry point and imports.
* Fix paths and test entry points.
* Fix up unit tests.
* Fix shebang and execute bit.
2019-08-07 09:34:11 -07:00
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
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
2be2ae366e Remove obsolete docs on pep8 sanity test. 2019-08-01 22:34:09 -07:00
Sandra McCann
9aa3130cd1
clarify what a namespace is or is not (#59809) 2019-07-31 10:58:16 -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
Sandra McCann
cb1dd6d77b remove molecule mentions (#59441) 2019-07-23 13:12:13 -05:00
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
Rémy Léone
30206d3066 Add an example for the debugging module (#50197)
+label: docsite_pr
2019-07-15 12:00:36 -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
Alicia Cozine
3fc0694ffc removes last :doc: links in the dev guide (#58417) 2019-06-26 14:59:33 -04:00
Sandra McCann
5569135efd create scenario guide template file (#58212)
* create scenario guide template file

* Apply suggestions from code review

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
2019-06-24 11:35:37 -05:00
ndclt
4376e88849 Coherence between example and text (use of to_native) (#58279) 2019-06-24 09:47:19 -05:00
Sandra McCann
7765bd41e6 add platform docs to network dev guide (#57960)
* add info on how to create platform docs to network dev guide
2019-06-18 15:35:09 -05:00
Ken Celenza
1a63f8642e Update local module options (#57553)
* Docs: Point out that local plugins can be loaded based on ansible.cfg settings
2019-06-17 15:22:50 -05:00
Pierre-Louis Bonicoli
c289006e05 validate-modules: new module: fail if 'type' isn't documented
Don't require 'type' when:
- parameter name starts with an underscore
2019-06-14 08:36:24 -07:00
Sandra McCann
5243cba0b2 describe how to link to modules or plugins (#57806) 2019-06-13 12:52:40 -05:00
Bill Nottingham
c493593b4b Adjust assorted terminology and wording around product offerings. (#57242)
* Adjust assorted terminology and wording around product offerings.

* Update docs/docsite/rst/dev_guide/style_guide/trademarks.rst
* Update docs/docsite/rst/user_guide/modules_support.rst
* Update docs/docsite/rst/reference_appendices/tower.rst
2019-05-31 14:24:44 -05:00
Sam Doran
50b1a66649 Update instructions for running module directly (#56883)
The internals of AnsiballZ changed silghtly
2019-05-23 17:20:29 -05:00
Felix Fontein
53ec9c8019 Clarify that GPLv3+ module_utils need core team approval (#56740)
* Clarify that GPLv3+ module_utils need core team approval.

* Update docs/docsite/rst/dev_guide/shared_snippets/licensing.txt

Co-Authored-By: Sam Doran <sdoran@redhat.com>

* More 'module_util' -> 'file in module_utils'.
2019-05-21 15:15:55 -05:00
Felix Fontein
abca3f1956 Clarify documentation on _info vs. _facts modules (#56611)
* Clarify documentation on _info vs. _facts modules.

* Expand with examples for facts and non-facts.
2019-05-20 13:52:43 -05:00
Alicia Cozine
118cf3ece6
Cloud dev docs to rst (#56485)
* Moves developer docs for AWS, ovirt, and openstack modules out of lib/ansible/, integrates them with dev_guide, with abadger's fix to make python snippets pass rstcheck
2019-05-16 09:05:12 -05:00
Matt Clay
f9b56a5b56 Add sanity test to check for unwanted files. 2019-05-14 09:13:51 -07:00
Alicia Cozine
3c8d8b1509 should have gone into 52373 (#56306) 2019-05-10 10:59:50 -04:00
Dag Wieers
eac7f1fb58 dev_guide: Various small updates (#53273)
* Document the clarifications that I usually remark when doing reviews
* Update docs/docsite/rst/dev_guide/developing_modules_documenting.rst

Co-Authored-By: dagwieers <dag@wieers.com>
2019-05-09 18:44:28 -05:00
Toshio Kuratomi
edafa71f42 Developer documentation update involving module invocation (#55747)
* Update docs for the 2.7 change to AnsiballZ which invokes modules with one
  less Python interpreter

* Add a section on how module results are returned and on trust between modules, action plugins, and the executor.

* Update docs/docsite/rst/dev_guide/developing_program_flow_modules.rst

Co-Authored-By: abadger <a.badger@gmail.com>
2019-05-01 18:52:22 -05:00
Mark Zhitomirski
b14f477bee docsite: correct path, list requirements for testing module docs, etc. (#52008)
* dev_guide: correct path, list requirements, etc.; module HTML docs are in '_build/html/module' subdir
2019-05-01 15:19:02 -05:00
Alicia Cozine
8542459b95
Docs: edits & expands module_utils & search path info in dev guide (#55931)
* Update docs/docsite/rst/dev_guide/developing_module_utilities.rst
2019-05-01 07:52:34 -05:00
Alicia Cozine
9d5b5d7ddd
correct description of modules vs plugins (#55784) 2019-04-26 09:32:42 -05:00
Sandra McCann
cca365061c
add how to create HttpApi plugins for network modules (#54340)
* initial port over from gdoc

* crosslink httpapi pages

* Add some examples?

* Add quick example of using Connection

* Fix indentation of python code blocks

* moved to a full developer guide for networks

* Try to clarify some examples

* Fix typos

How did I even do that?
2019-04-22 13:21:21 -04:00
Gregor Dschung
158452661a Correct link to Thomas' GitHub account (#55587)
Thomas renamed his account from tstringer to trstringer
2019-04-22 09:37:00 -05:00
Alicia Cozine
d7f6493084 adds better links to tips and pitfalls page (#55458) 2019-04-17 14:30:34 -04:00