Commit graph

151 commits

Author SHA1 Message Date
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
Toshio Kuratomi
3161a91d7e
Implement a framework for having common code for release scripts (#55893)
* Implement a framework for having common code for release scripts

* Release scripts will go through hacking/build-ansible.  build-ansible is
  a pluggable script which will set a directory that has common code for
  non-enduser scripts.  It will then invoke the plugin which implements
  that subcommand.  Uses straight.plugin for loading each sub-command.

* We're going to add tools which are needed to test ansible (the changelog
  generation, for instance) so we need to include the pieces relevant to
  that in the tarball.

* Add straight.plugin to the sanity test requirements for the same
  reason

* Skip compile test just for build-ansible plugins which won't be run as
  part of sanity tests.
2019-05-01 13:57:03 -05:00
Matt Martz
9f83139dcb
Don't register tests as filters (#55332)
* Don't register tests as filters. Fixes #55319

* Remove tests for deprecated functionality

* Remove no-tests-as-filters sanity tests

* Remove docs too

* Revert "Remove docs too"

This reverts commit 7daf457a74.

* Make no-tests-as-filters doc an orphan
2019-04-16 14:10:14 -05:00
Toshio Kuratomi
e5a31e81b6 Add a script to generate a new porting guide
* porting-guide.py is allowed to be Python-3.6+ as it will only be run
  by release engineers
