Commit graph

2731 commits

Author SHA1 Message Date
Sara-Touqan
4676e5d60e New module: onyx_bfd (#64359)
* Supporting BFD in Ansible

* Modifying BFD module
2020-01-08 12:03:32 -05:00
Sara-Touqan
37dd3c3aa4 Supporting SNMP Hosts Configurations in Ansible (#63983)
* Supporting SNMP Hosts Configurations in Ansible

* Modifying SNMP Hosts Configuration.

* Modifying SNMP Hosts Configurations.

* Modifying SNMP Hosts Configurations

* Modifying SNMP Hosts Configurations.

* Modifying SNMP Hosts Configurations Code.
2020-01-08 11:51:58 -05:00
Sara-Touqan
24781c01be Supporting AAA Configs in Ansible. (#64434) 2020-01-08 11:51:37 -05:00
Sara-Touqan
96b1efdce4 Supporting bfd command in Ansible. (#64509) 2020-01-08 11:51:25 -05:00
Martin Krizek
45240213be
Move bitbucket unit tests to separate dir (#66237) 2020-01-07 17:02:27 +01:00
Matt Martz
f8654de851
Ensure that data within a tuple is marked as unsafe (#65918)
* Use is_sequence, and Mapping throughout, add support for tuples. Fixes #65722

* Address tests

* Remove unused import

* Add changelog

* Add docstring for clarity

* Argh, linting fix

* Not chasing this rabbit

* wrap_var doesn't return a ref to the original item

* no ref tests

* Remove unused import
2020-01-07 08:41:37 -06:00
Rohit
2f996fc6e2
vyos_config bug fix #66110 (#66122)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-01-03 17:35:37 +05:30
Felix Fontein
17ef253ad1
docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.
2019-12-29 23:16:17 +01:00
Rohit
52f3ce8a80
allowing banner without stripping spaces (#62573)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2019-12-27 12:43:09 +05:30
Abhay Kadam
2fa8f9cfd8 Fix env lookup plugin error on utf8 values (#65541)
This commit fixes issue #65297.

The env lookup plugin used to fail when environment variable value
contained any UTF-8 characters (e.g., δ, ζ).
2019-12-25 17:24:38 +05:30
Abhijeet Kasurde
683c467609
Check if task file is specified for import_tasks (#57572)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-24 10:26:32 +05:30
anas-shami
ec0885cf05 Onyx username (#63897)
* Support username command to config users and edit capabilities

* Add disconnected param to disconnect all session for such user

* Edit yaml examples, add types to docs and edit the version

* Add fullname attribute

* Add no_log to password field and mutually_execlusive relations

* Fix pep8 issue

* remove debug line
2019-12-17 14:01:03 +05:30
anas-shami
557c8ab161 support syslog remote module (#63195)
* support syslog remote module

* change enabled implementation and edit the tests, also support disable override class

* fix the level order and delete types from choices
2019-12-17 12:12:55 +05:30
Sara-Touqan
84572c3b67 Supporting ntp servers and ntp peers configuration in Ansible. (#63714)
* Supporting ntp servers and ntp peers configuration in Ansible.

* Modifing ntp servers and peers config.

* Modifying ntp peers and servers configuration.
2019-12-17 11:51:29 +05:30
Sara-Touqan
d0d8fca334 Supporting SNMP Users Configurations in Ansible (#63778) 2019-12-17 11:50:58 +05:30
Sara-Touqan
fe354ed183 Supporting general ntp configurations in Ansible (#63724)
* Supporting general ntp configurations in Ansible

* Modifying ntp module
2019-12-17 11:50:32 +05:30
Sara-Touqan
13d0ebd603 Supporting general snmp configurations in Ansible (#63723)
* Supporting general snmp configurations in Ansible

* Modifying SNMP General configurations.

* Fix pycodestyle issues

Signed-off-by: Sara Touqan <sarato@mellanox.com>

* Fix documentation errors

Signed-off-by: Sara Touqan <sarato@mellanox.com>
2019-12-17 11:49:56 +05:30
anas-shami
33338decf7 Feature/onyx syslog files (#62746)
* support syslog files

* nested doc fix

* required togother

* fix docs type dict

* add file-debug feature same as files logging

* remove duplicated validation and change dict key access method

* add format of upload url and change the way of getting data from dict
2019-12-17 11:24:33 +05:30
Ganesh Nalawade
74e9b1e219
Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

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

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test
2019-12-16 19:15:41 +05:30
Paul Belanger
093d1500b9
Clean up flake8 for ansible.netcommon collection (#65842)
We noticed the following flake8 errors when we ran the migration script
for ansible.netcommon.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-16 08:24:38 -05:00
Suhas Bharadwaj
0a04a5efc2 adding the modules to /nxos/storage/ folder (#64269)
* adding the modules to /nxos/storage/ folder

* fix pep8 stuff

* fixed provider specific information from doc

* Fix integration tests

* Added tested against note

* Review comments

* added assertions for the commands sent in the integration tests
2019-12-16 14:44:33 +05:30
Paul Belanger
5046413b6d
Fix flake8 errors for iosxr tests (#65860)
These were noticed when we migrated to the cisco.iosxr collection.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-15 23:48:28 -05:00
Chris Van Heuveln
d72025be75 nxos_interfaces: RMB state fixes (#63960)
* nxos_interfaces: RMB state fixes

* shippable fixes

* Add add'l comments per review

* fix long line

* Fix mode/enabled system defaults handling

* fix N3L test skips

* lint

* test updates for titanium images

* doc fix
2019-12-13 18:06:21 +05:30
Paul Belanger
ea164fdde7
Clean up flake8 errors on ios unit tests (#65782)
This was caught during our collection migration process.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-12 19:26:54 -05:00
Paul Belanger
80333f9c4b
Clean up flake8 errors for eos unit tests (#65753)
These were found while migrating our content to eos collections.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-12 07:44:13 -05:00
Sebastian Wagner
a0cf42ae32 removed unnecessary ipv* address-family statements from vrf if the ip version is not used (#53866) 2019-12-12 00:29:23 +05:30
Jordan Borean
eaba5572cd
ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578) 2019-12-06 10:34:14 +10:00
Felix Fontein
95c85b395c Add hetzner_firewall_info module. (#65421) 2019-12-05 20:40:11 +05:30
GomathiselviS
d710a5cd7f
eos_interfaces: Added unit testcases for eos_interfaces (#63813)
* Added unit testcases for eos_interfaces

* Corrected lint errors

* Corrected lint errors

* Addressed Review comments
2019-12-03 18:42:26 -05:00
Jordan Borean
6586b7132c
galaxy - print HTTP reason on unknown error (#65273) 2019-12-03 07:36:05 +10:00
Jordan Borean
694ef5660d
Fix using a URL for galaxy collection install (#65272)
* Fix using a URL for galaxy collection install

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
2019-12-03 04:55:31 +10:00
Felix Fontein
5f6057598e Hetzner: dedicated server firewall module (#65399) 2019-12-02 09:19:49 +01:00
Hans Jerry Illikainen
a0b8b85fa5 ufw: add support for interface_in and interface_out (#65382)
* ufw: escalate privileges in integration tests

A few of the integration tests for the UFW module forgot to `become`.
This is problematic if the test suite is executed as a non-privileged
user.  This commit amends that by adding `become` when appropriate.

* ufw: add unit tests for direction and interface

Extend the unit tests for the UFW module to test the `direction` and
`interface` parameters.  This will help in the implementation of a fix
for issue #63903.

* ufw: add support for interface_in and interface_out

The UFW module has support for specifying `direction` and `interface`
for UFW rules.  Rules with these parameters are built such that
per-interface filtering only apply to a single direction based on the
value of `direction`.

Not being able to specify multiple interfaces complicates things for
`routed` rules where one might want to apply filtering only for a
specific combination of `in` and `out` interfaces.

This commit introduces two new parameters to the UFW module:
`interface_in` and `interface_out`.  These rules are mutually exclusive
with the old `direction` and `interface` parameter because of the
ambiguity of having e.g.:

    direction: XXX
    interface: foo
    interface_XXX: bar

Fixes #63903
2019-12-02 08:01:44 +01:00
Hans Jerry Illikainen
2acfa0e08c Add passphrase support for luks_device (#65050)
* Elevate privileges for luks_device integration tests

Several tests in `key-management.yml` don't `become` before executing,
despite needing elevated privileges.  This commit fixes that.

* Add passphrase support for luks_device

Previously, the luks_device module only worked with keyfiles.  The
implication was that the key had to be written to disk before the module
could be used.

This commit implements support for opening, adding and removing
passphrases supplied as strings to the module.

Closes #52408
2019-11-30 20:50:30 +01:00
Xu Yuandong
7f97f86303 add a new module to configure multicast igmp and enable it. (#63746)
* add a new.

* import-error

* update docs.

* add unittest.

* Update test_ce_multicast_igmp_enable.py

* add a ihtegration test.

* update for review.

* update for review.

* add notes.
2019-11-26 11:38:30 +00:00
Xu Yuandong
76e904e44f add a new module to create isis instance. (#63716)
* add a new

* update to add futuer.

* update

* update shippable

* update docs.

* update

* add unittest.

* add integration test.

* update for shippable.

* syntax error

* syntax error

* syntax error

* update for review.

* update for review.

* add notes.
2019-11-26 11:23:05 +00:00
Xu Yuandong
8c88ee3b9f add a new module to configure multicast global. (#63745)
* add a new module.

* add future

* update docs.

* update

* update

* update

* update

* add test.

* Update test_ce_multicast_global.py

* update for review.

* update for review.

* add notes.
2019-11-26 11:22:39 +00:00
Xu Yuandong
9f58e915d9 add a new module to configure mdn on interface. (#63755)
* add a new module to confiure mdn on interface.

* doc-default-does-not-match-spec.

* add unittest

* Update test_ce_mdn_interface.py

* add integration.

* update for review.

* add notes.
2019-11-26 11:21:40 +00:00
Xu Yuandong
eb423ecec0 add a new module to configure isis on interface. (#63717)
* add a new.

* update doc

* update docs.

* update

* delete provider.

* add future.

* add unittest

* add integration test.

* KeyError

* update for review.

* add notes.

* unused codes removed.
2019-11-26 11:12:31 +00:00
Matt Martz
b08e7daf46 Do not treat AnsibleUndefined as being unsafe (#65202)
* Do not treat AnsibleUndefined as being unsafe. Fixes #65198

* fix yaml formatting
2019-11-25 15:06:29 +01:00
Michael Cassaniti
a096cd08c5 docker_swarm_service: Sort lists when checking for changes (#63887)
* docker_swarm_service: Sort lists when checking for changes

When two lists are checked for changes in this module, the lists are 
reported changed when the order of the items is different. This PR 
resolves this issue.

* docker_swarm_service: Minor typo fix

* docker_swarm_service: Another minor typo

* docker_swarm_service: Should use sorted(), not sort()

* docker_swarm_service: Sort lists of dictionaries

* docker_swarm_service: Fix style issues in tests

* docker_swarm_service: Updates to integration tests

* docker_swarm_service: Casting string types within lists when comparing

* docker_swarm_service: Special handling of unordered networks with ordered aliases

* docker_swarm_service: Sorting network lists

* docker_swarm_serivce: Better unit test code coverage for lists and networks

* docker_swarm_service: Fixed coding style for sanity tests

* docker_swarm_service: More coding style fixes

* docker_swarm_service: Ignoring test for Python < 3

* docker_swarm_service: Update to version info check for backwards compatibility

* docker_swarm_service: Added change fragment #63887

* docker_swarm_service: Better handling of missing sort key for dictionary of lists

* docker_swarm_service: Preventing sorts from modifying in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>

* docker_swarm_service: Removed spurious import in test

* docker_swarm_service: Preventing sorts from modifying more data in-place

Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-11-23 20:31:35 +01:00
Jie (Link) Zheng
41b199a936 Fortinet's new module for fortios_system_global (#64817) 2019-11-22 09:32:48 +05:30
Xu Yuandong
cc5132a8ba add a new module to configure isis on isis-view. (#63720)
* add a new module.

* update docs.

* update docs.

* update again.

* add __future__

* update docs, some args type

* update docs, some args type

* add integration test.

* add unittest.

* update for shippabel.

* update for syntax error.

* Update setup.yaml

* Update setup.yaml

* Update cleanup.yaml

* update for review.

* add notes.
2019-11-20 14:37:13 +00:00
chkp-orso
b1e6667664 fix all modules to be able to get parameter with value false (very important fix) (#65040)
* add import of future and __metaclass__

* fix all modules to be able to get parameter with value false (very importent fix)

* Update ignore.txt
2019-11-20 12:09:40 +05:30
Jordan Borean
7092c196ed
config manager str type vault source (#65023)
* config manager str type vault source

* Convert vault text to_text earlier and add tests
2019-11-20 12:02:28 +10:00
Chris Van Heuveln
3252665a94 nxos_vlans: fix rmb behaviors and tests (#63650)
* nxos_vlans: fix rmb behaviors and tests

* whitespace fixes

* whitespace fixes 2

* review comments addressed

* TBD for legacy support

* additional tests to hit code coverage misses

* whitespace
2019-11-19 14:24:52 +05:30
Jordan Borean
480b106d65
become - stop using play context in more places (#62373)
* become - stop using play context in more places - ci_complete

* Fix up review points
2019-11-18 05:32:56 +10:00
Jordan Borean
f8f7662850
Add the ability to ignore files and collection build (#64688) 2019-11-14 05:02:58 +10:00
Vincent Bernat
bf19060683 ipaddr: add an option to return peer of a point-to-point link (#59144)
* ipaddr: add an option to return peer of a point-to-point link

Signed-off-by: Vincent Bernat <vincent@bernat.ch>

* ipaddr: extend "peer" to also work with /30
2019-11-13 13:47:05 -05:00
Jie (Link) Zheng
743b6eb5b0 Fortinet's new module for fortios_vpn_ipsec_phase2_interface (#64767) 2019-11-13 16:27:20 +05:30
Mads Jensen
0f491c0289 Replace TestCase.assertEquals with TestCase.assertEqual. 2019-11-11 10:24:21 -08:00
kakurpiel
4a995f26a3 Update aruba modules to handle prompt and syntax changes (#54261)
* Update prompt matching to handle changes introduced in arubaos 8.x

* Update aruba modules to support command changes on arubaos 8.x
2019-11-09 15:03:01 +05:30
Satyajit Bulage
98b6b98287 Fixed few typo's: "Mutiple" to "Multiple" (#64543)
Signed-off-by: Satyajit Bulage <sbulage@redhat.com>
2019-11-07 14:03:28 +05:30
GomathiselviS
b475e0408c
eos_lacp: Add unit testcases to eos_lacp (#64417)
* Added unit testcases eos_lacp

* Added unit testcases eos_lacp
2019-11-06 19:02:12 -05:00
Mads Jensen
c5d61953b1 Remove empty setUp/tearDown/tearDownClass methods in test classes. 2019-11-06 08:14:29 -08:00
John R Barker
f34d59dbef
Move gitlab modules to own subdir (#64497)
* Move gitlab modules to own subdir

* Correct module_utils
2019-11-06 12:35:12 +00:00
Chris Van Heuveln
351f60b0e1 nxos_hsrp_interfaces: new module (#61498)
* nxos_hsrp_interfaces: new module

* lint 1

* lint 2

* add normalize_interfaces

* change version /2.9/2.10/

* /2.10/"2.10"/
2019-11-06 15:40:39 +05:30
Matthew Davis
4ee9f40e62 Add aws_acm module (#60552)
* convert aws_acm_facts to AnsibleAWSModule

* factor aws_acm_facts into module_utils

* add more filtering options for aws_acm_info

* add aws_acm module and tests

* uncomment aws_acm test

* fix linting for aws_acm

* fix __future__ linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix linting for aws_acm

* fix aws_acm_info arg type

* remove test for old module name aws_acm_facts

* simplify AWS ACM client creation

* fix indent typo in aws_acm test

* catch BotoCoreError in aws_acm

* fix indent typo in aws_acm test

* tighten AWS ACM test policy resource

* move aws acm int test to venv

* remove errant file

* fix AWS ACM int test perms

* undo copyright addition to wrong file

* fix invalid log message in aws_acm

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rephrase aws_acm_info doc from facts to information

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* rename aws_facts var to aws_info

* remove case insensitivity for aws_acm pem compare

* add no_log for aws_acm credential setting

* add per-test prefix to aws_acm test resource names

* make aws_acm use crypto module_util

* clarify copyright for aws_acm

* make aws_acm int test clearer

* add explicit crypto dependency to aws_acm

* change requests for aws_acm pr

* fix wrong copyright owner aws_acm test

* fix wrong copyright owner aws_acm test

* rewrite aws_acm cert chain compare with regex, no dependency

* fix linting for aws_acm unit test

* fix linting for aws_acm unit test

* fix linting and duplicate ignore

* fix failed cert chain split in aws_acm, add more tests

* remove errant file

* more linting fixes for aws_acm

* fix sanity ignore

* rewrite cert compare in aws_acm to use base64 decode

* improve regex for pem cert chain split in aws_acm

* undo changes to crypto module util for aws_acm

* increment ansible version for new aws_acm module

* convert aws_acm return(x) to return x

* increment version added for aws_acm_info new features

* fix linting

* fix bugs with AWS ACM

* fix bad rebase

* disable AWS ACM integration test, due to AWS account limit issue

* remove aws acm integration test from shippable group
2019-11-05 11:57:08 -07:00
Mads Jensen
ecc8e51044 Remove empty overridden unittest.setUp and unittest.tearDown methods. 2019-11-05 09:12:11 -08:00
Jordan Borean
7acae62fa8 Fix up role version pagination for Galaxy install (#64373)
* Fix up role version pagination for Galaxy install

* Fix sanity issue
2019-11-05 10:34:50 -05:00
GomathiselviS
484943cbd1
Add unit testcases to eos_vlans (#63404)
* Added unit testcases to eos_vlans

* Corrected lint errors

* Corrected lint errors

* Corrected lint errors

* Addressed review comments and changed the testcase after bug fix

* Corrected lint errors

* removed the unwanted comments
2019-11-05 07:55:05 -05:00
GomathiselviS
4c8d0b1b8d
eos_l2interfaces: Add unit testcases to eos_l2interfaces (#64127)
* Add unit testcases to eos_l2interfaces

* Fixed lint errors

* Corrected lint errors
2019-11-05 07:51:13 -05:00
GomathiselviS
143b5a3674
Added Unit tests to eos_logging (#63248)
* Added Unit tests to eos_logging

* Added Unit testcases for eos_logging

* Added Unit testcases for eos_logging

* Added Unit testcases for eos_logging

* Add UT

* Corrected lint errors

* Corrected lint errors

* Addressed review comments

* Corrected lint errors
2019-11-05 07:50:00 -05:00
chkp-orso
3a0c6454a9 Enable logging to any domain in the check point machine (#63976)
* enable using any domain in the check point machine

* Update checkpoint.py

* trying to checge `test_chrckpoint` according to `test_ftd` in order to pass the tests

* Update test_checkpoint.py
2019-11-05 17:44:34 +05:30
Mark Chappell
8528fbc790 Amazon related Sanity test fixups (remaining batch 2) (#64358)
* Remove sanity/ignore.txt entries

* replace use of "_" as a variable name

* Cleanup boilerplate

* Remove default values from mandatory parameters

* Sanity test documentation updates

* Remove unused imports from iam_role
2019-11-04 16:56:14 +00:00
Pierre Prinetti
2444fae208 Add a named parameter to the filter to_uuid (#64057)
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.

This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
2019-11-01 13:11:34 -04:00
Mark Chappell
4e8bb334a9 Sanity test fixups: AWS VPC related modules (#64089)
* Add missing boilerplate

* Avoid blocklisted variable name '_'

* doc fixups

* Remove defaults for required parameters

* Remove explicit definition of 'region' from argument spec
it's automatically added by ec2_argument_spec and redefining removes the aliases

* remove sanity ignore entries for AWS VPC related modules

* Suggested Review changes
2019-10-30 14:28:14 -07:00
Mark Chappell
e6607d611a Sanity test fixups - AWS related tests (#64093)
* AWS tests Sanity Test fixups (add boilerplate)

* Remove sanity ignore.txt entries
2019-10-30 09:48:59 -07:00
Mark Chappell
ef7d060a3f AWS module_utils: Clear out Sanity Test issues (#63991) 2019-10-28 09:21:40 +00:00
kalimsshar
01a92f0191 Make banner detection non-greedy in ios_banner (#63092)
* Make banner detection non-greedy in ios_banner

* Added ios_banner unit test to detect bug #63091

* Corrected PEP8 errors

* Added integration test

* Corrected typo in integration test
2019-10-25 14:20:00 -04:00
Xu Yuandong
5c5a315a44 a new module to manage static route and bfd. (#58004)
* add a new module

* update for shippable

* update

* update for shippable

* update for shippable

* update for shippable

* update

* add unittest.

* update

* update integration

* update unittest

* update

* update unittest.

* update for syntax error

* update for reviewing.
2019-10-25 06:40:30 -04:00
Xu Yuandong
68c997e4dd add a new module ce_lldp_interface. (#58252)
* add a new module ce_lldp_interface.

* update for shipabble

* update

* ad unittest

* update

* update

* update

* update

* update

* upate

* update

* update for shipable.

* update & add intergration tests.

* update for shippable.

* update

* import future.

* update.

* update.

* update docs.

* missing whitespace after ','

* update docs.

* update docs.

* update docs.

* Update ce_lldp_interface.py

* Update ce_lldp_interface.py

* update for reviewing
2019-10-25 10:45:53 +01:00
Nathaniel Case
7f5d1ab2b7
Removed in 29 (#63680)
* Eh, 2.10 is close enough

* drop top-level authorize

* Remove from documentation

* Remove load_params

* Centralize this junos thing

* Fixup user modules

* I'm 95% sure this did not do what it was supposed to

* nxos_hsrp: I don't think this is an actual module parameter

* Try to fix junos_package tests

* Move local params to provider

* Promote 'timeout' to a real parameter for eos_eapi

* Don't assume provider exists?

* move another timeout

* Provider now always has auth_pass

* Fix junos tests to avoid NameErrors
2019-10-24 15:01:05 -04:00
GomathiselviS
68de182555 eos_eapi: Added fix for bug # 51144 (#63632)
* Added fix for bug # 51144

* Corrected Lint errors

* Added fix for bug 51144

* Corrected errors

* Added unit testcase
2019-10-23 19:46:43 +05:30
Bojan Vitnik
7afba9420a XenServer: Update docs with recent changes in XenAPI python lib and branding (#63728)
- xenserver module_util: XenAPI lib import error message handling is now
   ported to missing_required_lib(). Updated unit tests.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   docs are updated to reflect recent changes in availability of XenAPI lib
   on PyPI.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   docs are updated to reflect recent Citrix rebranding of XenServer. Broken
   URLs to external resources are fixed.
 - xenserver_guest, xenserver_guest_info, xenserver_guest_powerstate modules:
   more tested platforms are mentioned in docs.
2019-10-22 21:04:16 +05:30
Sorin Sbarnea
a6e610a9ed Prevent generating roles that do not pass linting (#63709)
Fixes bug where newly created role fails linting due to extra space
at end of line: [201] Trailing whitespace
2019-10-22 11:26:07 -04:00
Toshio Kuratomi
cc1ff57c5b
AH servers include automation-hub as part of the server configuration. (#63700)
* AH servers include automation-hub as part of the server configuration.

So we don't need to add it here.

Fixes #63699

* Update unittests for the fix to galaxy wait_import_task
2019-10-19 12:40:45 -07:00
Andrea Scarpino
8f843bbaa5 iptables: support wait parameter (#47877)
Version 1.4.20 doesn't support 'wait' at all
Version 1.6.0 requires an argument for it
2019-10-19 22:27:45 +05:30
René Moser
712abfd1a1
cloudstack: exoscale: fix boilerplate (#63532) 2019-10-19 09:37:23 +02:00
Xu Yuandong
39c92310b4 Add a new module ce_lldp to manage Link Layer Discovery Protocol(LLDP) (#63395)
* new module ce_lldp

* update for shippable

* update for shippable

* update for shipabble

* update

* merge confilcts

* add integration test.

* update for shippable.

* update for bad-whitespace

* update for shippable

* update for shippable

* update for shippable

* update license.

* update for typo.
2019-10-18 13:15:42 +01:00
Toshio Kuratomi
4cad7e479c
Galaxy publish fix (#63580)
* Handle galaxy v2/v3 API diffs for artifact publish response

For publishing a collection artifact
(POST /v3/collections/artifacts/), the response
format is different between v2 and v3.

For v2 galaxy, the 'task' url returned is
a full url with scheme:

        {"task": "https://galaxy-dev.ansible.com/api/v2/collection-imports/35573/"}

For v3 galaxy, the task url is relative:

        {"task": "/api/automation-hub/v3/imports/collections/838d1308-a8f4-402c-95cb-7823f3806cd8/"}

So check which API we are using and update the task url approriately.

* Use full url for all wait_for_import messages

Update unit tests to parameterize the expected
responses and urls.

* update explanatory comment

* Rename n_url to full_url.

* Fix issue with overwrite of the complete path

* Fixes overwrite of the complete path in case there's extra path stored
  in self.api_sever
* Normalizes the input to the wait_import_task function so it receives
  the same value on both v2 and v3

Builds on #63523

* Update unittests for new call signature

* Add changelog for ansible-galaxy publish API fixes.
2019-10-16 15:23:12 -07:00
Matt Clay
20be8693ba Revert "Remove top-level arguments from network modules (#62603)"
This reverts commit d5ac3f7e77.
2019-10-15 12:53:51 -07:00
Nathaniel Case
d5ac3f7e77
Remove top-level arguments from network modules (#62603)
Eh, 2.10 is close enough

* drop top-level authorize

* Remove from documentation

* Remove load_params

* nxos_hsrp: I don't think this is an actual module parameter

* Move local params to provider

* Promote 'timeout' to a real parameter for eos_eapi

* Provider now always has auth_pass
2019-10-15 11:41:35 -04:00
Sam Doran
e9d29b1fe4 Properly mask no_log values is sub parameters during failure (#63405)
* Get no_log parameters from subspec

* Add changelog and unit tests

* Handle list of dicts in suboptions

Add fancy error message (this will probably haunt me)

* Update unit tests to test for list of dicts in suboptions

* Add integration tests

* Validate parameters in dict and list

In case it comes in as a string

* Make changes based on feedback, fix tests

* Simplify validators since we only need to validate dicts

Add test for suboptions passed in as strings to ensure they get validated properly and turned into a dictionary.

ci_complete

* Add a few more integration tests
2019-10-14 09:20:07 -07:00
Xu Yuandong
36457bebc9 add a new module ce lacp to manage Eth-Trunk interfaces mode (#58077)
* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* add a new module to manage lacp

* update for shippable.

* update for shippable

* add units test to module ce_lacp.

* add units test to module ce_lacp.

* add units test to module ce_lacp.

* update

* update

* update

* update

* update

* update

* update for shippable.

* for shippable

* update ignore.txt to reslove conflict

* update for shippable

* update

* update unittest to remove provider.

* update unittest for shipppable.

* use to_native.

* intergration test

* syntax error

* syntax error

* syntax error

* update for `Andersson007` review and thanks.

* update for shippable
2019-10-14 15:14:43 +01:00
Matt Martz
7f4befdea7
Wrap CLI Passwords with AnsibleUnsafeText, ensure unsafe context is not lost during encode/decode (#63351)
* Wrap .encode and .decode on AnsibleUnsafe objects

* runme.sh needs to be executable

* ci_complete

* Update changelog with CVE
2019-10-11 09:17:10 -05:00
Adrian Likins
bad72693e4 Stop appending '/api' to galaxy server url (#63238)
* Stop appending '/api' to configured galaxy server url

Since not all galaxy REST api server URLs live
at '/api', stop always appending it to the
'url' value loaded from config.

* Add note about manually migrated galaxy configs and /api

* Add '/api/' to galaxy url and guessing if galaxy API

* Fix most unit tests (update to expect /api/)

* Fix test_initialise_unknown unit test

Since we retry now with an added /api/, mock it as well.

* Update fallback default avail_ver to new format
2019-10-08 15:09:19 -07:00
Pedro Magalhães
67d9cc45bd maven_artifact.py - add support for version ranges by using spec (#54309) (#61813) 2019-10-08 15:24:50 +01:00
Adrian Likins
239d639fee Add support for automation-hub authentication to ansible-galaxy (#63031)
Adds support for token authentication in Automation Hub. Fixes: ansible/galaxy-dev#96
2019-10-04 17:57:37 -04:00
Mike Wiebe
918f768890 [stable-2.9] Fix nxos_l3_interfaces module and tests (#62545)
* Fix nxos_l3_interfaces module and tests

* Use get_interface_type

* get_interface_type in utils lib
2019-10-02 13:43:17 -04:00
Will Smith
50d1cbd30a fix issue #60237 when non-ascii is returned from the WLC (#60243)
* fix issue #60237 when non-ascii is returned from the WLC

* update test to work with python3 through use of six library

* remove trailing white space
2019-10-01 16:52:35 -04:00
Dag Wieers
7fa1e4f70f Fix sanity checks (#62782)
This PR fixes all new ACI sanity issues.
2019-09-24 09:00:00 -04:00
David
a2846613b8 Apcon modules (#62028)
* Add APCON modules

* Fix cli regex

* revise for passing sanity tests

* Add unit test for apcon_command module
Remove apconos_config.py apconos_update.py apconos_cert.py for now

* Fix for santiy test

* test

* Ignore action-plugin-docs test

* Add apcon_command module

* conflict solved

* merge

* Fix for sanity test

* Revise integration test

* Mark integration test unstable

* Remove integration test temprorily

* 1. Ignored privilege escalation;
2. Ignored get_configure command;
3. Removed doc_fragments;
2019-09-23 16:42:17 -04:00
Sam Doran
987265a6ef
Account for empty strings when splitting the host pattern (#62442)
Improve tests
- add more unit test cases
- add specific integration test with more cases

Testing shows no major downside to calling .strip() twice in a comprehension vs. using a regular for loop and only calling .strip() once. Going with the comprehension for ease of maintenance and because comprehensions are optimized in CPython.
2019-09-20 16:03:51 -04:00
Evgeni Golov
8d0c193b25 allow before/after diff to be NoneType (#62582)
when creating or deleting an object (e.g. via an API), before/after can
be `None` (or at least represented as such by the used library). to
avoid modules havig to do

    diff={'before': before or '', 'after': after or ''}

let's just convert `None` to an empty string that can be diffed properly
2019-09-20 15:47:18 -04:00
Jordan Borean
85eba9d860 Fix test_galaxy failing test 2019-09-19 13:20:43 -07:00
Sloane Hertel
4cc4c44dd0
Add a representer for AnsibleUnsafeBytes (#62598)
* Add a representer for AnsibleUnsafeBytes

* changelog

* Add unit tests

Remove native string test until we have time to evaluate how this the function should work
Add non-ASCII characters to test cases

* Compare to the string on Python 2

Add a comment in the test about this behavior
2019-09-19 14:27:48 -04:00
Christian Clauss
23c7bf6481 Fix access to exception using Python 3 scoping rules (#62268) 2019-09-17 13:28:37 -04:00
Trishna Guha
5cd3be9129
gather_facts action plugin: Fix loading network facts modules for smart gathering (#59856)
* fix smart gathering for network_os in gather_facts action plugin

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

* Fix detection of network_os for smart gathering

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

* Add unittest

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

* make pep8 happy

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2019-09-17 18:35:44 +05:30
Mike Wiebe
b0668e17ed nxos_telemetry replaced state (#62368) 2019-09-17 16:49:30 +05:30