Commit Graph

357 Commits (eb33cc88bdaee747a36d583ec7523d3493899a33)

Author SHA1 Message Date
Will Thames 16b877e2b3 ec2_asg and ec2_asg_facts module improvements (#25166)
* ec2_asg and ec2_asg_facts module improvements

Return target group information for both ec2_asg and ec2_asg_facts
modules

Provide RETURN documentation for ec2_asg module

PEP8 fixes for ec2_asg_facts

* ec2_asg: use pagination when describing target groups

In case an ASG has 100s of target groups, ensure that
we get the full result using build_full_result
7 years ago
Pilou 460d932aa8 postgresql_user: fix bugs related to 'expires' option (#23862)
* Factorize tests related to no_password_change using an include task

* Refactor: deduplicate tasks

* postgresql_user: test 'expires' parameter

* Change 'valid until' even it's the only updated field

* value is changed when another value is provided

* value isn't returned when unset

* Remove unused variable

* psycopg2.extras.DictRow is able to handle comparison

* postgresql_user: simplify helper method

* postgresql_user: define variable just before using it

* Fix comparison between user input and applied configuration

* new test: adding an invalid attribute

* Refactor, add cleaning task

* Check that using same attribute a 2nd time does nothing

* Always try to remove created user

* postgresql_user: fix pep8
7 years ago
René Moser 29817ab115 cloudstack: add tests, fix pep8 (#25518)
* cloudstack: cs_zone: fix pep8

* cloudstack: cs_zone: add tests
7 years ago
Sloane Hertel b376bde4d7 [cloud] ec2_eni module - allow attaching a new instance - fixes #19452 (#22377)
* fix bug attaching instances

* pep8
7 years ago
Tim Rupp 61684f7313 Updates gtm wide ip module to be feature complete (#25502)
This module is used to manage GTM wide ips on a bigip.
Previously, this module only included a small subset of functionality
primarily related to editing a wide ip that already existed. Additionally
it used the SOAP api for its communication. this patch completes the
feature set of wide ips and refactors the code to use the F5 python SDK
and the REST API.

Unit tests are provided. Integration tests can be found here

https://github.com/F5Networks/f5-ansible/blob/devel/test/integration/bigip_gtm_wide_ip.yaml#L23
https://github.com/F5Networks/f5-ansible/tree/devel/test/integration/targets/bigip_gtm_wide_ip/tasks
7 years ago
Dag Wieers 6e98dbbfd7 wait_for: PEP8, imports, cosmetics (#24634)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)

This fixes #19781
7 years ago
Chris Houseknecht 20bddde669 docker_service: Forward stderr-based output from docker-compose (#25456)
PR #5165 at https://github.com/ansible/ansible-modules-core/pull/5165
adds redirection and capture of stdout during execution of
docker-compose.

This doesn't necessarily catch all errors, since some are printed to
stderr and lost.

This extends the redirection to include stderr, and does minor string
processing to attempt to find a 'useful' message to present as the
final Ansible error.
7 years ago
Matt Martz e86b00b917 Make validate-modules a .py file, and symlink back to validate-modules (#25227)
* Make validate-modules a .py file, and symlink back to validate-modules

* Set prog for argparse in valdiate-modules
7 years ago
Mike Wiebe b76acc8ce8 Fix nxos_vpc idempotence issues (#25219)
* Fix nxos_vpc idempotence issues

* Remove legacy-file pep8 now passing
7 years ago
Abhijeet Kasurde 5bd4e01533 Update documentation of pamd module (#24712)
Updated explanation and documentation of new_module*
in pamd documentation

Fixes #24516

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 65bd5c4d56 Refactor github_hook module (#24391)
* PEP8 fixes
* Refactoring for fetch_url call
* Removed un-used code

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 677a6c2982 Pep8 fixes for ejabberd_user and jboss (#24586)
* PEP* Fixes
* Refactor code

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
René Moser 894b86a467 cloudstack: cs_zone_facts: add tests and fix pep8 (#25407) 7 years ago
René Moser 3e02b19b98 cloudstack: fix pep8 cs_project (#25322) 7 years ago
Will Thames 84eea2a7e3 Support check_mode in ec2_vpc_nacl (#23112)
* Support check_mode in ec2_vpc_nacl

Ensure that all API calls that make changes are guarded by
`if not module.check_mode`.

* Update ec2_vpc_nacl_facts to latest pep8 standards
7 years ago
Dag Wieers 8cbed3c534 unarchive: PEP8, imports, cosmetics (#24654)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Brandon Davidson 0e0c5328fa amazon/ec2_vpc_igw: Allow internet gateways to be tagged (#23782) 7 years ago
Dag Wieers 5553b20828 Collated PEP8 fixes (#25293)
- Make PEP8 compliant
7 years ago
Dag Wieers 2f33c1a1a1 find: PEP8, imports, cosmetics (#24646)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Dag Wieers 91ee93ce13 patch: PEP8, imports, cosmetics (#24649)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Ganesh Nalawade 85219dfdf3 Add support to fetch old style junos facts (#25250)
* Add support to fetch old style junos facts

Fixes #25050

Add support to fetch old style facts supported in Ansible <= 2.2
To fetch old style facts value `gather_subset` value shoule be `all`
and `junos-eznc` is required to be installed on control node as a
prerequisite.

* Remove unwanted import
7 years ago
Sloane Hertel 7160a491c2 elasticache: add requirements to parameter_group and snapshot (#24904)
* Add requirements to elasticache parameter group

* add requirements for elasticache_snapshot

* pep8 elasticache_snapshot

* remove elasticache_snapshot from legacy files
7 years ago
Adrian Likins 45a9f96774 Facts Refresh (2.4 roadmap) (#23012)
Facts Refresh (2.4 roadmap)

This commit implements most of the 2.4 roadmap 'Facts Refresh'
- move facts.py to facts/__init__.py
- move facts Distribution() to its own class
- add a facts/utils.py
- move get_file_content and get_uname_version to facts/utils.py
- move Facts() class from facts/__init__ to facts/facts.py
- mv get_file_lines to facts/utils.py
- mv Ohai()/Facter() class to facts/ohai.py and facter.py
- Start moving fact Hardware() classes to facts/hardware/*.py
- mv HPUX() hardware class to facts/hardware/hpux.py
- move SunOSHardware() fact class to facts/hardware/sunos.py
- move OpenBSDHardware() class to facts/hardware/openbsd.py
- mv FreeBsdHardware() and DragonFlyHardware() to facts/hardware/
- mv NetBSDHardware() to facts/hardware/netbsd.py
- mv Darwin() hardware class to facts/hardware/darwin.py
- pep8/etc cleanups on facts/hardware/*.py
- Mv network facts classes to facts/network/*.py
- mv Virtual fact classes to facts/virtual
- mv Hardware.get_sysctl to facts/sysctl.py:get_sysctl

- Also mv get_uname_version from facts/utils.py -> distribution.py
  since distribution.py is the only thing using it.

- add collector.py with new BaseFactCollector
- add a subclass for AnsibleFactCollector
- hook up dict key munging FactNamespaces
- add some test cases for testing the names of facts
- mv timeout stuff to facts.timeout

- rm ansible_facts()/get_all_facts() etc

- Instead of calling facts.ansible_facts(), fact collection
  api used by setup.py is now to create an AnsibleFactCollector()
  and call it's collect method.

- replace Facts.get_user_facts with UserFactCollector
- add a 'systems' facts package, mv UserFactCollector there
- mv get_dns_facts to DnsFactCollector
- mv get_env_facts to EnvFactCollector
- include the timeout length in exception message

- modules and module_utils that use AnsibleFactCollector
  can now theoretically set the 'valid_subsets'

  May be useful for network facts module that currently have
  to reimplement a good chunk of facts.py to get gather_subsets
  to work.

- get_local_facts -> system/LocalFactCollector
- get_date_time -> system/date_time.py
- get_fips_facts -> system/fips.py
- get_caps_facts() -> system/caps.py
- get_apparmor_facts -> system/apparmor.py
- get_selinux_facts -> system/selinux.py
- get_lsb_facts -> system/lsb.py
- get_service_mgr_facts -> system/service_mgr.py
- Facts.is_systemd_managed ->  system/service_mgr.py
- get_pkg_mgr_facts -> system/pkg_mgr.py
- Facts()._get_mount_size_facts() -> facts.utils.get_mount_size()

- add unit test for EnvFactCollector
- add a test case for minimal gather_subsets
- add test case for collect_ids
- Make gather_subset match existing behavior or '!all'

    If 'gather_subset' is provided as '!all', the existing behavior
    (in 2.2/2.3) is that means 'dont collect any facts except those
    from the Facts() class'. So 'skip everything except
    'apparmor', 'caps', 'date_time', 'env', 'fips', 'local', 'lsb',
    'pkg_mgr', 'python', 'selinux', 'service_mgr', 'user', 'platform', etc.

    The new facts setup was making '!all' mean no facts at all, since
    it can add/exclude at a finer granularity. Since that makes more
    sense for the ansible collector, and the set of minimal facts to
    collect is really more up to setup.py to decide we do just that.

    So if setup.py needs to always collect some gather_subset, even
    on !all, setup.py needs to have the that subset added to the
    list it passes as minimal_gather_subset.

    This should fix some intg tests that assume '!all' means that
    some facts are still collected (user info and env for example).

    If we want to make setup.py collect a more minimal set, we can do that.

- force facts_dicts.keys() to a list so py3 works
- split fact collector tests to test_collectors.py

- convert Facter(Facts) -> other/facter.py:FacterFactCollector

- add FactCollector.collect_with_namespace()

    regular .collect() will return a dict with the key names
    using the base names ('ip_address', 'service_mgr' etc)

    .collect_with_namespace() will return a dict where the key names
    have been transformed with the collectors namespace, if there is
    one. For most, this means a namespace that adds 'ansible_' to the
    start of the key name.

    For 'FacterFactCollector', the namespace transforms the key to
    'facter_*'.

- add test cases for collect_with_namespace

- move all the concrete 'which facts does setup.py' stuff to setup.py

    The caller of AnsibleFactCollector.from_gather_subset() needs to
    pass in the list of collector classes now.

- update system/setup.py to import all of the fact classes and pass
  in that list.
- split the Distribution fact class up a bit

    extracted the 'distro release' file handling (ie, linux
    boxes with /etc/release, /etc/os-release etc) into its
    own class.
- extract get_cmdline_facts -> cmdline.py
- extract get_public_ssh_host_keys -> system/ssh_pub_keys.py
- extract get_platform_facts -> system/platform.py

  platform.py may be a good candidate for further splitting.

- rm test for plain Facts() base class
- let the base class for Collector unit tests provide collected_facts

    some Collectors and/or their migrated Facts() subsclasses need
    to look at facts collected by other modules ('ansible_architecture'
    the main one...).

    Collector.collect() has the collected_facts arg for this, so add
    a class variable to BaseFactsTest so we can specify it.

- mv Ohai to other/ohai.py and convert to Collector
- update hardware/*.py to return facts (no side effects)

- mv AnsibleFactCollector to setup.py
- extra collector class gathering to module method in
  facts/__init__.py (collector_classes_from_gather_subset)
- add a CollectorMetaDataCollector collector used to provide
  the 'gather_setup' fact
- add unit test module for 'setup' module
  (test/units/modules/system/setup.py)

- Collector init now doesnt need a module, but collect does

    An instance of a FactCollector() isnt tied to a AnsibleModule
    instance, but the collect() method can be, so optionally pass
    in module to FactCollector.collect() (everywhere)

- add a default_collectors for list of default collectors

  import and use it from setup.py module

  eventually, would like to replace this with a plugin loader
  style class finder/loader

- unit tests for module_utils/facts/__init__.py
- add unit tests for ohai facts collector
- remove self.facts side effect on populate() in hardware/sunos.py
- convert OpenBSDHardware() to rm side effects on self.facts
- try to rm some self.facts side effects in Network()

    plumb in collected_facts from populate() where it is needed.

    stop passing collected_facts into Network() [via cached_facts=,
    where it eventually becomes self.facts]

- nothing provides Fact() cached_facts arg now, rm it

    Facts() should be internal only implementation so nothing
    should be using it.

    Of course, now someone will.

- add a Collector.name attr to build a map of name->_fact_ids

    To properly exclude a gather_subset spec like '!hardware', we
    need to know that 'hardware' also means 'devices', 'dmi', etc.
    Before, '!hardware' would remove the 'hardware' collector name
    but not 'devices'. Since both would end up in id_collector_map,
    we would still end up with the HardwareCollector in the collector
    list. End result being that '!hardware' wouldn't stop hardware
    from being collected.

    So we need to be able to build that map, so add the Collector.name
    attribute that is the primary name (like 'hardware') and let
    Collector._fact_ids be the other fact ids that a collector is
    responsible for.

    Construct the aliases_map of Collector.name -> set of _fact_ids
    in fact/__init__.py get_collector_names, and use it when we are
    populating the exclude set.

- refactor of distribution.py

    make the big OS_FAMILY literal a little easier to read
    Also keys can now be any string instead of python literals

    99% sure the test for 'KDE Neon' was wrong
    I don't see how/where it should or could get 'Neon' instead
    of 'KDE Neon' as provided in os-release NAME=

    Use 'distribution' string for key to OS_MAP

    ie, we dont need to make it a valid python label anymore so dont.

    move _has_dist_file to module as _file_exists
    easier to mock without mucking with os.path

    mv platform.system() calls to within get_distribution_facts() instead
    of Distribution() init.

- remove _json compat module

    The code in here was to support:

      -a 'json' python module that was not the standard one included
      with python since 2.6.

      - potentially fallback to simplejson if 'json' was not available.

    'json' is available for all supported python versions now so
    no longer needed.

- mv get_collector_names -> facts.collector
- mv collector_classes_from_gather_subset -> facts.collector
- mv collector tests from test_facts -> test_collector

- Use six's reduce() in sunos/netbsd hardware facts

- rm extraneous get_uname_version in utils

  only system/distribution.py uses it

- Remove Facts() subclass metaclass usage

  - using fact_id and a platform id for matching collectors

    gut most of Facts() subclasses

    rm Facts() subclasses with weird metaclass

    only add collectors that match the fact_ids and the platform_info
    to the list of collectors used.

    atm, a collectors platform_id will default to 'Generic', and
    any platform matches 'Generic'

    goal is to select collector classes including matching the
    systems platform in collector.py, instead of relying on
    metaclasses in hardware/*. To finish this, the various
    Facts() subclasses will need to be replaced entirely with
    Collector() subclasses.

    use collector classmethod platform_match() to match the platform

    This lets the particular class decide if it is compatible with
    a given platform_info. platform_info is a dict like obj, so it could be
    expanded in the future.

    Add a default platform_match to BaseFactCollector that matches
    platform_info['system'] == cls._platform

    They were needed previously to trigger a module
    load on all the collector classes when we import
    facts/hardare so that the Hardware() and related
    classes that used __new__ and find_all_subclasses()
    would work.

    Now that is done in collectors based on platform matching
    at runtime we dont need to do it py module import/parse
    time. So the non empty __init__.pys are no longer needed
    and their is a more flexible mechanism for selection
    platform specific stuff.

    facts/facts.py is no longer used, rm'ed

- if we dont find an implement class for gather spec.. just ignore it.

  Would be useful to add a warn to warn about this case.

- Fix SD-UX typo (should be HP-UX)

- Port fix for #21893 (0 sockets) to this branch

    This readds the change from 8ad182059d
    that got lost in merge/rebase

    Fixes #21893

- port sunos fact locale fix for #24542 to this branch

    based on e558ec19cd

    Fixes #24542

    Solaris fact fix (#24793)

    ensure locale for solaris fact gathering

    fixes issue with locale interfering with proper reading of decimals

- raise exceptions in the air like we just dont care.

    Pretty much ignore any not exit exception in facts
    collection. And add some test cases.

- added new selinux fact to clarify python lib

    the selinux fact is boolean false when the library is not installed,
    a dictionary/hash otherwise, but this is ambigous
    added new fact so we can eventually remove the type dichtomy and normalize it as a dict

    Re-add of devel commit 85c7a7b844 to
    the new code layout, since it got removed in merge/rebase
7 years ago
Trishna Guha 343b83041e nxos_feature fix and unit test (#25200)
* nxos_feature fix

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

* nxos_feature unit test

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

* remove from pep8/legacy-file

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Dag Wieers c13b1a718a plugins/terminal/: PEP8 compliancy (#25207)
- Make PEP8 compliant
7 years ago
Chris Alfonso b937bad52e Narrowing the match for python 3 cmp check (#25220)
Allowing the yaml examples in python documentation.
7 years ago
Dag Wieers 758cfeb73e contrib: PEP8 compliancy (#24680)
- Make PEP8 compliant
7 years ago
Dag Wieers 09ba70f7c4 stat: PEP8, imports, cosmetics (#24653)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Dag Wieers 8d962209f4 mod_utils/cloudengine: PEP8 compliancy (#24659)
- Make PEP8 compliant
7 years ago
Dag Wieers b3b11fbce2 get_url: PEP8, imports, cosmetics (#24676)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Dag Wieers 630185cb20 ansible/executor: PEP8 compliancy (#24695)
- Make PEP8 compliant
7 years ago
Dag Wieers 51b595992b ansible/utils/: PEP8 compliancy (#24686)
- Make PEP8 compliant
7 years ago
Dag Wieers 47738eb1dd docs: PEP8 compliance (#24681)
- Make PEP8 compliant
7 years ago
Dag Wieers 4efec414e7 test/: PEP8 compliancy (#24803)
* test/: PEP8 compliancy

- Make PEP8 compliant

* Python3 chokes on casting int to bytes (#24952)

But if we tell the formatter that the var is a number, it works
7 years ago
Trishna Guha 31c59ad5f9 nxos_portchannel fix and unit test (#25019)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Rene Moser 9cbae80c3b cloudstack: fix pep8 cs_pod 7 years ago
Rene Moser 3ef37e88fe cloudstack: fix pep8 cs_facts 7 years ago
Rene Moser 439f0beca5 cloudstack: fix pep8 cs_domain 7 years ago
Rene Moser 1778e23fad cloudstack: fix pep8 cs_account 7 years ago
Rene Moser 9fe3891d65 cloudstack: fix pep8 cs_cluster 7 years ago
kkjang 5c43bd3bae Cmp python3 compat (#25008)
* Use double-quotes for expect integration tests

* Cast user input to string for expect integration tests

* Remove usage of cmp() for python3 compatibility

- Add code smell test to look for cmp usage

- Fixes #24756
7 years ago
Ganesh Nalawade 825d9df5ea Add eos changes for Python3 (#24600)
* eos python3 changes

* changes to convert response from byte to text

* Add dellos6 python3 changes
Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

* Fix py3 prompt issue for invalid show command
* Fix review comments
* Add generic fix for error prompt in py3
* Fix CI issue
* Fix network_cli unit test failure
7 years ago
Dag Wieers 66355df917 module_utils/six: PEP8 compliancy
- Make PEP8 compliant
7 years ago
Brian Coca 8f97aef1a3 Transition inventory into plugins (#23001)
* draft new inventory plugin arch, yaml sample

 - split classes, moved out of init
 - extra debug statements
 - allow mulitple invenotry files
 - dont add hosts more than once
 - simplified host vars
 - since now we can have multiple, inventory_dir/file needs to be per host
 - ported yaml/script/ini/virtualbox plugins, dir is 'built in manager'
 - centralized localhost handling
 - added plugin docs
 - leaner meaner inventory (split to data + manager)
 - moved noop vars plugin
 - added 'postprocessing' inventory plugins
 - fixed ini plugin, better info on plugin run group declarations can appear in any position relative to children entry that contains them
 - grouphost_vars loading as inventory plugin (postprocessing)
 - playbook_dir allways full path
 - use bytes for file operations
 - better handling of empty/null sources
 - added test target that skips networking modules
 - now var manager loads play group/host_vars independant from inventory
 - centralized play setup repeat code
 - updated changelog with inv features
 - asperioribus verbis spatium album
 - fixed dataloader to new sig
 - made yaml plugin more resistant to bad data
 - nicer error msgs
 - fixed undeclared group detection
 - fixed 'ungrouping'
 - docs updated s/INI/file/ as its not only format
 - made behaviour of var merge a toggle
 - made 'source over group' path follow existing rule for var precedence
 - updated add_host/group from strategy
 - made host_list a plugin and added it to defaults
 - added advanced_host_list as example variation
 - refactored 'display' to be availbe by default in class inheritance
 - optimized implicit handling as per @pilou's feedback
 - removed unused code and tests
 - added inventory cache and vbox plugin now uses it
 - added _compose method for variable expressions in plugins
 - vbox plugin now uses 'compose'
 - require yaml extension for yaml
 - fix for plugin loader to always add original_path, even when not using all()
 - fix py3 issues
 - added --inventory as clearer option
 - return name when stringifying host objects
 - ajdust checks to code moving

* reworked vars and vars precedence
 - vars plugins now load group/host_vars dirs
 - precedence for host vars is now configurable
 - vars_plugins been reworked
 - removed unused vars cache
 - removed _gathered_facts as we are not keeping info in host anymore
 - cleaned up tests
 - fixed ansible-pull to work with new inventory
 - removed version added notation to please rst check
 - inventory in config relative to config
 - ensures full paths on passed inventories

* implicit localhost connection local
7 years ago
Brian Coca 6fa5dbdb5c fixed pep8 issues 7 years ago
Nathaniel Case dd4a79d7d3 Clean up nxos_bgp_neighbor_af (#24890)
* Fix pep8 in bgp_neighbor_af
* Remove WARNINGS
* Rewrite command detection
* Add bgp_neighbor_af test
* Finally kill invoke
7 years ago
Brian Coca e0e94a4d02 reinstated to legacy
(cherry picked from commit a6484da0f11d03056b446526ef1cf78f968ae3ee)
(cherry picked from commit f23e766efa859b25557537d5098de557e85120cf)
7 years ago
Trishna Guha 4066b03a4c nxos_evpn_global refactor (#24919)
* nxos_evpn_global refactor

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

* ansibot told me to do this

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Ganesh Nalawade 7563d93901 Add nxos changes for Python3 (#24602)
* Add nxos changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

* Fix CI issues

* Fix review comment

Replace surrogate_or_strict with
surrogate_then_replace as per review
comment os PR #24601
7 years ago
Trishna Guha 1e5a0982b9 Fix nxos_hsrp and add unit test (#24770)
* nxos_hsrp fix

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

* unit test nxos_hsrp

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

* ansibot told me to do this

* revert apply_key_map and simplify method
7 years ago
Trishna Guha 4782a4e62f Make host required field and minor refactor (#24534)
* Make host required field and minor refactor

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

* ansibot pep8 legacy file

* example doc update
7 years ago
Trishna Guha 998305a493 nxos_ospf_vrf fix and unittest (#24495) 7 years ago
Dag Wieers c4a7f64c02 ansible/galaxy: PEP8 compliancy (#24696)
- Make PEP8 compliant
7 years ago
Dag Wieers 6f6bdf7914 ansible/parsing: PEP8 compliancy (#24701)
- Make PEP8 compliant
7 years ago
Tom Melendez 3fbf3b51ff [GCP] remove ansible.utils.display for deprecations (#24738)
* [GCP] remove ansible.utils.display for deprecations, use module.deprecate instead.

* removed test file from legacy files
7 years ago
Dag Wieers ac1017b7ad ansible/constants: PEP8 compliancy (#24692)
- Make PEP8 compliant
7 years ago
Dag Wieers 37bfca23c9 slurp: PEP8, imports, cosmetics (#24677)
- Make PEP8 compliant
- Ensure imports are specific
- Few cosmetic changes (sort lists, casing, punctuation)
7 years ago
Dag Wieers ea27baf7ff examples/: PEP8 compliancy (#24682)
- Make PEP8 compliant
7 years ago
Dag Wieers de907a8e36 ansible/compat/: PEP8 compliancy (#24689)
- Make PEP8 compliant
7 years ago
Dag Wieers ac27c54c2e ansible/errors: PEP8 compliancy (#24693)
- Make PEP8 compliant
7 years ago
Matt Clay f5332de83d PEP 8 fixes. 7 years ago
Ganesh Nalawade 38eeeb755d Add ios changes for Python3 (#24601)
* Add ios changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
pep8 fixes

* Fix CI issues

* Fix review comment
7 years ago
Abhijeet Kasurde ad41d0e88f Pep8 fixes for parted (#24713)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Trishna Guha 8937246f8f Fix nxos ospf and Unit test (#24613)
* nxos_ospf fixes refactor

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

* unit test nxos_ospf

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Daniel Shepherd cf4806d29d [cloud] Update AWS CloudTrail module to use boto3 and updated/new CT parameters (#22884)
remove cloudtrail.py from legacy-files as it passes pep8 tests now

update return values to use snake case per coding guidelines

update boto3 exception handling to use method outlined in coding guidelines

update parameter spec and return value code per PR code review
7 years ago
Ganesh Nalawade a3c689bf0d Add sros changes for Python3 (#24604)
* Add sros changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

Code cleanup
pep8 fixes

* Fix CI issue
7 years ago
Ganesh Nalawade 16d610c1de Add vyos changes for Python3 (#24603)
* Add vyos changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431
pep8 fixes

* Fix CI issues
7 years ago
Ganesh Nalawade f4e1dc503b Add iosxr changes for Python3 (#24605)
* Add iosxr changes for Python3

Make `execute_command` arguments and its
return value complaint to PY3 changes
made in PR #24431

* Fix CI issue
7 years ago
Dag Wieers 9a5a61bdca hacking/: PEP8 compliancy (#24683)
- Make PEP8 compliant
7 years ago
Dag Wieers 4f29662a9e ansible/vars/: PEP8 compliancy (#24685)
- Make PEP8 compliant
7 years ago
Will Thames 9a958da57e [cloud] Make ec2_vpc_nat_gateway results consistent (#24042)
Ensure newly created NAT gateways get converted to snake dict
Remove custom code, and associated test, for generating snake
dict and use `camel_dict_to_snake_dict`
Make use of `required_if` rather than bespoke parameter checks
Remove ec2_vpc_nat_gateway from pep8 legacy files list
7 years ago
Dag Wieers c6533d4da9 utils/unicode: PEP8 compliancy (#24668)
- Make PEP8 compliant
7 years ago
Nathaniel Case f240ba6b60 nxos_bgp_neighbor cleanup (#24446) 7 years ago
Dag Wieers 61d68275e8 module_utils/asa: PEP8 compliancy (#24655)
- Make PEP8 compliant
7 years ago
Ilya Drey 62b8813873 Improving nxos_ip_interface module (#21353)
* Improving of nxos_ip_interface module

Added features:

  * Route tags for an IP address at interface level with 'tag' option
  * Support of IPv4 secondary addresses if option 'allow_secondary' is
true (false by default). If option 'allow_secondary' is true primary
IPv4 address will be replaced

All features support NXAPI and CLI transport, but only with text/raw
output. Currently not possible to get route tags for secondary IPv4/IPv6
addresses from JSON output.

Other changes:
  * Module return state 'changed' only when configuration commands were
executed
  * Module result includes multiple prefixes if IPv4 addresses were
found

* Fix PEP8 issues

* Addition fix of PEP8 issues

* Remove unused variable from main()

* Fix "proposed" sample in RETURN variable

* Fix "existing" sample in RETURN variable

* Update RETURN variable

Add 'secondary' for every element of 'addresses' list.

* Restore old version number

* Added exception when ipaddress module is imported

* DOCUMENTATION string was updated

  * Added 'version_added' for new features
  * Added 'requirements' for module

* Added compatibility with latest commit in devel branch

* DOCUMENTATION was fixed
* Improve changes of route tag for existing ip addresses
* Added compatibility with core code

* Fixed mistypes in the DOCUMENTATION variable

* argument_spec fixed

allow_secondary argument type was changed according to allowed choices.
7 years ago
Tom Melendez 4a5cf0b5c1 [GCE] [GCP] UrlMap module (#24422)
* [GCP] UrlMap module

This module provides support for UrlMaps on Google Cloud Platform.  UrlMaps allow users to segment requests by hostname and path and direct those requests to Backend Services.

UrlMaps are a powerful and necessary part of HTTP(S) Global Load Balancing on Google Cloud Platform.

UrlMap takes advantage of the python-api so the appropriate infrastructure has been added to module_utils.

More about UrlMaps can be found at:
https://cloud.google.com/compute/docs/load-balancing/http/url-map

UrlMap API:
https://cloud.google.com/compute/docs/reference/latest/

Google Cloud Platform HTTP(S) Cross-Region Load Balancer:
https://cloud.google.com/compute/docs/load-balancing/http/

* updated documentation, remmoved parens

* fixed tabs
7 years ago
Abhijeet Kasurde 728d3e6c84 Pep8 fixes for web_infra/ansible_tower (#24479)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Jon Hadfield eb4cc31ae5 [cloud] migrate ec2_asg to boto3 and support application ELB target groups. (#19667)
* switch to boto3 and add support for application ELBs with target groups.

* use py23 compatible dict iterator.

* removing commented out fail_json calls

utilize sets to simplify logic

remove setting a redundant variable

add bounds checking in two places

add AWSRetry decorator - do we want this for other functions too?

change xrange to range so python3 doesn't fail

remove sorting lists of dicts; in python2 this returns None, in python3 this fails

* remove error variable from traceback.format_exc

* Remove boto2-style calls brought in by rebase

Old boto-style calls to `as_group` attributes break in boto3

Also remove module from legacy-PEP8 list

* Add  parameter to target_group_arn option

* Fix HAS_BOTO3 check

* use tags.items() instead of iteritems

* import botocore

* Fixed bugs in deleting autoscaling groups

* make changes in deleting autoscaling groups pep8

* more pep8

* fix version

* fix bugs so local integration tests run

* fix launch config check

* reflect changed status for ASG updates

* Fix existing exception handling and use traceback.

Fix imports

* line length

* Fix notification setup

* Fix mutually exclusive arguments
Only one of the AvailabilityZones and VPCZoneIdentifier arguments should be provided to the CreateAutoScalingGroup call.

* Allow desired_capacity, min_size, max_size, launch_config_name to be derived from the existing ASG if not specified

Remove code updating dict after ASG already uses it
7 years ago
Abhijeet Kasurde 3d51081a59 Refactor nxos_reboot module (#24484)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Trishna Guha b2a2f69a6e nxos_vrf_af fix and unit test (#24399)
* nxos_vrf_af fix and unit test

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

* ansibot told me to do this

* use sorted() as the test list elements differ in order for python2.x and 3.x
7 years ago
Trishna Guha 62eafa8837 fixes nxos_evpn_vni and unittest (#24372)
* fixes nxos_evpn_vni

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

* fixes pep8 issue and syntax error

* ansibot tole me to do this

* Unit test
7 years ago
Nathaniel Case 09b2964dee nxos_bgp_af updates (#24171)
* update docs
* clean up nxos-bgp_af
* Remove useless params from bgp_af
* Add bgp_af tests
7 years ago
Abhijeet Kasurde 2f26c5285a Refactor nxos_file_copy module (#24314)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Martz d3249e7875 pep8 fixes for contrib (#24344) 7 years ago
Abhijeet Kasurde e342b281d8 Check if api_key and app_key before proceeding (#24336)
Fix adds check if app_key and api_key provided by
user is correct or not. If this combination is wrong
then fail with appropriate error message given by
Datadog server

Fixes https://github.com/ansible/ansible/issues/24325

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 2425143cf2 Pep8 fixes for digital_ocean_*
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 9c5b55232c Pep8 fixes for Windows module (#24349)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay a07d42e16d Add support for cloud tests to ansible-test. (#24315)
* Split out ansible-test docker functions.
* Add cloud support to ansible-test.
7 years ago
Sloane Hertel ad8cb903f4 rds: do not update multi-az unless specified - fixes #23385 (#23498)
* allow multi_az to be unmodified if not explicitly specified

* fix pep8 and remove from legacy files
7 years ago
Matt Martz 2fbfba0ef3 Make Reporter class hold all results, move line/col into results, and out of message (#24127)
* Make Reporter class hold all results, move line/col into results, and out of message

* Move line/col out of message for YAML parser errors

* We have lineno for the DOC var, use it for YAML parser errors

* Remove valdiate-modules files from legacy-files

* pep8 indentation fixes

* Add todo for line/col in _validate_docs_schema
7 years ago
Matt Clay 6522d703a1 Fix ansible-test pylint and pep8 issues. (#24245)
* Fix pylint useless-super-delegation issues.
* Fix miscellaneous pylint issues.
* Fix PEP 8 issues.
* Fix warnings reported by PyCharm.
7 years ago
Ganesh Nalawade a42b892f70 Fix junos_rpc and junos_user broken issues (#24238)
* Fix junos_rpc and junos_user broken issues

Add persistent connection related changes.

* Fix CI issues
7 years ago
Abhijeet Kasurde 465c12ccdb Pep8 fixes for deploy_helper (#24237)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 53f0cd197e Pep8 fixes for jira (#24229)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde b6b3f84990 Pep8 fixes for htpasswd (#24230)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde fbb924ff24 Pep8 fixes for letsencrypt module (#24144)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde df5be2b8ea Pep8 fixes for django_manage (#24198)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Robin Roth 0cf00db750 Make git module pep8 compliant (#24196) 7 years ago
Sloane Hertel e13fc5d6bd elasticache_parameter_group: fix documentation and exception handling - fixes #23709 (#23718)
* fix documentation and correct exception handling

* follow AWS exception guidelines

* fix parameter_group_family req; only needed when creating cache parameter group

make pep8 and remove from legacy files
7 years ago
Sloane Hertel fcaa49b536 sns: move from notification directory to cloud/amazon directory - fixes #11874 (#23805)
* move sns to cloud directory

* make sns pep8 and remove from legacy files
7 years ago
Abhijeet Kasurde 9d9e9a79e2 Pep8 fixes for apache2 module (#24185)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Andrea Tartaglia 4e4fc9cb4c Added test for 'RETURN' field in validate-modules (#23322)
* Added test for 'RETURN' field in validate-modules

* print the field being tested.

Useful when the RETURN structure is complex.

* Fixed schema after CI traceback fail

* Fixed list_string_types

* Fixed line in 319 code for RETURN
7 years ago
Toshio Kuratomi 3428f42120 Add integration test that modules are loaded from the expected locations (#24170)
* Add integration test that modules are loaded from the expected locations
* Fix ping module to pass PEP8
7 years ago
Abhijeet Kasurde d8f76bed97 Misc fixes and Pep8 fixes for proxmox_* modules (#24162)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde cdca648f15 Pep8 fixes for jenkins_* module (#24154)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 806506c032 Pep8 fixes for taiga_issue module (#24143)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
René Moser 594d7d5d9d cloudstack: cs_region: fix pep8 (#24134) 7 years ago
Toshio Kuratomi 1c05ed7951 Fix circular import with unsafe_proxy, template, and vars
template/__init__.py imported unsafe_proxy from vars which caused
vars/__init__.py to load.  vars/__init__.py needed template/__init__.py
which caused issues.  Loading unsafe_proxy from another location fixes
that.
7 years ago
Abhijeet Kasurde ca7616b4a1 Pep8 fixes for ha_proxy module (#24090)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
John R Barker ecbf8e933a Docs how to test (2nd) (#24094)
* Big testing doc refactor
* Combine all the testing documentation in to one place to make it easier to find
* Convert everything to RST
* Create testing_network guide
* Create testing landing page
* For each section detail "how to run" and "how to extend testing"
* More examples
* Lots more detail
7 years ago
Nathaniel Case 689b93bf14 Junos_config unicode (#23369)
* Try to handle unicode output more sensibly

* Appears I'm getting latin1 instead

Ugh.
7 years ago
John R Barker 1c61b9bae7 Split modules/network into two parts (#24024)
* Split modules/network into two parts

Given the dedicated team we we have working on Ansible Networking a
clearer split is needed between Networking modules and "things that
happen to use the network"

* nmcli to net_tools

* nmcli moved
7 years ago
Abhijeet Kasurde 9456f93ea8 Pep8 fixes for known_hosts.py (#24029)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Senthil Kumar Ganesan ce99ffe205 Fixed PEP8 issues (#24030) 7 years ago
Matt Clay d662f6f0db Fix bugs in ansible-test units command. (#24044)
* Handle old versions of coverage.
* Handle old versions of setuptools.
* Detect python version for docker/remote units.
* Add sanity override for test constraints.
7 years ago
Nathaniel Case 0d67a49d5a nxos_bgp fixes (#23927)
* Pre-emptively fix sanity/pep8

* fix for commands

* Quick unit test
7 years ago
Nathaniel Case c0ebdf144d nxos_acl_interface fixes (#23917)
* Update nxos_acl_interface

* Add basic unit tests to nxos_acl_interface
7 years ago
Nathaniel Case f0914ee3c2 nxos_acl fixes (#23915)
* Update nxos_acl

* unit tests for nxos_acl

* Remove nxos_acl from pep8-legacy
7 years ago
Abhijeet Kasurde d16fe5bef3 Minor typo and PEP8 fixes for dnf module (#23845)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Abhijeet Kasurde 9fbbb5e10f Pep8 fixes for mysql module (#23923)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Matt Clay a871e590a8 Update validate-modules to ignore *.rst files. 7 years ago
Matt Clay d3c006c496 Fix module validator report if skipping all files. 7 years ago
Toshio Kuratomi 78dd3496e2 Update version and change remove files from pep8 blacklist 7 years ago
Sloane Hertel 00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 7 years ago
Sloane Hertel 91644167c9 improve exception handling (#23722)
make pep8
7 years ago
Sloane Hertel 11c292bac2 route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option

* make route53_facts pep8 and remove from legacy files
7 years ago
Sloane Hertel d63af51f90 s3_sync: removing irrelevant s3.list_buckets() call - fixes #23409 (#23492)
* Removing irrelevant s3 call

Fix exception handling

Make s3_sync pep8 and remove from legacy file
7 years ago
Daniel Shepherd 698fa37a44 [cloud] Fix #23152 in route53 module and pep8 cleanup (#23156)
update module to support more standard state=present/absent syntax

update module to use required_if, required_together, mutually_exclusive functions where possible

per ryansb review: make documentation section more clear, fix some extra quotes, remove FIXME comment

pre willthames review: force private_zone to True if vpc_id is set and fix word wrap
7 years ago
Nathaniel Case 0b4cebfb8b nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
7 years ago
Will Thames 9229d53143 [cloud] Add ec2_vpc_dhcp_options_facts check mode (#23106)
* Support check mode in ec2_vpc_dhcp_options_facts

As a facts module, ec2_vpc_dhcp_options_facts supports check mode
by default

* ec2_vpc_dhcp_options_facts tidy up

Use named method imports, move imports to top of code
Use shared code to handle filters and tags
Use snake case for parameter names while retaining backward compatibility
7 years ago
Nathaniel Case e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
7 years ago
Matt Clay 4ad869b407 Expand test documentation. (#23598)
* Replace test README.md with new README.rst.
* Add compile and sanity README.rst docs.
7 years ago
Matt Clay cb1f57d4e5 Add rstcheck to ansible-test and correct issues. (#23550)
* Add rstcheck to ansible-test.
* Fix rst code-block languages and syntax errors.
* Fix rst inline literals.
* Update python 2 code block to pass tests on py 3.
7 years ago
Matt Clay e7bb508ad6 Fix var precedence check to support python 3. (#23552)
* Fix var precedence check to support python 3.
* Run CI sanity tests using python 3.5.
* Disable pylint non-iterator-returned test to pass on python 3.5.
7 years ago
Matt Clay 442768c45e Fix module validator blacklist handling.
Process the blacklist before creating a validator instance.
7 years ago
Sloane Hertel 5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
7 years ago
Lumír 'Frenzy' Balhar 9d41aefd71 Add Python 3 support for validate-modules test. (#21195)
* Improve PEP8 compatibility

* Fix Python 3 incompatibility

Is prohibited to mutate OrderedDict during iteration through it so
is better to add records with error or warning to empty dictionary
instead of delete records from copy of dictionary during iterating.

* Decode output of subprocess from bytes to unicode.

* Add Python 3 support for validate-modules test.

Fix #18367
7 years ago
Dmitry Sobolev 1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
7 years ago
Matt Clay 48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
8 years ago
Matt Clay 1daa69d685 Initial pylint support for ansible-test sanity. 8 years ago
Will Thames bded5ac987 [cloud] Support check_mode for ec2_vpc_subnet_facts (#23111)
* Support check_mode for ec2_vpc_subnet_facts

facts modules support check mode by default

* ec2_vpc_subnet_facts pep8 tidy up
8 years ago
Will Thames e61be9ea78 [cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)
* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
8 years ago
Sergey 9a43603761 [cloud] Added account selection to PubNub BLOCKS (#23160)
* . switched from 'user.id' to 'account.id' in REST API calls.
+ added ability to select desired account (by name or identifier) from list of accounts to which authorized user have access.

* + added account option addition version.

* Remove pubnub_blocks from PEP8-legacy list
8 years ago
Matt Clay 9713abe9f7 Remove references to deleted files. 8 years ago
Senthil Kumar Ganesan a0344acd78 Ansible 2.3 feature support for dellos6. (#23084)
* Ansible 2.3 feature support for dellos6.

- With the new Ansible 2.3 infra changes, the dellos modules doesn't work
  (the new infra changes are not backward compatible), so added the below
  changes support it.
- Added the new terminal plugin for DellOS6
- Added the new action plugin for DellOS6
- Modified the modules to work with the new infra.
- with that it adds support for DellOS6 Persistent Connection support.

* Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
8 years ago
Senthil Kumar Ganesan dd63dfcf1e Ansible 2.3 feature support for dellos9 and dellos10 (#22856)
* Ansible 2.3 feature support for dellos9 and dellos10
* Use Persistent Connection Manager

* Fix CI issue, revert the doc and metadata changes

* Reverted the meta_info (supported_by) to community from core

* Fixed the CI issues, use module_utisl.six and updated legacy-files
8 years ago
Brian Coca 18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
8 years ago
Dag Wieers ac43a1bbbc Windows: Use the correct newline sequence for the platform (#21846)
This change to the template action plugin make template use the
platform's native newline_sequence for Jinja.

We also added the option `newline_sequence` to change the newline
sequence using by Jinja if you need to use another newline sequence than
the platform default.

This was previously discussed in
https://github.com/ansible/ansible/issues/16255#issuecomment-278289414

And also relates to issue #21128
8 years ago
Toshio Kuratomi 2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
8 years ago
Matt Martz 0ced29c51b Don't skip action/__init__.py (#22911) 8 years ago