Commit Graph

279 Commits (4af8c6852fbadd269704b0f15456898847e7744e)

Author SHA1 Message Date
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
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
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
Brian Coca 788a0d1b9e skip test when no s3 lib 7 years ago
Mike Wiebe ec11cd2696 nxos_bgp_neighbor_af fix problem with advertise-map properties (#28413)
* Fix problem with advertise-map properties

* Change limit_to back to run all tests

* Fix unit tests

* Move advertise_map out of get_custom_value
7 years ago
David Newswanger b818e986b6 Change network *_user modules to use configured_password to set a users password (#28187)
* WIP, update eos_user args

* refactor password for ios_user

* add eos tests, fix ios tests

* fixed password check

* refactor iosxr_user password

* fixed password arg for nxos

* [WIP] fix vyos_user password

* fix vyos tests

* update docs for net_user

* fix typo

* fix eos tests

* add warning when attempting to use password arg

* fix sanity/unit tests

* fix eos unit tests

* fix vyos_user aggregate

* fix typo in eos documentation string

* re add configured_password to vyos tests after rebase
7 years ago
George Nikolopoulos b339f23485 Various small fixes (#27766) 7 years ago
Peter Sprygada 6886153b54 refactors nxos_vrf_af module (#28208)
* refactors nxos_vrf_af module

fixes #27595

* fix up unit test cases

* add commands to result dict

* add route-target on afi create

* adds deprecation note to safi argument
7 years ago
David Newswanger a37c5e53e6 fix prompt error when deleting ios user (#28175)
* fix prompt error when deleting ios user

* placate pep8

* wrap delete user command in function

* fix python 3 unit tests
7 years ago
Trishna Guha ce3d1c6ba0 eos_user fix username param (#28114)
* eos_user fix username param

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

* Add setup eos_user test and rename username for consistency

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

* update unit test and pep8 fix

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

* pep8 fix
7 years ago
Pierre-Louis Bonicoli c6efb81707 circonus_annotation: reason becomes a string 7 years ago
Pierre-Louis Bonicoli 2bbe99dc26 circonus_annotation: add unit tests 7 years ago
Brian Coca f921369445 Ansible Config part2 (#27448)
* Ansible Config part2

- made dump_me nicer, added note this is not prod
- moved internal key removal function to vars
- carry tracebacks in errors we can now show tracebacks for plugins on vvv
- show inventory plugin tracebacks on vvv
- minor fixes to cg groups plugin
- draft config from plugin docs
- made search path warning 'saner' (top level dirs only)
- correctly display config entries and others
- removed unneeded code
- commented out some conn plugin specific from base.yml
- also deprecated sudo/su
- updated ssh conn docs
- shared get option method for connection plugins
- note about needing eval for defaults
- tailored yaml ext
- updated strategy entry
- for connection pliugins, options load on plugin load
- allow for long types in definitions
- better display in ansible-doc
- cleaned up/updated source docs and base.yml
- added many descriptions
- deprecated include toggles as include is
- draft backwards compat get_config
- fixes to ansible-config, added --only-changed
- some code reoorg
- small license headers
- show default in doc type
- pushed module utils details to 5vs
- work w/o config file
- PEPE ATE!
- moved loader to it's own file
- fixed rhn_register test
- fixed boto requirement in make tests
- I ate Pepe
- fixed dynamic eval of defaults
- better doc code

skip ipaddr filter tests when missing netaddr
removed devnull string from config
better becoem resolution

* killed extra space with extreeme prejudice

cause its an affront against all that is holy that 2 spaces touch each other!

shippable timing out on some images, but merging as it passes most
7 years ago
saichint d69440c4ef Fix nxos_vpc issues (#28188)
* fix for nxos_vpc issues

* fix unit tests

* clean documentation
7 years ago
saichint 9d84a4e530 fix for nxos_ospf_vrf invalid cmd and ntp errors (#27977)
* fix for nxos_ospf_vrf invalid cmd

* fix for nxos_ntp issues
7 years ago
Trishna Guha 60ce6438e3 fix nxos_overlay_global idempotence (#28150)
* fix nxos_overlay_global idempotence

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

* modify nxos_overlay_global unittest

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
David Newswanger a01aa6e9df Fix structured output not supported in nxos_pim_interface (#28125)
* fixed unstructured error

* fix unit tests so they accept commands in dictionary form
7 years ago
Trishna Guha 12460dd713 Add ios_vrf declarative intent config check (#28001)
* Add ios_vrf declarative intent config check

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

* add version for delay param

* modify ios_vrf unit test
7 years ago
Pierre-Louis Bonicoli 94a327dd09 rhn_channel: add unit tests 7 years ago
Sloane Hertel 1de91a9aa0 [cloud] Convert `s3` module to use boto3 (#21529)
* replace boto with boto3 for the s3 module

make s3 pep8 and remove from legacy files

fix s3 unit tests

* fix indentation

* s3 module - if we can't create an MD5 sum return None and always upload file

* remove Location.DEFAULT which isn't used in boto3 and tidy up the docs

* pep8

* s3: remove default: null, empty aliases, and required: false from documentation

fix incorrectly documented defaults

* Porting s3 to boto3. Simplify some logic and remove unused imports

* Fix s3 module variables

* Fix a typo in s3 module and remove from pep8 legacy files

* s3: add pagination for listing objects.

Fix logic and use head_object instead of get_object for efficiency.

Fix typo in unit test.

* Fix pagination to maintain backwards compatibility.

Fix incorrect conditional.

Remove redundant variable assignment.

Fix s3 list_object pagination to return all pages

* Use the revised List Objects API as recommended.

* Wrap call to paginated_list in a try/except

Also remembered to allow marker/prefix/max_keys to modify what keys are listed

* Simplify argument
7 years ago
Nathaniel Case a78f3faa6c nxos_bgp_neighbor_af does not want required_together (#26370)
* nxos_bgp_neighbor_af does not want required_together

* fixup tests

* Fix max_prefix_* issues

* Require address-family

* Fix idempotency for next_hop_third_party

* Fix idempotency for allowas_in*

* Fix idempotency for *_in and *_out

* Reorder command generation again

`default` is first, then `max-prefix`, then booleans
7 years ago
Nathaniel Case c1bf74283e Network load_config: Capture configuration output and display as warnings (#27851)
* Capture configuration output and display as warnings

* Don't break on nxapi

nxapi errors very loudly instead, so no need to muck about with warnings
7 years ago
Pilou b57af4428d rhn_register: fix broken imports, add unit tests (#26878)
Fix 'module' object is not callable

* rhn_register: fix Python 3 compatibility
* rhn_register: update requirements
* rhn_register: add unit tests
* Add missing method name
* use a dedicated line for XML related requirements
* rhn_register: drop support for Python 2.4
* rhn_register unit tests: fix Python 3 compatibility
* refactor in order to check order of the requests
7 years ago
Sloane Hertel 467a1f54a3 s3_bucket: fix python3 sorting incompatibility (#27502)
* s3_bucket: fix policy sorting for python3 so strings are evaluated as less than tuples.

Add tests to ensure this behavior is maintained.

* Fix s3_bucket comparison function to work on both Python 3.5 and 3.6

* s3_bucket: document that cmp_to_key is used for python 2.7.

Add another test for s3_bucket to compare policies of different sizes.

* fix pep8

* Work around code-smell grepping by not using the word 'cmp'.
7 years ago
Sloane Hertel dbbad16385 [cloud] New module: Add module for managing AWS Datapipelines (cloud/amazon/data_pipeline) (#22878)
* New module for managing AWS Datapipelines

* Supports create/activate/deactivate and deletion
* Handles idempotent creation by embeding the version in the
uniqueId field
* Waits for requested state to be reached, as Botocore doesn't
have waiters yet for datapipelines

* rename module, fix imports, add tags option, improve exit_json results, fix a couple bugs, add a TODO so I don't forget

fix pep8

allow timeout to be used for pipeline creation

make .format syntax uniform

fix pep8

fix exception handling

allow pipeline to be modified, refactor, add some comments, remove unnecessary imports

pipeline activation may not be in the activated state long

remove datapipeline version option

change a loop to a list comprehension

create idempotence by hashing the options given to the module minus the objects (which can be modified)

small bugfix

* data_pipeline unittests

make unittests pep8

fix bug in unittests

* remove exception handling that serves no purpose

* Fix python3 incompatibilities in datapipeline tests and add placebo fixture maybe_sleep for faster tests

Fix python3 incompatibilities in data_pipeline build_unique_id()

Don't delete a pipeline in diff_pipeline() because it's unexpected

Don't use time.time() because it causes an issue with placebo testing

re-recorded tests

fix pep8 in data_pipeline

Remove disable_rollback from tests

Make sure unique identifier is a string

re-record tests

* improve documentation and add another example

* use a placebo fixture instead of redundant code in tests

fix tests for PLACEBO_RECORD=false

* Fix data_pipeline docs

use isinstance instead of type()

fix documentation

* fix documentation

* Remove use of undefined variable from data_pipeline module and fix license

* fix copyright header
7 years ago