Commit Graph

912 Commits (6d3307e472437f1cd116b8858cf67af5cbfe7a74)

Author SHA1 Message Date
Ganesh Nalawade d72eb08902 Fix nxos provider transport warning issue (#30610)
* Fix nxos provider transport warning issue

*  Add default value of transport arg in provider spec
*  Remove default value if transport arg in top level spec
   This ensure deprecation warning is seen only in case transport
   is given as a top level arg in task
*  Refactor nxos modules to reference transport value from provider
   spec

* Fix unit test

* Remove transport arg assignment in nxos action plugin

* As assigning transport value is handled in provider spec
  top level task arg assignment is no longer required
7 years ago
Tim Rupp 0eb0d96286 Adds module which allows users to manage partitions on a BIG-IP (#30577) 7 years ago
dteach ca56a248d8 junos_facts: Add Hardware facts. (#30304)
* Add Routing Engine Facts

 - Map routing engine output information to routing_engines facts dict.
 - Add fact 'has_2RE', which is a quick way to determine how many REs
   the chassis has.

* Fix a typo

* Fix more typos

* Add slot number to routing_engine dict

* Add facts about the installed chassis modules

* Fix typo

* Fixed another typo

* Fix Path

* Change path again.

* More Typos

* Add some deubgging

* Add additional information for hardware components.

 - Return information about the Routing Engines.
 - Return a fact to easily determine if the device
   has two routing engines.
 - Return information about the hardware modules.

* Addressed pep8 stardard failures.

* Add unit test fixtures.

* Rename fixture.

* Fix unit test failures.

 - Rename the fixture file to what the unit test expects.
 - Strip out junos namespace attributes.
Rename file to match what the unit test expects.

* Scrubbed the routing engine serial numbers.

* Add unit test facts for new tests.

 - Add unit test for ansible_net_routing_engines fact
 - Add unit test for ansible_net_modules fact
 - Add unit test for ansible_net_has_2RE

* Fixed spacing.
7 years ago
Adrian Likins 307be59092 Don't ask for password confirm on 'ansible-vault edit' (#30514)
* Don't ask for password confirm on 'ansible-vault edit'

This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491
7 years ago
Toshio Kuratomi 0a69e27e62 Fix jenkins_plugin test for no net situations (#30568)
Unittests are sometimes run without network connectivity in build
systems.  Make that work correctly by mocking out _get_url_data with the
expected return value.
7 years ago
Matt Clay dbf9634b1b Enable more pylint rules and fix reported issues. (#30543)
* Enable pylint invalid-encoded-data test.
* Enable pylint anomalous-unicode-escape-in-string test.
7 years ago
Matt Clay 7714dcd04e Enable more pylint rules and fix reported issues. (#30539)
* Enable pylint unreachable test.
* Enable pylint suppressed-message test.
* Enable pylint redundant-unittest-assert test.
* Enable pylint bad-open-mode test.
* Enable pylint signature-differs test.
* Enable pylint unnecessary-pass test.
* Enable pylint unnecessary-lambda test.
* Enable pylint raising-bad-type test.
* Enable pylint logging-not-lazy test.
* Enable pylint logging-format-interpolation test.
* Enable pylint useless-else-on-loop test.
7 years ago
Dag Wieers 6a6f88d035 Clean up ACI error text (#30501)
* Clean up ACI error text
* Get rid of explicit unicode strings, use PY2
7 years ago
Toshio Kuratomi 1fa3fb45bc Update aci tests for new messages from lxml-4.0+ 7 years ago
Mike Wiebe 173c41aefe Rel240/fix nxos pim interface (#29885)
* fix nxos_pim_interface

* Add integration test coverage and fix unit test

* Add clarifying comments

* Make ansibot happy
7 years ago
Ganesh Nalawade 3ff527b1d2 Fixes #30281 eos_banner integration test failure (#30283)
* Fixes #30281 Configure login prompt for eos_banner

* Fix unit test

* Fix pep8 issue
7 years ago
Felipe Garcia Bulsoni 18707136e2 Added support to retrieving SAN Manager resources in HPE OneView
- Added unit tests
- Added _main_ function to oneview unit tests which were missing it
7 years ago
Felipe Garcia Bulsoni eeb8128baf Added __main__ method to tests so they can be run directly through Python 7 years ago
Matt Clay 442af3744e Miscellaneous pylint fixes.
The following rules are no longer disabled:

- bad-format-string
- duplicate-key
- lost-exception
- trailing-newlines
- unexpected-keyword-arg
- useless-suppression
- using-constant-test
7 years ago
Matt Clay 68aeaa58a8 Fix dangerous default args. (#29839) 7 years ago
Tim Rupp 74ace093b8 Renames the bigip_configsync_actions module (#29747)
Retains the old name by making a symlink. We can remove it in a later
release.
7 years ago
Miguel Ángel Ajo 8e4f112b39 Fixes #23680 bug with py3.x due to binary string handling (#23688)
* This commit includes a unit test to exercise the _is_role
function and make sure it doesn't break in any Python version.
* Import os.path and other minor fixups
7 years ago
Toshio Kuratomi 75249e311e Fix set theory filters for python3
The set theory filters need to use lists rather than generators on python3.

Also add unit tests for most of the mathstuff filters

Fixes #26494
7 years ago
Brian Coca fe3b4325c2 less confusing 'args' message (#29053)
* less confusing 'args' message

* fix test

* gone native
7 years ago
Nathaniel Case f84ff216b6 Generalize nxos_bgp event-history detection (#28890)
* More general handling of event-history

* Update unit tests
7 years ago
Nathaniel Case 8bfdbd0f73 nxos_bgp_neighbor: Fix regex &report warnings (#28888)
* Fix over-detection of log-neighbor-as

* Report nxos warnings

* Update nxos_bgp_neighbor unit tests to test remove-private-as
7 years ago
Trishna Guha 252efcebf5 module should fail if eos_user is added without configured_password or nopassword or sshkey (#28780)
* module should fail if eos_user is added without configured_password or nopassword or sshkey

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

* fix eos_user unit test

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

* fix eos_user integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Felipe Garcia Bulsoni fd304d9b5b Added support to SAN Manager resource in HPE OneView (#28787)
- Added unit tests
7 years ago
Felipe Garcia Bulsoni 1e785d4117 FcoeNetworkFactsModule for HPE OneView (#28728)
* Add FcoeNetworkFactsModule for retrieving HPE OneView FCoE Networks

- Allow querying for FCoE Network resources in HPE OneView
- Adds unit tests to new module

* Fix "required: no"
7 years ago
Felipe Garcia Bulsoni 6ea2099ee4 EthernetNetworkFactsModule for HPE OneView (#28723)
* Adds EthernetNetworkFactsModule for retrieve HPE OneView

- Allows retrieving Ethernet Network resources from HPE OneView
- Adds unit tests

* Removed required: no
7 years ago
Felipe Garcia Bulsoni a4ae8536d9 NetworkSetFactsModule for HPE OneView (#28730)
* Add NetworkSetFactsModule for retrieving HPE OneView Network Sets

- Allow querying for Network Set resources in HPE OneView
- Adds unit tests to new module
- Updates oneview_module_loader copyright header to short GPL3 version

* Adding possibility to pass in credentials as parameters

* Removed required false and changed format of filter_by_name declaration

* Updated examples in docs to reflect new way to pass in credentials

- All examples of the oneview_network_set_facts updated to use
credential parameters
- All required=False from oneview base module removed
- Shared docs updated to bring attention to API version being used
7 years ago
jacky.chen 75998d3ca3 [cloud] Add the ability to modify shard count to kinesis_stream module (#24805)
* Add the ability to modify shard count to kinesis_stream module

* Fixed an issue in kinesis_stream where update() reports not changed when it is changed

* Remove unreachable message and make the try and catch block shorter
7 years ago
Mike Wiebe d9fc3def94 Fixes #28779 eth_mode key error (#28782)
* Fixes #28779 eth_mode key error

* Remove unused get_config references

* Addressed PR comment
7 years ago
Nathaniel Case 64dac346c9 Fix nxos_pim_interface dr-priority handling (#28472)
* Fix nxos_pim_interface dr-priority handling

* Prefer execute_show over `| json`

* Mock get_config

* Fix sparse-mode detection
7 years ago
Brian Coca aec1dfd1fa fix improt order to actually skip when no boto 7 years ago
Jacob McGill 1c4fe510d0 IOS Ping: Add new module to support ping tests from IOS devices (#28557)
* IOS Ping: Add new module to support ping tests from IOS devices

* Add tests

* Add fixtures for ios_ping
7 years ago
Kai 3251aecd95 Fix leading slashes being stripped from mount src (#24013)
* Tidy mount module for testing

Fix spelling mistakes in comments. I *think* the example for omitting parents
root has the wrong parent ID.

Make mountinfo file a parameter for testing.

* Don't strip leading slash from mounts

The current code does not follow the example, it produces src=tmp/aaa instead
of src=/tmp/aaa. This causes problems with bind mounts under /rootfs.

* Use dictionary to store mounts by ID

Instead of looping over each one to check if the ID matches. This does not
preserve the order of the output on < Python3.6, but that is not necessary.

* Make linux_mounts a dict

Always accessed by 'dst', so avoid looping by just making it a key.

* Add test case for get_linux_mounts
7 years ago
Brian Coca f9b3f4f934 make groups magic var dependant on inventory (#28677)
* make groups magic var dependant on inventory

it was overtly restricted by 'host'
minor fixes to test_var_manager.py, need to test other values also

* pepe hates extra blank line
7 years ago
Michael De La Rue fbec5ab12d [cloud] new module lambda_policy (PR #24951)
- Fixes to lambda
- reformatting + tests for lambda_facts
- lambda module integration test
- switch lambda and lambda_facts to AnsibleAwsModule
- Get the account ID from STS, GetUser, and finally error message
7 years ago
Mike Wiebe 3d46258cff Refactor/fix nxos_nxapi to use show run (#28675)
* Refactor/fix nxos_nxapi to use show run

* Fix unit tests

* Python 3 compatibility
7 years ago
Felipe Garcia Bulsoni 791a029203 Added support to HPE Network Set resources (#28614)
- Added unit tests
7 years ago
Felipe Garcia Bulsoni 978c64afc5 Support retrieving Facts about Fibre Channel resource of HPE OneView (#28608)
* Added FcNetworkFactsModule to query FC Network Resources in HPE OneView

- Added unit tests

* Removing unnecessary quotes from example and documentation
7 years ago
George Nikolopoulos c01dd6470c Add disable operation for netscaler_servicegroup (#28327) 7 years ago
George Nikolopoulos 2281a6676b Add enable, disable operation in netscaler_service (#28321) 7 years ago
Evgeny Fedoruk 71313ce04d Module for uploading templates into vDirect server (#27570)
* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server

* Module for uploading templates into vDirect server

Module for uploading configuration and workflow templates
into Radware vDirect server
7 years ago
Peter Sprygada 75293d83ca configures address-families when vrf is created (#28615)
* configures address-families when vrf is created

fixes #26725

* fix up unit test cases
7 years ago
Nicolas Porcel ba420c47cd synchronize: Use private_key and ssh_user with delegate_to (Fixes #16215) (#21686) 7 years ago
Sloane Hertel cf1a9d4d22 New module: Add ec2 Vpn Connection module and tests (cloud/amazon/ec2_vpc_vpn) (#24385)
* Add VPN module and unittests

* remove unnecessary imports

* fix documentation

* raise custom exception rather than passing module everywhere

* remove recordings

Rerecord tests

Fix docs

Ensure vpn_connection_id is a list of strings when checking if it exists

* fix check mode

* Rerecord tests

* remove superfluous code and comments and make exception handling uniform

fix docs

* Fix ec2_vpc_vpn documentation

* make ec2_vpc_vpn compatible with python 2.6 and make check mode logic more succinct

* fix comparison of list of dicts

* Fix typos and docstrings

make requested changes for imports

make code clearer

* Fix copyright and metadata version.
7 years ago
Felipe Garcia Bulsoni fb6ed8d76c EthernetNetworkModule for HPE OneView (#28336)
* Adding module to manage ethernet network on HPE OneView

* Adding unit tests to EthernetNetwork module

* Added OneViewModuleException custom exceptions to module

- Removed exception imports from hpOneView
- Updated unit tests

* Fixing mock import inside ethernet network module unit test

* Fixing issues found in METADATA by CI

* Updated paths to use solution name instead of vendor name

* Fixed documentation, removed redundant if and improved readability

* Updated _bulk_present to use and return `result`, same way as _present

* Changed __ to _ in private methods following ansible style

* Fixed some example inconsistencies and turned states doc into a list

* Added adriane-cardozo to list of maintainers
7 years ago
Brian Coca 725d4d4bc8 added diff as new keyword (#28581)
added diff to fake options in ec2_vpc_nat_gateway test
7 years ago
Michael Tinning 282e743eb0 elb_application_lb: fix issue with boto parameter validation on Rules (#27333) 7 years ago
Sloane Hertel 24b49c2539 [cloud] New module: AWS Direct Connect connection (#26152)
* New module for AWS Direct Connect connections

Unittests for new module

Added utils that will be used by other Direct Connect modules

* pep8 fixes

* Correct aws_direct_connect_connection EXAMPLES to be valid yaml

* Make requested changes

* remove use of the variable changed

get rid of unnecessary parentheses

* Fix unit test

* Rename variable.

* Fix metadata version
7 years ago
Sloane Hertel a48e0b5101 New Module to manage AWS direct connect link aggregation groups (#27250)
* Add module_utils/aws/direct_connect.py for frequently used functions

* new AWS Direct Connect link aggregation group module with tests and placebo recordings

* remove extra argument

* Remove use of undefined var

* Fix param name for extra exception codes for AWSRetry to use.

* Fix undefined var and line length and metadata version number

* Fix copyright headers
7 years ago
Felipe Garcia Bulsoni 84005498bc Support Fibre Channel over Ethernet resource of HPE OneView (#28359)
* Added new oneview_fcoe_network module and unit tests

* Fixing metadata issues and importing unittest from ansible.compat.tests

* Fixing shebang and adding correct copyright header

* Renamed remote_management/hpe to remote_management/oneview

* Updated documentation and default state according to review comments

- Added present as the default state
- Added delegate_to: localhost in all examples
- Changed config path from a variable to illustrate a location
- Other documentation fixes
7 years ago
Sloane Hertel 7551e8c921 AWSRetry: allow retrying on additional ClientError exceptions (#28483)
* Added the ability to extend the exception list in CloudRetry

* AWSRetry boto and boto compatible

* Updated tests to reflect boto/boto3

* Added boto to shippable requirements

* Have base_class and added_exceptions default to None in CloudRetry

AWSRetry - only retry on boto3 exceptions and remove boto requirement from tests

* Make requested changes.
7 years ago