Commit Graph

1532 Commits (0dd17b521f228689d0d0961f509fd9046791c6ed)

Author SHA1 Message Date
dangoscomb fb72a5424c nmcli: fix vlan connection modification Fixes #42322 (#42415)
* ensure optional items are set to empty strings rather than not presented
fix syntax of vlan modification command

* extended tests for nmcli
6 years ago
anasbadaha 2c24cfb401 Add support for IGMP interfaces on onyx switches (#46218)
Signed-off-by: Anas Badaha <anasb@ufm-host08-004.mtr.labs.mlnx>
6 years ago
Matt Clay 0785656344 Fix vmware_inventory unit tests so they run. 6 years ago
lwm 8d0f823de0 Add a Linode v4 dynamic inventory plugin. (#45902)
* Add a Linode v4 dynamic inventory plugin.

Closes https://github.com/ansible/ansible/issues/44721.

* Use the latest API for accessing host variables.

References:

  * https://github.com/linode/linode_api4-python/issues/141

* Minor docs formating
6 years ago
Toshio Kuratomi 473f70c21a Mocking out __future__ could cause problems 6 years ago
Matt Clay a11f631ee4 Python 3.8 collections compatibility fixes.
Includes a new pylint blacklist plugin to prevent regressions.
6 years ago
Matt Clay 1a28898a00 Fix parametrize warning in unit tests. 6 years ago
Sloane Hertel 27534e9b47 Move network utils that are used by AWS modules (#45579)
* Separate networking tools that may be used by modules outside of networking so changes to networking-only utilities don't trigger AWS integration tests

* Add unit tests for moved network utils

* Add comment to prevent imports from being mistakenly removed

* Move to_bits as well
6 years ago
Egor Zaitsev 6df1f6b203 New module: routeros_facts – collect facts from RouterOS devices (#46114)
* feat(routeros): implement routeros_facts module

* fix(routeros): review by felixfontein

* fix(routeros): review by ganeshrn

* fix(routeros): review by felixfontein
6 years ago
Brian Coca d3d812b604 avoid tests when ncclient is not installed 6 years ago
Dag Wieers d6bd52ad59 Add unit tests 6 years ago
Matt Clay 04ddadd89b Move module tests using TQM to integration tests. 6 years ago
Brian Coca 32ec69d827
allow jinja2 unique filter compat (#45637)
* allow jinja2 unique filter compat
* detect if unique is provided, fallback with warning
* handle j2 specific params
* now all filters using unique must pass environment
* added env to tests

also normalized on how we normally import and use exceptoins
6 years ago
Dan a6c20488d3 Add ospf net type (#45904)
* Added ospf network type option to nxos_interface_ospf module

* Added documentation and example for the 'network' parameter

* adding version
6 years ago
Matt Martz c0915e2f5a
Support nested JSON decoding in AnsibleJSONDecoder (#45924)
* Support nested JSON decoding in AnsibleJSONDecoder

* Add tests for vault portion of AnsibleJSONDecoder
6 years ago
Sam Doran b60854357b
Unify terms and UI between 1Password lookups and facts module (#45427)
* Unify login behavior between 1Password lookup plugins and module

- Use the same names for all credential aspects
- Only require the minimal amount of information for each
- Add more examples

* Change parameter terms

- use terms in line with 1Password documentation.
- update examples
- update tests

* Improve error messages in lookup plugin

* Unify onepassword_facts with lookup plugins

- use same methods and logic for signing in or reusing existing session
- unify terms with lookup plugins

* Change rc test for determing login

An rc other than 1 can be returned when a current login session does not exist.

* Create AnsibleModuleError class

ansible.errors is not available to modules, so create an AnsibleModuleError class within the module

Do not user os.path.expanduser since this is already done by virtue of the type being "path" in the argument spec.

* Add note about risk with fact caching sensitive data

* Add note on op version that was used for testing
6 years ago
Matt Martz 95e77ac853
Ensure that the src file contents is converted to unicode in diff info (#45744)
* Ensure that the src file contents is converted to unicode in diff info. Fixes #45717

* Fix up and cleanup

* The diff functionality in the callback plugins should have the
  to_text() calls removed since we're now doing it in ActionBase
* catching of UnicodeError and warnings in the callback diff
  functionality from 61d01f549f haven't been
  needed since we switched to to_text so remove them.
* Add a note to ActionBase's diff function giving an example of when the
  diff function will be inaccurate and how to fix it

* Fix callback get_diff() tests

I believe the unittests of callback's get_diff() were wrong.  They were
sending in a list where strings were expected.  Because previous code
was transforming the lists into strings via their repr, the previous
tests did not fail but they would have formatted the test cases output
in an odd way if we had looked at it.
6 years ago
Nathaniel Case 406b59aeba
Move persistent connections to only use registered variables (#45616)
* Try to intuit proper plugins to send to ansible-connection

* Move sub-plugins to init so that vars will be populated in executor

* Fix connection unit tests
6 years ago
Dag Wieers cb4bf04be6 Fix pylint error on utf8 character in string (#45880)
Small fix
6 years ago
Felix Fontein bc69aeca7f Fixing HTTPError case of fetch_url for Python 3 compatibility. (#45628)
* Fixing HTTPError case of fetch_url for Python 3 compatibility.

* Adding unit test.

* PEP8.

* Changelog.
6 years ago
Tim Rupp ccfbed3dbc
Adds bigiq_device_facts module (#45822)
This module can be used to query a variety of facts from a BIG-IQ
6 years ago
Matt Clay abe8e4c9e8
Run unit tests in parallel. (#45812) 6 years ago
Matt Clay 53b230ca74 Fix unit test parametrize order on Python 3.5. 6 years ago
Matt Clay 0686450cae
Fix unit tests which modify the source tree. (#45763)
* Fix CNOS unit test log usage.
* Use temp dir for Galaxy unit tests.
* Write to temp files in interfaces_file unit test.
* Fix log placement in netapp_e_ldap unit test.
6 years ago
Sloane Hertel 2167ce6cb6
Remove placeboify from unit tests that are not calling AWS (i.e. creating a recording) (#45754) 6 years ago
Sloane Hertel 5467ac3454
[aws unit test utils] only create a recordings directory when the env var is set (#45752)
* Only create placebo recording test directories when the environment variable PLACEBO_RECORD is set
6 years ago
Aidan Feldman fa18d45eb3 Link to the Galaxy platforms list from the meta file template (#34046)
* Link to the Galaxy platforms list from the meta file template
Fixes https://github.com/ansible/galaxy/issues/52.
* make ansible/ansible text match mazer text on platforms
6 years ago
Maugli 235b11f681 Return correct version on installed VyOS (#39115)
* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests
6 years ago
Anton Nikulin b7263eab1d Store Authorization header inside HttpApi connection plugin (#45598) 6 years ago
Nathaniel Case 285b927889
network command modules cleanup (#45242)
* Standardize _command modules

* Centralize command transformation process

* Fix check mode error test
6 years ago
Nathaniel Case 0b433b3ea9
Clean up after cnos tests (#45564) 6 years ago
Anil Kumar Muraleedharan ac58c36ad0 Lenovo cli bugfixes (#45278)
* To change all CLIs present in the code to latest CNOS CLI. One bug of executing with Lenovo Jakku switch is also getting fixed.

* To change the file names as the commands have changed from display to show

* To change to new CLI in test_cnos_comand.py as well
6 years ago
Matt Clay c0bf9815c9 Fix ACI unit test on Python 3.7.0.
The previous logic was only needed for pre-release versions of 3.7.
6 years ago
James Cassell 211aeebd0d remove unused templar._clean_data() (#42739) 6 years ago
Jon Dufresne ef67d4074b Prefer io.BytesIO over six; available on all supported Pythons (#45388)
On all supported Pythons, the io.BytesIO is always a stream
implementation using an in-memory bytes buffer. Makes code slightly more
forward compatible by reducing use of the six module.
6 years ago
Matt Clay f7979e4938 Skip ipaddr test that fails on Python 3.7+. 6 years ago
Abhijeet Kasurde 4e9b8136c2 Add support for Devuan (#45148)
Devuan is part of Debian family. This fix adds support for Devuan OS.

Fixes: #45047

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
6 years ago
Ganesh Nalawade c0326aea2f
Fix cli_command multiple prompt issue (#44922)
* Add check in network_cli to handle all prompts

* Add check_all flag to mandatory handle all the command prompt
  in prompts list. By default if any one prompt is handled
  remaining prompts are ignored.

* Fix cli_command multiple prompt issue

* If multiple prompt and answers are given as input network_cli
  handles only the first prompt that matched by default
* If a command execution results in muliple prompt the fix
  add support to set a boolean option C(check_all) to indicate
  network_cli to wait till all the prompts and answers are processed.

* Update cli_command

* Update api doc

* Fix unit test failure

* Fix CI failure

* Update network_cli

* Fix review comment
6 years ago
Deepak Agrawal 50c7702e46
cisco firepower : Make API endpoints configurable via hostvars (#44952)
* httpapi host vars

* Make configurable end-points for firepower

* pep8 fix
6 years ago
Alex Stephen 276ad32a45 removing libcloud secrets support for legacy gcp modules (#44932)
* removing libcloud secrets support for legacy gcp modules

* test fixes
6 years ago
Nilashish Chakraborty 0f268e70a1
Fix ios_user issues (#44904)
* Fix ios_user issues

* Modify regex and fix unittests
6 years ago
Alex Stephen 3550f342e0 Gcp auth deprecation (#44866) 6 years ago
Sam Doran 8cd8d17980
Add ability to unlock 1Password vault to lookup plugins (#44923)
* Add ability to use login to 1Password vault to 1Password lookups

* Adjust unit tests

* Add changelog
6 years ago
Senthil Kumar Ganesan a64b97da42 Support for Openswitch (OPX) Control Plane Services (CPS) Module (#44745)
* Generic module to support Openswitch (OPX) Contorl Plane Services (CPS)

* Address ansible-test sanity issues
6 years ago
Ganesh Nalawade 1a684df109
Fix iosxr cli_config module diff issue (#44898)
* Fix iosxr cli_config module diff issue

* Modify iosxr plugin to support configuration
  diff capability (get_diff()) within Ansible
  to be in sync with iosxr_config module.

* Fix unit test case failure
6 years ago
Matt Martz 0221d1ad20
Introduce and use locale-naive rfc2822 date format function (#44868)
* Introduce and use locale-naive rfc2822 date format function. Fixes #44857

* Adjust test expected response
6 years ago
Ghilli3 7bc2660017 fortimanager/fmgr_provisioning.py (#35743)
* Initial commit for new provisioning module
6 years ago
pierremahot d11e078366 adding an option for the filter ipsubnet and testing (#40670)
* adding an option for the filter ipsubnet
6 years ago
lwm fbcdf8ba5b Linode: Mark 'name' as required. Fixes #29785 (#44699)
* Mark 'name' parameter as required.

Closes https://github.com/ansible/ansible/issues/29785.

* Add the `linode-python` dependency for unit tests.

* Add unit test for linode name parameter.

* Add note about where to find required arguments.

Closes https://github.com/ansible/ansible/issues/44696.
6 years ago
Anton Nikulin 40a97d43d1 New modules and updated HTTP API plugin for FTD devices (#44578)
* Add common and Swagger client utils for FTD modules

* Update FTD HTTP API plugin and add unit tests for it

* Add configuration layer handling object idempotency

* Add ftd_configuration module with unit tests

* Add ftd_file_download and ftd_file_upload modules with unit tests

* Validate operation data and parameters

* Fix ansible-doc, boilerplate and import errors

* Fix pip8 sanity errors

* Update object comparison to work recursively

* Add copyright
6 years ago