Commit Graph

2094 Commits (c8e179fbf1568612bdd5fb41720a25dd192b8caa)

Author SHA1 Message Date
Gonéri Le Bouder fc3064471b virt_net: idempotency of create/stop actions (#53276)
Currently, if we try to stop or start a network two time in a row, the
second call will fail. With this patch:

- we don't recreate a network, if it exists
- we only stop a network if it's active, and so we avoid an exception
  saying the network is not active

* test: mock libvirt

* add integration tests for virt_net

* test: enable virt_net test on RedHat 7 and 8

* ci: use the unsupported alias

* tests that require privileged mode are run in VM

* virt_net/create raise unexpected libvirt exception

* import mock from units.compat

* virt_net: do not call create() on "active" network

* virt_net func test: only clean up the libvirt packages

* test: virt_net: don't use assert_called()

* virt_net: add the destructive alias

* move the test in virt_net dir

* test/virt_net: clean up the network at the end
5 years ago
Anil Kumar Muraleedharan 82d26c8c93 Lenovo cnos vrf (#54188)
* Adding module cnos_vrf to manage VRF Configurations.

* Update cnos_vrf.py

* Adding Functional Tests, Unit Tests and Bug Fixes.

* Fixing discrepancy in description against sample

* Review comments incorporated

* Review comments 2 Done

* Update basic.yaml

* Update test_cnos_vrf.py

* Review comments 3
5 years ago
James Cassell bc4ef99533 standardize TLS connection properties (#54315)
* openstack: standardize tls params

* tower: tower_verify_ssl->validate_certs

* docker: use standard tls config params

- cacert_path -> ca_cert
- cert_path -> client_cert
- key_path -> client_key
- tls_verify -> validate_certs

* k8s: standardize tls connection params

- verify_ssl -> validate_certs
- ssl_ca_cert -> ca_cert
- cert_file -> client_cert
- key_file -> client_key

* ingate: verify_ssl -> validate_certs

* manageiq: standardize tls params

- verify_ssl -> validate_certs
- ca_bundle_path -> ca_cert

* mysql: standardize tls params

- ssl_ca -> ca_cert
- ssl_cert -> client_cert
- ssl_key -> client_key

* nios: ssl_verify -> validate_certs

* postgresql: ssl_rootcert -> ca_cert

* rabbitmq: standardize tls params

- cacert -> ca_cert
- cert -> client_cert
- key -> client_key

* rackspace: verify_ssl -> validate_certs

* vca: verify_certs -> validate_certs

* kubevirt_cdi_upload: upload_host_verify_ssl -> upload_host_validate_certs

* lxd: standardize tls params

- key_file -> client_key
- cert_file -> client_cert

* get_certificate: ca_certs -> ca_cert

* get_certificate.py: clarify one or more certs in a file

Co-Authored-By: jamescassell <code@james.cassell.me>

* zabbix: tls_issuer -> ca_cert

* bigip_device_auth_ldap: standardize tls params

- ssl_check_peer -> validate_certs
- ssl_client_cert -> client_cert
- ssl_client_key -> client_key
- ssl_ca_cert -> ca_cert

* vdirect: vdirect_validate_certs -> validate_certs

* mqtt: standardize tls params

- ca_certs -> ca_cert
- certfile -> client_cert
- keyfile -> client_key

* pulp_repo: standardize tls params

remove `importer_ssl` prefix

* rhn_register: sslcacert -> ca_cert

* yum_repository: standardize tls params

The fix for yum_repository is not straightforward since this module is
only a thin wrapper for the underlying commands and config.  In this
case, we add the new values as aliases, keeping the old as primary,
only due to the internal structure of the module.

Aliases added:
- sslcacert -> ca_cert
- sslclientcert -> client_cert
- sslclientkey -> client_key
- sslverify -> validate_certs

* gitlab_hook: enable_ssl_verification -> hook_validate_certs

* Adjust arguments for docker_swarm inventory plugin.

* foreman callback: standardize tls params

- ssl_cert -> client_cert
- ssl_key -> client_key

* grafana_annotations: validate_grafana_certs -> validate_certs

* nrdp callback: validate_nrdp_certs -> validate_certs

* kubectl connection: standardize tls params

- kubectl_cert_file -> client_cert
- kubectl_key_file -> client_key
- kubectl_ssl_ca_cert -> ca_cert
- kubectl_verify_ssl -> validate_certs

* oc connection: standardize tls params

- oc_cert_file -> client_cert
- oc_key_file -> client_key
- oc_ssl_ca_cert -> ca_cert
- oc_verify_ssl -> validate_certs

* psrp connection: cert_trust_path -> ca_cert

TODO: cert_validation -> validate_certs (multi-valued vs bool)

* k8s inventory: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* openshift inventory: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* tower inventory: verify_ssl -> validate_certs

* hashi_vault lookup: cacert -> ca_cert

* k8s lookup: standardize tls params

- cert_file -> client_cert
- key_file -> client_key
- ca_cert -> ca_cert
- verify_ssl -> validate_certs

* laps_passord lookup: cacert_file -> ca_cert

* changelog for TLS parameter standardization
5 years ago
Chris Archibald 8dbdd987d8 Fix .encode('hex') call for python3 (#53343)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* documentation changes

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* fix encode calls for python3

* fix small issue

* switch to to_text

* Fix string
5 years ago
dgadmin 8de00e3e1c To ipv6 network (#48572)
* Add to_ipv6_subnet function

* Use the correct function for subnet

* Corrected code style and tests

* Corrected testcase assertion

64 bits make 8 octets, or 4 hextets

* Import from correct module directly
5 years ago
Olivier BLIN 1a57daf9b0 Add support for multiple IPv6 addresses in nxos_l3_interface module (#50892)
* Add support for multiple IPv6 addresses in nxos_l3_interface module

Cisco support multiple IPv6 addresses on each interface but only the first
IPv6 is considered by this module. There is no impact on the configuration
but the module is not idempotent.

* Add internal support for IPv6 list
* Fix module idempotency

* Initialize tests for nxos_l3_interface

* Fix IPv4 removal idempotency
* Fix data extraction from nxos config

* Fix silently ignored interfaces in nxos_l3_interface

* Add warning when interface does not exist in nxos config
5 years ago
Chris Archibald 68ad75a56a New Module na_elementsw_cluster_config (#52373)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* New module

* fix author

* update copy right

* fixes
5 years ago
Chris Archibald 194af05832 bug fix (#54430) 5 years ago
Anil Kumar Muraleedharan 8d742d9bff Lenovo cnos user module (#53763)
* Adding cnos_user module to Ansible

* Update cnos_user.py

* Adding Functional test cases and unit test cases.

* Fixing Bug found in testing with Lenovo Mars.

* Review comments incorporated

* Review comments implemented.

* Copy paste mistake
5 years ago
Ujwal Komarla 9384773e1e Exos httpapi (#54405)
* Modify EXOS module utils to utilize 'httpapi' or 'network-cli' connection

* Changes to cliconf plugin to support 'json' or 'text' output for compatibility between network-cli and httpapi

* Add HTTPAPI plugin supportng JSONRPC and RESTCONF for EXOS

* exos_facts modify commands with run script cli2json.py to command dictionary specifying 'json' output
Load appropriate fixtures

* Update exos_config module to utilize the get_diff and get_default_flag functionality.
JSONRPC doesn't work well with pipes, regex MULTILINE

* Support for NOS agnostic 'cli_config' module by implementing 'get_default_flag' and 'get_diff' functionality

* Update Ansible Documentation regarding the connections available for EXOS
5 years ago
Kyryl Galanov 4a5b9bd8eb New lookup module: manifold (#50435)
* New lookup module: manifold

Add Manifold.co integration. The plugin fetches resource credentials
from Manifold service.

* module manifold: fix ansible lint warnings

* module manifold: fix false warning - split test assertion

* manifold module: fix unittest import

* manifold module: fix unittest patch

* manifold module: fix python3 requests getheader error
5 years ago
Alex Stephen a191ed7b58 More GCP Utils Tests (#53568)
* navigate_hash tests

* remove_nones_from_dict tests

* replace_resource_dict tests
5 years ago
Bojan Vitnik 54d23a8297 XenServer: Minor changes to error messages (#54434)
Changed "." for "!" in some error messages to make error messages uniform across the code.
5 years ago
Chris Van Heuveln 20fb77c49b nxos_interfaces_ospf: fix passive-interface states & check_mode (#54260)
* nxos_interfaces_ospf: fix passive-interface states & check_mode

This fix addresses issues #41704 and #45343.

The crux of the problem is that `passive-interface` should have been treated as a tri-state value instead of a boolean.

The `no` form of the command disables the passive state on an interface (allows it to form adjacencies and send routing updates).  It's essentially an override for `passive-interface default` which enables passive state on all OSPF interfaces.\*
This `no` config will be present in `running-config`.

   \**See `router ospf` configuration.*

Since both enable and disable states are explicit configs, the proper way to remove either of these is with the `default` syntax.

Passive-interface config syntax:
```
  ip ospf passive-interface              # enable  (nvgens)
  no ip ospf passive-interface           # disable (nvgens)
  default ip ospf passive-interface      # default (removes config, does not nvgen)
```

Code changes:

* `passive_interface` param changed from boolean to string, restricted to `true`,`false`,`default`.

* Several passive-interface specific checks were added because the existing module logic tends to test for true or false and doesn't handle the None case.

* Fixed `check_mode`.

Sanity verified on: N9K,N7K,N3K,N6K

* Fix doc header

* Unit tests for passive-interface

* doc fix #2

* Fix indent for SA

* Remove 'default' keyword, restore bool behavior

* remove changes to sanity
5 years ago
Matt Clay 399fc110e7 Use pytest.mark.skip instead of pytest.skip. 5 years ago
Rigel Di Scala 51f38b090e Fix failing test modules due to incorrect use of pytest.skip() (#54282) 5 years ago
Anton Nikulin c231fc5a7c New module to install images on Cisco FTD devices (#53467)
* Add ftd_install module

* Remove shebangs

* Avoid using enum package

* Update module docs

* Update ftd_install docs

* Update PropertyMock import

* Fixing unit tests

* Move get_system_info and FtdOperations to module_utils

* Update dependency name

* Move Kick assertion to module_utils

* Add a note about Python interpreter for this module
5 years ago
Hannes Ljungberg be293fbe50 docker_swarm_service: Remove configs and secrets defaults (#54361)
* Remove defaults

* Skip redundant casting

* Indentation fix

* Use generic compare functions

* Add tests for compare functions

* Remove extra whitespace

* Add changelog fragment
5 years ago
Alan Rominger f2f11341a3 Avoid erroring on host group confusion in keyed groups (#54099) 5 years ago
Sloane Hertel 54be769e8d fix AWS plugin credential precedence for environment variables (#52945)
* fix AWS plugin credential precedence for environment variables

* Allow aliases in direct plugins options

Consolidate precedence fix just in the doc fragment using aliases for mismatched options

* Access options with the option name rather than alias

* fix indentation

* update unit tests

* Improve readability
5 years ago
Abhijeet Kasurde 83be129923
helper: raise Exception when ds is not dict type (#53936)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Matt Clay 89a022b6a0 Update handling of the non_local test alias.
Previously the alias disabled all code coverage collection.
Now it only disables Ansible module code coverage collection.
5 years ago
Chris Archibald 6a2b9c2a86 New Module: na_elementsw_cluster_snmp (#52374)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* new module

* fix author

* update copyright date

* test/units/modules/storage/netapp/test_na_elementsw_cluster_snmp.py
5 years ago
Chris Archibald 1e6aa9533c New na_ontap_volume option (#52587)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Update to volume

* fix documentation

* Fix doc
5 years ago
Evgeniy Krysanov 907765a3a5 Add Bitbucket Pipelines variable module (#54049)
* Add Bitbucket pipelines variable module

* Add tests

* Remove parameters check for `absent` state

* Update version_added documentation field

* Minor fixes

* A few additional cosmetic changes

* Move to source_control

* Rename lib/ansible/modules/source_control/bitbucket_pipelines_variable.py to lib/ansible/modules/source_control/bitbucket/bitbucket_pipelines_variable.py

* Reflect directory change

* Move these imports as well

* Rename 'key' parameter (API) to 'name' (GUI)

* Add missing __init__.py files to mark modules

* Rename module (pipeline should be singular)

* Adjust module references and variable names after renaming
5 years ago
James Cassell 530771e6f8 rename rhsm_repository_release to rhsm_release (#53430)
no changelog needed, as it is a new module for 2.8
5 years ago
Sam Doran ff88bd82b5
Move type checking methods out of basic.py and add unit tests (#53687)
* Move check_type_str() out of basic.py

* Move check_type_list() out of basic.py

* Move safe_eval() out of basic.py

* Move check_type_dict() out of basic.py

* Move json importing code to common location

* Move check_type_bool() out of basic.py

* Move _check_type_int() out of basic.py

* Move _check_type_float() out of basic.py

* Move _check_type_path() out of basic.py

* Move _check_type_raw() out of basic.py

* Move _check_type_bytes() out of basic.py

* Move _check_type_bits() out of basic.py

* Create text.formatters.py

Move human_to_bytes, bytes_to_human, and _lenient_lowercase out of basic.py into text.formatters.py
Change references in modules to point to function at new location

* Move _check_type_jsonarg() out of basic.py

* Rename json related functions and put them in common.text.converters

Move formatters.py to common.text.formatters.py and update references in modules.

* Rework check_type_str()

Add allow_conversion option to make the function more self-contained.
Move the messaging back to basic.py since those error messages are more relevant to using this function in the context of AnsibleModule and not when using the function in isolation.

* Add unit tests for type checking functions

* Change _lenient_lowercase to lenient_lowercase per feedback
5 years ago
Matt Clay 98fdbf6a13 Fix test_oneview_ethernet_network unit test.
Use yaml.safe_load since yaml.load without a loader is deprecated.
5 years ago
Matt Clay 3ea05f7757 Add pypsrp to unit tests and disable failing test. 5 years ago
Felix Fontein 4ced1c693c Docker: mention Docker SDK for Python instead of docker/docker-py (#53917)
* Mention Docker SDK for Python instead of docker-py / docker.

* Docs fixes.

* Add myself as docker_container author.

* Use array syntax for running command.

* Break long lines.

* Avoid failure when docker_version is None.

* Improve docker-py vs. docker note in requirements.

* Canonicalize Docker SDK for Python upgrade instructions.

* Split long line.

* Make it clearer which hostnames are meant.
5 years ago
Chris Archibald e3b6a07f6e Adds Gather Subset Feature to na_ontap_gather_facts (#53993)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* Revert "Revert "documentation changes""

This reverts commit fffeb974104f2da047435021e0dce94311e945b1.

* Gather facts

* Revert "Gather facts"

This reverts commit 67bfd54f6780818854b5e5d99db52afef89ac4f2.

* Revert "Revert "Gather facts""

This reverts commit 199c27c520bdfce1fc2dfa685dc953cb56381de2.

* Revert "Gather facts"

This reverts commit fc6d21418123d03af3cedd1903175277b1612856.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* Gather facts

* Revert "Gather facts"

This reverts commit 67bfd54f6780818854b5e5d99db52afef89ac4f2.

* Revert "Revert "Gather facts""

This reverts commit 199c27c520bdfce1fc2dfa685dc953cb56381de2.

* Revert "Gather facts"

This reverts commit fc6d21418123d03af3cedd1903175277b1612856.

* revert

* Revert "Revert "documentation changes""

This reverts commit fffeb974104f2da047435021e0dce94311e945b1.

* fix conflicts
5 years ago
Anil Kumar Muraleedharan 7a24ecde86 Lenovo cnos system module (#53764)
* Adding cnos_system module to Ansible.

* Adding UT, Functional test required for cnos_system. Bugs came up are fixed

* Adding more files to the cnos_system suit.
5 years ago
Anil Kumar Muraleedharan e4a1473a8f Lenovo cnos static route (#53736)
* Adding new module to Ansible viz. cnos_static_route.
5 years ago
Toshio Kuratomi f5f4948480
Remove nose from unittests (#54055)
* Remove nose from unittests

This PR migrates the last of our unittests from using nose to using
pytest.  We don't need to install nose in our testing environments
anymore
5 years ago
Wojciech Wypior dcf833d31c adds new module to manage bigip devices on the BIGIQ (#53987) 5 years ago
Wojciech Wypior e13cb29e23 Refactors main() function and module manager in multiple modules in line with recent changes (#53954)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
Adds missing Return values to documentation
Removes deprecated modules unit tests
5 years ago
Wojciech Wypior dcf40d43ea deprecates the old module name (#53972)
adds ha order, ha group and ha load as failover types
refactors main() function and module manager to accomodate new patterns
updates docs
refactors unit tests
5 years ago
Wojciech Wypior cd1ff016ef deprecates the old package name bigip_iapplx_package (#53988)
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Chris Archibald 309f7e59a3 Add ability to run in Privileged mode to Na_ontap_command (#52343)
* update command

* doc update

* fix review comments
5 years ago
Chris Archibald 3ff20436b6 Modify port would remove and re-add ports on a modify which can results in an error (#53341)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* documentation changes

* Revert "documentation changes"

This reverts commit 02c369d0414fdff492d90865c903bdade3174261.

* Issue with port being removed and added on modify
5 years ago
Wojciech Wypior 9a007799d4 Refactors main() function and module manager in multiple modules in line with recent changes (#53984)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 1e4dab822b BIGIP: Bugfix.bigiqapplication (#53986)
* adds function to do version checks for bigiq

* adds version limitation to bigiq application modules
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 648ac17be3 Refactors main() function and module manager in multiple modules in line with recent changes (#53983)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 348b6e7da9 Refactors main() function and module manager in multiple modules in line with recent changes (#53982)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 1a411e9c6b Refactors main() function and module manager in multiple modules in line with recent changes (#53981)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 739df1c348 Refactors main() function and module manager in multiple modules in line with recent changes (#53979)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 9744ef80a0 BIGIP: Bugfix.multiple modules 3 (#53969)
* Moving comparision functions to compare.py from common.py

* Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 284565c39e Refactors main() function and module manager in multiple modules in line with recent changes (#53974)
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior 313e07dfd3 BIGIP: Bugfix.bigip.data.group (#53968)
* Moving comparision functions to compare.py from common.py

* fixes issue with data group elements containing IPs with Route Domains
refactors main() function and module_manager to accomodate new patterns
updates doc variables
5 years ago
Wojciech Wypior 2b00cb592d Adds new module to manage and create ha groups (#53967) 5 years ago
Wojciech Wypior 5be1348081 Fixes issue with sub collection for pool members (#53955)
Refactors main() function and module manager in multiple modules in line with recent changes
Adds variable types to docs
Refactors unit tests to remove deprecated parameters
5 years ago
Wojciech Wypior fbc8ee0288 Refactors main() function and module manager in multiple modules (#53948)
Improves docs
5 years ago
Chris Archibald baf255e4c1 Allow comment for na_ontap_svm (#52300)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* updates

* doc changes

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.
5 years ago
Abhijeet Kasurde 3fa39ac818 ec2_vpc_vpn: Add delay and wait_timeout parameter (#53940)
* ec2_vpc_vpn: Add delay and wait_timeout parameter

Fixes: #53481

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* Fix unit tests

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
MonsieurBon eb790cd3c6 Added support for iptables module iprange (#53732) (#53732) 5 years ago
Olivier Bourdon 668f014b3c Add more tests for method option change (#52228) 5 years ago
Lindsay Hill b92d81cc01 Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 5 years ago
rajaspachipulusu17 e2d92e82c4 Pluribus Networks network cli terminal and cliconf plugins (#53735)
* Pluribus Networks network cli terminal and cliconf plugins

* Changes in Unit tests and modules according to network_cli connection

* Changes in Unit tests and modules according to network_cli connection
5 years ago
Sam Doran 43a44e6f35
Move utility functions out of basic.py (#51715)
Move the following methods to lib/anisble/module_utils/common/validation.py:

- _count_terms()
- _check_mutually_exclusive()
- _check_required_one_of()
- _check_required_together()
- _check_required_by()
- _check_required_arguments()
- _check_required_if
- fail_on_missing_params() --> create check_missing_parameters()
5 years ago
Sloane Hertel 87ebc56de6 Allow parent groups to be variables or literal (#53649)
* Allow parent groups to be variables or literal, requires {{ }}
* Check strict before failing on templating errors
* Don't add a group if an invalid parent group was provided
5 years ago
Alan Rominger 8c2037aaa9 do not error in case of empty list constructed group (#53748) 5 years ago
Chris Archibald 14d670573a Ability to add port in portset (#52734)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* add ports
5 years ago
Chris Archibald b5144a36ab New Module: na_elementsw_initiators (#52375)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Revert "Revert "changes to clusteR""

This reverts commit f1104a37b4.

* new module

* update author

* update copyright

* fixes
5 years ago
Brian Coca e280f2f7b0
Try to get correct buffer size to avoid races (#53547)
* Try to get correct buffer size to avoid races

  fixes #51393

* fix test, mock buffer function since all is mocked
5 years ago
Sam Doran 55306906cf
Correctly count processors on ARM systems. (#52884)
- Add unit tests for Linux CPU info
- Add cpuinfo output from several systems for unit tests

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Chris Archibald fa2e8d8fe1 New Module: na_ontap_snapshot_policy.py (#52299)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* add snapshot policy

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* review change
5 years ago
Bojan Vitnik edcd921258 XenServer: Fix wrong FakeXenAPI module import in unit tests (#53634) 5 years ago
Chris Archibald 0e77eeb205 Merging of broadcast domain and Broadcast domain port (#51978)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Add domain ports in to broadcast domain

* ansibot fixes

* Revert "Revert "changes to clusteR""

This reverts commit 2713c75f31.

* Fix author
5 years ago
albinpopote 473596a472 New module: na_ontap_net_subnet (#50491)
* New module: na_ontap_net_subnet

* Sanity tests Fix

* Fix: correct examples

* Fix: examples syntax

* Correction: Sanity 1

* Code review

* Code review + Bugfix

* Add Unit Tests

* Fix Sanity Indentation tests

* FIX: Validator change request

* FIX : Change unit test json fail message

* FIX: Typo ip_ranges in example section

* FIX: Remove NetApp copyright
5 years ago
Chris Archibald 2e47e9fffa Modify na_ontap_net_port NetAppModule module format, allow for multiple ports, unit tests (#52286)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* add update to netport

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* fix docs

* fix option
5 years ago
Abhijeet Kasurde 8d4343b94c
iptables: implement log_level parameter (#52880)
Fixes: #25100

Based upon https://github.com/ansible/ansible/pull/25118

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Abhijeet Kasurde f0ef4dae05
iptables: Add support for gateway parameter (#53465)
When user specifies the JUMP value to 'tee', gateway is required.
This fix adds new parameter 'gateway' to support this functionality.

Fixes: #53170

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Felix Fontein c2cb82ec14 ACME: add support for IP identifiers (#53660)
* Adding support for IP identifiers according to https://tools.ietf.org/html/draft-ietf-acme-ip-05.

* Add changelog.

* Make sure that the authorizations return value is unchanged for CSRs with DNS-only SANs.

* Remove unneeded import.

* type -> identifier_type

* Python 2.6 compatibility.

* Fix unit tests.

* Add IP address normalization.

* Extend tests.

* Move data into fixtures.

* Adjust BOTMETA.
5 years ago
krisvasudevan 651fc88303 Added support for infoblox member object (#53174)
* changes for member module
5 years ago
Nilashish Chakraborty 9365c0f468
New module for BGP configuration management in Arista EOS (#52722)
* New module for BGP in EOS

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add function to validate input

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix line indentation

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add integration tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix CI

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix sanity test failure

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Remove unused code

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
5 years ago
Jordan Borean c8c326d88e
Use unicode string for auto interpreter warnings (#53671)
* Use unicode string for auto interpreter warnings

* Added some unit tests for interpreter selection

* Fix python 3 syntax issues
5 years ago
Brian Coca f73e03632f
remove obsolete set_play on play_context (#47934)
* remove redundant assignments from play

 - fix unit tests
5 years ago
Matt Clay 887ab35656
Add support for ansible-test --coverage-check. (#53573) 5 years ago
Chris Archibald 1a306ce871 Rewrite of na_ontap_snapshot to follow NetAppModule, add new option to rename snapshot, bug fix to modify snapmirror_label (#52297)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* upadets

* fix docs

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* review change
5 years ago
Chris Archibald 48098ba688 Updates to na_ontap_net_route (#49656)
* new option and rewrite

* update documentation

* fix documentation

* Review change

* add comment
5 years ago
Chris Archibald dbcfb3d0fe Update to na_ontap_firewall_policy (#51976)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* Fix issue and unit tests

* update to firewall

* fix import issues

* Revert "Revert "changes to clusteR""

This reverts commit 2713c75f31.

* fix docs

* stop pylint on unicode line, line can only be run in python2

* Review comment

* add pylint skip

* add pylint skip
5 years ago
Trishna Guha a41028244d
Add platform facts in network facts modules (#51434)
* Add platform facts in network facts modules

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

* Add nxos

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

* Add vyos

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

* Add iosxr

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

* Add junos

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

* fix pep8

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

* update unit test

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

* fix vyos_facts unittest

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

* fix ios_facts unittest

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

* fix iosxr unittests

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

* fix CI failure

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

* fix junos test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
5 years ago
Bojan Vitnik e775434a52 XenServer: Documentation improvements and fixes for XenServer related modules (#53498)
- More info added to module docs.
 - Fixed errors and typos in module docs.
 - Added parameter types to module docs.
 - Some error messages are fixed and/or changed to be more helpful.
 - Some code comments changed and added.
 - Updated unit tests that test changed error messages.
 - Improved module examples.
 - Improved docs for custom_params xenserver_guest module parameter
5 years ago
ndswartz 26d87a912b Added eseries base with tests (#49269) 5 years ago
Sam Doran 1d91e03119
Ensure Clear Linux parsing is actually parsing a Clear Linux host and all others fall back to NA (#53298)
Fixes a bug where parse_distribution_file_ClearLinux() was called on CoreOS (and probably many other distros) and it returned True since it successfully parses the distribution file. Since this file exists on many Linux distributions and they are a very similar format, add an additional check to make sure it is Clear Linux.

Change the order in which distribution files are processed so NA is last. This prevents a match on CoreOS hosts since they also have /etc/os-release and the called matching function for NA is very general and will match CoreOS.

* Add changelog

* Add unit tests

Only add tests for Clear Linux parsing since that was the cause of this issue.
5 years ago
Jordan Borean 8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* Add support for Windows hosts in the SSH connection plugin

* fix Python 2.6 unit test and sanity issues

* fix up connection tests in CI, disable SCP for now

* ensure we don't pollute the existing environment during the test

* Add connection_windows_ssh to classifier

* use test dir for inventory file

* Required powershell as default shell and fix tests

* Remove exlicit become_methods on connection

* clarify console encoding comment

* ignore recent SCP errors in integration tests

* Add cmd shell type and added more tests

* Fix some doc issues

* revises windows faq

* add anchors for windows links

* revises windows setup page

* Update changelogs/fragments/windows-ssh.yaml

Co-Authored-By: jborean93 <jborean93@gmail.com>
5 years ago
Sam Doran bf28b5ceca
Use distro.id() instead of distro.name() (#52199)
* Update sys_info unit tests

* Correct distribution values in hostname.py

* Normalize Rhel to Redhat
5 years ago
Ankit Bhansali 85ba4d7c73 itential iap_start_workflow module (#51238)
* initial commit

* fixed the linting and requests error

* updated test file setup

* updated code as per feedback

* updated test import

* updated test import with unittest

* updated validate certs for https

* updated after pep8 test

* removed under-construction remark

* Initial commit

* removed type for tests

* removed types and added ssl compatibility

* applied return type

* applied return type as dict instead of obj

* applied types in eact field

* tested with a playbook

* modified owner

* added unit test

* following pep8 guidelines

* added mock and unittest separately

* Sanity check using pep8

* added full path on patch
5 years ago
hexdump0x0200 4d407d1781 ios_logging: fix idempotence errors (#53109)
* ios_logging: fix the error checking the existence of "host" destinations (IOS 12)

In the "have" list, records of type "host" do not contain the key "size",
although in the list "want" it is always there. Because of this, the module
assumes that the "host" type destinations is not configured and does it again.
This does not change the configuration on the device, but is redundant and
the status of the task will always be "changed". This patch fixes it.

* ios_logging: fixes #53227

* ios_logging: minor changes in string matching
5 years ago
abirami-n ce9fc9b912 opx_cps_changes (#51952) 5 years ago
ftntcorecse be3fe8f364 FortiManager Plugin Module Conversion: fmgr_ha (#52768)
* Auto Commit for: fmgr_ha

* Auto Commit for: fmgr_ha

* Removed about 50 lines of validation in favor of "required_if" clauses.
5 years ago
Sloane Hertel 9687879840
Fix inventory cache interface (#50446)
* Replace InventoryFileCacheModule with a better developer-interface

Use new interface for inventory plugins with backwards compatibility

Auto-update the backing cache-plugin if the cache has changed after parsing the inventory plugin

* Update CacheModules to use the config system and add a deprecation warning if they are being imported directly rather than using cache_loader

* Fix foreman inventory caching

* Add tests

* Add integration test to check that fact caching works normally with cache plugins using ansible.constants and inventory caching provides a helpful error for non-compatible cache plugins

* Add some developer documentation for inventory and cache plugins

* Add user documentation for inventory caching

* Add deprecation docs

* Apply suggestions from docs review

* Add changelog
5 years ago
Anil Kumar Muraleedharan 77565554c8 To fix bug on switch port issue of L3 interfaces. (#53267)
* To fix bug on switch port issue of L3 interfaces.

* Adding mock return value for is_switch_port method
5 years ago
Brian Coca d241794daa
Add toggle to control invalid character substitution in group names (#52748)
* make add_group return proper name
* ensure central transform/check
* added 'silent' option to avoid spamming current users
  those already using the plugins were used to the transformations, so no need to alert them
* centralized valid var names
* dont display dupes
* comment on regex
* added regex tests
  ini and script will now warn about deprecation
* more complete errormsg
5 years ago
Alan Rominger 56e3597856 Add keyed_groups feature (#52045)
This implements:
- Allow creating keyed group parents
5 years ago
Chris Archibald 04c6f94269 New Module: na_ontap_quotas (#49783)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* new module na_ontap_quotas

* fix file location

* Fix author

* updates

* Revert "Revert "changes to clusteR""

This reverts commit 1c82958764.

* fix author

* Add types
5 years ago
Chris Archibald af6e4cc75b Add tcp_max_xfer_size option for na_ontap_nfs, plus unit test (#52288)
* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* updates

* Revert "Revert "changes to clusteR""

This reverts commit 8e56b999e6.

* fix docs

* Fix boolean to bool

* Update lib/ansible/modules/storage/netapp/na_ontap_nfs.py

Co-Authored-By: carchi8py <carchi@netapp.com>
5 years ago
Felix Fontein 07fcb60d55 Python 2: accept both long and int for type=int (module options) (#53289)
* Added unit test
5 years ago
ftntcorecse d1c0df9e92 FortiManager Plugin Module Conversion: fmgr_secprof_web (#52788)
* Auto Commit for: fmgr_secprof_web

* Auto Commit for: fmgr_secprof_web

* Auto Commit for: fmgr_secprof_web
5 years ago
ftntcorecse 7ee7c3cf2c FortiManager Plugin Module Conversion: fmgr_secprof_waf (#52789)
* Auto Commit for: fmgr_secprof_waf

* Auto Commit for: fmgr_secprof_waf

* Auto Commit for: fmgr_secprof_waf
5 years ago