Commit Graph

558 Commits (5540e2f8a917d68d8abe7abbffb8e7b1e3a80302)

Author SHA1 Message Date
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