Commit graph

2031 commits

Author SHA1 Message Date
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
2019-03-27 09:15:50 +05:30
Matt Clay
399fc110e7 Use pytest.mark.skip instead of pytest.skip. 2019-03-26 11:10:51 -07:00
Rigel Di Scala
51f38b090e Fix failing test modules due to incorrect use of pytest.skip() (#54282) 2019-03-26 10:51:06 -07:00
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
2019-03-26 19:35:53 +05:30
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
2019-03-26 09:45:40 -04:00
Alan Rominger
f2f11341a3 Avoid erroring on host group confusion in keyed groups (#54099) 2019-03-25 16:57:46 -04:00
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
2019-03-25 16:53:11 -04:00
Abhijeet Kasurde
83be129923
helper: raise Exception when ds is not dict type (#53936)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-03-25 11:18:33 +05:30
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.
2019-03-22 16:05:24 -07:00
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
2019-03-22 14:18:39 +00:00
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
2019-03-22 14:12:18 +00:00
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
2019-03-22 13:17:08 +01:00
James Cassell
530771e6f8 rename rhsm_repository_release to rhsm_release (#53430)
no changelog needed, as it is a new module for 2.8
2019-03-21 10:21:45 -05:00
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
2019-03-21 09:40:19 -04:00
Matt Clay
98fdbf6a13 Fix test_oneview_ethernet_network unit test.
Use yaml.safe_load since yaml.load without a loader is deprecated.
2019-03-20 22:13:26 -07:00
Matt Clay
3ea05f7757 Add pypsrp to unit tests and disable failing test. 2019-03-20 14:10:21 -07:00
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.
2019-03-20 13:27:44 -04:00
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
2019-03-20 13:56:23 +00:00
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.
2019-03-20 08:50:45 -04:00
Anil Kumar Muraleedharan
e4a1473a8f Lenovo cnos static route (#53736)
* Adding new module to Ansible viz. cnos_static_route.
2019-03-20 08:47:45 -04:00
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
2019-03-19 18:36:45 -07:00
Wojciech Wypior
dcf833d31c adds new module to manage bigip devices on the BIGIQ (#53987) 2019-03-19 15:15:43 -07:00
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
2019-03-19 14:59:14 +00:00
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
2019-03-19 14:58:39 +00:00
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
2019-03-19 14:57:57 +00:00
Chris Archibald
309f7e59a3 Add ability to run in Privileged mode to Na_ontap_command (#52343)
* update command

* doc update

* fix review comments
2019-03-19 14:49:58 +00:00
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
2019-03-19 14:47:24 +00:00
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
2019-03-18 23:30:58 -07:00
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
2019-03-18 23:13:06 -07:00
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
2019-03-18 23:12:34 -07:00
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
2019-03-18 23:12:17 -07:00
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
2019-03-18 22:57:00 -07:00
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
2019-03-18 22:40:40 -07:00
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
2019-03-18 22:03:47 -07:00
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
2019-03-18 21:45:18 -07:00
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
2019-03-18 21:25:54 -07:00
Wojciech Wypior
2b00cb592d Adds new module to manage and create ha groups (#53967) 2019-03-18 21:11:24 -07:00
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
2019-03-18 20:49:21 -07:00
Wojciech Wypior
fbc8ee0288 Refactors main() function and module manager in multiple modules (#53948)
Improves docs
2019-03-18 20:28:54 -07:00
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.
2019-03-18 16:53:48 +00:00
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>
2019-03-18 11:05:51 -05:00
MonsieurBon
eb790cd3c6 Added support for iptables module iprange (#53732) (#53732) 2019-03-18 13:05:04 +00:00
Olivier Bourdon
668f014b3c Add more tests for method option change (#52228) 2019-03-15 09:53:32 +00:00
Lindsay Hill
b92d81cc01 Update slxos_vlan for new SLX-OS versions, linting fixes (#52956) 2019-03-15 08:55:50 +00:00
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
2019-03-15 13:51:50 +05:30
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()
2019-03-14 21:29:55 -04:00
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
2019-03-14 14:22:18 -04:00
Alan Rominger
8c2037aaa9 do not error in case of empty list constructed group (#53748) 2019-03-14 12:27:56 -04:00
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
2019-03-14 15:39:11 +00:00
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
2019-03-14 15:38:49 +00:00