Commit Graph

1093 Commits (caa5abdfc9d4a42fd75a367ca5cbf7b6da760f44)

Author SHA1 Message Date
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
6 years ago
Jordan Borean ec6d82435f
win_scheduled_task: add deprecation warning for repetition format (#45468)
* win_scheduled_task: add deprecation warning for repetition format

* fixed up sanity issues
6 years ago
Brian Coca 64c594d226
correct and clarify deprecation (#45234)
* correct and clarify deprecation
6 years ago
Matt Clay 6fb333faff
Fixes for ansible-test sanity import test. (#45249)
* Fix import test on Python 3.7.
* Fix path processing in import sanity test.
6 years ago
Matt Martz f89d873698
Stub out modules scheduled for 2.8 removal (#44985)
* Remove modules scheduled for 2.8

* Add changelog and porting guide

* Skip docs test on removed modules

* Don't link to removed modules
6 years ago
Matt Clay abdd6a6475 Fix pslint issues. 6 years ago
Dag Wieers 15c9bb5aa0
Disable PSUseOutputTypeCorrectly
Because of a bug that produces false positives.
6 years ago
newtonne 30fd326953 Various updates to macports module (#44605)
- Add support for installing specific variants of a port.
- Add support for using yaml lists with 'name' parameter, rather than comma-separated lists.
- Add to and clarify documentation and examples.
- Use Macports nomenclature:
  - s/package/port/g
  - Rename update_cache to sync_ports but keep update_cache as an alias. Remove undocumented update-cache alias.
  - Remove undocumented 'pkg' alias for 'name'. Replace with 'port' alias and document it.
- Print stdout and stderr output if `port sync` fails.
- Print stderr output, rather than stdout, if `port install/uninstall/activate/deactivate` fail.
6 years ago
Chris Archibald 7cded31ec9 Depreciate elementsw modules (#44792)
* rename deprecated files
6 years ago
Dag Wieers 5e814d8d17 Fix support for JSON output when charset is set (#44762)
* Fix support for JSON output when charset is set

This fixes #41797

* Add specific exception to catch

* Add Changelog fragment
6 years ago
René Moser dd953dbe96
cs_template: implement update and revamp (#37015) 6 years ago
Michael Price f89374bf6d Update the ignore and doc_fragments for E-Series
Make the generic updates to remove unneeded ignores and improve the
documentation for the NetApp E-Series modules.
6 years ago
Toshio Kuratomi 68c60ad307 Change validate-modules for removed modules
Removed modules now don't have documentation.  Need to account for that
when checking them in validte-modules
6 years ago
Toshio Kuratomi 3ccdb35f59 Do not test for docs in removed modules 6 years ago
Aren 9db3e597f3 state: present added in docs (#37197)
* state: present added in docs

* atomic_container.py docs now match argspec, enforce test
6 years ago
Michael Price ad91793428 Resolve issues in NetApp E-Series Host module (#39748)
* Resolve issues in NetApp E-Series Host module

The E-Series host module had some bugs relating to the update/creation
of host definitions when iSCSI initiators when included in the
configuration. This patch resolves this and other minor issues with
correctly detecting updates.

There were also several minor issues found that were causing issues with
truly idepotent updates/changes to the host definition.

This patch also provides some unit tests and integration tests to help
catch future issues in these areas.

fixes #28272

* Improve NetApp E-Series Host module testing

The NetApp E-Series Host module integration test lacked feature test
verification to verify the changes made to the storage array.

The NetApp E-Series rest api was used to verify host create, update, and
remove changes made to the NetApp E-Series storage arrays.
6 years ago
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.
6 years ago
Matt Clay 31a5b874a1 Use runtime instead of datetime for test output. 6 years ago
Ondra Machacek 24c26aded8 oVirt: Add depracation warning to all modules (#44440) 6 years ago
/v\atthew L Daniel d7e66f16a6 Correct the default doc for attached in ec2_eni (#44523)
* Correct the default doc for attached in ec2_eni

Also corrected a typo in the summary

* Address ansible-test sanity error about E324

* Fix and remove the E325 suppression for ec2_eni
6 years ago
Chris Archibald 9dceca8a88 Deprecated Old NetApp Cdot Modules (#43781)
* MVP2 Post ElementSW OSRB sync

* Revert "MVP2 Post ElementSW OSRB sync"

This reverts commit c13db2ad962cd56bffce052c2891c558a2240c72.

Undoing bad push

* move deprecated files

* add documentation

* add new line

* Fix version issue

* fix issue with ignore file, hopefully

* Add ontap modules to porting guide

* fix refs

* add _module to ref
6 years ago
René Moser 1fb0e11b56
vultr: rename prefix vr_to vultr_ (#43994)
* vultr: rename modules

* replace string vr_ with vultr_

* add deprecation warning

* fix sanity tests

* add changelog
6 years ago
Chris Archibald 479408330e Adding Common files for NetApp ElementSW release (#43727)
* MVP2 Post ElementSW OSRB sync

* Revert "MVP2 Post ElementSW OSRB sync"

This reverts commit c13db2ad962cd56bffce052c2891c558a2240c72.
6 years ago
Matt Martz 54e4c53f00
Ensure removed_in is StrictVersion before comparing (#43835)
* Ensure removed_in is StrictVersion before comparing

* Catch ValueError with StrictVersion on incompatible versions
6 years ago
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.
6 years ago
Matt Martz 01c0446cb5
Add AnsibleModule signature schema, and fix associated issues (#43512) 6 years ago
Joren Vrancken 9e310558ee Enable PEP8 testing of E305 6 years ago
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
6 years ago
Florian Braun 74af52533f Variable Timout for Katello Module + Documentation (#41834)
* Changed Foreman timeout to be setable via a parameter
Added a Parameter to set the timout to wait for the started Foreman actions
by the user instead of using the hard coded 1000 Seconds

* katello module screamed for more docu :)

* fix docu + some ci findings
made docu better and moved chices in relations to other options to the description

* added a quote to description and removed wrong combination of param product

* Removed choices from params
also removed katello from a ignore file
6 years ago
Toshio Kuratomi 52449cc01a AnsiballZ improvements
Now that we don't need to worry about python-2.4 and 2.5, we can make
some improvements to the way AnsiballZ handles modules.

* Change AnsiballZ wrapper to use import to invoke the module
  We need the module to think of itself as a script because it could be
  coded as:

      main()

  or as:

      if __name__ == '__main__':
          main()

  Or even as:

      if __name__ == '__main__':
          random_function_name()

  A script will invoke all of those.  Prior to this change, we invoked
  a second Python interpreter on the module so that it really was
  a script.  However, this means that we have to run python twice (once
  for the AnsiballZ wrapper and once for the module).  This change makes
  the module think that it is a script (because __name__ in the module ==
  '__main__') but it's actually being invoked by us importing the module
  code.

  There's three ways we've come up to do this.
  * The most elegant is to use zipimporter and tell the import mechanism
    that the module being loaded is __main__:
    * 5959f11c9d/lib/ansible/executor/module_common.py (L175)
    * zipimporter is nice because we do not have to extract the module from
      the zip file and save it to the disk when we do that.  The import
      machinery does it all for us.
    * The drawback is that modules do not have a __file__ which points
      to a real file when they do this.  Modules could be using __file__
      to for a variety of reasons, most of those probably have
      replacements (the most common one is to find a writable directory
      for temporary files.  AnsibleModule.tmpdir should be used instead)
      We can monkeypatch __file__ in fom AnsibleModule initialization
      but that's kind of gross.  There's no way I can see to do this
      from the wrapper.

  * Next, there's imp.load_module():
    * https://github.com/abadger/ansible/blob/340edf7489/lib/ansible/executor/module_common.py#L151
    * imp has the nice property of allowing us to set __name__ to
      __main__ without changing the name of the file itself
    * We also don't have to do anything special to set __file__ for
      backwards compatibility (although the reason for that is the
      drawback):
    * Its drawback is that it requires the file to exist on disk so we
      have to explicitly extract it from the zipfile and save it to
      a temporary file

  * The last choice is to use exec to execute the module:
    * https://github.com/abadger/ansible/blob/f47a4ccc76/lib/ansible/executor/module_common.py#L175
    * The code we would have to maintain for this looks pretty clean.
      In the wrapper we create a ModuleType, set __file__ on it, read
      the module's contents in from the zip file and then exec it.
    * Drawbacks: We still have to explicitly extract the file's contents
      from the zip archive instead of letting python's import mechanism
      handle it.
    * Exec also has hidden performance issues and breaks certain
      assumptions that modules could be making about their own code:
      http://lucumr.pocoo.org/2011/2/1/exec-in-python/

  Our plan is to use imp.load_module() for now, deprecate the use of
  __file__ in modules, and switch to zipimport once the deprecation
  period for __file__ is over (without monkeypatching a fake __file__ in
  via AnsibleModule).

* Rename the name of the AnsiBallZ wrapped module
  This makes it obvious that the wrapped module isn't the module file that
  we distribute.  It's part of trying to mitigate the fact that the module
  is now named __main)).py in tracebacks.

* Shield all wrapper symbols inside of a function
  With the new import code, all symbols in the wrapper become visible in
  the module.  To mitigate the chance of collisions, move most symbols
  into a toplevel function.  The only symbols left in the global namespace
  are now _ANSIBALLZ_WRAPPER and _ansiballz_main.

revised porting guide entry

Integrate code coverage collection into AnsiballZ.

ci_coverage
ci_complete
6 years ago
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
6 years ago
saichint fa5f396a4b nxos_file_copy enhancement (#42424)
* add file_pull option

* typo correction

* fix shippable error

* review comments

* fix for review comments by mwiebe

* possible shippable fix

* remove file_copy from ignore

* more review comments addressed

* review comments

* add localhost for remote scp server in tests

* timeout fix
6 years ago
tomelrod 5eb47066e3 Documentation change for resizefs (#43224)
* Documentation change for resizefs

Changed documentation to match the default value of resizefs set in the code.
Added a note on the resizefs use on the example utilizing it.

* Remove test now it validates fine
6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Jordan Borean 93c05074ee
win_chocolatey: refactor module to fix bugs and add new features (#43013)
* win_chocolatey: refactor module to fix bugs and add new features

* Fix some typos and only emit install warning not in check mode

* Fixes when testing out installing chocolatey from a server

* Added changelog fragment
6 years ago
Abhijeet Kasurde b02e0c07d8
dnsimple: refactor dnsimple module (#42548)
* Update dnsimple-python minimum version to 1.0.0 as it supports API v2 and API v1 is deprecated.
* Update examples.
* Update documentation.

Fixes: #42495

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Dag Wieers 95a1170908 Windows: Add "special" parameter types to docs (#42853)
* Windows: Add special parameter types

Adding explicit parameter types now exposes this information in the
module documentation, and proves really helpful.

We only do this for non-string types as strings, mostly because strings
are implicit.

PS We also make copyright statements consistent and use #Requires for
explicit library imports

* Type "string" must be type "str"

* A few more Copyright corrections

* More fixes

* Don't add file encoding to Powershell files

* Don't add missing interfacetypes parameter

Otherwise CI demands an incorrect version_added

* Small fix
6 years ago
Tim Rupp 290df027e3
Adds the ipaddress compat library backport from Python 3.x (#42265)
This library is a backport (to 2.x versions of Python) of the code
that is found in the mainline versions of Python 3.x. It is being
included so that networking vendors, and others, can make use of it
without needing to add a python module dependency to their own modules.

A separate dependency would add to user burden of satisfying those
dependencies before using some Ansible modules.

In a previous core meeting, this was approved. Naming of the directory
it is found in was up for debate, but "compat" was the first directory
to have some sort of concensus.
6 years ago
Dag Wieers e899824c49
ACI: Add parameter types to module docs (#42893)
* ACI: Add parameter types to module docs

* Update validate-modules ignore list
6 years ago
Wojciech Sciesinski cf4e7fd70a Make the code more PowerShell compliant (#39464)
* Make the code more PowerShell compliant

* Correction of the mistaken comment

* Revert style changes to If/Else/Elseif

* Remove an ignored PSScriptAnalyzer rule due to the code correction

* Decreasing of an entropy ;-) and replacing the next to aliases

* minor whitespace changes
6 years ago
Sloane Hertel 2c3e6f8bd3 [elb_target_group] fix docs and add default for wait_timeout - fixes #42324 (#42477)
Add default for wait_timeout and version_added flag
6 years ago
Yanis Guenane 593f484d77 Fix E324 for vultr modules. (#42464) 6 years ago
John R Barker d962611528 Allow documentation of module options type (#42285)
* Allow documentation of module options

Pass through the `type` of a modules option so it's displayed on the
html module docs

* docs
6 years ago
fxfitz f92b95b8cb Remove ipa_ modules from sanity ignore; fix the docs 6 years ago
Dag Wieers 57c0471b54
Fix ACI validate-modules issues (#42222) 6 years ago
tstoner db7300904d Enforcing NXAPI default HTTP behavior (#41817)
* nxos_nxapi http default behavior

* Use nxos_nxapi module in prepare_nxos_tests

* Refactor nxos_nxapi configure test to use yaml block

* Extend nxos_nxapi https & http test cases

* Removed NXOS internal release naming

* Resolved ansibot sanity errors

* Fix typo in prepare_nxos_tests

* Address PR comments

* Shippable indicates this is no longer needed

* Add port change logic and testing
6 years ago
John R Barker 6024a766e9
Allow removed_in 2.11 (#42119) 6 years ago
Andrea Tartaglia a342538aba Add shell out checks (#41545)
* Added error codes for shell_out checks

* Added ignore lines for allowed Modules

* Added shell out checks

* Fixed pep8

* Updated regex to only match subprocess.Popen

* Added failing modules to ignore.txt

* Wrong postgresql module in ignore.txt

* Removed bigip from ignore.txt
6 years ago
Abhijeet Kasurde 27b85e732d Argument spec must be dict/hash (#40858)
validate-modules should fail when argument is not dict/hash.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ben Berry 32c191ee9c expand user before calling abspath (#40196)
* expand user before calling abspath

* omit expanduser code smell check for volumes
6 years ago
Matt Clay 70c475da6c Implement new changelog generator. 6 years ago
Matt Martz d4930e6692
Add requests.Session like class (#37622)
* Adds requests.Session like class

* py2 syntax fix

* Add a few examples to the Request docstrings

* Add helper methods and docs

* Fix test failures

* Switch tests to test Request instead of open_url, add simple open_url test to validate funcitonality

* Fix filename in replace-urlopen code smell test
6 years ago
Sloane Hertel 7d2c71462d gluster_volume: add 'volume' alias to 'name' param (#40845)
* gluster_volume: add 'volume' alias to 'name' param

* remove gluster_volume from validate-modules/ignore.txt
6 years ago
Pilou de385560a8 jenkins_jobs: fix typos (#40844)
* jenkins_job: fix typos

* jenkins_job: add type for 'enabled' parameter
6 years ago
Matt Martz 36c8441c6d New module vmware_deploy_ovf (#30309)
* First pass at vmware_deploy_ovf functionality
* Add OVA file support, re-structure code
* Move some useful functions to module_utils.vmware, and perform a little DRY too
* Better handling of errors during spec validation and import
* Properly calculate the lease progress percentage for all vmdk files
* Make warnings and errors a little better
* Add an allow_duplicates argument, that defaults to true, to allow users to have name based idempotency
* Add fail_on_spec_warnings to cause the module to treat warnings as errors
* Support non-vmdk uploads
* Add ova alias for ovf
* Rename vmdk_post_url to device_upload_url so it does not sound to specific to VMDK files
* Safer handling of * hostname in urls
* Add default Content-Type, remove unused headers var
* Add deploymentOptions and propertyMapping functionalities
* Add basic check_mode support
* Add vmware_deploy_ovf to list of use-argspec-type-path ignores
* Update version_added and fix path for use-argspec-type-path
* Add configurable folder
* Doc changes
6 years ago
Matt Clay 45c6fa9784 Update gluster_volume path in ignore.txt. 6 years ago
Matt Martz b07f779296 Update dnf module argument_spec and docs to match (#39819)
* Update dnf module argument_spec and docs to match. Fixes #39800

* Always evaluate autoremove as boolean
6 years ago
Zim Kalinowski dde48560fb fixing container instance sanity & integration tests (#40774) 6 years ago
Strahinja Kustudic de57fa71c1 Improve timezone module for none systemd Linux distributions (#38032)
* The module now correctly sets the timezone in both the config file and
in /etc/localtime; while hwclock is set in both the config and
/etc/adjtime.
* Module checks if the timezone is actually set by checking
/etc/localtime. Before it only checked if it was set in the config file.
* Fixed module not setting the timezone on RedHat systems if
/etc/localtime was a symbolic link.
* Fixed module failures in case of missing config files or incorrect data
in them.
* Added a lot of integrations tests to cover most of these situations.
6 years ago
René Moser 5dd3aa26ea
cs_instance: implement host migration support (#40309)
* cs_instance: implement host migration support

* fix build

* fail fast on update if user is not admin

* improve tests a bit

* expunge it

* fix typo

* disable temporarly verify for host on starting instance.
6 years ago
Jiri Tyr e6e5e45d7e Fixing choices for transport option in gluster_volume module (#38815) 6 years ago
Ryan Brown 858a1b09bb EC2_group module refactor (formerly pr/37255) (#38678)
* Refactor ec2_group

Replace nested for loops with list comprehensions

Purge rules before adding new ones in case sg has maximum permitted rules

* Add check mode tests for ec2_group

* add tests

* Remove dead code

* Fix integration test assertions for old boto versions

* Add waiter for security group that is autocreated

* Add support for in-account group rules

* Add common util to get AWS account ID

Fixes #31383

* Fix protocol number and add separate tests for egress rule handling

* Return egress rule treatment to be backwards compatible

* Remove functions that were obsoleted by `Rule` namedtuple

* IP tests

* Move description updates to a function

* Fix string formatting missing index

* Add tests for auto-creation of the same group in quick succession

* Resolve use of brand-new group in a rule without a description

* Clean up duplicated get-security-group function

* Add reverse cleanup in case of dependency issues

* Add crossaccount ELB group support

* Deal with non-STS calls to account API

* Add filtering of owner IDs that match the current account
6 years ago
Matt Clay 15b6837daf Add yamllint for plugin docs and fix issues. 6 years ago
pierremahot 3903ca5c8e Fix ios_vlan to correctly identify unmodified config when having long interface names (#40145)
Change the command to get the interface in a vlan "show vlan" => "show vlan brief"
Change the parsing of the return command of the switch.
The return of the ios command is fixed so i cut with fix number of carracter.
Adding looking for the next line to add the forgeted interfaces.
6 years ago
Zim Kalinowski 8e38668285 fixing disabled azure sanity tests (#40519)
* fixing azure sanity tests

* fixing sanity

* fixing some tags issues

* removed unnecessary things from managed disk

* fixed location problem

* more sanity fixes

* sanity test fixes

* final sanity fixes?

* final fixes again

* undo changes related to container instance

* removed container instance

* readd again

* fixed stupid mistake

* removed _azure from changes

* one more mistake
6 years ago
Matt Clay 8deced3e04
Fix shebangs and file modes and update tests. (#40563)
* Add execute bit sanity test and apply fixes.
* Add shebang test for `lib` dirs and apply fixes.
* Shebang and execute bit cleanup.
6 years ago
Matt Clay 8d39515914 Remove tab check from validate-modules.
It is redundant with the pycodestyle W191 "indentation contains tabs" check.
6 years ago
Strahinja Kustudic 32d6a354d7 postgresql_user: set encrypted as default and fix empty password reporting changed (#36931)
* Set encrypted as default and fix empty password reporting changed

* Starting with Postgres 10 `UNENCRYPTED` passwords are removed and
because of that this module fails with the default `encrypted=no`.
Also encrypted passwords are suported since version 7.2
(https://www.postgresql.org/docs/7.2/static/sql-createuser.html) which
went EOL in 2007 and since 7.3 it is the default. Because of this it
makes a lot more sense to make `encrypted=yes` the default. This won't
break backward compatibility, the module would just update the user's
password in the DB in the hashed format and everything else will work
like before. It's also a security bad practice to store passwords in
plain text. fixes #25823
* There was also a bug with `encrypted=yes` and an empty password always
reported as changed.
* Improved documentation for `encrypted`/`password` parameters, and
removed some obsolete notes about passlib.

* Fix clearing user's password to work with all versions of Postgres

* Add tests for clearing the user password

* Fix documentation atfer rebase

* Add changelog fragment
6 years ago
John R Barker fe4368ce15
removed_in: 2.6 is valid (#40399) 6 years ago
Toshio Kuratomi 46d35d8919 unarchive now passes the E322 test 6 years ago
René Moser de8b6b55f7
cs_vpc: implement state=started (#40319) 6 years ago
Anil Kumar Muraleedharan 1cb4619c9a Modifying cnos-facts, cnos_command and cnos-config in line with the design followed in Ansible. Adding unit test cases for these modules. Added plugins to support them. (#39955)
* Modifying cnos-facts, cnos_command and cnos-config in line with the design followed in Ansible. Adding unit test cases for these modules. Added plugins to support them.

* Removing doc fragment conflicts with other modules

* Replacing show with display
6 years ago
Dag Wieers 3cdd5da247
xml: Fix validate-modules issue (#40121) 6 years ago
Zim Kalinowski b20a88c39d fix problem with documentation and param definition difference (#40067)
* fix problem with documentation and param definition difference

* removed some E324 from ignore.txt

* fixed mistake

* remove one more E324

* removed function app

* fixing append tags

* leaving append tags for later
6 years ago
Tim Rupp 06f76d6407
Removes ignores for f5 (#40038)
Removes ignores for f5 from unit tests and fixes any issues that
are being suppressed by the ignores
6 years ago
Tim Rupp d312c2aed7
Various bigiq fixes (#40024)
Udpdating coding conventions
6 years ago
Tim Rupp 742fd3a91a
Adds misc fixes for gtm facts module (#39966)
Codifies some parameters and fixes f5 coding conventions
6 years ago
Trishna Guha f1103a7a02
remove purge from nxos_logging doc, argspec (#39947)
* remove purge from nxos_logging doc, argspec

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

* shippable

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
6 years ago
Dag Wieers d7f3d3b867
Fix module validation checks and remove old params (#39926)
This PR includes:
- Fixes to the majority of module validation issues
  (deliberate inconsistencies between docs and arg_spec)
- Removal of deprecated parameters 'method' and 'protocols'
- A few typos in the documentation

There are still some left-over validation errors, some are deliberate
(like doc strings as default to indicate ranges, etc.)
6 years ago
Matt Clay a7d7df1450 Make docs-build sanity test disabled by default. 6 years ago
Tim Rupp ad5fdf5eb7
Fixes for bigip_gtm_wide_ip (#39931)
Added the irules parameter. Misc corrections of invalid parameter
names and internal behaviors.
6 years ago
Matt Martz 1663b64e18
Allow subspec defaults to be processed when the parent argument is not supplied (#38967)
* Allow subspec defaults to be processed when the parent argument is not supplied

* Allow this to be configurable via apply_defaults on the parent

* Document attributes of arguments in argument_spec

* Switch manageiq_connection to use apply_defaults

* add choices to api_version in argument_spec
6 years ago
Rob b5cffe8ced [aws] Create classes for Application Load Balancer (#33769)
* Create classes for Application Load Balancer
* Add unsupported CI alias
* Add AWSRetry
* Add integration tests using the ALB
6 years ago
Pilou a5d320f8e7 vdirect modules: fix 'import' sanity test (#39706)
* vdirect modules: fix 'import' sanity test

* Remove passing file from import skip list.

* vdirect modules: fix validate-modules warnings

- Arguments with a default should not be marked as required
- add choices in doc

* vdirect_runnable: use formatting function
6 years ago
Alicia Cozine c8a9b411bc
Last docs link fixes (#39391)
* should not need <>, but fails without

* adds anchor to keywords page, uses it on plugins pages

* fixes envvar link errors

* harmonize file name and ref name as python_3

* removes undefined-lable from ignore list
6 years ago
Tim Rupp fb264281de
Adds various features and fixes (#39271)
* a refactor of pool member and node modules to be inline with current f5 conventions
* Added priority_group_activation to pools
* various other small convention fixes and bug fixes
6 years ago
saichint 1afec5a48e fix nxos_snmp_community issues (#39258) 6 years ago
Tim Rupp 256b5535ec
Various fixes to F5 modules (#39255)
* Adds gnat provisioning to bigip_provision
* Adds special handling for AFM in bigip_provision
* Add device rebooting for provisioning as necessary
* Refactored route domain module to be inline with current f5 conventions
* Minor refactors across modules
6 years ago
John R Barker 7c4b91844d
More validate module fixes (#39097)
* Fix type bool DOCUMENTATION issues
6 years ago
Tim Rupp 39e4754fc9
Fixes for convention incompatibilities (#39209)
Minor fixes for the f5 modules to use current conventions
6 years ago
Tim Rupp e254121729
Adds minor fixes and features to f5 modules (#39202)
* Add Mac_address parameter to bigip_traffic_group
* Fix docs
* Fix f5 conventions
6 years ago
Pierre-Louis Bonicoli afef20827b openshift_raw & openshift_scale: fix broken import 6 years ago
Pierre-Louis Bonicoli 5d72f29b1a Remove passing file from import skip list. 6 years ago
Tim Rupp 19d229a8e0
Fixes F5 conventions and adds features (#39189)
This patch fixes a number of convention changes in F5 modules.
Additionally, it adds some features to bigip vlan and other modules
6 years ago
Pierre-Louis Bonicoli 2f535a339c azure_rm_storageaccount: fix broken import 6 years ago
Matt Clay 9e8889bb70
Fix more docs errors. (#39051)
* Fix remaining unknown-document docs errors.
* Fix last toc-tree-missing-document docs error.
6 years ago
Matt Clay 7e96421132
Handle warnings in docs-build sanity test. (#39043) 6 years ago
Thierry BOUVET 4117b2dd29 Fix documentation fragments for docker (#38378) 6 years ago
Nathaniel Case 3b3c72f3e5
Fix use of bytes in cliconf plugins for Python 3 (#37715)
* Remove raw byte-strings from cliconf plugins of supported platforms + edgeos

Remove uses of to_bytes, too

* Update CliConfBase docstring to reflect current position on byte strings
6 years ago
saichint 1d975bdc93 fix nxos_ntp_options (#38695) 6 years ago
Matt Clay 8a223009ca
Improve handling of integration test aliases. (#38698)
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
6 years ago
Matt Clay 26fa3adeab Add docs-build sanity test. 6 years ago
saichint ed42331105 fix nxos_igmp_snooping issues (#38566)
* fix nxos_igmp_snooping issue

* shippable error fix
6 years ago
John R Barker 38491fe93d
Explicitly exclude W504 (#38539)
pycodestyle 2.4 has changed the default for W504
6 years ago
Matt Martz 6332beef65
Add unit tests for ansible.module_utils.urls (#38059)
* Start of tests for ansible.module_utils.urls

* Start adding file for generic functions throughout urls

* Add tests for maybe_add_ssl_handler

* Remove commented out line

* Improve coverage of maybe_add_ssl_handler, test basic_auth_header

* Start tests for open_url

* pep8 and ignore urlopen in test_url_open.py tests

* Extend auth tests, add test for validate_certs=False

* Finish tests for open_url

* Add tests for fetch_url

* Add fetch_url tests to replace-urlopen ignore

* dummy instead of _

* Add BadStatusLine test

* Reorganize/rename tests

* Add tests for RedirectHandlerFactory

* Add POST test to confirm behavior is to convert to GET

* Update tests to handle recent changes to RedirectHandlerFactory

* Special test, just to confirm that aliasing http_error_308 to http_error_307 does not cause issues with urllib2 type redirects
6 years ago
jhawkesworth ad94d03ba1 Tolerate win line endings on windows module_util load (#37291)
* tolerate windows line endings when loading windows module utils.  Helpful for old custom windows modules.

* add test modules to demonstrate win line ending module load behaviour.

* attempt to fix sanity check failures

* pep8 fix

* explict skip of test modules from shebang check (core modules must still have expected unix style line endings)

* switch to rstrip() following core team meeting feedback
6 years ago
Jordan Borean f37a44430f win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets (#37897)
* win_service: fix when dealing with paths with special chars and change WMI to CIM cmdlets

* compare username in lowercase for test
6 years ago
René Moser b06dfbec54
cs_user: fix E325 (#38158) 6 years ago
Matt Martz ffbbb5a25b
Use arg_spec type for comparisons on default and choices (#37741)
* Use arg_spec type for comparisons on default and choices

* Further improve type casting

* Make sure to capture output in more places

* Individually report invalid choices

* Update ignore.txt after resolving merge conflicts
6 years ago
saichint 0df5cfd41f fix nxos_static_route issues (#37614)
* fix nxos_static_route issues

* remove nxos_static_route from ignore
6 years ago
Matt Clay 0dade18f43 Fix yamllinter handling of tuple assignment. 6 years ago
Dag Wieers 2c2f335893
win_psexec: Fix pslint issues (#37718) 6 years ago
Dag Wieers de5fb66026
win_product_facts: Fix pslint issues (#37722) 6 years ago
Dag Wieers fdc0e5c5fb
win_defrag: Fix pslint issues (#37719) 6 years ago
Dag Wieers f78b415db0
win_wakeonlan: Fix pslint issues (#37717) 6 years ago
Matt Clay 307d8b5330 Disable PowerShell null comparison test.
Too many false positives due to unknown types.
6 years ago
Matt Clay 05220d693d
Complete updates of remaining code-smell tests. (#37743)
* Add text/binary file support to code smell tests.
* Enhance line-endings code smell test.
* Enhance no-smart-quotes code-smell test.
* Enhance shebang code-smell test.
6 years ago
Matt Clay 8daa80e5bb Move var precedence check to integration tests. 6 years ago
Matt Clay 775539a8b8 Fix api_profile choices in Azure docs fragment. 6 years ago
Dag Wieers 51662acc6c
Clean up Grafana docs a bit (#37516)
* Clean up Grafana docs a bit

But more is needed, default values, missing choices, proper
descriptions, actual sentences :-)

* Remove validate-modules entries
6 years ago
Dag Wieers cdd21e2170
Clean up module documentation (#36909)
* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
6 years ago
Matt Martz 8980d275a0
Support recursive suboptions schema (#37206)
* Support recursive suboptions schema

* Remove todo line, add voluptuous version constraint
6 years ago
Pilou bc6b96d42e webfaction modules: fix broken import (#35024)
* webfaction_app: fix broken import
* doc: use formatting functions
* webaction_db: fix broken import
* webfaction_domain: fix broken import
* webfaction_mailbox: fix broken import
* webaction_site: fix broken import
* webfaction modules: fix doc
6 years ago
René Moser e1297af18a cs_router: fix missing doc (#37107)
* cs_router: fix missing doc

* update ignore.txt
6 years ago
René Moser 67d8c8f5c6 cs_ip_address.py: fix missing doc (#37109)
* cs_ip_address.py: fix missing doc

* update ignore.txt
6 years ago
René Moser 2559e832df
cloudstack: fix common E324 in docs (#37082)
Notes about precedence of common args.
Partly fixes E324.
6 years ago
René Moser 4705edd1a7
letsencrypt: add new param force (#37077)
* letsencrypt: add new param force to ignore remaining days

* letsencrypt: fix E325
6 years ago
Mikhail Naletov 7d0e1f92f4 [terraform] Support initializing modules and providers at runtime (#36996)
* Fixes #36994

Added function for force initializing modules and providers

Added type for force_init parameter
6 years ago
Matt Martz ca092b5c26
Skip top level args that are the same as args in provider in doc<->arg_spec comparisons (#36911) 6 years ago
Gaurav Rastogi 60e39b9718 Updated the documentation of modules to match argspec including the type setting for bool parameters (#36821) 6 years ago
Matt Clay dc71c2197f
More code-smell sanity test updates. (#36830)
* Add test for missing Azure requirements.
* Improve readability.
* Enhance no-unicode-literals code-smell test.
6 years ago
Matt Clay ac1698099d
Overhaul additional sanity tests. (#36803)
* Remove unnecessary sys.exit calls.
* Add files filtering for code-smell tests.
* Enhance test-constraints code-smell test.
* Simplify compile sanity test.
* Pass paths to importer on stdin.
* Pass paths to yamllinter on stdin.
* Add work-around for unicode path filtering.
* Enhance configure-remoting-ps1 code-smell test.
* Enhance integration-aliases code-smell test.
* Enhance azure-requirements code-smell test.
* Enhance no-illegal-filenames code-smell test.
6 years ago
Matt Clay 60a24bbdaa Pass code-smell paths on stdin. 6 years ago
Mário Santos 8b52006d5c Fix sanity checks in OpenStack docs fragment (#36722)
* Fix sanity checks in OpenStack docs fragment

Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
6 years ago
Ed Costello 2a0c7c4331 Fix documentation of validate_certificates option in aws doc_fragment.
Unignore sanity test failures for AWS modules caused by this common
fragment.
6 years ago
Pilou 07927f52ae filesystem: fix documentation (#36556) 6 years ago
Matt Clay 5b5cba5e50
Update more code-smell tests. (#36570)
* Enhance use-compat-six code-smell test.
* Enhance use-argspec-type-path code-smell test.
* Enhance replace-urlopen code-smell test.
* Enhance boilerplate code-smell test.
* Enhance no-underscore-variable code-smell test.
6 years ago
Matt Clay 891f4f3b2d
Upgrade more code-smell tests. (#36560)
* Enhance no-dict-* code-smell tests.
* Enhance no-basestring code-smell test.
* Enhance no-get-exception code-smell test.
* Enhance empty-init code-smell test.
* Enhance required-and-default-attribute test.
* Remove unused code-smell test.
6 years ago
Jordan Borean ef4f8851dc
win_feature: better error handling to make it easier to debug issues (#36491)
* win_feature: better error handling to make it easier to debug issues

* removed ignroed pslint rules that are no longer needed
6 years ago
John R Barker 5d0ed38e3a
Fixup VMware module docs issues (#36409)
Fix various argspec vs documentation issue
6 years ago
Matt Clay 2b6ac4561b
Add support for enhanced code-smell tests. (#36332)
* Add support for enhanced code-smell tests:

- Path selection handled by ansible-test.
- Optional path filtering based on extension.
- Optional path filtering based on prefixes.
- Optional lint friendly output.

* Enhance no-assert code-smell test.
* Enhance no-tests-as-filters code-smell test.
6 years ago
Matt Clay a9b58b84d8 Fix path handling in validate-modules sanity test. 6 years ago
ABond 591695932e Fix bug in DigitalOcean module_util (#36352) 6 years ago
Abhijeet Kasurde 5242914ae5
Fix digital ocean issues (#36347)
Remove module from ignore lists and some documentation fix in
digital_ocean_block_storage and digital_ocean module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Matt Clay ff922ac2ad Import sanity test for main() in Ansible modules. 6 years ago
John R Barker 365630df65
Update ignore to deal with renamed files (#36323) 6 years ago
Matt Clay 80b55e3742 Add missing validate-modules ignore entries. 6 years ago
Matt Martz 831a9d67d7 Arg spec doc comparison fixes (#36265)
* Ensure we merge doc fragments early, for comparisons

* Perform boolean conversion from arg_spec data too

* Update valdiate-modules ignore.txt due to recent changes
6 years ago
Matt Martz 50adc5409b Add several new doc<->arg_spec checks (#36247)
* Add several new doc<->arg_spec checks. See #18183

* Update ignore.txt for validate-modules
6 years ago
John R Barker 7dfa11cd8a Notice in 2.6 remove in Ansible 2.10 (#36191)
Update the list of allowed removed_in for modules
6 years ago
John R Barker 3e22efa0ba
Ensure docs are valid before checking deprecation (#36160) 6 years ago
John R Barker 17c0d3eae0
Fix more docs vs argspec (#36048) 6 years ago
Jordan Borean a0178b79f1
win_uri: fixes (#35487)
* win_uri: moved away from Invoke-WebRequest and fixed multiple issues

* fixes from review
7 years ago
Pilou 54882d4715 dimensiondata: fix broken import (#35634)
* Fix broken import

* Remove never reached statements

exit_json and fail_json methods call sys.exit, subsequent statements
can not be executed.
7 years ago
Toshio Kuratomi 86242e6871
Enable wildcard import pylint (#35786)
* Wildcard imports should be taken care of.  Enable the pylint check for them
* Remove wildcard import code-smell test as we're now checking via pylint
* Add unused-wildcard-import as ignored in our compat code.

These three files use wildcard imports so that they can export
symbols in a compatible location.  The real code lives elsewhere.
So disable the pylint tests for the relevant sections of code.
7 years ago
Toshio Kuratomi a5b80464df Fix packaging/os modules for wildcard imports and get_exception 7 years ago
Abhijeet Kasurde 1119709b56 Remove get_exception from modules
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Pierre-Louis Bonicoli 2646ea9b86 yum_repository: Python 3.7 error have been fixed
See 232dc7110c
7 years ago
Toshio Kuratomi 4a48fdba1d
Update code smell blacklists (#35621)
Update blacklist for get_exception, boilerplate, and no-wildcard.

f5, lenovo, and junos have updated their code.
7 years ago
Matt Clay b9c5147be2
Move import sanity test files into own directory. (#35593) 7 years ago
Matt Clay 2d565d14ed Add pslint sanity test settings.
Globally ignore rule: PSUseShouldProcessForStateChangingFunctions
7 years ago
Jordan Borean 62b87bc925
change .encode to to_bytes (#35522)
ignore backup dir in test integration targets folder
7 years ago
Matt Martz c282e4e00f
Replace LooseVersion comparison with int/float comparison. Fixes #35435 (#35519) 7 years ago
Matt Martz f659cc5963
Guard against assignments that are not ast.Name in docs parsing (#35513) 7 years ago
John R Barker a23c95023b
Module deprecation: docs, scheme and tests (#34100)
Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
7 years ago
Jordan Borean 4da19f2d6b Added code-smell check to verify filenames are allowed with Windows (#35436) 7 years ago
Matt Clay 7abdab6c9e Convert ansible-test compile into a sanity test. 7 years ago
Pilou 0ce8d389a4 azure_rm_dnsrecordset: fix broken import and minor updates (#34983)
* fix broken import

Error was:
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py:223:0: NameError: name 'ARecord' is not defined

* doc: use formatting functions

* remove unused dict
7 years ago
Dag Wieers 417accf88d Skip parameters that are being deprecated (#35319)
* Skip parameters that are being deprecated

So in most cases when parameters are deprecated, you may not want to
advertise them in the documentation. One reason for this is because
these parameters were not introduced within Ansible but predate
upstreaming them.

So this change avoids reporting parameters that are not documented and
are deprecated. It's only a small subset of the existing E322 errors.

* Add support for E323 with these changes

* Unsure about the other issues now

* Add better error message with E321

* Restore some erroneously remove files

* Readd false positives to ignore.txt
7 years ago
Matt Clay e0010f15e4 Add pslint sanity test. (#35303)
* Add pslint sanity test.

* Fix `no-smart-quotes` sanity test.

* Add docs for `pslint` sanity test.
7 years ago
Matt Clay cc65636a10 Add PSScriptAnalyzer to default container. 7 years ago
Colins-Git 7fac5cd7d2 Support for creation and modification of bridge and bridge slaves for nmcli (#34071)
Fixes: #31737
7 years ago
Dag Wieers 46e53f90a7
ACI: Rename aci_intf_policy_* to aci_interface_policy_* (#35170)
* ACI: Rename aci_intf_policy_* to aci_interface_policy_*

* Modify documentation accordingly

* Fix validity ignore file
7 years ago
Dag Wieers fa5adabcbf
aci_rest: Additional notes and simplify examples (#35091)
Add additional notes, improve examples
7 years ago
Tim Rupp ca8982f96c
Fixes some bugs and things (#35122)
Removes deprecations and fixes bugs.
7 years ago
Matt Martz f9c2c9570d
Clean up imports to prevent issues with mutable data being used in modules (#35112)
* Clean up imports to prevent issues with mutable data being used in modules

* Remove un-needed mock
7 years ago
Matt Martz 3742ff9230
Fix CaptureStd in validate-modules to work on both py3 and py2 (#35060) 7 years ago
Dag Wieers 2fd5a99989
ACI: Fix validate-module tests E322 and E323 (#35052) 7 years ago
John R Barker 9a32f5c889 Add missing extends_documentation_fragment (#35013)
NXOS modules need more work, though that will all be in
module_docs_fragments/nxos.py
7 years ago
Matt Martz 3c400c5899
ANSIBLE_METADATA doesn't support YAML currently, change 315 to invalid data type (#35009) 7 years ago
Matt Martz a352d43824
Compare arg+aliases between docs and argument_spec (#34809)
* compare arg+aliases between docs and argument_spec

* Add some special handling for the network modules provider options that also appear in the top level arg spec

* Fix error code for bigip_hostname

* Address merge conflicts due to changes in f5 modules

* Update validate-modules ignore based off a clean execution

* Address merge conflicts

* Address renamed module

* Address recent changes to modules

* Add ignore for ucs_ip_pool

* Update aci modules to get more reliable documentation comparison, but not mutating the module_utils aci_argument_spec

* Update ignore.txt after recent aci updates

* Add extra guard to ensure we handle provider special only for network modules

* Address additional changes to modules
7 years ago
Matt Clay 227ff61f9d
Add module support to yamllint sanity test. (#34964)
* Add module support to yamllint sanity test.
* Fix duplicate keys in module RETURN docs.
* Fix syntax in return_common docs fragment.
* Fix duplicate keys in module EXAMPLES docs.
7 years ago
Brian Coca bbd6b8bb42 Temporary (#31677)
* allow shells to have per host options, remote_tmp

added language to shell
removed module lang setting from general as  plugins have it now
use get to avoid bad powershell plugin
more resilient tmp discovery, fall back to `pwd`
add shell to docs
fixed options for when frags are only options
added shell set ops in t_e and fixed option frags
normalize tmp dir usag4e

- pass tmpdir/tmp/temp options as env var to commands, making it default for tempfile
- adjusted ansiballz tmpdir
- default local tempfile usage to the configured local tmp
- set env temp in action

add options to powershell
shift temporary to internal envvar/params
ensure tempdir is set if we pass var
ensure basic and url use expected tempdir
ensure localhost uses local tmp
give /var/tmp priority, less perms issues
more consistent tempfile mgmt for ansiballz
made async_dir configurable
better action handling, allow for finally rm tmp
fixed tmp issue and no more tempdir in ballz
hostvarize world readable and admin users
always set shell tempdir
added comment to discourage use of exception/flow control

* Mostly revert expand_user as it's not quite working.

This was an additional feature anyhow.

Kept the use of pwd as a fallback but moved it to a second ssh
connection.  This is not optimal but getting that to work in a single
ssh connection was part of the problem holding this up.

(cherry picked from commit 395b714120522f15e4c90a346f5e8e8d79213aca)

* fixed script and other action plugins

ensure tmpdir deletion
allow for connections that don't support new options (legacy, 3rd party)
fixed tests
7 years ago
Matt Martz 19ab882790
Fix inconsitencies between code assumptions and schema (#34901)
* Fix inconsitencies between code assumptions and schema

* Address a couple of RETURN issues, where the description was parsed as a dict
7 years ago
jctanner b10d5f34ea Extend validate-modules to check the next to last line (#34819)
* Add validation for the next to last line of a module

* Fix last error code

* Reduce to a single conditional

* Fix conditionals

* Move the final warnings statement to main() in mysql_replication
7 years ago
Tim Rupp c548ab0f18
Refactors and deprecation removals (#34830)
This patch is primarily a refactor to make the validate-modules arg-spec
no longer generate a traceback. It additionally includes removal of deprecated
code in the virtual server module.
7 years ago
Tim Rupp a10aee0fc3
Adds refactors for more f5 modules (#34824)
The main patch is to remove the traceback generating code. There are
other small fixes that were made in addition to doing that.

* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
7 years ago
Tim Rupp 0e4e7de000
Various F5 related fixes for traceback raising (#34820)
The main purpose of this patch is to do the refactor that
supports replacing tracebacks with fail_json. Additionally, the
following was done.

* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
7 years ago
Tim Rupp eace686044
Various fixes and changes for F5 (#34817)
Primarily, this patch contains refactors to remove tracebacks that
are generated when libraries are missing. There is also,

* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg. Minor bug fixes made during this refactor.
7 years ago
Tim Rupp 44a5b3abb4
Various fixes (#34815)
This patch was primarily an effort to reduce traceback errors for
work that sivel was doing. Part of (and in some cases in addition to)
that, the following was done.

* Removed re-def of cleanup_tokens.
* Changed parameter args to be keywords.
* Changed imports to include new module_util locations.
* Imports also include developing (sideband) module_util locations.
* Changed to using F5Client and plain AnsibleModule to prevent tracebacks caused by missing libraries.
* Removed init and update methods from most Parameter classes (optimization) as its now included in module_utils.
* Changed module and module param references to take into account the new self.module arg.
* Minor bug fixes made during this refactor.
7 years ago
Dag Wieers 628eca85c3
ACI: Fixing new pylint issue (#34775) 7 years ago
Dag Wieers 83b7ec69fc
Fix pylint issue (#34773) 7 years ago
Dag Wieers 03dd3214b4
Fix new pylint issue (#34772)
Is it all worth it ?
7 years ago
Pilou 00332a49d5 ec2_win_password: fix broken import and minor updates (#34479)
* fix broken import

* ansible.module_utils.ec2.HAS_BOTO is already used

* wait_timeout parameter: use 'int' type

* wait is always True there

* doc: use formatting function
7 years ago
Matt Martz dcc05093db Validate modules arg spec fixes (#34477)
* Update validate-modules arg_spec introspection to be faster, by only mocking the imports we explicitly list
* The use of types.MethodType in redhat_subscription wasn't py3 compatible, use partial instead
* Remove argument_spec import hacks, make them errors, we can ignore them with ansible-test
* Enable the --arg-spec flag for validate-modules
7 years ago
Matt Clay 96e5cce5ea Ignore pylint errors. 7 years ago
Matt Clay 74ac1c2e4a Test cleanup. 7 years ago
Matt Clay 2d4a43bb0a
Add file+rule ignore support to validate-modules. (#34757)
* Clean up code.
* Add file+rule ignore support to validate-modules.
7 years ago
Kedar Kekan 08957cf46e
cliconf and netconf refactor of iosxr_logging (#34495)
* * cliconf and netconf refactor of iosxr_logging

* * documentation issue fix

* * adds required_if and mutually_exclusive in arg spec
7 years ago
Matt Clay 513e0547b9 Fix version_added validation when empty. 7 years ago
Matt Clay 784360385e Remove already fixed Python 3.7 pylint ignores. 7 years ago
Matt Clay 797664d9cb Python 2.6 `str.format()` compatibility fixes. 7 years ago
Chris Houseknecht 623ff39443
Separate common and raw (#34563) 7 years ago
Matt Clay 85761d1291 Add ignore lines for string_format pylint plugin. 7 years ago
Matt Martz 8c1353537d Add string_format pylint plugin. 7 years ago
Matt Clay aff16225eb Add per file+rule pylint ignore to ansible-test. 7 years ago
Pilou e9a5ff912a nxos_file_copy: fix broken import and 2.6 compatibility (#34480)
* Fix broken import: paramiko could be missing

* doc: use formatting function

* Use Python 2.6 compatible format string
7 years ago
Matt Clay ccbd788f6b Remove passing files from import skip list. 7 years ago
Pilou bd38359ddc gcdns_zone: fix broken import (#34076)
* fix broken import
* whole project requires Python >= 2.6
7 years ago
Matt Martz 70b31abf85
Fix tests as filters 5 (#34406)
* Address recent tests as filters in win_iis_webbinding tests

* Make no-tests-as-filters.py so that it is executed
7 years ago
Abhijeet Kasurde 2b6af10982 Misc. fix for typo (#34262)
Changed 'assginment' to 'assignment'

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Martz 57575d1cfa
Fix tests as filters #4 (#33930)
* Resolve newly added tests as filters

* Add code smell to test for ansible provided jinja tests as filters syntax

* Add docs for no-tests-as-filters code smell test

* Address tests as filters in new integration tests

* Address feedback

* Address feedback 2
7 years ago
Pilou 459adf8966 ios_static_route: fix broken import (#34133)
* Fix broken import

* doc: add ipaddress in requirements
7 years ago
Pilou 4713d9ea44 ce_file_copy: fix broken import (#34023)
* fix broken import

* doc: use formatting functions
7 years ago
Pilou 107934241e gcdns_record: fix broken import (#34024) 7 years ago
Will Thames 5f29cd5e60 Add validation test for new copyright (#32919)
* Update validation test for new copyright

Ensure new modules without the new copyright header fail
validation
Ensure existing modules without copyright in top 20 lines fail

* Add documentation of 108 error

Create label in developing modules documentation so that
the validation page can point to it

* Ensure new style copyright header passes test!
7 years ago
Pilou 85871da03d consul_acl: fix broken import (#33729) 7 years ago
Pilou 02e965ba20 maven_artifact: fix broken import (#33749)
* Fail when lxml isn't available

* whole project requires Python >= 2.6
7 years ago
Pilou b6528ea19f ovirt_disk: fix Python 3 compatibility (use six) (#33730) 7 years ago
John R Barker 18529a275b Bulk pep8 fixes - hand crafted (#33690)
* Bulk pep8 fixes - hand crafted

Fix by hand the remaining issues that autopep8 couldn't

* Next batch of hand crafted pep8 fixes

* Ignore W503

https://github.com/PyCQA/pycodestyle/pull/499

* Revert more of W503
7 years ago
John Barker 10cd2cd1b7 Manually fix issues that autopep8 introduced
* iam.py 161 -> 160 chars
* lamba -> single line function -> multiline function

Avoid redefining key

iam line length

iam.py now clean
7 years ago
John Barker c57a7f05e1 Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues

Generated using:
autopep8 1.3.3 (pycodestyle: 2.3.1)
autopep8 -r  --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules

Manually fix issues that autopep8 has introduced
7 years ago
Kedar Kekan 2bc4c4f156
IOS-XR NetConf and Cliconf plugin work (#33332)
*  - Netconf plugin addition for iosxr
 - Utilities refactoring to support netconf and cliconf
 - iosx_banner refactoring for netconf and cliconf
 - Integration testcases changes to accomodate above changes

* Fix sanity failures, shippable errors and review comments

* fix pep8 issue

* changes run_command method to send specific command args

* - Review comment fixes
- iosxr_command changes to remove ComplexDict based command_spec

* - Move namespaces removal method from utils to netconf plugin

* Minor refactoring in utils and change in deprecation message

* rewrite build_xml logic and import changes for new utils dir structure

* - Review comment changes and minor changes to documentation

* * refactor common code and docs updates
7 years ago
Matt Clay 90ac38bd4c Fix module validator handling of empty options. 7 years ago
Dag Wieers af59817850 pkg5: PEP8 compliancy and documentation changes (#33559)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers aec8e7784a urpmi: PEP8 compliancy and documentation changes (#33560)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers ff50b7893c
rpm_key: PEP8 compliancy and documentation changes (#33426)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers fbfeeff6bf
apt_repository: PEP8 compliancy and documentation changes (#33429)
* apt_repository: PEP8 compliancy and documentation changes

This PR includes:
- PEP8 compliancy changes
- Documentation changes

* Fix merge issue
7 years ago
Dag Wieers c4ef5bb922
apt_key: PEP8 compliancy and documentation changes (#33427)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 2416a8806d apt: PEP8 compliancy and documentation changes (#33425)
This PR includes:
- PEP compliancy changes
- Documentation changes
7 years ago
Ganesh Nalawade 11c9ad23d5
Refactor common network shared and platform utils code into package (#33452)
* Refactor common network shared and platform specific code into package (part-1)

As per proposal #76 refactor common network shared and platform specific
code into sub-package.
https://github.com/ansible/proposals/issues/76

*  ansible.module_utils.network.common - command shared functions
*  ansible.module_utils.network.{{ platform }} - where platform is platform specific shared functions

*  Fix review comments

* Fix review comments
7 years ago
Dag Wieers 5b5d767c0b apt_rpm: PEP8 compliancy and documentation changes (#33431)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Toshio Kuratomi 7bd0af15d2
Enhance empty __init__ code-smell to check module_utils (#33438)
Empty __init__ will allow us to use python namespaces with all of these
files.  That may be something we want to take advantage of for allowign
them to be expanded by user dirs.  Also might be needed for AnsiballZ or
other wrapper enhancements in the future.
7 years ago
Dag Wieers e0c94aa6a7 yum: PEP8 compliancy and documentation changes (#33424)
This PR includes:
- PEP8 compliancy changes
- documentation changes
7 years ago
Matt Clay c6bb6c72cc Fix anomalous backslashes and enable pylint test. 7 years ago
Matt Clay e45c763b64 Fix invalid string escape sequences. 7 years ago
Matt Clay f9cd50411f Enable Python 3.7 in ansible-test. 7 years ago
Dag Wieers b3e4a88b90 consul_session: PEP8 compliancy and documentation changes (#33000)
THis PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 5f36932adf pacemaker_cluster: PEP8 compliancy and doc changes (#33001)
This PR includes:
- PEP8 compliancy changes
- DOcumentation changes
7 years ago
Dag Wieers 3089892e59 sl_vm: PEP8 compliancy and documentation changes (#32657)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Matt Martz 99d4f5bab4 Remove uses of assert in production code (#32079)
* Remove uses of assert in production code

* Fix assertion

* Add code smell test for assertions, currently limited to lib/ansible

* Fix assertion

* Add docs for no-assert

* Remove new assert from enos

* Fix assert in module_utils.connection
7 years ago
Mike Wiebe fedd1779cc Add ISSU capability and fix workflow bug for nxos_install_os module (#32540)
* Initial issu support

* Enhance ISSU support

* Additional refactoring to simplify code flow

* Remove debugs and bug fixes

* Update doc example output

* Update provider line in task example

* Remove unneeded else clause and comments

* Fix ansible-doc errors

* Satisfy ansibot requirements

* Update header docs

* Update nxos_install_os.py
7 years ago
Prasad Katti 306c3508b2 Deprecate ec2_ami_find (#32501) 7 years ago
Dag Wieers 59c30595c1
stacki_host: PEP8 compliancy and documentation changes (#32651)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Anil Kumar Muraleedharan 8e081b7e30 Moving modules from lenovo to cnos (#31401)
* Moving modules from lenovo to cnos

* Merge conflicts

* Update cnos_conditional_template.py

Removed
180:5: E265 block comment should start with '# '
188:34: E226 missing whitespace around arithmetic operator

* Update cnos_template.py

155:5: E265 block comment should start with '# '
162:34: E226 missing whitespace around arithmetic operator

* Update cnos_vlan.py

210:1: E302 expected 2 blank lines, found 1

* Update cnos_backup.py

Adding 
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_bgp.py

Added
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_backup.py

Added a line extra

* Update cnos_command.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_conditional_command.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_conditional_template.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_factory.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_facts.py

Adding 
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_image.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_interface.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_portchannel.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_reload.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_rollback.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_save.py

Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_showrun.py

Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_template.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_vlag.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_vlan.py

Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

* Update cnos_backup.py

Moving it to top of file

* Update cnos_backup.py

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Moving future and metaclass to top

* Putting condition to bye pass paramiko

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

*  Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Condition to byepass paramiko import error

* Removing unused import and white spaces

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Dealing with white space and import issues

* Update cnos_template.py
7 years ago
Toshio Kuratomi 0b320ba15c Generate whitelist of current files using underscore variable and enable test 7 years ago
Dag Wieers c737e93a34 netscaler: PEP8 compliancy and documentation changes (#32653)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 56eb997bae cs_nic: PEP8 compliancy and documentation changes (#32655)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 90b867b7a5 bigip_virtual_server: PEP8 compliancy and documentation fixes (#32652)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 10bfa89f06 zfs: PEP8 compliancy and documentation changes (#32648)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Dag Wieers 9d156c6cb1
docker: PEP8 compliancy and documentation changes (#32628)
This PR includes:
- PEP8 compliancy changes
- Documentation changes
7 years ago
Nikhil Kathole 585ecc2867 gce: PEP8 compliancy Fixes (#32311)
* gce: PEP8 compliancy Fixes

* Documentation updates

* Documentation updates

* Documentation update
7 years ago
Yadnyawalkya Tale d21a6aa147 Ansible system module: sanity pep8 fixes (#32314)
* Ansible system module: pep8 fixes

* Clean up documentation

* Blank line change not required by PEP8

* Update legacy-files.txt

* Documentation updates

* Update documentation

* Documentation update
7 years ago
Satyajit Bulage 1857d11034 ovirt: PEP8 compliancy fixes (#32316)
* ovirt: PEP8 compliancy fixes
This PR includes:
- PEP8 compliancy fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>

* Improve documentation

* Update documentation

* Update documentation

* Update documentation

* Fix legacy-files.txt

* Update documentation

* Fix PEP8 issue

* Fix PEP8 issue

* Fix another PEP8 issue

* More typo fixes

* Yet another PEP8 typo
7 years ago
Yadnyawalkya Tale a2d34e914e PEP8 fixes: Ansible system module and playbook base.py (#32322)
* Ansible files module sanity pep8 fixes

* Ansible system module and playbook base.py

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Undo empty lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank lines not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Undo blank line changes not required by sanity checks

* Various changes

* Various changes

* Various changes

* Various changes

* Various changes

* Missing piece after merge

* Blank lines

* Blank line

* Line too long

* Fix typo

* Unnecessary quotes

* Fix example error
7 years ago
Yadnyawalkya Tale fcab13a668 PEP8 fixes: Ansible source_control module (#32323)
* PEP8 fixes: Ansible source_control module

* Some more cleanup changes

* More cleanups

* Fix copyright statement
7 years ago
Abhijeet Kasurde b5f1fc850b Allow user to specify maintenance DB (#32510)
This fix allows user to specify alternative maintenance DB
required for initial connection in Postgresql_db module.
Also, adds pep8 related fixes.

Fixes: #30017

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Dag Wieers 9a6615a905
Make newer stuff PEP8 compliant (#26951)
So we fixed everything that was not a module to be PEP8 compliant, and
in the meantime these 5 new files were additionally disabled from PEP8
testing.

This fixes it.

Also update Copyright/License statements.
7 years ago
Tim Rupp 06363f6ede
Removes bigip_snmp from skip file (#32530) 7 years ago
Tim Rupp 53940670fd
Removes bigip_qkview from skip file (#32529) 7 years ago
Tim Rupp 45787f6ef2
Removes bigip_provision from skip file (#32525) 7 years ago
Tim Rupp 64871470e2
Removes bigip_pool from the skip file (#32516) 7 years ago
Tim Rupp ab71a9de14
Removes bigip_irule from the skip file (#32509) 7 years ago
Tim Rupp 6b6df43eae
Removes bigip_iapp_template from the skip file (#32488) 7 years ago
Tim Rupp 015baf5149
Removes bigip_iapp_service from skip list (#32482) 7 years ago
Tim Rupp cbc5c2d556
Removes bigip_hostname from skip file (#32479) 7 years ago
Tim Rupp d5d4683047
Removes bigip_snmp_trap from skip file (#32470) 7 years ago
Tim Rupp e3f1198a67
Removes bigip_ucs from skip file (#32462) 7 years ago
Abhijeet Kasurde 51c5b51ea3 Handle error message from psycopg2 using to_native (#32371)
This fix adds handling of error/exception message using
to_native API instead of decoding.
Also, fixes PEP8 errors.

Fixes: #31825

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Tim Rupp c239749052
Removes bigip_user from skip file (#32451) 7 years ago
Tim Rupp 83674af284
Removes virtual_address from skip file (#32425) 7 years ago
Sébastien DA ROCHA bc4ba6b638 Iptables unit tests (#30762)
* Add some tests for iptables

* Fix remove bug (calls 2 times check to remove a chain)

* Add me as maintainer

* Fix PEP8

* Doc: Give more information on issue #18988

* Fix #18988 and test it

* Fix doc (thanks Pillou)

* enable PEP8 check for iptables
7 years ago
Tim Rupp fc4580b4cc
Removes bigip ssl certificate from skip file (#32424) 7 years ago
Tim Rupp 6193d5bc65
Removes gtm wide ip from skip file (#32422) 7 years ago
Tim Rupp 8868b5fa85
Removes gtm pool from skip file (#32419) 7 years ago
Tim Rupp daaf8ca86c
Fixes skip imports for bigip_configsync_action module (#32413) 7 years ago
Tim Rupp 8f2b243a3e
Fixes bigip_config to remove from skip file (#32409) 7 years ago
Tim Rupp 8c5cd9c530
Removes bigip_command from the skip file (#32407)
Includes fixes and enhancements to make it unnecessary to include this
module in the skip file
7 years ago
Satyajit Bulage 52aa522c19 google: PEP8 compliancy fixes (#32309)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes

Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
7 years ago
nilhase25 1a43038bc2 Pep8 aos login.py (#32312)
* fix pep8 issue in consul_kv.py

* fix pep8 issue in aos_login.py
7 years ago
nilhase25 9cff2c376b fix pep8 issue in consul_kv.py (#32310) 7 years ago
Dag Wieers 005c1ce7ba
Sort the PEP8 legacy files (#32339) 7 years ago
Dag Wieers 16bbc19674
subversion: PEP8 compliancy and doc fixes (#30909)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 86bb82a220
user: PEP8 compliancy and doc fixes (#30895)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 63edeb1644
systemd: PEP8 compliancy and doc fixes (#30892)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 8b2bf09c49
service: PEP8 compliancy and doc fixes (#30890)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers edc0ff481c
seboolean: PEP8 compliancy and doc fixes (#30888)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 32775b0caa
hostname: PEP8 compliancy and doc fixes (#30886)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 3ae42afbc7
getent: PEP8 compliancy and doc fixes (#30885)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 11f8d9659d
at: PEP8 compliancy and doc fixes (#30881)
This PR includes:
- PEP8 compliancy fixes
- Documentation changes
7 years ago
Dag Wieers c46401e41f
tempfile: PEP8 compliancy, pylint and docs (#30859)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers f64a8f58a3
synchronize: PEP8 compliancy, pylint and docs (#30858)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 19c3c7fe44
blockinfile: PEP8 compliancy, pylint and docs (#30845)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers fb18e27d87
assemble: PEP8 compliancy, pylint and docs (#30844)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 0129b96065
archive: PEP8 compliancy, pylint and docs (#30842)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Aniket Khisti 27694f6909 PEP8 compliancy for os_server_volume module (#32306) 7 years ago
Sloane Hertel c714da7fac cloudformation_facts: don't fail on nonexistent stack - fixes #23419 (#23758)
* Allow cloudformation_facts to exit gracefully if stack does not exist

make cloudformation_facts pep8

remove from legacy files

remove unnecessary if statement

Allow cloudformation_facts to exit gracefully if stack does not exist version 2

fix documentation errors

add an example for a hard-fail if a stack doesn't exist

* Remove extra whitespace

* Use the .response attribute since .message isn't present with Python 3

* Don't fail if no stack name is provided and no stacks exist.
7 years ago
Matt Clay cf1337ca9a Update ansible-test sanity command. (#31958)
* Use correct pip version in ansible-test.
* Add git fallback for validate-modules.
* Run sanity tests in a docker container.
* Use correct python version for sanity tests.
* Pin docker completion images and add default.
* Split pylint execution into multiple contexts.
* Only test .py files in use-argspec-type-path test.
* Accept identical python interpeter name or binary.
* Switch cloud tests to default container.
* Remove unused extras from pip install.
* Filter out empty pip commands.
* Don't force running of pip list.
* Support delegation for windows and network tests.
* Fix ansible-test python version usage.
* Fix ansible-test python version skipping.
* Use absolute path for log in ansible-test.
* Run vyos_command test on python 3.
* Fix windows/network instance persistence.
* Add `test/cache` dir to classification.
* Enable more python versions for network tests.
* Fix cs_router test.
7 years ago
Daniel Shepherd 8aeb239f73 [cloud] Update ec2_vpc_net_facts to use Boto3 (#25375)
* update ec2_vpc_net_facts module to boto3

updated with RETURN values and other requested changes

removed errant extra blank line

another errant extra line removed...auto-linter not working apparently

updates per review

fix typo in RETURN docs

* fix trailing whitespace issue
7 years ago
Matt Davis 0c34cdd0f7 fix #Requires to be valid in real Powershell (#31858)
* module_utils #Requires should not have .psm1 extension if "real" Powershell will ever execute them
* updated validate-modules to enforce this
* added check to disallow multi-module syntax on Ansible.ModuleUtils #Requires
7 years ago
Tim Rupp 8085c38e05 Refactors the bigip_gtm_facts module (#31917)
Includes pep fixes and inlining code with current conventions
7 years ago
Matt Clay 36b13e3e3d Fix ansible-test default image. (#31966)
* Add openssh-client to default docker container.
* Include Azure requirements in default container.

To do so, handling of pip requirements was updated to install each
set of requirements separately and then run a verification pass to
make sure there are no conflicts between requirements.

* Add missing --docker-no-pull option.
* Add documentation for the azure-requirements test.
7 years ago
Matt Clay f76afab6e5 Add new default Docker container for ansible-test. (#31944)
* Add new default Docker container for ansible-test.
* Update ansible-test change classification.
* Update list of disabled pylint rules.
* Fix pylint issues with ansible-test.
7 years ago
Matt Clay 6c3339402a Improve python 2/3 ABC fallback for pylint. (#31848)
* Improve python 2/3 ABC fallback for pylint.
* Allow longer method names in ansible-test.
7 years ago
Matt Clay f012c94fa5 Handle bad options syntax in validate-modules. 7 years ago
Eike Frost 1b71fb0499 fix legacy PEP8 violations in zabbix modules, remove test exception for them (#31702)
* fix legacy PEP8 violations in zabbix_*, remove test exception for them

* fix new pep8 violations for zabbix_maintenance.py
7 years ago
René Moser 8b8d5aaca7 cs_instance: remove CloudStackException dep (#31724)
- fixes dep
- fix docs
7 years ago
Pilou 840a57a4ed s3_sync: fix broken import (#31460) 7 years ago
Abhijeet Kasurde 9d811a34c4 pep8 fixes for vmware modules (#31537)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
René Moser 540d53327d cs_instance_facts: fix pep8 (#31606) 7 years ago
Toshio Kuratomi f38b8d9997 Remove boundary_meter module as the hosted service it configured has been removed. (#31506)
References #29387
7 years ago
René Moser e872763877 cs_portforward: remove CloudStackException dep (#31610)
- fixes pep8
- fixes doc
7 years ago
René Moser c1121dd5fb cs_securitygroup_rule: remove CloudStackException dependency (#31603)
- fixes pep8
- fixes docs
7 years ago
René Moser af6e89fbc8 cs_securitygroup: remove CloudStackException dep (#31597)
- fixes pep8
- fixes docs
7 years ago
Rene Moser d6e1f02990 cs_snapshot_policy: remove CloudStackException dependency 7 years ago
Toshio Kuratomi b454115e9f Update test cases
* Remove cloudstack, f5, and nxos from the wildcard import whitelist
* Remove nxos and f5 from the get_exception whitelist
* Remove some files from the pep8 legacy whitelist
7 years ago
Toshio Kuratomi c81314dcb9 Add a hack to test whether type=path should be used in a module 7 years ago
Toshio Kuratomi 5e9384300d Add boilerplate and remove wildcard imports for openstack modules (#31461)
* Add boilerplate and remove wildcard imports for openstack modules
* Remove openstack files that are now pep8 compliant from the legacy list
7 years ago
Sofiane Medjkoune ef72eda172 Adding doc for the description argument of lxd_profile module 7 years ago
Toshio Kuratomi 9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
7 years ago
Pilou 870974e0be ec2_vpc_route_table: fix broken import (#31459) 7 years ago
Pilou 0be8ac6797 ec2_vpc_igw: fix broken import (#31458) 7 years ago
Dag Wieers ae5d8e5ebb modprobe: PEP8 compliancy and doc fixes (#31255)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
- Make module a bit more consistent with existing practices
7 years ago
Matt Clay a333f2e5b0 Fix ansible-test config management. 7 years ago
Dag Wieers 17fbeeb2f0 rhn_channel: PEP8 compliancy and doc fixes (#30912)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 4a358b5396 foreman: PEP8 compliancy and doc fixes (#30910)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Pilou 44f5b2bd25 ansible_tower: fix broken import, reuse tower_argument_spec and documentation fragment (#29115)
* module_utils/ansible_tower: fix broken import

* tower_*: use tower_argument_spec & doc fragment

* tower doc fragment: Ansible requires Python 2.6+

* tower_job_wait: fix broken import (Py3 compat)
7 years ago
Dag Wieers 1241d0a3f4 pip: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers bedfd0a5a4 atomic: PEP8 compliancy and doc fixes (#30918)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Rene Moser d7fa3ab487 cloudstack: cs_template: remove dependency to CloudStackException
* fixes docs
* fixes pep8
7 years ago
Dag Wieers fde4244d04 kubernetes: PEP8 compliancy and doc fixes (#30914)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 0ef87c849f virt: PEP8 compliancy and doc fixes (#30917)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
René Moser b444332412 fix pep8 for cloudscale_server (#30974) 7 years ago
Dag Wieers fd91da7297 pacman: PEP8 compliancy and doc fixes (#30913)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 91bb211922 redis: PEP8 compliancy and doc fixes (#30920)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 125c4b135d mount: PEP8 compliancy and doc fixes
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Will Thames ce2f5d26ab Improve cloudwatchevent_rule exception handling (#30823)
* Fix cloudwatchevent_rule exception handling

Where it is currently present, this change fixes the exception handling.
However, there are many places that it is lacking.

Fixes #30806

* Add new exception handling for cloudwatchevent_rule

Ensure all API calls are wrapped with exception handling

* PEP8 tidy up

* Remove unnecessary HAS_BOTO3 import and checks

Tidy up documentation so that NO_QA can be removed
7 years ago
Dag Wieers c3707aaf37 linode: PEP8 compliancy and doc fixes (#30922)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 4647713be9 cron: PEP8 compliancy and doc fixes (#30884)
This PR includes:
- PEP8 compliancy fixes
- Documentation fixes
7 years ago
Dag Wieers 5175bd8ebd replace: PEP8 compliancy, pylint and docs (#30856)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 989bd1f829 xattr: PEP8 compliancy, pylint and docs (#30861)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Dag Wieers 04b5c17578 ini_file: PEP8 compliancy, pylint and docs (#30851)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
7 years ago
Hervé Beraud 0e9ae5b8cc [fix] no-unicode-literals sanity error on ansible.egg-info (#30446)
* [fix] no-unicode-literals sanity error on ansible.egg-info
7 years ago
Toshio Kuratomi 46e5c48f03 Split ec2_elb_* modules in service of rename/interface changes (#30532)
* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb
7 years ago
Dag Wieers f5dded59c2 mail: Fix charset encoding issue
This PR includes:
- An important fix to charset encoding of from address
- Documentation and examples cleanup
- PEP8 fixes
- Warning on insecure access
- Strict parameter typing
- More modern interface (using lists rather than comma, space or pipe-delimited strings)
- Warn on failure to send mail to some recipients
  ```
   [WARNING]: Failed to send mail to 'foobar': 550 5.1.1 <foobar>:
Recipient address rejected: User unknown in local recipient table
  ```
- Warn on failure to parse some headers
  ```
  [WARNING]: Skipping header 'Foobar', unable to parse
  ```
- Return failed recipients as return value
- Changed default encoding to utf-8
7 years ago
Matt Clay dbf9634b1b Enable more pylint rules and fix reported issues. (#30543)
* Enable pylint invalid-encoded-data test.
* Enable pylint anomalous-unicode-escape-in-string test.
7 years ago
Matt Clay 7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
7 years ago
Toshio Kuratomi c82cf791dd Add a code-smell test for smart quotes and remove smart quotes from all files 7 years ago
Matt Davis 6b5b465125 azure_rm_dnsrecordset rewrite (#30449)
As-merged, had several issues that prevented idempotent usage. Some args were defined at the wrong UI level. Dual-state args didn't match up with typical Ansible UI.
7 years ago
René Moser f128796782 cs_volume: fix CloudStackException dependency (#30389)
fixes pep8
7 years ago
Pierre-Louis Bonicoli e9d202f944 module_utils/avi.py: fix broken import 7 years ago
Nathaniel Case 8c03609e54 nxos_snmp cleanup (#28922)
* Clean up nxos_snmp_contact & nxos_snmp_location

* Bring nxos_snmp_community in line

* Bring nxos_snmp_host in line

* And I would have gotten away with it too,

if it weren't for those meddling sanity tests

* Bring nxos_snmp_traps & nxos_snmp_user in line

* Appease Shippable
7 years ago
Matt Clay 442af3744e Miscellaneous pylint fixes.
The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
7 years ago
John R Barker bc2f4365b5 Correctly validate module name for modules with aliases (#29957)
* Correctly validate module name for modules with aliases

If a module has an alias (ie is a symlink) then we need to ensure that
DOCUMENTATION.module is set to the main name, not the aliased name

* formatting
7 years ago
Matt Clay 68aeaa58a8 Fix dangerous default args. (#29839) 7 years ago
Matt Clay 79bc49e150 Fix ansible-test unicode and sanity tests. (#29743)
* Show warning when using pylint on Python 2.6.
* Add pylint disable entries for Python 2.
* Fix unicode handling in ansible-test.
* Add missing documentation.
7 years ago
Abhijeet Kasurde b5eca624d0 Refactor easy_install module
* PEP8 fix
* Rectified string check in package install command stdout
* Add abadger's code review changes

Fixes #22245

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Adam Miller 75127092f2 refactor firewalld module with object abstraction (#26487)
* refactor firewalld module with object abstraction

This change creates a FirewallTransaction object that each
individual transaction type is a sub-class of as they all follow the
same pattern to enable or disable something in the firewall.

Also, there's a few bugfixes here:
    - Fix the "source" type to handle permanent operations
    - Remove ambiguity of required parameters for only specific use
      cases that can lead to transactions effectively being a no-op.
      Instead, pick sane defaults and document them.
    - Change how imports are done so globals are no longer needed

This is based on the original feedback by Toshio from the last
refactor attempt:

    https://github.com/ansible/ansible-modules-extras/pull/3383

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* fix line too long for pep8 for shippable tests

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>

* remove firewalld from pep8/legacy-files

Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
7 years ago
Toshio Kuratomi ff13d58c14 Remove use of unicode_literals as it is an anti-pattern
from __future__ unicode_literals leads to developer confusion as
developers no longer can tell whether a bare literal string is a byte
string or a unicode string.  Explicit marking as u"" or b"" is the way
to solve the same problem in the Ansbile codebase.
7 years ago
Matt Clay 5953a428a8 Undo accidental addition to skip.txt. 7 years ago
Matt Clay cafd064547 Improve import error handling in azure_rm_common. (#29153)
* Improve import error handling in azure_rm_common.

* Update skip.txt
7 years ago
Matt Clay f88750d665 Expand disabled pylint rules. (#29162)
* Expand disabled pylint rules.
* Fix pylint and unicode issues in ansible-test.
7 years ago
Pierre-Louis Bonicoli 557356c571 module_utils/ovirt.py: fix broken import 7 years ago
Matt Clay e71cddc026 Remove unnecessary import skip entries. 7 years ago
Sam Doran a5ee865634 Update elasticsearch_plugin.py (#28936)
* Update elasticsearch_plugin.py

Change module to work with Elasticsearch 2.x and 5.x automatically.
Update examples and docs.
Supersedes #21989

* Check system paths for elasticsearch-plugin binary

Use get_bin_path from basic.py for searching paths.

* Create a copy of PLUGIN_BIN_PATHS rather than modifying the global

* Use provided plugin_bin path first before trying other places

Change global PLUGIN_BIN_PATHS to a tuple
7 years ago
Abhijeet Kasurde dd9db65a9a PEP8 fixes for smartos module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
pari- 468e71bf71 npm: fix idempotence (#22238)
* npm: fix idempotence

* Better idempotency fix

More intelligently add --production rather than depending on hard coded order in args list
Cleanup boilderplate imports and license
PEP8 fixes
7 years ago
Michael De La Rue fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
7 years ago
Will Thames 63df0adc17 [cloud] Update RDS parameter group for boto3 (#25345)
* Update RDS parameter group for boto3

* Update to boto3
* Update to latest ansible standards
* Remove choices list for valid engines (See #19221 for context)
* Allow tagging
* Return some useful information, and document that information

* Add tests for rds_param_group

* Improve testing of rds_param_group

* Add purge_tags option for rds_param_group

* Fix remaining broken rds_param_group tests

* Ensure the group name is lowercased. Fixes integration tests when run on OSX
7 years ago
Dag Wieers a1876bac9c pkg5_publisher: Fix on failed, PEP8 compliancy (#26019) 7 years ago
George Nikolopoulos 869eee0762 Deprecate citrix/netscaler module (#28280)
* Deprecate citrix/netscaler module

* 	renamed:    netscaler.py -> _netscaler.py

* Fix legacy files list
7 years ago
Will Thames b1df75fc1c [cloud] Return AMI info on ec2_ami module when `changed=false` (#27867)
Fixes #27861
7 years ago
Tomáš Karásek b3a90253fc Improvements in the packet_device module (#23127)
* Improvements and fixes in the packet_device module

* add version_added to new args

* remove default value from facility

* changed 'lock' from deprecated arg to alias of 'locked'
7 years ago
Abhijeet Kasurde be86d77a70 Add check for correct parsing of sysctl (#24540)
* PEP8 fixes
* Refactoring of code
* Check to skip non-comment lines which doesn't
  contain = character

Fixes #24453

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde a572de626c Pep8 fixes for acl module (#24666)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay f8d6c71d09 Remove deleted files from legacy-files.txt. 7 years ago
Dag Wieers 78dfbed2a5 openbsd_pkg: Fix when failed, PEP8-compliant (#26018)
This PR includes:
- PEP8 compliancy
- A fix to ensure the module fails when it failed for a package
- Various cosmetic changes to documentation
- Make `state: present` the default (and not required)
7 years ago
Pilou 016cd0691c alternatives: handle absent link, add integration tests (#27967)
* alternatives: add integration tests

* alternatives: handle absent link (fix AttributeError)

Error occurred at least on Debian Stretch and OpenSuse 42.2:
Traceback (most recent call last):
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 161, in <module>
    main()
  File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 113, in main
    current_path = current_path_regex.search(display_output).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

update-alternatives stdout sample:
dummy - manual mode
  link best version is /usr/bin/dummy1
  link currently absent
  link dummy is /usr/bin/dummy

* alternatives: PEP 8 fixes

* alternatives: fix copyright in integration tests

* alternatives: nested loops handle more than 2 items

Thanks to Michael Scherer (@mscherer) for pointing that.

* alternatives: enable integration tests
7 years ago
Toshio Kuratomi af2073d057 metadata 1.1
* Add network value to support_by field.
* New support_by value, certified
* Deprecate curated in favor of certified
* Add conversion from 1.0 to 1.1 to metadata-tool
* Add supported by Red Hat field to ansible-doc output
7 years ago
Pierre-Louis Bonicoli f69333b80d circonus_annotation: fix broken import, update requirements 7 years ago
Brian Coca f921369445 Ansible Config part2 (#27448)
* Ansible Config part2

- made dump_me nicer, added note this is not prod
- moved internal key removal function to vars
- carry tracebacks in errors we can now show tracebacks for plugins on vvv
- show inventory plugin tracebacks on vvv
- minor fixes to cg groups plugin
- draft config from plugin docs
- made search path warning 'saner' (top level dirs only)
- correctly display config entries and others
- removed unneeded code
- commented out some conn plugin specific from base.yml
- also deprecated sudo/su
- updated ssh conn docs
- shared get option method for connection plugins
- note about needing eval for defaults
- tailored yaml ext
- updated strategy entry
- for connection pliugins, options load on plugin load
- allow for long types in definitions
- better display in ansible-doc
- cleaned up/updated source docs and base.yml
- added many descriptions
- deprecated include toggles as include is
- draft backwards compat get_config
- fixes to ansible-config, added --only-changed
- some code reoorg
- small license headers
- show default in doc type
- pushed module utils details to 5vs
- work w/o config file
- PEPE ATE!
- moved loader to it's own file
- fixed rhn_register test
- fixed boto requirement in make tests
- I ate Pepe
- fixed dynamic eval of defaults
- better doc code

skip ipaddr filter tests when missing netaddr
removed devnull string from config
better becoem resolution

* killed extra space with extreeme prejudice

cause its an affront against all that is holy that 2 spaces touch each other!

shippable timing out on some images, but merging as it passes most
7 years ago
Ivan Bojer 8b617aaef5 Panos object (#28028)
* - deprecated panos_address and panos_service in lieu of common panos_object

* - deprecated/removed panos_address and panos_service in lieu for panos_object

* squash! - deprecated/removed panos_address and panos_service in lieu for panos_object

* - fixed PEP8 issues

* - ansible_metadata requires metadata_version instead of just version key in 2.4

* add > to multi line descriptions

* update version string to 2.4

* Update legacy-files.txt
7 years ago
Nathaniel Case 1d13624eae Clean up nxos_aaa_server (#28177)
* cleanup nxos_aaa_server

* Specify nxos_aaa_server output format

Fixes #27289
7 years ago
Sam Doran 271127113f Add comment option to authorized_key (#27781)
* Add comment option to authorized_keys

* Update version_added for authorized_keys comment

* PEP8

* Include index rank in parsed_key_key

*  Properly display diff

Only display diff if specificed via settings

* Fix PEP8 test failure

Removed from legacy files since it is now properly formatted

* Cleanup integration test formatting and add test for new comment feature

* Correct version_added for new option
7 years ago
Pilou a3f91274b3 circonus_annotation: DOCUMENTATION & argument_spec cleaning (#26832)
* circonus_annotation: clean description

- add 'default' field
- default value for 'required' field is false
- use formatting function

* circonus_annotation: clean argument_spec

remove useless conversion
default of 'required' False
use 'default' when possible

* circonus_annotation: fix pep8

* circonus_annotation: add RETURN block

* circonus_annotation: check_mode isn't supported, add a note
7 years ago
Sam Doran 68060002e8 Rename modules from plural to singular (#27185)
* First batch of modules renamed from plural to singular

Related to this proposal: https://github.com/ansible/proposals/issues/10

* Emit rename deprication warning

* Update legacy-files.txt and skip.txt to reflect new names
7 years ago
Pierre-Louis Bonicoli 4ecf85392e udm_user: fix broken import
Tested with:
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
n = datetime.now()
assert n + timedelta(days=365) == n + relativedelta(years=1)
7 years ago
Pierre-Louis Bonicoli c52f355bcb serverless: fix broken import 7 years ago
Pierre-Louis Bonicoli f761fc1d1f rhn_channel: fix py3 compatibility (use six)
and remove unused import
7 years ago
Pilou feff6abd72 os_client_config: fix broken import (#26839)
* os_client_config: fix broken import
* remove wildcards and add boilerplate
7 years ago
Toshio Kuratomi 7cd81b802d Fix wildcard imports, remove get_exception, add boilerplate
Fixed for monitoring modules
7 years ago
Sloane Hertel aca1950150 iam certificate facts (duplicate): add iam_cert_facts as alias for iam_server_certificate_facts (#25387)
* add iam_cert_facts as alias for iam_server_certificate_facts
* remove from legacy files
7 years ago
Toshio Kuratomi ac56a2f138 Remove wildcard imports and get_exception calls
Fixed module_utils
7 years ago
Sloane Hertel 1de91a9aa0 [cloud] Convert `s3` module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
7 years ago
Abhijeet Kasurde f7321a87ca Pep8 fixes for rabbitmq modules (#24590)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Dag Wieers eee09565b1 utilities modules: PEP8 compliancy (#27741) 7 years ago
Colin Nolan db50650365 Adds support for all Consul 0.8 ACL rule scopes (#25800)
* Added in support for 'agent' and 'node' types.

* Tidies and moves `consul_acl` module closer to PEP8 compliance.

* Switched from using byspoke code to handle py2/3 string issues to using `to_text`.

* Made changes suggested by jrandall in https://github.com/ansible/ansible/pull/23467#pullrequestreview-34021967.

* Refactored consul_acl to support scopes with no pattern (and therefore a different HCL defintion).

* Corrects whitespace in Consul ACL HCL representation.

* Fixes Consul ACL to return the HCL equivalent JSON (according to the Consul docs) for the set ACLs.

* Repositioned import to align with Ansible standard (!= PEP8 standard).

* Adds Python 2.6 compatibility.

* Fixes PEP8 issues.

* Removes consul_acl.py as it now passes PEP8.

* Follows advice in the "Documenting Your Module" guide and moves imports up from the bottom.

* Tidies consul_acl module documentation.

* Updates link to guide about Consul ACLs.

* Removes new line spaces from error message string.

* Provide better error message if user forgets to associate a value to a Consul ACL rule.

* Minor refactoring of Consul ACL module.

* Fixes bug that was breaking idempotence in Consul ACL module.

* Detects redefinition of same rule.

* Adds test to check the Consul ACL module can set rules for all supported scopes.

* Fixes return when updating an ACL.

* Clean up of Consul ACL integration test file.

* Verify correct changes to existing Consul ACL rule.

* Adds tests for idempotence.

* Splits Consul ACL tests into cohesive modules.

* Adds test for deleting Consul ACLs.

* Test that Consul ACL module can set all rule scopes.

* Fixes issues surrounding the creation of ACLs.

Thanks for the comments by manos in https://github.com/ansible/ansible/pull/25800#issuecomment-310137889.

* Stops Consul ACL's name being "forgotten" if ACL updated by token.

* Fixes incorrect assignment when a Consul ACL is deleted.

* Fixes value of `changed` when Consul ACL is removed.

* Fixes tests for Consul ACL.

* Adds interal documentation.

* Refactors to separate update and create (also makes it possible to unit test this module).

* Improves documentation.

* Completes RETURN documentation for Consul ACL module.

* Fixes issue with equality checking for `None` in ACL Consul.

* Fixes Python 2 issue with making a decision based on `str` type.

* Fixes inequality check bug in Python 2.

* Adds tests for setting ACL with token.

* Adds support for creating an ACL with a given token.

* Outputs operation performed on Consul ACL when changed.

* Fixs issue with test for creating a Consul ACL with rules.

* Corrects property used to set ACL token in python-consul library.

* Fixes tear-down issue in test that creates a Consul ACL using a token.
7 years ago
Nathaniel Case 01dda25e0f fix nxapi transport in nxos_snmp_location (#27849)
* fix nxapi transport in nxos_snmp_location

* Appease Shippable
7 years ago
Moritz Grimm 11af034255 moved aws elasticache module to boto3 (#27441)
* moved aws elasticache module to boto3

* fixed error and improved code

* implemented requested changes

* now checking for missing boto3 packages in a better way

* now dynamically setting the default port depending on the engine if it is not set

* moved standard import in front of ansible ones

* now case insensitive in regards to engine name

* removed superfluous spaces

* now checking for None in the correct way

* removed elasticache module from exceptions to pep8 testing

* removed hardcoded default ports and letting aws decide if no port is given
7 years ago
Willem van Ketwich 6d402de25e ec2 launch configuration boto3 upgrade (#26348)
Updates ec2_lc module to use boto3. Adds parameters:

instance_id
placement_tenancy

Also added a second example using instance_id and updated the docs with the new parameters.
7 years ago