Commit graph

1992 commits

Author SHA1 Message Date
Wojciech Wypior
a5c630a81f Adds aggregate functionality to the module (#51640) 2019-02-01 17:53:06 -08:00
Wojciech Wypior
fd2e0ddcac Adds clone_pools parameter (#51635)
Adds rate_limit parameter
Minor bug fixes
2019-02-01 17:47:46 -08:00
rajaspachipulusu17
a48af10b2c Pluribus Networks stp port module with UT (#51476) 2019-02-01 21:19:32 +05:30
Federico87
f94378fc2f ios_ntp module (#50705)
* ios_ntp module

* add execute_module for config func

* fix units test

* test empty list

* update example

* change want logic to follow have - removed try/except

* update commands list for config test

* add idempotent test case

* add more test
2019-02-01 09:20:02 -05:00
Anil Kumar Muraleedharan
004d8b03d4 Lenovo cnos l3interface (#51322)
* Adding cnos_l3_interface module in alignment with others vendors.
2019-02-01 09:17:52 -05:00
Chris Archibald
c6a9534d61 Rewrite of na_ontap_cluster and unit tests. (#49780)
* changes to clusteR

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* ontap cluster changes
2019-01-31 18:43:54 +00:00
Chris Archibald
7b5897d266 New Module: na_ontap_vscan_scanner_pool (#49786)
* changes to clusteR

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* na ontap vscan scanner pool

* Update author
2019-01-31 18:42:42 +00:00
vaneuk
2a432a093b added timestamps to ios_command module (#50323)
ios_command module now returns timestamps field, which shows command execution time
2019-01-31 18:11:53 +05:30
rajaspachipulusu17
a9b459e406 Pluribus Networks stp module with unit test (#51475) 2019-01-31 09:47:17 +05:30
rajaspachipulusu17
5e88cd9972 Pluribus Networks pn user module with UT (#51428)
* Pluribus Networks user module with UT

* Added choice to State in doc

* pep8 standards correction
2019-01-31 09:43:04 +05:30
rajaspachipulusu17
5fa2d29c9a Pluribus Networks point feature cpu mgmt class module with UT's (#51427) 2019-01-31 09:41:58 +05:30
rajaspachipulusu17
52cab33e4e Pluribus Networks point features for snmp vacm with UT's (#51423)
* Pluribus Networks point features for snmp vacm with UT's

* Duplicates removal

* Added choice for state
2019-01-31 09:40:38 +05:30
rajaspachipulusu17
271e14638e pn snmp trap sink (#51420)
* Pluribus Network snmp trap sink module with Unit tests

* pep8 standard fix

* Added proper author name
2019-01-31 09:39:23 +05:30
Brian Coca
abb964a5a0
move extravars and option vars loading into VM (#51070)
* move extravars and option vars loading into VM

  also safedir setting, all these are intrinsic to VM
  avoid uneeded and inefectual shallow copy
  remove setters/getters as VM now does most of the work in init
  updated and added tests

* feedback + fixes

* keep extra_vars property for vars_prompt

* pass values not objects
2019-01-30 16:25:36 -05:00
mrmagooey
8eff4cae10 VMware: vmware_guest - allow existing vmdk files to be attached to guest (#45953) 2019-01-30 15:35:24 +01:00
Nilashish Chakraborty
2f0c666b5b
Add option to enter admin configuration mode in iosxr_user (#51430)
* Add admin mode to iosxr_user

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Update docs for admin option

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix review comment

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-01-30 15:37:28 +05:30
Brian Coca
50b40c47df aws_ec2 Implement the missing 'region discovery' (#51333)
* aws_ec2 Implement the missing 'region discovery'

  fixes #45288

  tries to use api as documented (which seems to fail in latest boto3 versions)
  and fallback to boto3 'hardcoded' list of regions

* fixes and cleanup, add error for worst case scenario

* fix tests, remove more unused code

* add load_name

* acually load the plugin

* set plugin as required

* reverted test changes, removed options tests

* fixes as per feedback and cleanup
2019-01-29 14:59:38 -06:00
Chris Archibald
d897ff7bf2 Updates to ontap_user 2019-01-29 14:05:08 +00:00
Nilashish Chakraborty
77303d72ab
Add new module - junos_ping (#50711)
* WIP junos_ping

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Added junos_ping module

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Minor changes

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Minor changes - 2

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix CI

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Initial tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* WIP tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix spaces

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fixed unit tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Removed unused print statements

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Removed unused print statements

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Update license template

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fixed Review Comments

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-01-29 15:36:12 +05:30
Chris Archibald
cc618b00a5 changes to cifs_server 2019-01-28 20:34:56 +00:00
Chris Archibald
0ab5b765ec Rewrite of Na_ontap_job_schedule and new options (#49507)
* New options, and rewrite

* add module
2019-01-28 20:30:59 +00:00
Chris Archibald
5cc34af927 ucadapter rewrite and unit test (#49497)
* ucadapter rewrite

* update skip line
2019-01-28 20:29:56 +00:00
Nilashish Chakraborty
69dd03d472
ios_user: Add support for multiple sshkeys (#51173)
* Add support for multiple sshkeys

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix CI

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add the keys at on go

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Update tests

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-01-28 13:44:15 +05:30
Chris Archibald
7e4336a3f4 Switch na_ontap_ifgrp to use NetAppModule and new option (#50774)
* rewrite

* fixes to ifgrp

* Fixed Author
2019-01-25 11:48:20 -05:00
Chris Archibald
1c54ca52b2 New Module: na_ontap_nvme_namespace (#50886)
* changes to clusteR

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* new module nvme namespace

* updates

* Revert "updates"

This reverts commit 92056e5ba4.

* update author

* Fix author line
2019-01-25 11:46:10 -05:00
Chris Archibald
d5add305ab New Module: na_ontap_portset (#49784)
* changes to clusteR

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* new module na_ontap_portset

* Fix author

* fix issue from comment
2019-01-25 10:31:41 -05:00
Chris Archibald
c940c6df41 Rewite of na_ontap_cifs to use NetAppModule, new options, and unit tests. (#49782)
* changes to clusteR

* Revert "changes to clusteR"

This reverts commit 33ee1b71e4bc8435fb315762a871f8c4cb6c5f80.

* changes to na_ontap_cifs

* fix dup
2019-01-24 10:41:36 -05:00
Anatoly Pugachev
fe8412128b facts: solaris: introduce distribution_major version detection for Solaris (#43978)
* facts: solaris: introduce distribution_major version detection for Solaris

Currently, there's no distribution_major in facts module on Solaris OS.
Use "uname -r" output to report major version.

Before the patch we get this on Solaris 11.3 :

$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {}, "changed": false}

and after this patch, output is the following:

$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "11"}, "changed": false}

Tested with Solaris 11.3 and Solaris 10 (both are x86_64 VMs)

Includes patch for test/units.

Fixes #18197

* Try to fix test unit

* should work now...

* fixes for W291 (trailing whitespace) and E265 (block comment)

* mock uname_release for solaris 10 and solaris 11

* facts: solaris: introduce distribution_major version detection for Solaris

Currently, there's no distribution_major in facts module on Solaris OS.
Use "uname -r" output to report major version.

Before the patch we get this on Solaris 11.3 :

$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {}, "changed": false}

and after this patch, output is the following:

$ ansible -o solaris11 -m setup -a filter=ansible_distribution_major_version
solaris11 | SUCCESS => {"ansible_facts": {"ansible_distribution_major_version": "11"}, "changed": false}

Tested with Solaris 11.3 and Solaris 10 (both are x86_64 VMs)

Includes patch for test/units.

Fixes #18197

* Try to fix test unit

* should work now...

* fixes for W291 (trailing whitespace) and E265 (block comment)

* mock uname_release for solaris 10 and solaris 11

* typo uname_v -> uname_r

* rebase

* fix pep8 E302: 2 blank lines

* remove int() cast to match test case

* use single function for uname_r and uname_v

* add solaris 11.4 OS to distribution test unit

* fix pep8 sanity - E231 missing whitespace

* distribution_major_version variable strip newline

* mocker test function for mock_get_uname with parameters instead of two different functions

* failed to make one fuction with test unit, revert to use 2 different functions

* try to use single get_uname function

* fix pep8: E703
2019-01-23 20:33:32 -05:00
Chris Archibald
890f4eb5c4 New Options for Autosupport (#50773)
* new option

* spelling

* fix minor issue

* Fix Doc line

* Add update netapp_module

* fix issue with autosupport

* Fix docuemntation
2019-01-23 18:18:07 +00:00
Matt Martz
8c08d03989
Fieldattribute inheritance with defaults (#50891)
* Add tests for check_mode at play and task level

These test inheritance of check_mode from the various levels (command
line, as a play attribute and as a task attribute) so they will be
useful for checking that the change to fieldattribute inheritance with
defaults works

* Add a sentinel object

The Sentinel object can be used in place of None when we need to mark an
entry as being special (usually used to mark something as not having
been set)

* Start of using a Sentinel object instead of None.

* Handle edge cases around use of Sentinel

* _get_parent_attribute needs to deal in Sentinel not None

* No need to special case any_errors_fatal in task.py any longer

* Handle more edge cases around Sentinel

* Use Sentinel instead of None in TaskInclude

* Update code to clarify the vars we are copying are class attrs

* Add changelog fragment

* Use a default of Sentinel for delegate_to, this also allows 'delegate_to: ~' now to unset inherited delegate_to

* Explain Sentinel stripping in _extend_value

* Fix ModuleArgsParser tests to compare with Sentinel

* Fixes for tasks inside of roles inheriting from play

* Remove incorrect note. ci_complete

* Remove commented code
2019-01-23 11:40:07 -06:00
Brian Coca
42c35a2e01
parallelize getting mount info (#49398)
* parallelize getting mount info

* fixed timeout and made 8 max thread count

  - minor cleanup
  - avoid empty mount entries
  - set timeout on get
  - enforce timeout per mount/thread
  - make note on failure per mount
  - make note on timeout per mount
  - ensure proper pool control
  - minor fixes
  - less vars, simpler code
  - move filter 'pre threading'
  - remove timeout for all mounts, now per mount
  -  also use cpu count from multiprocessing lib
  -  moved 'bind' options out of thread as per comments
  - warn on error, more info on failure to get info
2019-01-23 12:33:59 -05:00
Sam Doran
9d4c0dc111 Catch sshpass authentication errors and don't retry multiple times to prevent account lockout (#50776)
* Catch SSH authentication errors and don't retry multiple times to prevent account lock out

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Subclass AnsibleAuthenticationFailure from AnsibleConnectionFailure

Use comparison rather than range() because it's much more efficient.

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Make paramiko_ssh connection plugin behave the same way

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Add changelog

Signed-off-by: Sam Doran <sdoran@redhat.com>
2019-01-23 11:32:25 -05:00
Sumit Jaiswal
4049e33817
PR to implement support feature for creating NIOS network container (#51168)
* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* resolves 51161

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-01-23 19:21:00 +05:30
Olivier BLIN
87a01df6ad Fix 'defaults' option in the nxos_config module (#51076)
* Fix 'defaults' option in the nxos_config module

Nxos get_config is allways called with the 'all' option.
* Fix flag's calculation
* Add tests

* nxos_config: the 'backup' option take into account the value of 'defaults' option

If 'defaults' option is true, the running-config backup is done with the all
keyword.
2019-01-23 11:29:27 +05:30
rajaspachipulusu17
61a342f0bb Pluribus Networks admin syslog modules with unit tests (#50596) 2019-01-22 22:00:12 +05:30
Abhijeet Kasurde
2a2e9c4ea2 dataloader: unit tests (#50942)
* dataloader: unit tests

Based on work from Alikins (https://github.com/ansible/ansible/pull/16500)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-01-22 09:51:27 -05:00
Nathaniel Case
9702893729
Remove deprecated options from modules (#50246)
* Remove deprecated options from modules

* Update tests

* Add porting guide notes
2019-01-22 09:18:26 -05:00
rajaspachipulusu17
a38039bbbe Pluribus Networks port cos rate setting module with UT (#50856) 2019-01-21 12:49:31 +05:30
rajaspachipulusu17
213b2e633c Pluribus Networks switch setup module with unit test cases (#50797)
* Pluribus Networks switch setup module with unit test cases

* Module error fix and pep8 standards error fix
2019-01-21 12:48:09 +05:30
Abhijeet Kasurde
8aa2372073
VMware: Unit test for vmware_guest (#50140)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-01-21 10:23:39 +05:30
Ingate Systems
5671ff983d modules: network: ingate: Add module ig_store_edit (#47675)
* modules: network: ingate: Add module ig_store_edit

* modules: network: ingate: Add module ig_config

Manage the configuration database on an Ingate SBC.
2019-01-17 23:05:45 -05:00
Johannes Brunswicker
c6d404cbe9 Add optional headers to utm modules (#49856)
* removed info declaration from documentation fragment as this is not implemented
* added optional headers for POST and PUT requests
* updated documentation
* added missing headers field decalaration
* removed info choice from state field
* added tests for the new utm_utils function
* fixed class invocation
* added missing required params
* fixed the pytests
2019-01-17 19:06:50 +05:30
vaneuk
e150943314 added timestamps to nxos_command module (#50261)
* added timestamps to nxos_command module

nxos_command module now returns timestamps field, which shows command execution time

* –fixed unit test failure for /lib/ansible/module_utils/basic

* cosmetic changes to align with PEP 8
2019-01-17 10:14:31 +05:30
Ricardo Carrillo Cruz
ac61c99821
Add checkpoint_session module (#50930)
* Add checkpoint_session module

* Add unit test

* Fix pep8

* Rename Checkpoint for Check Point
2019-01-16 13:19:36 +01:00
Matt Clay
465df0ef8d
Fix encoding issues with file paths. (#50830)
* Fix encoding issues with file paths.

Discovered while testing with ANSIBLE_CONFIG env var set to a path
that contained unicode characters while LC_ALL=C.

* Fix unit tests.

* Fix another path encoding issue.
2019-01-14 13:06:47 -08:00
Ricardo Carrillo Cruz
18370419a3
Add forgotten checkpoint unit tests (#50858)
I forgot to do a git add on a couple unit tests it seems
2019-01-14 12:07:48 +01:00
Roberto Polli
caa0c9d4cc Fixes #25725: strip quotes from lsb_release and distribution description. (#31143) 2019-01-11 12:07:26 -05:00
rajaspachipulusu17
ca74c443ba Pluribus Networks port config module (#50314)
* Pluribus Networks port config module

* Documentation fix for version added

* Doc fixes
2019-01-11 14:02:36 +05:30
rajaspachipulusu17
44febe4e56 Pluribus Networks port cos bw module (#50287)
* Pluribus Networks port cos bw module

* Indentation fix

* Documentation fix

* Corrected indetentation for required_one_of

* Added maintainer name in BOTMETA.yml

* Removed maintainer name in BOTMETA.yml as my team is already there
2019-01-11 14:00:10 +05:30
rajaspachipulusu17
abdcf2a776 Pluribus Networks pn_dscp_map_pri_map module with Unit tests (#50142)
* Pluribus Networks pn_dscp_map_pri_map module with Unit tests
* Corrected method name in unit test script
2019-01-10 12:51:07 +05:30
Anil Kumar Muraleedharan
cb89b1758d Lenovo cnos l2interface (#50641)
* Adding cnos_l2 interface module and its associated Integration test as well as Unit test code
2019-01-09 10:46:56 -05:00
Anil Kumar Muraleedharan
f5ebd9736c Lenovo cnos banner new module (#50145)
* Adding cnos_banner module to the list.
2019-01-09 10:43:57 -05:00
Martin Krizek
4c72ef124b tqm._initialize_notified_handlers() is noop now (#50713) 2019-01-09 10:15:11 -05:00
Ricardo Carrillo Cruz
3e91ec28b8
Checkpoint access rule (#49937)
* WIP checkpoint_access_rule module

* Add fixes and docstrings

* Add dunder init

* Fix sanity tests issues

* Fix sanity test

* Add RETURN and EXAMPLES

* Fix example

* Fix pep8

* Add tests

* Fix pep8

* Fix pep8
2019-01-09 11:25:18 +01:00
Nilashish Chakraborty
7845373f96
New Module: vyos_ping (#50193)
* New module for vyos ping functionality

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Add some new parameters

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Need spaces

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix pylint errors

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix pylint errors

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>

* Fix docs

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2019-01-08 10:42:24 +05:30
vpiserchia
774a667591 Add Devuan Support for ascii release - resolve 49615 (#49616)
* Add Devuan Support for ascii release - resolve 49615

* Devuan Ascii does not have the VERSION_ID in the /etc/os-release file, we need to set NA
2019-01-07 17:08:01 -05:00
Ricardo Carrillo Cruz
f9079274e7
Checkpoint httpapi plugin (#49929)
* Add checkpoint httpapi plugin and access rule facts module

* WIP checkpoint_access_rule module

* Add publish and install policy, plus fix empty json object request for publish

* Refactor publish and install_policy onto module_utils

* Add update resource logic

* Add checkpoint_host_facts module

* Return code and response on get_acess_rule function

* Add checkpoint_host module

* Add checkpoint_run_script module

* Add checkpoint_task_facts module

* Show all tasks if no task id is passed

Note, this is only available on v1.3 of Checkpoint WS API

* Add update logic to checkpoint host

* Add full details on get task call

* Add checkpoint httpapi plugin

* Fix pep8

* Use auth instead of sid property and return False on handle_httperror method

* Fix version in docstring

* Remove constructor

* Remove Accept from base headers

* Do not override http error handler and assign Checkpoint sid to connection _auth

There is scaffolding in the base class to autoappend the token, given
it is assigned to connection _send

* Use new connection queue message method instead of display

* Remove unused display

* Catch ValueError, since it's a parent of JSONDecodeError

* Make static methods that are not used outside the class regular methods

* Add missing self to previously static methods

* Fix logout

Was carrying copy pasta from ftd plugin

* Remove send_auth_request

* Use BASE_HEADERS constant

* Simplify copyright header on httpapi plugin

* Remove access rule module

* Remove unused imports

* Add unit test

* Fix pep8

* Add test

* Add test

* Fix pep8
2019-01-07 14:02:29 +01:00
rajaspachipulusu17
a1e1a42341 Pluribus Networks module for connection stat settings with UT's (#50186)
* Pluribus Networks module for connection stat settings
2019-01-07 10:40:39 +05:30
Wojciech Wypior
4648a441d2 adds bigip apm policy import (#50559) 2019-01-04 13:50:50 -06:00
Wojciech Wypior
8b1214596a adds apm policy fetch module (#50534) 2019-01-04 12:32:06 -06:00
Sumit Jaiswal
189fcb37f9
Added new module to support NIOS Fixedaddress DHCP property (#49119)
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* nios fixedaddr new module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* updating name

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2019-01-04 13:00:12 +05:30
Abhijeet Kasurde
bc6cd13874
Handle exception raised in recursive_finder API (#49590)
User module can contain Indentation errors or syntax errors.
Handle AST exceptions rather than showing traceback while importing such module.

Fixes: #21707

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-01-04 10:33:37 +05:30
Toshio Kuratomi
27c7d5bb01 Move the arguments module into cli/ and context_objects into utils
* Note: Python2 is not as intelligent at detecting false import loops as
  Python3.  context_objects.py cannot be added to cli/arguments because it
  would set up an import loop between cli/__init__.py,
  cli/arguments/context_objects.py, and context.py on Python2.

ci_complete
2019-01-03 18:12:23 -08:00
Toshio Kuratomi
7e92ff823e Split up the base_parser function
The goal of breaking apart the base_parser() function is to get rid of
a bunch of conditionals and parameters in the code and, instead, make
code look like simple composition.

When splitting, a choice had to be made as to whether this would operate
by side effect (modifying a passed in parser) or side effect-free
(returning a new parser everytime).

Making a version that's side-effect-free appears to be fighting with the
optparse API (it wants to work by creating a parser object, configuring
the object, and then parsing the arguments with it) so instead, make it
clear that our helper functions are modifying the passed in parser by
(1) not returning the parser and (2) changing the function names to be
more clear that it is operating by side-effect.

Also move all of the generic optparse code, along with the argument
context classes, into a new subdirectory.
2019-01-03 18:12:23 -08:00
Toshio Kuratomi
afdbb0d9d5 Save the command line arguments into a global context
* Once cli args are parsed, they're constant.  So, save the parsed args
  into the global context for everyone else to use them from now on.
* Port cli scripts to use the CLIARGS in the context
* Refactor call to parse cli args into the run() method
* Fix unittests for changes to the internals of CLI arg parsing
* Port callback plugins to use context.CLIARGS
  * Got rid of the private self._options attribute
  * Use context.CLIARGS in the individual callback plugins instead.
  * Also output positional arguments in default and unixy plugins
  * Code has been simplified since we're now dealing with a dict rather
    than Optparse.Value
2019-01-03 18:12:23 -08:00
Toshio Kuratomi
c18da65089 Add a CLIArgs Singleton class that will hold the parse cli arguments 2019-01-03 18:12:23 -08:00
Toshio Kuratomi
5844c8c7f0 Cleanups to the common.sys_info API
* Move get_all_subclasses out of sys_info as it is unrelated to system
  information.
* get_all_subclasses now returns a set() instead of a list.
* Don't port get_platform to sys_info as it is deprecated.  Code using
  the common API should just use platform.system() directly.
* Rename load_platform_subclass() to get_platform_subclass and do not
  instantiate the rturned class.
* Test the compat shims in module_utils/basic.py separately from the new
  API in module_utils/common/sys_info.py and module_utils/common/_utils.py
2019-01-03 16:21:09 -08:00
Matt Martz
3b49bbcfde Give IncludedFile more context via ansible_search_path (#50045)
* Give IncludedFile more context via ansible_search_path to template lookups. Fixes #49969

* Update units
2019-01-03 16:13:02 -05:00
Joseph Benden
d810acf7a5 Add support for Kali Linux detection. (#50331)
Signed-off-by: Joseph Benden <joe@benden.us>
2019-01-03 09:43:24 +05:30
Wojciech Wypior
3ef71e529a added new module to manipulate signatre sets on ASM policy (#50209) 2019-01-02 13:12:08 -06:00
rajaspachipulusu17
3517373cfd Pluribus Networks igmp snooping module with Unit tests (#50146) 2018-12-24 13:40:02 +05:30
Nathaniel Case
0b3aa75b7f
Add backup parameter to cli_config (#50206)
* Add backup parameter to cli_config

* Add a unit test for cli_config backup
2018-12-21 09:55:14 -05:00
anasbadaha
d2446cbf0f Fix Issue #39598 (#49982)
* Fix Issue #39598

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix unit test for onyx_config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add comments for save running config

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Enhance onyx_config bug fix

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix result['changed'] = True comment

Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-21 11:54:10 +05:30
anasbadaha
6178a55afd Fix Issue #49612 (#50073)
* Fix Issue #49612

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Pep8 failures

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add validation for send empty group name

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Error message

Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-21 11:53:36 +05:30
Chris Archibald
39b1f1c363 Rewrite (#49570) 2018-12-20 12:19:32 +00:00
Sumit Jaiswal
f76d7bdbef
New Module for creating, managing Infoblox NIOS nameserver groups (#49124)
* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* adding new nios_nsgroup module

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix shippable errors

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* added unit tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2018-12-20 14:36:41 +05:30
Anil Kumar Muraleedharan
eab3b02cb3 Refactoring of cnos_interface module like what followed by other vendors (#49927)
* Refactoring of cnos_interface module like what followed by other vendors

* To remove cnos-interface from E326 validation ignore list

* Effect of default parameters impacted UT
2018-12-19 11:38:19 -05:00
rajaspachipulusu17
afdd4e2343 Pluribus Networks dhcp filter module with unit tests (#49848)
* Pluribus Networks dhcp filter module with unit tests
* Added type which was missing in doc
* Removed unwanted global variable
* Fix return type
2018-12-19 17:16:25 +05:30
rajaspachipulusu17
8ca02d8359 Pluribus Networks admin service module with unit tests (#49854)
* Pluribus Networks admin service module with unit tests
* Documentation fix
* import module changes
* Removed unused imports
* Fix return type
2018-12-19 17:14:48 +05:30
Wojciech Wypior
59f4871615 added bigip_asm_policy_manage (#50115)
* added bigip_asm_policy_manage

* Update bigip_asm_policy_manage.py
2018-12-18 19:35:51 -08:00
Wojciech Wypior
f761cc4077 added ASM policy server technology module (#50116)
* added ASM policy server technology module

* Update bigip_asm_policy_server_technology.py
2018-12-18 18:38:19 -08:00
Toshio Kuratomi
bd072fe83a
Make the timeout decorator raise an exception out of the function's scope (#49921)
* Revert "allow caller to deal with timeout (#49449)"

This reverts commit 63279823a7.

Flawed on many levels

* Adds poor API to a public function
* Papers over the fact that the public function is doing something bad
  by catching exceptions it cannot handle in the first place
* Papers over the real cause of the issue which is a bug in the timeout
  decorator
* Doesn't reraise properly
* Catches the wrong exception

Fixes #49824
Fixes #49817

* Make the timeout decorator properly raise an exception outside of the function's scope

signal handlers which raise exceptions will never work well because the
exception can be raised anywhere in the called code.  This leads to
exception race conditions where the exceptions could end up being
hanlded by unintended pieces of the called code.

The timeout decorator was using just that idiom.  It was especially bad
because the decorator syntactically occurs outside of the called code
but because of the signal handler, the exception was being raised inside
of the called code.

This change uses a thread instead of a signal to manage the timeout in
parallel to the execution of the decorated function.  Since raising of
the exception happens inside of the decorator, now, instead of inside of
a signal handler, the timeout exception is raised from outside of the
called code as expected which makes reasoning about where exceptions are
to be expected intuitive again.

Fixes #43884

* Add a common case test.

Adding an integration test driven from our unittests.  Most of the time
we'll timeout in run_command which is running things in a subprocess.
Create a test for that specific case in case anything funky comes up
between threading and execve.

* Don't use OSError-based TimeoutError as a base class

Unlike most standard exceptions, OSError has a specific parameter list
with specific meanings.  Instead follow the example of other stdlib
functions, concurrent.futures and multiprocessing and define a separate
TimeoutException.

* Add comment and docstring to point out that this is not hte Python3 TimeoutError
2018-12-18 18:01:46 -08:00
Yannig Perré
6b41588e93 Fix with_ini example and unittest
* Fix example in ini.py
* Fix unittest in test_ini.py to pass CI as latest ansible returns list in
  different order. To prevent such issues in future results are sorted
* PEP8 E501 styling improvements

Co-Authored-By: Sergii Golovatiuk <sgolovat@redhat.com>
2018-12-18 12:25:02 -08:00
Abhijeet Kasurde
139e3477a7 Review comments
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-18 12:20:35 -08:00
Abhijeet Kasurde
44bd8fc0a8 Update unit tests for configmanager
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-18 12:20:35 -08:00
rajaspachipulusu17
d28e700a22 Pluribus networks admin session timeout module with unit tests (#50012)
* Pluribus networks admin session timeout module with unit tests
* Doc fix
* Removed unused imports
* Removed unwanted global variable
2018-12-18 17:23:45 +05:30
rajaspachipulusu17
cf00880ab3 Pluribus Networks dscp map module with unit tests (#49849)
* Pluribus Networks dscp map module with unit tests
* Doc string fix
2018-12-18 12:50:16 +05:30
rajaspachipulusu17
4d88cdd83a Pluribus Networks cpu class module with unit tests (#49847)
* Pluribus Networks cpu class module with unit tests
* Doc string fixes
2018-12-18 12:42:33 +05:30
Matt Martz
7eb1ab45a7
Allow tags to be templated from a variable (#49833)
* Allow tags to be templated from a variable. Fixes #49825

* Restore _load_tags to ensure we do csv tag splitting

* Add tests for csv tags and templated tags

* evaluate_tags doesn't need to accept strings, because _load_tags handles this
2018-12-17 15:40:26 -06:00
Toshio Kuratomi
61b1daa65f Port from plaform.dist to ansible.module_utils.distro.linux_distribution
ci_complete
2018-12-17 11:01:01 -08:00
Adrian Likins
e872811b8d WIP: add tests to compare to platform.*dist
Can be removed once everything is ported.
2018-12-17 11:01:01 -08:00
Adrian Likins
5e1f8a48f3 Bundle a copy of github.com/nir0s/distro/distro.py
Since the 'platform.dist()' and 'platform.linux_distribution()'
methods will be removed from future versions of python, this
provides an alternative to replace ansibles use of those
methods.

lib/ansible/module_utils/distro.py is a copy of
https://github.com/nir0s/distro/blob/master/distro.py

This module is originally from https://github.com/nir0s/distro
and is license under the Apache License, Version 2.0.
2018-12-17 11:01:01 -08:00
f-bor
134c1a624e new network module: edgeswitch_vlan (#48041)
* initial commit

* better commands generation
2018-12-17 11:30:17 +05:30
anasbadaha
369354547e Issue: 46475 Fix onyx magp module for supporting new json format (#49417)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-17 10:52:51 +05:30
Toshio Kuratomi
175f3b51e5 Ensure that current uses of BaseException are required
* In some cases, it appears that Exception should have been used instead
  as there's no need to catch sys.exit KeyboardInterrupt and similar.
* In a few cases, it appears that BaseException is used because
  a library we depend on calls sys.exit() contrary to good coding
  design.  Comment those so that we know that those have been audited
  and found to be correct and change to use (Exception, SystemExit)
  instead.
2018-12-16 15:03:19 -08:00
Toshio Kuratomi
3fba006207 Update bare exceptions to specify Exception.
This will keep us from accidentally catching program-exiting exceptions
like KeyboardInterupt and SystemExit.
2018-12-16 15:03:19 -08:00
anasbadaha
c0dbc1a441 Issue/38837 (#49873)
* Fix Issue #38837

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Issue #38837 2

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Enhance decumentation

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Failures in Shippable

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Fix Version Added

Signed-off-by: Anas Badaha <anasb@mellanox.com>

* Add version_added:2.8 in purge attributes

Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-12-16 13:16:28 +05:30
Abhijeet Kasurde
162d9497ba
Ad-hoc command: fix 'any' call in play_ds (#49852)
* Ad-hoc command: fix 'any' call in play_ds
* Unit test for ad-hoc cli
* Review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-16 11:07:06 +05:30
Abhijeet Kasurde
013c42b14f
Misc typo fixes (#49816)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-14 15:12:58 +05:30
Susant Sahani
59dcf3f277 nmcli: Introduce SIT Tunnel (#45937)
This work enables to add sit tunnel via nmcli module

Signed-off-by: Susant Sahani susant@redhat.com

SUMMARY
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
nmcli

ANSIBLE VERSION
2.8
ADDITIONAL INFORMATION
  - nmcli:
       state: present
       type: sit
       conn_name: sit_test1
       autoconnect: yes
       ip_tunnel_dev: enp0s8
       ip_tunnel_local: 192.168.1.2
       ip_tunnel_remote: 192.168.1.5
2018-12-12 23:06:09 -05:00
cma0
974c45a5f5 itential iap_token module (#46773) 2018-12-12 14:28:20 -05:00
WhyIsThisOpen
7bdca72713 rhn_register fixes for username and password when unregistering
- Require username and password for unregistering and avoid "cannot marshal None unless allow_none is enabled" error when using an activation key and no channels specified.
- Update test fixtures and add changelog


Co-authored-by: WhyIsThisOpen <WhyIsThisOpen@users.noreply.github.com>
2018-12-12 11:32:48 -05:00
rajaspachipulusu17
b47cde9d4c Pluribus Networks pn access list ip module with unit test cases (#49604)
* Pluribus Networks pn access list ip module with unit test cases

* Changes according to ansibot standards in unit test modules

* Remove unwanted variables

* Removed unwanted super call
2018-12-12 13:33:01 +00:00
Chris Archibald
8ad5035ce6 Bug Fix and rewrite (#49508) 2018-12-12 12:16:12 +00:00
Abhijeet Kasurde
d36922064b Add support for hex color in slack module (#49804)
Fixes: #11935

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-12 08:41:49 +00:00
Josue David Hernandez
9202ef60b0 set ansible_os_family from name variable in os-release for clearlinux OS (#49639)
* set ansible_os_family from name variable in os-release for clearlinux system

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add os_family for clear linux and clear linux mixes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
2018-12-11 16:12:38 -05:00
Matt Martz
2a469fd959 Consolidate handler tracking (#49338)
* Consolidate handler tracking
  -  Remove unused code. ci_complete
  - unit test fixes. ci_complete
  - Restore previous behavior of matching a single handler
  - when notifying a host for a handler, return True if it was added, False otherwise, to reduce copied logic
  - rename funcitons for clarity. ci_complete
  - Remove handler logic for static includes which was disabled previously
2018-12-11 10:58:19 -05:00
Andreas Calminder
876b637208 move some of basic into common (#48078)
* move file functions into common.file

* move *_PERM_BITS and mark as private (_*_PERM_BITS)

* move get_{platform, distribution, distribution_version} get_all_subclasses and load_platform_subclass into common.sys_info

* forgot get_distribution_version, properly rename get_all_subclasses

* add common/sys_info.py to recursive finder test

* update module paths in test_platform_distribution.py

* update docstrings, _get_all_subclasses -> get_all_subclasses

* forgot to update names

* remove trailing whitespace
2018-12-07 10:21:11 -08:00
Pavlos Tzianos
a4eb4b2551 Rabbitmq user permission fixes (#49404)
* Simplify permission changing code for rabbitmq_user module

* Add check for multiple permission dicts for same host to rabbitmq_user module

* Add docstring for _get_permission method of rabbitmq_user

* Fix method that compares vhost permissions in rabbitmq_user

* Add tests for rabbitmq_user module

* Add helper function for simulating collections.Counter functionality
2018-12-07 13:19:08 +00:00
Sean Myers
9434f8608a Add rhsm_repository_release module (#43211)
* Add rhsm_repository_release module

* bump ansible version_added

* Fix imports in rhsm_repository_release unit test
2018-12-06 20:16:18 +00:00
Tim Rupp
1c3fa2b07f
Deprecate the bigip_asm_policy module (#49574)
Specific import and export modules should be used instead
2018-12-05 16:02:16 -08:00
Anil Kumar Muraleedharan
dd004321d4 Refactoring code of cnos_portchannel as cnos_linkagg in tune with other vendors. (#49467)
* Refactoring code of cnos_portchannel as cnos_linkagg in tune with other vendors.
2018-12-05 11:03:42 -05:00
Josue David Hernandez
6d42c5020a Fix for changes in clearlinux (#49344)
* Fix for changes in clearlinux

clearlinux is now providing /etc/os-release file and ansible is identifying as NA
then this change allow ansible to find it

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>

* Add changelog fragment for clearlinux changes

Signed-off-by: Josue David Hernandez Gutierrez <josue.d.hernandez.gutierrez@intel.com>
2018-12-05 13:13:40 +00:00
Naval Patel
880390ca0a Added new module lxca_nodes for Lenovo XClarity Administrator (#46767)
* Added new module lxca_nodes
2018-12-05 10:18:36 +00:00
Toshio Kuratomi
c817bef3ae Fix for callback plugins on Python3 when a module returns dictionary keys that aren't strings
This fixes one of the problems reported in https://github.com/ansible/ansible/issues/49343

Upstream Python3 bug for the json traceback:
https://bugs.python.org/issue25457

and PR that may fix it:
https://github.com/python/cpython/pull/8011
2018-12-04 23:03:48 -08:00
Tim Rupp
60b75c2cfd
Adds ASM policy import module (#49526) 2018-12-04 21:34:55 -08:00
Tim Rupp
7a4c7b8c0f
Adds module for gtm topology regions (#49510) 2018-12-04 20:58:52 -08:00
Tim Rupp
c7dd13758e
Adds bigip_profile_analytics module (#49499) 2018-12-04 12:53:31 -08:00
Tim Rupp
caa6ed3c66
Adds ASM policy fetch module (#49494) 2018-12-04 11:24:34 -08:00
Tim Rupp
138690519d
Various small fixes for f5 ansible modules (#49492) 2018-12-04 11:15:49 -08:00
Sam Doran
40a5f7bfdf Add better error when k=v syntax is used with YAML in tasks (#41754)
* Add error message for k=v and YAML in a single task

Find the correct line, column, and position for k=v errors since they are different than the position reported initially.

Document bug in quoting syntax check.

* Change tense or error message

Since the error still exists, switch to present tense rather than past tense.

* Remove double spaces after periods in error messages.

http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html

* Add changelog fragment

* Add tests for new error message

* Fix tests

* Add clarifying comments to unit test
2018-12-04 12:32:02 -05:00
Abhijeet Kasurde
1b04571ea0
VMware: Fix module usages in module_utils (#49421)
* VMware: Fix module usages in module_utils
* Skip test for Python 2.6 as SSL context is not available in Python 2.6

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-12-04 10:11:29 +05:30
John Kerkstra
672acbea68 Adds redshift_cross_region_snapshots module (#35527)
* add redshift_cross_region_snapshots module, unit tests.

* fix errors

* use ec2_argument_spec as the basis for the argument spec. fixed
metadata_version

* follow best practices by naming example tasks.

* code review changes

* fix linting errors

* Update version added
2018-12-03 08:34:53 +00:00
Chris Archibald
62dd1fe29e New options of na_ontap_aggregate (#48906)
* add new options for na_ontap_aggregate

* add gpl line

* remove dup option

* Put files in wrong directory

* change unit test to match the request from PR 48941

* Changed for review comments

* pep8
2018-12-02 14:24:27 +00:00
ftntcorecse
b4ce4e1571 Fortinet FortiManager Device Group Module (#46086)
* fmgr_device_group PR candidate

* fgmr_device_group PR candidate

* PR candidate

* PR candidate

* Fixing Edits.

* Fixing Edits.

* Fixing Authors

* Removed State Parameter and replaced with Mode, per request of justjais
2018-11-30 15:54:41 +05:30
Felix Fontein
3726d467ec Code style adjustment. (#49329) 2018-11-29 21:57:32 +01:00
Paul Neumann
a914f494a8 ios_facts: Gather CDP neighbor data (#49129)
* ios_facts: Gather CDP neighbor data

* ios_facts: Create tests for ansible_net_neighbors
2018-11-29 14:05:17 -05:00
Pilou
62c05033d6 templar: ensure that exceptions are handled, fix 'AttributeError' (#48792)
* templar: ensure that exceptions are handled

* Fix AttributeError: object has no attribute 'message'

'message' attribute is deprecated since Python 2.6 and not available
with Python 3.

Simple reproducer:

    - hosts: localhost
      vars:
        not_json: "{{ 'test str' | from_json }}"
      tasks:
        - command: "echo {{ not_json }}"
2018-11-29 09:56:23 -05:00
Felix Fontein
1e0ab16247 Add basic unit tests for module_utils/acme.py. (#49103) 2018-11-29 09:32:15 +00:00
Anil Kumar Muraleedharan
7a81d859c5 Refactoring cnos_vlan in line with ios, eos etc. (#48924)
* Refactoring cnos_vlan in line with ios, eos etc.
2018-11-28 12:51:39 -05:00
Lars Kellogg-Stedman
bafc1f8a41 fix constructed functionality in openstack inventory plugin (#48833)
* test for openstack inventory constructed functionality

this adds unit tests for the compose, groups, and keyed_var features
of the openstack inventory plugin

* fix constructed functionality in openstack inventory plugin

The compose, groups, and keyed_groups functionality of the openstack
inventory plugin was broken:

- the plugin was not passing the correct variables to the
  Constructable methods for compose and groups
- the plugin was simply never calling the appropriate method for
  implementing keyed_groups

This commit fixes both issues.
2018-11-27 13:01:56 -05:00
Toshio Kuratomi
61e5d04a60 Replace nose with pytest 2018-11-26 13:41:57 -08:00
Brian Coca
91150423f4
ignore netapp tests when no libs (#48941)
* ignore tests when no libs
2018-11-21 11:51:40 -05:00
ftntcorecse
fb7b6f9521 Fortinet FortiManager Device Add Module (#45954)
* fmgr_device PR candidate

* fmgr_device PR candidate

* fmgr_device PR candidate

* fmgr_device PR candidate

* fmgr_device PR candidate

* fmgr_device PR candidate

* fmgr_fwobj_address PR candidate

* Grammar

* grammar changes

* pylint changes

* Fixing Authors
2018-11-21 12:05:33 +05:30
ftntcorecse
050a2c51dd Fortinet FortiManager Device Config Module (#46080)
* fmgr_device_config PR candidate

* fmgr_fwobj_address PR candidate

* PR candidate

* Resolving Edits

* Resolving Edits

* Fixing Authors
2018-11-21 12:03:38 +05:30
ftntcorecse
1da3c5c302 Fortinet FortiManager Firewall Objects - Addresses (#46084)
* fmgr_fwobj_address PR candidate

* fmgr_fwobj_address PR candidate

* PR candidate

* PR candidate

* Adding requested changes by @samccann

* minor issue...

* minor pylint issue

* More changes from @samccann

* more grammar

* Author Mention Change

* Fixing Authors
2018-11-21 12:00:39 +05:30
ftntcorecse
86222fd4c4 Fortinet FortiManager HA Configuration Module (#46085)
* fmgr_ha PR candidate

* PR candidate

* PR candidate

* PR candidate

* PR candidate

* Fixing Edits.

* Fixing Edits.

* Fixing Edits.

* Fixing Edits.

* Fixing Authors
2018-11-21 11:57:04 +05:30
Tim Rupp
212b48b6fd
Adds module to configure ldap device auth on a bigip (#48974) 2018-11-20 22:15:50 -08:00
ftntcorecse
44b20fbf96 Fortinet Firewall Object - Virtual IPs (#47637)
* PR Candidate

* PR Candidate - pylint fix

* PR Candidate minor pylint fix v2

* Fixed Odd type annotation -- needed double comments

* Missed one of the # type: comments in fixture...

* Fixing Edits. Nixing Stale CI Flag

* Fixing Edits.

* Fixed Authors -- Fixed Changes.

* Fixing pep8...

* Fixing a description
2018-11-21 11:19:58 +05:30
ftntcorecse
4862a4aeb4 FortiManager security profile group module (#46220)
* Initial Commit

* Initial Commit

* Initial Commit

* Fixing syntax errors

* After running sanity tests, fixed pylint and pep8 errors

* After running sanity tests, fixed pylint and pep8 errors

* Fixing more syntax issues

* Fixing more syntax issues

* Adding username to doc block

* PR candidate

* PR candidate

* fixed pep8 and docs issues

* fixed 2.6 function issues

* fixed 2.6 function issues part duex

* Initial commit for security profile group module

* Adding better playbook example to module

* Adding another commit to test shippable tests

* Fixing shippable errors, pep8 in unit test file and doc block problem in main module

* Fixing documentation module error

* Fixing pep8 line too long in unit test

* Fixing utility function with nested dictionaries

* Fixing utility function with pep8 issue

* Adding change to allow for multiple list of dictionaries to be submitted via a single playbook

* Fixing review changes

* Adding @ in author names per @Gundalow's request per Ansible's guidelines
2018-11-21 11:18:19 +05:30
ftntcorecse
64c4881d58 FortiManager DNS security profile (#46239)
* Initial Commit

* Initial Commit

* Initial Commit

* Fixing syntax errors

* After running sanity tests, fixed pylint and pep8 errors

* After running sanity tests, fixed pylint and pep8 errors

* Fixing more syntax issues

* Fixing more syntax issues

* Adding username to doc block

* PR candidate

* PR candidate

* fixed pep8 and docs issues

* fixed 2.6 function issues

* fixed 2.6 function issues part duex

* Initial commit for security profile group module

* Adding better playbook example to module

* Initial commit for FMG DNS security profile

* Fixing pep8 line too long in unit test

* Removing excess modules and unit tests

* Fixing trailing white space for dns module

* Fixing utility function with nested dictionaries

* Fixing utility function with pep8 issue

* Adding change to allow for multiple list of dictionaries to be submitted via a single playbook

* Fixing review changes

* Adding @ in author names per @Gundalow's request per Ansible's guidelines
2018-11-21 11:17:37 +05:30
ftntcorecse
37e932c4ee Fortinet FortiManager IPv4 Policy Module (#47638)
* Needs unit test fix -- the "delete" calls a GET command and another function to get policy ID of a firewall policy before deleting it. Nested functions like this, where a GET occurs to determine a new call, breaks the unitTestGen output. Need to figure out what's going on, and adjust the generator.

* PR Candidate

* PR Candidate (fixes)

* Reverting

* Fixing Edits.

* Fixing Authors - Fixing Requested Changes
2018-11-21 11:14:47 +05:30
ftntcorecse
d7e1e6429c FortiManager Web Application Firewall Security Profile (#46967)
* Initial Commit

* Initial Commit

* Initial Commit

* Fixing syntax errors

* After running sanity tests, fixed pylint and pep8 errors

* After running sanity tests, fixed pylint and pep8 errors

* Fixing more syntax issues

* Fixing more syntax issues

* Adding username to doc block

* PR candidate

* PR candidate

* fixed pep8 and docs issues

* fixed 2.6 function issues

* fixed 2.6 function issues part duex

* Initial commit for security profile group module

* Adding better playbook example to module

* Adding another commit to test shippable tests

* Fixing shippable errors, pep8 in unit test file and doc block problem in main module

* Fixing documentation module error

* Fixing pep8 line too long in unit test

* Fixing utility function with nested dictionaries

* Fixing utility function with pep8 issue

* Adding change to allow for multiple list of dictionaries to be submitted via a single playbook

* Initial commit for FMG Security Profile Web Application Firewall

* adding extra line at bottom for pep8 conditions

* Adding descriptions to documentation

* Fixing more pep8 issues

* New commit for new PR

* Removing todo in documentation

* Changing module name in documentation to match actual module name

* Fixing yaml syntax for long choices list

* Fixing yaml syntax for long choices list

* Fixing review changes

* Adding @ in author names per @Gundalow's request per Ansible's guidelines
2018-11-21 10:46:13 +05:30
ftntcorecse
a171b80a0c FortiManager Web Filter Security Profile (#47150)
* Initial Commit

* Initial Commit

* Initial Commit

* Fixing syntax errors

* After running sanity tests, fixed pylint and pep8 errors

* After running sanity tests, fixed pylint and pep8 errors

* Fixing more syntax issues

* Fixing more syntax issues

* Adding username to doc block

* PR candidate

* PR candidate

* fixed pep8 and docs issues

* fixed 2.6 function issues

* fixed 2.6 function issues part duex

* Initial commit for security profile group module

* Adding better playbook example to module

* Adding another commit to test shippable tests

* Fixing shippable errors, pep8 in unit test file and doc block problem in main module

* Fixing documentation module error

* Fixing pep8 line too long in unit test

* Fixing utility function with nested dictionaries

* Fixing utility function with pep8 issue

* Adding change to allow for multiple list of dictionaries to be submitted via a single playbook

* Initial commit for FMG Security Profile Web Application Firewall

* adding extra line at bottom for pep8 conditions

* Adding descriptions to documentation

* Fixing more pep8 issues

* New commit for new PR

* Removing todo in documentation

* Changing module name in documentation to match actual module name

* Fixing yaml syntax for long choices list

* Fixing yaml syntax for long choices list

* Initial commit for fmgr web filter security profile

* Fixing pep8 syntax issues

* Fixing documentation yaml syntax errors with choices on new lines

* Fixing documentation yaml syntax errors, removing Todo comments

* Fixing choices additional tab

* Fixing choices on multiple lines

* Fixing choices on multiple lines

* Adding yaml block scalar for multiline choices

* Changing YAML syntax for multiline to YAML sequence for choices

* Fixing all sanity test errors

* Fixing review changes

* Adding @ in author names per @Gundalow's request per Ansible's guidelines
2018-11-21 10:45:00 +05:30
ftntcorecse
199cd1bc77 FortiManager SSL SSH Security Profiles (#47152)
* Initial Commit

* Initial Commit

* Initial Commit

* Fixing syntax errors

* After running sanity tests, fixed pylint and pep8 errors

* After running sanity tests, fixed pylint and pep8 errors

* Fixing more syntax issues

* Fixing more syntax issues

* Adding username to doc block

* PR candidate

* PR candidate

* fixed pep8 and docs issues

* fixed 2.6 function issues

* fixed 2.6 function issues part duex

* Initial commit for security profile group module

* Adding better playbook example to module

* Adding another commit to test shippable tests

* Fixing shippable errors, pep8 in unit test file and doc block problem in main module

* Fixing documentation module error

* Fixing pep8 line too long in unit test

* Fixing utility function with nested dictionaries

* Fixing utility function with pep8 issue

* Adding change to allow for multiple list of dictionaries to be submitted via a single playbook

* Initial commit for FMG Security Profile Web Application Firewall

* adding extra line at bottom for pep8 conditions

* Adding descriptions to documentation

* Fixing more pep8 issues

* New commit for new PR

* Removing todo in documentation

* Changing module name in documentation to match actual module name

* Fixing yaml syntax for long choices list

* Fixing yaml syntax for long choices list

* Initial commit for fmgr web filter security profile

* Initial commit for SSL and SSH security profiles in FMG

* Fixing pep8 syntax issues

* Adding better playbook example

* Fixing review changes

* Adding @ in author names per @Gundalow's request per Ansible's guidelines
2018-11-21 10:44:35 +05:30
Tim Rupp
cd02b3637c
Removes remaining nose usage from f5 unit tests (#48973) 2018-11-20 20:34:01 -08:00
Tim Rupp
c1118389cf
Remove nose usage from a bigip unit test (#48964) 2018-11-20 15:49:29 -08:00
Tim Rupp
fb782fa3e9
Adds the bigip_password_policy module (#48951)
This module can be used to manage password policy settings on a BIG-IP
2018-11-20 11:59:02 -08:00
Tim Rupp
10095a397c
Adds the bigip_monitor_gateway_icmp module (#48915) 2018-11-19 19:11:00 -08:00
Tim Rupp
fdbc0e5798
Adds the bigip_dns_cache_resolver module (#48914) 2018-11-19 19:05:24 -08:00
Tim Rupp
e7d1c0fb77
Removes f5-sdk references from bigip modules (#48911) 2018-11-19 19:02:02 -08:00
Tim Rupp
8e6c3b06b8
Adds the ip_intelligence_policy parameter to vs module (#48903) 2018-11-19 15:24:44 -08:00
Tim Rupp
e6d586f703
Change port to allow strings too (#48899)
The port technically supports an asterisk, but the argument spec was
requiring integers only.
2018-11-19 13:44:20 -08:00
Chris Archibald
50808ffa8f Add common files for ONTAP and SOLIDFIRE unit tests (#48739)
* And unit test files

* Changes to netapp.py

* Matt's changed, and pep8 change for test_netapp.py
2018-11-19 14:43:32 +00:00
Susant Sahani
88dcb11695 nmcli: Introduce IPIP Tunnel (#45933)
This work enables to add ipip tunnel via nmcli module

```
  - nmcli:
       state: present
       type: ipip
       conn_name: ipip_test1
       autoconnect: yes
       ip_tunnel_dev: enp0s8
       ip_tunnel_local: 192.168.1.2
       ip_tunnel_remote: 192.168.1.5
```

version2: Added tests
Signed-off-by: Susant Sahani <susant@redhat.com>

Rebase
2018-11-16 23:57:11 -05:00
Tim Rupp
9af5724bd4
Remove the f5-sdk from bigip_remote_syslog (#48539) 2018-11-16 15:13:08 -08:00
Tim Rupp
dd2629ff0b
Adds new module for gtm topology records (#48817) 2018-11-16 10:05:23 -08:00
Tim Rupp
0e1dca6e8f
Adds the bigip_imish_config module. (#48779)
This can be used to manage bgp configuration on a BIG-IP.
2018-11-16 09:17:57 -08:00
lwm
ae0054a79e Add new linode_v4 module. (#46151)
Refs:
  * https://github.com/ansible/ansible/issues/36348
  * https://github.com/ansible/ansible/pull/41875
2018-11-16 12:39:05 +00:00
Anton Nikulin
9770ac70f9 FTD modules: upsert functionality and bug fixes (#47747)
* FTD modules: bug fixes and upsert functionality

* Fix sanity checks

* Fix unit tests for Python 2.6

* Log status code for login/logout

* Use string formatting in logging
2018-11-16 11:55:36 +05:30
Tim Rupp
a7b7c07ad2
Adds bigip_file_copy module (#48770)
This module can be used to copy files to specific datastores on
a bigip
2018-11-15 19:42:53 -08:00
Matt Clay
feb5b0b299 Fix unit test issues with pytest >= 4.0.0. 2018-11-15 10:06:07 -08:00
Sumit Jaiswal
feac12f9b7
fix nios modules (#48559)
* resolves 47839

* update name

* update name

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* update name tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* update name tests

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* modifying the condn

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
2018-11-14 18:05:25 +05:30
Abhijeet Kasurde
03f71e778b
Refactor ingate module_utils (#47959)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-11-13 17:42:53 +05:30
Olivier Bourdon
cf3483e752 Add tests filters (#43221)
This will allow tests to be carried out condtionally if necessary
using regexp include and/or exclude filters
Reorganize imports into alphabetical order for easier insertion
2018-11-13 11:16:49 +00:00
Tim Rupp
5e7a02d574
Remove f5-sdk from bigip_vcmp_guest (#48541) 2018-11-11 13:58:11 -08:00
Tim Rupp
62332155b5
Removes the f5-sdk from bigip_routedomain (#48543) 2018-11-11 11:29:21 -08:00
Tim Rupp
708c2b4b71
Removes the f5-sdk from bigip_selfip (#48544) 2018-11-11 11:14:56 -08:00
Tim Rupp
452cf2b1a3
Adds the bigip_dns_resolver module (#48540) 2018-11-11 11:09:53 -08:00
Tim Rupp
232fcb9f34
Adds the bigip_profile_server_ssl module (#48532) 2018-11-11 10:57:26 -08:00
Tim Rupp
69d24cc7fc
Remove f5-sdk from bigip_profile_udp module (#48534) 2018-11-11 10:40:25 -08:00
Tim Rupp
d89fa23412
Remove f5-sdk from bigip_profile_tcp module (#48533) 2018-11-11 10:40:02 -08:00
Tim Rupp
b292f8338f
Corrects parameters to flatten correctly. (#48531)
Also fixes unit tests and adds other code patterns that other f5
modules use
2018-11-11 10:39:44 -08:00
Tim Rupp
4e2891e38f
Adds bigip_profile_fastl4 module (#48527) 2018-11-10 22:16:26 -08:00
Tim Rupp
6134281d28
Remove f5-sdk from bigip_profile_oneconnect (#48530) 2018-11-10 22:13:16 -08:00
Tim Rupp
875d83df50
Fixes unit tests in bigip_profile_http_compression (#48529) 2018-11-10 22:12:53 -08:00
Tim Rupp
77afc32621
Adds new parameters to bigip_profile_http (#48528) 2018-11-10 22:12:19 -08:00
Tim Rupp
f126db7f21
Remove f5-sdk from bigip_profile_client_ssl (#48525) 2018-11-10 21:59:56 -08:00
Tim Rupp
50fb2d7795
Remove f5-sdk from bigip_profile_dns (#48526) 2018-11-10 21:46:19 -08:00
Tim Rupp
ed818edd5a
Remove f5-sdk from bigip_partition. Fix partition descriptions. (#48522) 2018-11-10 21:46:04 -08:00
Tim Rupp
0c3f168087
Remove f5-sdk from bigip_policy_rule (#48524) 2018-11-10 21:35:34 -08:00
Tim Rupp
dbbc752d56
Removes the f5-sdk from bigip_policy (#48523) 2018-11-10 21:33:42 -08:00
Tim Rupp
4dc5a26293
Adds new params to bigip_node. Fix unit tests. (#48521) 2018-11-10 21:16:00 -08:00
Tim Rupp
1e57b91c35
Add new parameters to bigip monitor modules (#48520) 2018-11-10 20:34:48 -08:00
Tim Rupp
240d2baebd
Removes f5-sdk from bigip_management_route (#48519) 2018-11-10 20:34:15 -08:00
Tim Rupp
73ec37b6b6
Remove f5-sdk from bigip_log_destination (#48517) 2018-11-10 20:10:07 -08:00
Tim Rupp
94d04b7da4
Remove the f5-sdk from bigip_irule (#48516) 2018-11-10 20:09:05 -08:00
Tim Rupp
25344da0ad
Remove f5-sdk from bigip_log_publisher (#48518) 2018-11-10 19:54:59 -08:00
Tim Rupp
a260e86729
Remove f5-sdk from bigip_iapp_service module (#48511) 2018-11-10 19:23:44 -08:00
Tim Rupp
1a226a86b5
Remove f5-sdk from bigip_iapplx_package (#48513) 2018-11-10 19:14:49 -08:00
Tim Rupp
4579b6516f
Remove f5-sdk from bigip_iapp_template (#48512) 2018-11-10 19:12:35 -08:00
Tim Rupp
8dabd0cde3
Remove f5-sdk from bigip_gtm_virtual_server (#48508) 2018-11-10 18:49:46 -08:00
Tim Rupp
ce06cfe8ef
Remove f5-sdk from bigip_gtm_wide_ip (#48509) 2018-11-10 18:48:52 -08:00
Tim Rupp
4a74c1fec6
Add new features to gtm server module (#48507)
Remove the f5-sdk. Fix unit tests. Add new prober parameters
2018-11-10 18:34:48 -08:00
Tim Rupp
364ed4e660
Remove f5-sdk from bigip_hostname (#48510) 2018-11-10 18:23:10 -08:00
Tim Rupp
bfd8dc56ea
Remove the f5-sdk from bigip_gtm_pool_member (#48506) 2018-11-10 18:22:55 -08:00
Tim Rupp
830f1880b7
Remove f5-sdk from bigip_gtm_pool (#48505) 2018-11-10 18:03:39 -08:00
Tim Rupp
98a15013dc
Remove f5-sdk from bigip_gtm_monitor_tcp_half_open (#48504) 2018-11-10 18:03:26 -08:00
Tim Rupp
8a57ae1702
Remove f5-sdk from bigip_gtm_monitor_tcp (#48503) 2018-11-10 18:03:14 -08:00
Tim Rupp
530a21dfc0
Remove the f5-sdk from bigip_gtm_monitor_https (#48502) 2018-11-10 17:39:30 -08:00