2019-04-12 12:57:35 -07:00
Matt Davis
1dc8436ed9
module_utils fixes in collections (#55118)
* module_utils fixes in collections

* fixed Windows module_utils in collections
* fixed more Python module_utils cases (from X import module)
* "medium style" Ansiballz modules now work properly with collections (ie, non-replacer but also not using basic.py)
* added more tests
* split Windows/POSIX exec

* sanity
2019-04-10 22:59:53 -07:00
Sam Doran
3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
2019-04-09 13:17:59 -04:00
Toshio Kuratomi
5fb416ae34 Add a script to generate twitter and mailing list announcements
Announcements taken from https://github.com/ansible/community/wiki/RelEng:-ReleaseProcess
and then cleaned up:

* Update issue reporting blurb from feedback from acozine and gundalow
* Add a subject and to line for email output
* Ignore long line tests on the jinja templates (as jinja doesn't give
  enough control to get rid of newlines when text wrapping)
* Skip shebang and compile tests for older pythons since this is a
  release engineer-only script.  (ok'd by mattclay)
2019-03-22 11:23:54 -07:00
Matt Clay
39bbadb2fd
Replace no-underscore-variable test with pylint. (#54140)
* Replace no-underscore-variable test with pylint.
* Update orphan handling for sanity test docs.
* Update command for listing tests.
2019-03-20 22:14:22 -07:00
Matt Clay
47f2101e8d Fix no-underscore-variable test. (#54137)
* Ignore lines with comments.
* Detect variables at the start of the line.
2019-03-20 16:08:25 -07:00
Matt Clay
40318b49b2 Check extensions on changelog fragments. 2019-03-08 22:42:19 -08:00
Matt Clay
7c0bc9e4ac Fix no-assert code-smell regex. 2019-03-08 13:20:20 -08:00
Rhys Campbell
7f50f467fe mongodb_replicaset module and test exception (#49690)
* Clean up from previous fork

* Minor doc update

* Fix doc string return type

* Minor doc updates

* Keeping fresh

* Various changes to documentation, cosmetics and code logic

Please test :-)

* Fix typo

* Various small changes as requested

* Remove traceback ref

* try catch changes

* Tidy description

* Correct data type in documentation

* Fix for 4.0
2019-02-25 11:52:07 +01:00
Alex Stephen
6ae04017d8 GCE deprecation warning (#52116)
* GCE deprecation warning

* porting guide typo

* fixing ignores

* moving error code back

* underscore marking on gce

* forgot to change status
2019-02-18 16:42:19 +00:00
Toshio Kuratomi
0ec4e0a842 Disable the update-bundled test during normal operation
This is enabled once per release cycle in a PR so that the release
manager can open bugs for the Ansible team to update the bundled code.
2019-02-06 13:59:55 -08:00
Toshio Kuratomi
dfd8b659c0 Have update-bundled check for updates to all bundled code
Add a test for whether we have bundled code inside of ansible that needs to be updated
2019-02-06 13:59:55 -08:00
Matt Clay
06d83bae05 Support ignore_changes in code-smell tests. 2019-02-05 15:21:01 -08:00
Brian Coca
96b3ef5553
Doc fragments to plugins (#50172)
* promote doc_fragments into actual plugins

  change tests hardcoded path to doc fragments
  avoid sanity in fragments
  avoid improper testing of doc_fragments
  also change runner paths
 fix botmeta
 updated comment for fragments
 updated docs
2019-01-23 20:03:47 -05:00
Felix Fontein
d2c4f57f16 docker_service: rename to docker_compose. (#51035)
* Rename docker_service -> docker_compose.

* Added changelog.

* Update scenario guide.

* Clean up module.
2019-01-23 12:21:57 +00:00
Matt Clay
634533208e Fix integration test shebangs and update tests.
* Integration tests now have their own list of allowed shebangs.
* Use `#!/usr/bin/env bash` instead of `#!/bin/bash`
  since the location is different on various platforms.
2019-01-15 14:08:26 -08:00
Matt Clay
332dc6a93a Fix false positives in no-get-exception test. 2019-01-15 09:37:10 -08:00
Matt Clay
7995f69a44 Improve performance of no-tests-as-filters test. 2019-01-09 17:25:19 -08:00
Matt Martz
6918b4e8f4
Add tests for WANT_JSON and old style modules (#50555)
* Add tests for WANT_JSON and old style modules

* quote source path

* Attempt to further appease tests

* Check for file and not just exists

* omg don't be dumb

* moar fixes

* shellcheck is the worst :)

* Test the custom modules for failure without arg files
2019-01-09 14:43:25 -06:00
Ganesh Nalawade
71113ee291
Fix backup issue in network config modules and network action plugins common code refactor (#50301)
* Fix backup issue in network config modules

*  Fix `get_working_path` not found issue introduced due to
   backup config code refactor (PR #50208)

*  Further refactor config related action plugins to minimize
   duplicate code

*  Remove unwated imports in config action plugins

* Add common network class for action plugin and related code refactor

* Fix review comment
2019-01-04 16:06:13 +05:30
Jordan Borean
7bce6818eb
Added supershipit to botmeta sanity test (#50219) 2018-12-21 10:36:43 +10:00
Dag Wieers
7fb1a71a2c
no-smart-quotes: Skip files by path in code-smell (#45881)
* no-smart-quotes: Skip files by path in code-smell

This is to ensure the generated docs do not trigger code-smell issues on
contributor systems.

* Implement feedback from review
2018-12-18 20:33:18 +01:00
Adrian Likins
be65d9cfe5 Skip sanity tests that don't apply to bundled code
* add distro to pep8 skip tests
* Skip no-assert test for distro
* Add bundled distro to the empty-init skip list
2018-12-17 11:01:01 -08:00
Rhys Campbell
cdc0011333 mongodb_shard module and test exception (#43673)
* mongodb_shard module and test exception

* Update version_added

* Documentation improvements

* Correct yaml errors

* Correct lines over 160 chars

* Correct replicaset

* Minor documentation changes
2018-12-05 16:29:45 -05:00
John R Barker
e7da4975cc
Botmeta validate path macros (#48980)
BOTMETA validation - use path macros

Rather than hard coding the list of path macros, read them directly from
BOTMETA
2018-11-21 11:15:56 +00:00
Matt Martz
9773a1f289
Add a Singleton metaclass, use it with Display (#48935)
* Add a Singleton class, use it with Display

* update six import

* Move remaining failes to display singleton

* Fix rebase issues

* Singleton improvements

* Add code-smell for 'from __main__ import display'. ci_complete

* s/self/cls/g

* Add docs for no-main-display

* Address linting issues

* Add changelog fragment. ci_complete

* Implement reentrant lock for class instantiation in Singleton

* Add Display singleton porting guide
2018-11-20 17:06:51 -06:00
Matt Clay
1a3bf09f8a
Add test to require docs for action plugins. (#48376) 2018-11-13 22:52:36 -08:00
Matt Martz
8765d2a8e8
code-smell test that can find deprecated config items (#46273)
* Start of code-smell test that can find deprecated config items

* Strip deprecated.version from config item

* Don't use os.walk, rely on explictly passed list of files

* Properly disable the test

* Add docs

* Make config an orphan
2018-11-13 09:29:39 -06:00
Toshio Kuratomi
bcd6dbcd65 Remove get_exception from the remainder of the modules 2018-10-18 08:37:04 -07:00
Matt Clay
c3a6737004 Add BOM check to shebang sanity test.
Includes fixes for docsite files with a UTF-8 BOM.
2018-10-15 12:03:58 -07:00
Alicia Cozine
9764f32513 adds stub API docs in a single file (#46663)
* adds stub API docs in a single file
2018-10-11 10:15:24 -04:00
Felix Fontein
a520ca3298 docker_container, docker_image_facts: allow to use image IDs (#46324)
* Allow to specify images by hash for docker_container and docker_image_facts.

* flake8

* More sanity checks.

* Added changelog.

* Added test.

* Make compatible with Python < 3.4.

* Remove out-commented imports.
2018-10-06 08:50:31 -05:00
Matt Clay
e2b6047514
Add symlinks sanity test. (#46467)
* Add symlinks sanity test.
* Replace legacy test symlinks with actual content.
* Remove dir symlink from template_jinja2_latest.
* Update import test to use generated library dir.
* Fix copy test symlink setup.
2018-10-04 07:02:42 -07:00
John R Barker
f4f5d941e5
botmeta support: core (#45917)
* botmeta enforce `support: core`
2018-09-25 18:37:01 +01:00
Matt Clay
4085d01617 Reduce noise in docs-build test failures. 2018-09-24 10:14:47 -07:00
Matt Clay
ac492476e5
Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.
2018-09-21 11:38:22 -07:00
Matt Clay
2148999048 Improve error handling for docs-build test. 2018-09-21 08:34:07 -07:00
Dag Wieers
24dd87bd0a Fix incorrect use of subprocess.CalledProcessError (#45890) 2018-09-20 10:14:11 -07:00
Matt Clay
e7426e3795
Minor cleanup of code-smell tests. (#45658)
* Minor cleanup of code-smell tests.
* Add exception handling for YAML load.
2018-09-14 11:12:06 -07:00
John R Barker
822236810e
BOTMETA Validator + Bulk tidyup, support:(core,community,network) (#44903)
plugins/ is COMMUNITY
Set sensible defaults for directories
support:network for the platforms that we Networking SUPPORTS,
everything else is COMMUNITY
Mark other support:network (ansible-connection, etc)
Infoblox is support:core
contrib/ by definition should be support:community
Remove duplicated labels
Make yamllint happy(ier)
Adds sanity test to ensure BOTMETA.yml is valid
2018-09-14 12:33:23 +01:00
Alicia Cozine
4264be2b18 Remove more docs build errors (#45364)
* orphans testing pages to avoid not-in-toctree errors

* orphans various pages pending reorg

* adds module_utils and special_vars to main TOC

* uses a glob for scenario_guide TOC

* normalize and Sentence-case headings on community pages, typos

* re-orgs community TOC, adds all pages to toctree

* removes scenario guides index page

* adds style guide to community index

* basic update to style guide

* fix typo that created a new error

* removes not-in-toctree from ignore errors list

* leave removing files for future cleanup task
2018-09-11 17:51:47 +01:00
Felix Fontein
0e6234ab04 Adding module which allows to complete certificate chains (#44169)
* Adding certificate_complete_chain module.

* Avoid code smell errors.

* Removing input_chain_src.

* Make sure line ending is there.
2018-08-23 23:18:36 +02:00
Matt Clay
31a5b874a1 Use runtime instead of datetime for test output. 2018-08-23 12:05:10 -07:00
Felix Fontein
e7e63ec1e8 Improving syntax highlighting in HTML docs (#42472)
* Adding improved YAML lexer for HTML docs.

* Fixing (some of) the warnings.

* Fixing more warnings.

* Removing ansible- prefix from lexer names.

* Rename extensions -> _extensions.

* Removing superfluous module search path extension.
2018-07-31 15:28:16 -05:00
Egor Zaitsev
249a6aae22 New module: routeros — manage MikroTik RouterOS (#41155)
* Implement initial RouterOS support

* Correct matchers for license prompts

* Documentation updates & mild refactor

* Remove one last Cisco function

* Sanity test fixes

* Move imports to the beginning

* Remove authorize property

* Handle ANSI codes

* Revert to_lines function

* CR fixes

* test(routeros): add unit tests

* Added another test (with ANSI colors and banner in fixture).

* Ignore CRLF line endings in system_package_print file

* fix: review by ganeshrn
2018-07-30 10:28:03 +05:30
Julien Champseix
19dc267e4c Allow specifying the output encoding in the template module (#42171)
Allow specifying the source and destination files' encodings in the template module

* Added output_encoding to the template module, default to utf-8
* Added documentation for the new variables
* Leveraged the encoding argument on to_text() and to_bytes() to keep the implementation as simple as possible
* Added integration tests with files in utf-8 and windows-1252 encodings, testing all combinations
* fix bad smell test by excluding windows-1252 files from the utf8 checks
* fix bad smell test by excluding valid files from the smart quote test
2018-07-25 13:10:40 -07:00