Commit graph

1041 commits

Author SHA1 Message Date
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
Tim Rupp
0f2ea94c00
Remove f5-sdk from bigip_gtm_monitor_firepass (#48499) 2018-11-10 15:32:07 -08:00
Tim Rupp
ce1c88a7b8
Remove the f5-sdk from bigip_gtm_monitor_http (#48500) 2018-11-10 15:26:33 -08:00
Tim Rupp
75661cc5f6
Removes the f5-sdk from bigip_gtm_monitor_external (#48498) 2018-11-10 15:08:47 -08:00
Tim Rupp
7664d1d91c
Removes the f5-sdk from bigip_gtm_monitor_bigip (#48497) 2018-11-10 15:03:03 -08:00
Tim Rupp
7ce3d7c8ef
Removes the f5-sdk from bigip_gtm_global (#48496) 2018-11-10 14:53:54 -08:00
Tim Rupp
3186f2b576
Removes the f5-sdk from bigip_gtm_datacenter (#48495) 2018-11-10 14:53:41 -08:00
Tim Rupp
3132ce8404
Fixes unit tests and move client variable (#48494) 2018-11-10 14:42:01 -08:00
Tim Rupp
7d11e6e3e5
Adds token cleanup and fixes unit tests (#48493) 2018-11-10 14:40:14 -08:00
Tim Rupp
1afbe4d61b
Remove the f5-sdk from bigip_firewall_port_list module (#48492) 2018-11-10 14:39:26 -08:00
Tim Rupp
fd0f3ad648
Fixes unit tests for bigip_firewall_policy module (#48490) 2018-11-10 14:39:10 -08:00
Tim Rupp
112ce6da89
Adds bigip_firewall_dos_vector module (#48487)
This module can be used to manage DoS vectors in a DoS profile or
device config
2018-11-10 14:08:31 -08:00
Tim Rupp
d1288f9ea1
Adds bigip_dns_zone module (#48482)
This module can be used to manage zones on a BIG-IP. The managed
zones should **not** be confused with ZoneRunner zones as they are
not the same.
2018-11-10 13:14:57 -08:00
Tim Rupp
9a396cc45d
Fixes unit tests broken in ansible 2.8 and minor module cleanup (#48484) 2018-11-10 13:06:07 -08:00
Tim Rupp
1378e9fca2
Removes the f5-sdk from bigip_firewall_address_list module (#48483) 2018-11-10 12:58:12 -08:00
Tim Rupp
b5ee96a576
Adds bigip_dns_nameserver module (#48480)
This module can be used to manage DNS nameservers (usually used for
DNS express) functionality on a BIG-IP.
2018-11-10 12:56:48 -08:00
Tim Rupp
0c14b75eec
Remove f5-sdk from bigip_device_trust (#48479) 2018-11-10 12:07:49 -08:00
Tim Rupp
1c7e6d354c
Remove f5-sdk from bigip_device_sshd (#48478) 2018-11-10 12:07:03 -08:00
Tim Rupp
90857004c9
Remove f5-sdk from bigip_device_ntp (#48477) 2018-11-10 12:06:46 -08:00
Tim Rupp
ccb6349e70
Removes f5-sdk from bigip_device_license (#48476) 2018-11-10 12:06:32 -08:00
Tim Rupp
0873043e5a
Fixes ssl cipher ordering in bigip_device_httpd. Also fix unit tests (#48475) 2018-11-10 11:40:18 -08:00
Tim Rupp
fccbbf3405
Removes f5-sdk from bigip_device_group_member (#48464) 2018-11-09 22:35:34 -08:00
Tim Rupp
70cdf477e4
Remove f5-sdk from bigip_device_group (#48463) 2018-11-09 22:17:49 -08:00
Tim Rupp
03ccf50466
Remove f5-sdk from bigip_device_dns (#48461) 2018-11-09 22:13:01 -08:00
Tim Rupp
a1a899353c
Remove f5-sdk from bigip_device_facts and add more facts (#48462) 2018-11-09 22:12:47 -08:00
Tim Rupp
de066ceef8
Removes f5-sdk from bigip_device_connectivity (#48460) 2018-11-09 21:59:21 -08:00
Tim Rupp
c161ffef81
Fixes unit tests for bigip_device_auth that were broken in 2.8 (#48459) 2018-11-09 21:56:26 -08:00
Tim Rupp
68084d989c
Removes f5-sdk from bigip_data_group (#48458) 2018-11-09 21:52:46 -08:00
Tim Rupp
effa22245e
Remove the f5-sdk from bigip_configsync_action (#48457) 2018-11-09 21:38:01 -08:00
Tim Rupp
e6fad87e20
Removes the f5-sdk from bigip_config (#48456) 2018-11-09 21:37:48 -08:00
Tim Rupp
ec2933e20b
Removes the f5-sdk from bigip_command (#48455) 2018-11-09 21:24:21 -08:00
Tim Rupp
d97abff0ad
Fixes unit tests that were broken in ansible 2.8 (#48454) 2018-11-09 21:00:03 -08:00
Tim Rupp
5196188b97
Minor fixes to bigip_cli_alias (#48452) 2018-11-09 20:39:50 -08:00
Tim Rupp
70cf5acf13
Remove f5-sdk from bigip_asm_policy (#48451) 2018-11-09 20:11:46 -08:00
Tim Rupp
77d14b36b0
Remove the f5-sdk from as3 module (#48449) 2018-11-09 19:40:27 -08:00
Tim Rupp
f4c2587d47
Adds new parameters to bigip_pool_member (#48448) 2018-11-09 16:48:08 -08:00
Tim Rupp
55f5a707fe
Removes f5-sdk from bigip_pool (#48431)
Additionally fixes forwarding, small bugs, and adds small enhancements
2018-11-09 12:31:07 -08:00
Tim Rupp
7290bc23b8
Removes the f5-sdk from bigip_provision (#48397) 2018-11-08 21:46:56 -08:00
Tim Rupp
38806e8507
Fixes for bigip_qkview (#48396)
Fixes unit tests for ansible 2.8 and adds more error handling
for qkview generation
2018-11-08 21:08:27 -08:00
Raphael Meudec
c062f37984 Bug 42787 create volume with label (#46527)
* add None value to docker-version so it can be mocked in tests
2018-11-07 13:31:12 +00:00
Adam Miller
091fb1dc3f yum also parse obsolete package output (#45365)
* yum also parse obsolete package output

This is a rebase of the patch originally proposed in
https://github.com/ansible/ansible/pull/40001 by machacekondra

Fixes #39978

Signed-off-by: Adam Miller <admiller@redhat.com>

* properly parse the obsoletes, provide a new output entry, add changelog

Signed-off-by: Adam Miller <admiller@redhat.com>

* make pep8 happy

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove q debugging output

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-11-06 16:07:50 -05:00
Andrew Herrington
43bbc505a1 Add threading to slack notification module (#47333)
* Add threading to slack notification module

* Fix sanity check

* Change thread_ts to thread_id
2018-11-06 12:04:07 -05:00
Tim Rupp
16032d37c4
Removes f5-sdk from bigip_service_policy (#48033) 2018-11-02 23:14:16 -07:00
Tim Rupp
11ff831998
Remove f5-sdk from bigip_snat_pool (#48030) 2018-11-02 23:03:16 -07:00
Tim Rupp
1373a25ed3
Remove the f5-sdk from bigip_smtp (#48032) 2018-11-02 22:42:02 -07:00
Tim Rupp
438827ca4d
Remove f5-sdk from bigip_snmp (#48029) 2018-11-02 22:39:54 -07:00
Tim Rupp
45e990c5f8
Remove the f5-sdk from snmp community module (#48028) 2018-11-02 22:28:18 -07:00
Tim Rupp
6b14bab750
Fixes ansible unit tests for bigip_software_install (#48025) 2018-11-02 22:20:54 -07:00
Tim Rupp
5afe77933b
Removes the f5-sdk from bigip_snmp_trap (#48027) 2018-11-02 22:20:39 -07:00
Tim Rupp
b45b2b3cc4
Fixes unit tests for bigip_software_image (#48026) 2018-11-02 22:20:24 -07:00
Tim Rupp
a90bf9fb32
Removes f5-sdk from bigip_software_update (#48024) 2018-11-02 22:17:13 -07:00
Tim Rupp
787b12e016
Adds the bigip_ssl_ocsp module (#48018)
This module can be used to manage OCSP profiles on a BIG-IP
2018-11-02 22:06:16 -07:00
Tim Rupp
32e77c12e0
Fixes to bigip_static_route (#48017)
Corrects documentation. Fixes unit tests, Fixes ip address checks
for gateway_address
2018-11-02 20:57:08 -07:00
Tim Rupp
f25d9a1b30
Remove sdk and deprecated features (#48016)
This removes deprecated params and the f5-sdk from the sys_global module
2018-11-02 15:38:59 -07:00
Tim Rupp
96c9d9fdaa
Removes the f5-sdk from bigip_sys_db (#48015) 2018-11-02 15:38:36 -07:00
Tim Rupp
f9402e5a91
Removes the f5-sdk from timer policy module (#48014) 2018-11-02 15:30:29 -07:00
Tim Rupp
d8a8c21efe
Removes the f5-sdk from the traffic group module (#48008) 2018-11-02 13:01:22 -07:00
Tim Rupp
24be9c030c
Remove f5-sdk and add qinq ethertype (#48006)
This patch removes the f5-sdk from bigip trunk and adds the qinq
ethertype parameter
2018-11-02 12:47:58 -07:00
Tim Rupp
b4af058c55
Fixes unit tests and token cleanup (#48005)
The unit tests in 2.8 were broken. this fixes them and adds a token
cleanup to the bigip_tunnel module
2018-11-02 12:14:30 -07:00
Tim Rupp
2a69dfb22f
Removes f5-sdk from bigip_ucs module (#48003)
This patch removes the usage of the f5-sdk from the bigip_ucs module
2018-11-02 12:13:44 -07:00
Tim Rupp
f6309d19a3
Removes f5-sdk from bigip_uce_fetch module (#48002)
This is part of the ongoing effort to fully remove the f5-sdk from
the f5 ansible modules
2018-11-02 11:54:40 -07:00
Tim Rupp
5b5d41e958
Removes the f5-sdk from bigip_user (#47794)
This is more work in the ongoing effort to remove the f5-sdk from
all f5 ansible modules
2018-11-02 11:25:18 -07:00
f-bor
35b97a2fa7 edgeswitch_facts (#47618) 2018-11-02 18:50:11 +05:30
saichint
b92556549e Add new configurations for nxos_vxlan_vtep (#47834)
* add new commands for vxlan

* review comments

* fix unit test

* fix sanity yaml spaces
2018-11-02 11:23:37 +05:30
Stephan Müller
00bab2d24d [docker_network] add ipv6 support (#47492)
* [docker_network] add ipv6 support

* docker_network: review ipam_options

* docker_network: fix requirements

* docker_network: fix deprecation notice

* docker_network: add minimum docker version change

* docker_network: remove trailing whitespace

* docker_network: revert rename of network_four #discussion_r228707101

* docker_network: refactor IPAM config comparison #discussion_r228707255, #discussion_r228707280

* docker_network: correct spelling of IPv4 and IPv6 #discussion_r228707114, #discussion_r228707138

* docker_network: manually remove networks #discussion_r228709051

* docker_network: refactor enable_ipv6 condition #discussion_r228707317

* docker_network: add mutually_exclusive #discussion_r228707185

* docker_network: fix iprange #discussion_r228709072

* docker_network: add auxiliary addresses in examples and tests

* docker_network: link to docker docs #discussion_r228707018

* docker_network: remove list default #discussion_r228707060, #discussion_r228709091

* docker_network: introduce params syntax for create_network() #discussion_r228709031

* docker_network: beautify code

* docker_network: resolve change requests

* docker_network: add yaml header

* docker_networking: fix get_ip_version

* docker_network: extend CIDR test

* docker_network: use backported unittest2 for python 2.6

* docker_network: migrate unittest to pytest
2018-11-02 08:59:16 +10:00
anasbadaha
dc8b3e94ad Adding IGMP vlan module for onyx switches (#47811)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-11-01 14:25:25 +05:30
anasbadaha
760e57f877 Adinng new module for supporting PTP interface in Onyx switches (#47489)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-11-01 14:19:51 +05:30
anasbadaha
dea9e9b4c8 Adding new module for supporting PTP Global Protocol (#47501)
Signed-off-by: Anas Badaha <anasb@mellanox.com>
2018-11-01 14:16:30 +05:30
Lindsay Hill
a1b0d20368 New voss_config module (#47533)
* New voss_config module

* Updated test import paths as per #46996
2018-11-01 14:07:41 +05:30
Susant Sahani
2596ac196f nmcli: Introduce VxLan (#45932)
This work enables to add vxlan via nmcli module

```
  - nmcli:
      type: vxlan
      conn_name: vxlan_test1
      vxlan_id: 16
      vxlan_local: 192.168.1.2
      vxlan_remote: 192.168.1.5
```
ansible 2.8.0

revision 1: Added tests

Signed-off-by: Susant Sahani <susant@redhat.com>
2018-10-30 03:17:33 -04:00
Tim Rupp
1ddfac5ad5
Fixes unit tests for vcmp guest module (#47792)
Tests were not working for ansible 2.8
2018-10-29 21:51:50 -07:00
Tim Rupp
1aae9ad282
Remove f5-sdk from bigip_virtual_address module (#47791)
Removes the f5-sdk and fixes unit tests for ansible 2.8
2018-10-29 21:38:10 -07:00
Tim Rupp
3ad1cb5619
Adds bigip_device_syslog module (#47790)
This module can be used to alter the device syslog settings and
priorities for syslog settings
2018-10-29 21:24:24 -07:00
Tim Rupp
e0d2419683
Adds firewall global rules module (#47789)
This module allows the user to change global rules in AFM firewalls
2018-10-29 21:10:49 -07:00
Tim Rupp
10f3e0c187
Adds module to manage cookie persistence profiles in BIG-IP (#47786) 2018-10-29 20:47:25 -07:00
Tim Rupp
7336dd595b
Adds ipsec policy module for BIG-IP (#47785)
Allows users to manage IPSec policies on a BIG-IP
2018-10-29 15:49:22 -07:00
Tim Rupp
9d2f68e00a
Adds bigip_traffic_selector module (#47784)
This module enables the user to manage traffic selector policies on a BIG-IP
2018-10-29 15:27:18 -07:00
Tim Rupp
d69b8e4bfd
Import mdule for managing sys daemon logs in BIG-IP (#47783)
This module allows one to manage the daemon log settings in tmm on BIG-IP
2018-10-29 15:16:51 -07:00
Tim Rupp
9d351f2ee7
Adds bigip profile for http2 (#47782)
This allows one to manage HTTP2 profiles on a BIG-IP
2018-10-29 14:53:20 -07:00
Tim Rupp
f80288c0c4
Adds bigip_monitor_ldap module (#47781)
Adds new module to manage LDAP monitors on a BIG-IP
2018-10-29 14:42:49 -07:00
Tim Rupp
114d591f31
Adds bigip_ike_peet module (#47780)
Adds new module to managing IKE peers
2018-10-29 14:25:43 -07:00
Tim Rupp
8edbfb488c
Adds new parameters to bigip_vlan (#47777)
Also fixes unit tests to work in ansible 2.8
2018-10-29 13:57:53 -07:00
Tim Rupp
7c84ba8051
Fixes tests in bigip_wait for ansible 2.8 (#47773) 2018-10-29 13:08:35 -07:00
Tim Rupp
38844194ae
Fixes bigiq unit tests for ansible 2.8 (#47771)
fixes the unit tests for bigiq in ansible 2.8 because changes broke them
2018-10-29 12:43:56 -07:00
Tim Rupp
8ede4c5e60
Adds more facts to bigiq_device_facts (#47765)
Adds more facts to the bigiq_device_facts module
2018-10-29 11:33:47 -07:00
Tim Rupp
cbc8571809
Adds fixes to the bigiq unit tests (#47763)
The tests were not working on ansible 2.8. This fixes that.
2018-10-29 10:41:35 -07:00
Tim Rupp
6e28b7d572
Remove the f5-sdk from more bigiq modules (#47721) 2018-10-29 10:10:11 -07:00
Tim Rupp
d5d18a995a
Removes f5 sdk from bigiq modules and fixes unit tests (#47720) 2018-10-27 20:20:07 -07:00
Tim Rupp
b7a937cb0d
Updates bigiq_utility_license_assignment for ansible 2.8 (#47719) 2018-10-27 19:30:34 -07:00
Ingate Systems
9fe20123cf modules: network: Add initial support for Ingate modules (#47494)
* modules: network: Add initial support for Ingate modules

* modules: network: Add ingate module ig_unit_information

* module_utils: network: ingate: Use default 'v1' for version

* modules: network: ingate: Remove unused code
2018-10-26 09:47:58 +05:30
Matt Clay
8f072ea0f5 Fix sanity test failure. 2018-10-22 17:35:47 -07:00
Brian Coca
581b6aed2e really skip if no boto3
makes no sense to check/skip after you already fail to import
2018-10-22 17:18:25 -04:00
Jocelyn Jaubert
4352a4e54d interfaces_file: Add test for pre-up/post-up with inet/inet6 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
bd7001cdb6 interfaces_file: Add test for changing ipv4 or ipv6 address through address_family 2018-10-22 20:51:59 +02:00
Jocelyn Jaubert
a4916e848d interfaces_file: Add test for multiple address_family for same iface 2018-10-22 20:51:59 +02:00
Matt Clay
37b013aca3
Enable additional pylint rules and resolve issues found. (#47221)
* Resolve unneeded-not.
* Resolve global-at-module-level.
* Resolve useless-import-alias.
* Resolve bad-whitespace.
* Resolve global-variable-not-assigned.
* Resolve logging-not-lazy.
* Resolve comparison-with-itself.
2018-10-18 13:38:08 -07:00
Aaron
9c08ff7a94 [aws] New module: iam_password_policy (#36200)
* Adding iam_password_policy module

* fixing various issues -- error handling, bugs

* fixing various issues based on tests

* renaming dummy var

* fixing type reference in documentation

* adding int tests and other updates

* removing typo

* fixing auth for int tests

* removing int tests for now

* readding integration tests w/ unsupported designation

* removing conflicting group

* Update aliases

* Fix unused variable
2018-10-17 13:56:13 -04:00
Matt Clay
3033fd96b0
Move unit test compat code out of lib/ansible/. (#46996)
* Move ansible.compat.tests to test/units/compat/.
* Fix unit test references to ansible.compat.tests.
* Move builtins compat to separate file.
* Fix classification of test/units/compat/ dir.
2018-10-12 20:01:14 -07:00
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
2018-10-11 07:52:18 -04:00
anasbadaha
2c24cfb401 Add support for IGMP interfaces on onyx switches (#46218)
Signed-off-by: Anas Badaha <anasb@ufm-host08-004.mtr.labs.mlnx>
2018-10-10 11:42:47 -04:00
Toshio Kuratomi
473f70c21a Mocking out __future__ could cause problems 2018-10-08 20:50:54 -07:00
Matt Clay
a11f631ee4 Python 3.8 collections compatibility fixes.
Includes a new pylint blacklist plugin to prevent regressions.
2018-10-08 11:26:37 -07:00
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
2018-10-02 13:44:23 +05:30
Matt Clay
04ddadd89b Move module tests using TQM to integration tests. 2018-09-27 13:46:19 -07:00
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
2018-09-25 11:38:39 +05:30
Tim Rupp
ccfbed3dbc
Adds bigiq_device_facts module (#45822)
This module can be used to query a variety of facts from a BIG-IQ
2018-09-18 22:30:31 -04:00
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.
2018-09-17 20:27:14 -07:00
Sloane Hertel
2167ce6cb6
Remove placeboify from unit tests that are not calling AWS (i.e. creating a recording) (#45754) 2018-09-17 18:17:43 -04:00
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
2018-09-14 22:51:30 +05:30
Nathaniel Case
285b927889
network command modules cleanup (#45242)
* Standardize _command modules

* Centralize command transformation process

* Fix check mode error test
2018-09-13 08:55:35 -04:00
Nathaniel Case
0b433b3ea9
Clean up after cnos tests (#45564) 2018-09-12 12:17:29 -04:00
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
2018-09-12 10:31:45 -04:00
Nilashish Chakraborty
0f268e70a1
Fix ios_user issues (#44904)
* Fix ios_user issues

* Modify regex and fix unittests
2018-08-31 11:08:46 +05:30
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
2018-08-30 17:39:47 +01:00
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
2018-08-30 21:39:11 +05:30
Ghilli3
7bc2660017 fortimanager/fmgr_provisioning.py (#35743)
* Initial commit for new provisioning module
2018-08-30 14:25:17 +01:00
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.
2018-08-30 05:09:21 +02:00
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
2018-08-29 15:48:10 +02:00
Michael Price
70fd1ec130 Define module for NetApp E-Series iSCSI targets (#40632)
Create a new module for managing E-Series iSCSI targets.
2018-08-28 18:38:43 +01:00
ndswartz
d31e25acbd Define netapp_e_mgmt_interface storage module. (#42519)
* Define netapp_e_mgmt_interface storage module.

The netapp_e_mgmt_interface module provides management configuration for
e-series storage array interface points including remote ssh access, NTP
and DNS services.

This patch also includes integration and unit tests.

* Fix netapp_e_mgmt_interface ssh option documentation and name/channel exclusivity.
2018-08-28 17:50:21 +01:00
Michael Price
054b87acb8 Define module for managing E-Series email alerts (#42643)
Email alerts can be enabled for an E-Series system to provide
information to interested users by email when a warning or critical
level event occurs on the system. This module will allow a system owner
to configure whether or not system alerts are enabled, and who will
receive them.
2018-08-28 17:40:51 +01:00
Michael Price
97157cf876 New module for managing NetApp E-Series iSCSI Interfaces (#39877)
* New module for NTAP E-Series iSCSI Interfaces

Define a new module for configuring NetApp E-Series iSCSI interfaces.

* Improve netapp_e_iscsi_interface integration tests

Restructured integration test to set all iscsi ports to disabled, then
defines the ports either statically or with dhcp, next updates the ports
with the other definition type (static <-> dhcp), and lastly disables
all ports.  Each netapp_eseries_iscsi_interface call is verified with the
array.
2018-08-28 17:39:14 +01:00
Michael Price
f781f341a2 Define NetApp E-Series ASUP module (#41153)
* Define NetApp E-Series ASUP module

ASUP, or Auto-Support, is a mechanism that allows NetApp support
to receive information on the status of E-Series storage-systems
in order to proactively resolve issues for customers. This module
gives customers the ability to tune ASUP settings to their liking,
including disabling the feature entirely.

* Improved testing for netapp_e_asup module

Added coverage and validation to asup integration and unit testing
2018-08-28 17:05:25 +01:00
Michael Price
1f2ae0d4cd Define a module for managing E-Series settings (#41010)
There are multiple settings that are defined at a global level for
E-Series systems, but don't necessarily fit with anything else. This
module is intended to provide a place to encapsulate those.
2018-08-28 15:38:53 +01:00
ndswartz
cf41415bdf Define netapp_e_auditlog storage module. (#42535)
This module allows NetApp E-Series storage system's audit-log feature to be configured.
2018-08-28 14:11:33 +01:00
ndswartz
7eda94dc8d Defined netapp_e_syslog storage module (#42421)
Module allows syslog server configuration on NetApp E-Series storage arrays.
2018-08-28 13:22:36 +01:00
Michael Price
feb212b0a1 Define module for managing LDAP for E-Series (#42356)
This module will allow users to manage LDAP authentication domains for
accessing E-Series systems.
2018-08-28 13:00:19 +01:00
Tim Rupp
0dacc606b4
Various fixes for f5 modules (#44734)
A number of bugfixes for the remaining 2.7 work on the F5 modules.
2018-08-27 14:09:03 -07:00
Tim Rupp
c7eeb37f64
Adds bigip_software_install module (#44733)
This module can be used to install existing images on a bigip.
2018-08-27 12:56:19 -07:00
Tim Rupp
24a379f0b7
adds the bigip_cli_script module (#44674)
This module can be used to manage tmsh cli scripts on a BIG-IP
2018-08-24 22:08:37 -07:00
Tim Rupp
ee1b899b18
Adds AS3 module (#44655)
This adds the as3 module for bigip to ansible.
2018-08-24 15:12:23 -04:00
Tim Rupp
639cfe3b6f
Refactors device group (#44599)
Make module use patterns that other modules use
2018-08-24 13:58:12 -04:00
Michael Price
ad91793428 Resolve issues in NetApp E-Series Host module (#39748)
* Resolve issues in NetApp E-Series Host module

The E-Series host module had some bugs relating to the update/creation
of host definitions when iSCSI initiators when included in the
configuration. This patch resolves this and other minor issues with
correctly detecting updates.

There were also several minor issues found that were causing issues with
truly idepotent updates/changes to the host definition.

This patch also provides some unit tests and integration tests to help
catch future issues in these areas.

fixes #28272

* Improve NetApp E-Series Host module testing

The NetApp E-Series Host module integration test lacked feature test
verification to verify the changes made to the storage array.

The NetApp E-Series rest api was used to verify host create, update, and
remove changes made to the NetApp E-Series storage arrays.
2018-08-24 15:44:59 +01:00
Samer Deeb
a07af2a1f7 issue:43021 add support for onyx version 3.6.6000 and above (#44527)
* issue:43021 add support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* issue:43021 add support for onyx version 3.6.6000

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-08-24 07:59:10 +01:00
Sumit Jaiswal
1d2bb34992
Includes support for Reverse-Mapping zone in nios_zone module (#44525)
* support reverse mapping

* support reverse mapping

* support reverse mapping

* fix shippable errors

* fix shippable errors

* fix shippable errors
2018-08-23 03:07:30 +00:00
photoninger
d68c734ae2 Fix for "cannot marshal None unless.." (#33660)
when using only an activation key without any channels.
As already suggested by mattclay in
https://github.com/ansible/ansible/pull/25079

and also patch unit test for rhn_register and
add test case for activationkey only
2018-08-22 12:25:58 -04:00
Tim Rupp
49f34fec13
Correct unit tests and module fixes (#44488)
Cleanup of unit tests. Modules fixes in iapp_template nad profile_dns
to support unit tests.
2018-08-21 22:02:11 -04:00
Tim Rupp
07a011cd6f
Various bigiq fixes (#44487)
Fixes usage of the RestClient class. Documentation fixes. Removal
of dependency code.
2018-08-21 18:40:19 -04:00
Tim Rupp
d39a711aa1
Adds the bigip firewall DoS profile module (#44486)
This module can be used to manage AFM DoS profiles on a BIG-IP
2018-08-21 18:29:34 -04:00
Tim Rupp
d05da83495
Removes dependencies and cleans up code (#44484)
Portions of the f5-sdk were removed as well as the netaddr library
and were replaced with libraries that are part of ansible. Additionally,
deprecated code has been removed.
2018-08-21 18:01:52 -04:00
Tim Rupp
b5e99949e2
Adds the bigip_profile_http module (#44473)
This module can be used to manage HTTP profiles on a BIG-IP.
2018-08-21 14:22:09 -04:00
Lindsay Hill
bec0a1ceb3 nos_facts module and tests (#44094) 2018-08-21 10:03:04 -07:00
Lindsay Hill
b0a25d321d new nos_config module (#44140)
* new nos_config module

* Update cliconf/nos.py to add missing 'end'
2018-08-21 10:02:40 -07:00
Tim Rupp
359d97f01b
Adds bigip_device_auth module (#44373)
This module can be used to configure auth settings to the mgmt
interface on a BIG-IP.
2018-08-19 17:32:19 -04:00
Tim Rupp
b54f6cd132
Adds bigip_firewall_rule module (#44370)
This module can be used to manage rules in either a firewall policy
or a firewall rule list in AFM, on BIGIP.
2018-08-19 14:36:08 -04:00
Tim Rupp
d8ea154fb8
Adds the firewall-rule-list module for BIGIPs (#44368)
This module allows one to manage rule lists in AFM on a BIGIP.
2018-08-19 11:28:03 -04:00
Tim Rupp
8dd39a031f
Adds module to manage srcaddr persistence profiles (#44364)
This module can manage source address persistence profiles on a BIG-IP
2018-08-19 11:13:01 -04:00
Tim Rupp
3a15b6512c
Adds bigip http compression profile module (#44362)
This module can be used to manage http compression profiles on
a BIG-IP.
2018-08-19 02:46:56 -04:00
Tim Rupp
1148d57012
Adds bigip_firewall_policy module (#44361)
This module is used to manage firewall policy objects on a bigip.
2018-08-19 02:18:15 -04:00
Tim Rupp
e95dbf5f47
Adds oneconnect profile module (#44360)
This module can be used to manage oneconnect profiles on a BIG-IP
2018-08-19 01:55:23 -04:00
Tim Rupp
fae42c83f1
Adds bigip_monitor_dns module (#44359)
This module can be used to manage DNS monitors on a BIG-IP.
2018-08-19 01:35:49 -04:00
Tim Rupp
783b565583
Adds bigip_remote_role module (#44358)
This module can be used to manage remote roles on a BIG-IP used
for remote authentication to management interfaces.
2018-08-19 01:15:04 -04:00
Tim Rupp
0eb284b040
Adds cli alias module for BIG-IP (#44357)
This module allows one to manage CLI aliases in a BIG-IP.
2018-08-19 00:56:02 -04:00
Tim Rupp
41df1e15fe
Adds module for utility license assignment on BIG-IQ (#44356)
This module can be used to distribute utility licenses to BIG-IPs
from a BIG-IQ
2018-08-19 00:34:14 -04:00
Tim Rupp
48e99982ff
Adds bigip_software_image module (#44355)
This module can be used to manage software images on a BIG-IP.
2018-08-19 00:16:48 -04:00
Tim Rupp
c1b2ef2c1a
Adds bigip_tunnel module (#44354)
This module can be used to manage tunnels on a BIG-IP.
2018-08-18 23:58:34 -04:00
Tim Rupp
e204098646
Adds more unit test fixtures (#44353)
Fixtures for new modules
2018-08-18 22:49:43 -04:00
Tim Rupp
ee5b761c21
Adds bigip_device_facts module (#44351)
This is a new module to manage the different facts that can be gathered
from a bigip.
2018-08-18 16:26:58 -04:00
Tim Rupp
47b527224a
Renames the security_port_list module (#44350)
Renames the module by adding a symlink, introducing the new module,
and naming the symlink so that it identifies as deprecated.
2018-08-18 14:44:23 -04:00
Tim Rupp
b65f05f9c0
Renames the security_address_list module (#44348)
Renames module and includes a symlink with the old name so that it
will still work, though will be deprecated too.
2018-08-18 14:29:25 -04:00
Zhikang Zhang
501503f4cb
Allow version specifiers for pip install (#41792)
Allow version specifiers for pip install.
2018-08-17 11:46:53 -04:00
Adam Miller
6d95624c22 Refactor yum and dnf, add feature parity (#43621)
* Refactor yum and dnf, add feature parity

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove unnecessary module_utils, move the classes into the module code

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove yum -> yum4, out of scope

Signed-off-by: Adam Miller <admiller@redhat.com>

* use ABCMeta

Signed-off-by: Adam Miller <admiller@redhat.com>

* re-arrange run() caller vs callee

Signed-off-by: Adam Miller <admiller@redhat.com>

* make sanity checks happy

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix yum unit tests

Signed-off-by: Adam Miller <admiller@redhat.com>

* remove unecessary debug statements, fix typo

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix licensing and attribution in yumdnf module_util

Signed-off-by: Adam Miller <admiller@redhat.com>

* include fix from PR 40737

original commit 5cbda9658a
original Author: Strahinja Kustudic <kustodian@gmail.com>

yum will fail on 'No space left on device', fixes #32791 (#40737)

During the installing of packages if yum runs out of free disk space,
some post install scripts could fail (like e.g. when the kernel
package generates initramfs), but yum would still exit with a status
0.  This is bad, especially for the kernel package, because it makes
it unable to boot.  Because the yum module is usually used for
automation, which means the users cannot read every message yum
prints, it's better that the yum module fails if it detects that
there is no free space on the disk.

Signed-off-by: Adam Miller <admiller@redhat.com>

* Revert "fix licensing and attribution in yumdnf module_util"

This reverts commit 59e11de5a2.

* move fetch_rpm_from_url out of yumdnf module_util

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix the move of fetch_rpm_from_url

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-08-17 11:15:11 -04:00
Lindsay Hill
3960ebb8e8 new voss_facts module (#44234)
@LindsayHill Thank you!
2018-08-16 18:53:35 +05:30
Lance Richardson
dc08b9a738 new module exos_config (#43902)
- support config operations for EXOS-based platforms
- add regex to detect command failure responses
- add exos action plugin for "backup" operation
- add unit tests for exos_command (currently 94% coverage of
  exos_config.py)
2018-08-15 14:56:50 -07:00
Lindsay Hill
5981a7489b new nos_command module (#43056) 2018-08-10 13:50:02 -07:00
Trishna Guha
96346938ee
nxos_vlan refactor to support non structured output (#43805)
* nxos_vlan refactor to support non structured output

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

* unittest fix

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

* minor fixes

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

* use check_rc

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

* address review comment

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

* remove additional return statement

* address Nate's review

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-08-10 21:03:56 +05:30
Ganesh Nalawade
d1de1e0449
Update iosxr cliconf plugin (#43837)
* Update iosxr cliconf plugin

Fixes #39056

*  Update iosxr cliconf plugin
*  Modify iosxr module_utils code to support
   refactored cliconf plugin api's
*  Other minor changes

* Fix unit test failure

* Update ios, eos, nxos plugin for diff

* Fix review comment
2018-08-10 13:12:51 +05:30
Deepak Agrawal
8eaebf86b6
openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)
* change column value to string. handle idempotency in no key case

* fix unit test failures in baseline
2018-08-10 10:31:03 +05:30
Lance Richardson
bd4d68c785 network/exos: add exos_facts module (#43210)
Add exos_facts module. Known limitations at this time include:
   - Interface MTU is not reported.
   - Only primary interface IP is reported.

Add basic unit tests for the exos_facts module.

An EXOS CLI prompt can be prefixed with '! ' (shutting down), '* '
(running configuration does not match saved configuration), and
can include various status tokens within parentheses after these
prefixes. Update prompt regex to accept valid CLI prompts.
2018-08-08 16:02:18 +02:00
Lindsay Hill
8429f777da New networking module: voss_command (#43741)
* new voss_command module

* Removed incorrect version_added line
2018-08-08 15:56:50 +02:00
Anil Kumar Muraleedharan
119376a685 Refactoring to persistence connection BGP, factory, reload, save, showrun modules (#43534)
* Refactoring to persistence connection BGP, factory, reload, save, showrun modules

* Refactoring methods from Util to module file

* Removing BGP Utility methods

* Adding to errors that need to be ignored
2018-08-03 08:40:24 -04:00
Trishna Guha
09ae1ec308
cliconf refactor eos, nxos fix (#43596)
* cliconf refactor eos and nxos fix

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

* move nxos replace check to plugins

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

* address review comment

* fix shippable
2018-08-02 16:34:48 +05:30
Sumit Jaiswal
e96f90b440
Nios integration and unit tests for all remaining nios new modules (#43399)
* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* new nios module integration test support

* test/integration/targets/nios_naptr_record/tasks/nios_naptr_record_idempotence.yml

new nios module integration test support

* fix pep8 error

* fix pep8 error

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end

* adding newline at end
2018-08-01 08:54:01 +05:30
Joren Vrancken
b954917761 Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
Alex Dukhno
dd28be3aab Update pagerduty modules to rest v2 (#42618)
* refactored from procedural to OOP

* updated ongoing maintenance windows to PagerDuty REST API v2

* update create maintenance windows to PagerDuty REST API v2

* update absent maintenance windows to PagerDuty REST API v2

* update pager alert module to PagerDuty REST API v2

* removed basic HTTP authorization
updated parameter description and examples

* fix failed sanity checks

* revised documentation according to review

* make obsolete service key parameter an alias to a new integration key parameter
2018-07-31 10:39:29 -04:00
Egor Zaitsev
249a6aae22 New module: routeros — manage MikroTik RouterOS (#41155)
* Implement initial RouterOS support

* Correct matchers for license prompts

* Documentation updates & mild refactor

* Remove one last Cisco function

* Sanity test fixes

* Move imports to the beginning

* Remove authorize property

* Handle ANSI codes

* Revert to_lines function

* CR fixes

* test(routeros): add unit tests

* Added another test (with ANSI colors and banner in fixture).

* Ignore CRLF line endings in system_package_print file

* fix: review by ganeshrn
2018-07-30 10:28:03 +05:30
tstoner
2c3d418e53 Nxapi ssl (#42905)
* NXAPI ssl ciphers & protocols default values

* TLSv1, TLSv1.1, TLSv1.2 and weak cipher support

* NXOS NXAPI weak/strong cipher & TLSv 1.2, 1.1 & 1.0 support

* Version checking for strong/weak ciphers & TLS 1.2, 1.1 & 1.0 support

* Cleaned up erroneously committed changes.

* Specific NXOS platform checking for nxapi ssl ciphers & protocols

* Fixed ansibot reported errors.

* Resolved ansibot reported error.

* Added network_os_version to mocked up N7K unit test device_info

* Calling get_capabilities() once in main and passing results into methods.

* Removed raising exceptions when platform capabilities return None
per reviewers request. Skipping nxapi ssl options when capabilities
are None and generating a warning when these options are skipped

* Cleaned up explicit checks for None/not None
2018-07-27 22:10:39 +05:30
Anil Kumar Muraleedharan
f2c9a6b126 Lenovo port to persistence 1 (#43194)
* CNOS Vlag module is refactored to use persistence connection instead of paramiko.

* Changing interface and port channel modules to persistent connection and adding UT for them.

* Fixing pep8 issues

* Removing trailing new line

* Removing trailing new line

* Removing trailing new line

* Correcting indentation mistake

* Update cnos_vlag.py

* Removing commented examples

They are commented because those configurations are not meant for L2 ports
2018-07-27 10:47:02 -04:00
Ganesh Nalawade
af3f510316
nxos cliconf plugin refactor (#43203)
* nxos cliconf plugin refactor

Fixes #39056

*  Refactor nxos cliconf plugin as per new api definition
*  Minor changes in ios, eos, vyos cliconf plugin
*  Change nxos httpapi plugin edit_config method to be in sync with
   nxos cliconf edit_config

* Fix CI failure

* Fix unit test failure and review comment
2018-07-27 11:05:40 +05:30
Toshio Kuratomi
52449cc01a AnsiballZ improvements
Now that we don't need to worry about python-2.4 and 2.5, we can make
some improvements to the way AnsiballZ handles modules.

* Change AnsiballZ wrapper to use import to invoke the module
  We need the module to think of itself as a script because it could be
  coded as:

      main()

  or as:

      if __name__ == '__main__':
          main()

  Or even as:

      if __name__ == '__main__':
          random_function_name()

  A script will invoke all of those.  Prior to this change, we invoked
  a second Python interpreter on the module so that it really was
  a script.  However, this means that we have to run python twice (once
  for the AnsiballZ wrapper and once for the module).  This change makes
  the module think that it is a script (because __name__ in the module ==
  '__main__') but it's actually being invoked by us importing the module
  code.

  There's three ways we've come up to do this.
  * The most elegant is to use zipimporter and tell the import mechanism
    that the module being loaded is __main__:
    * 5959f11c9d/lib/ansible/executor/module_common.py (L175)
    * zipimporter is nice because we do not have to extract the module from
      the zip file and save it to the disk when we do that.  The import
      machinery does it all for us.
    * The drawback is that modules do not have a __file__ which points
      to a real file when they do this.  Modules could be using __file__
      to for a variety of reasons, most of those probably have
      replacements (the most common one is to find a writable directory
      for temporary files.  AnsibleModule.tmpdir should be used instead)
      We can monkeypatch __file__ in fom AnsibleModule initialization
      but that's kind of gross.  There's no way I can see to do this
      from the wrapper.

  * Next, there's imp.load_module():
    * https://github.com/abadger/ansible/blob/340edf7489/lib/ansible/executor/module_common.py#L151
    * imp has the nice property of allowing us to set __name__ to
      __main__ without changing the name of the file itself
    * We also don't have to do anything special to set __file__ for
      backwards compatibility (although the reason for that is the
      drawback):
    * Its drawback is that it requires the file to exist on disk so we
      have to explicitly extract it from the zipfile and save it to
      a temporary file

  * The last choice is to use exec to execute the module:
    * https://github.com/abadger/ansible/blob/f47a4ccc76/lib/ansible/executor/module_common.py#L175
    * The code we would have to maintain for this looks pretty clean.
      In the wrapper we create a ModuleType, set __file__ on it, read
      the module's contents in from the zip file and then exec it.
    * Drawbacks: We still have to explicitly extract the file's contents
      from the zip archive instead of letting python's import mechanism
      handle it.
    * Exec also has hidden performance issues and breaks certain
      assumptions that modules could be making about their own code:
      http://lucumr.pocoo.org/2011/2/1/exec-in-python/

  Our plan is to use imp.load_module() for now, deprecate the use of
  __file__ in modules, and switch to zipimport once the deprecation
  period for __file__ is over (without monkeypatching a fake __file__ in
  via AnsibleModule).

* Rename the name of the AnsiBallZ wrapped module
  This makes it obvious that the wrapped module isn't the module file that
  we distribute.  It's part of trying to mitigate the fact that the module
  is now named __main)).py in tracebacks.

* Shield all wrapper symbols inside of a function
  With the new import code, all symbols in the wrapper become visible in
  the module.  To mitigate the chance of collisions, move most symbols
  into a toplevel function.  The only symbols left in the global namespace
  are now _ANSIBALLZ_WRAPPER and _ansiballz_main.

revised porting guide entry

Integrate code coverage collection into AnsiballZ.

ci_coverage
ci_complete
2018-07-26 20:07:25 -07:00
Gregory Hellings
6f007c35c1 Improved the documentation of known_hosts
The documentation for the key parameter was lacking in specificity and
also lacking in testing. These parts are both remedied herein.

Fixes #43157
2018-07-24 09:25:12 -04:00
Matej Vadnjal
7c318d4e30 ios_user module - implement sshkey option (#38782)
* ios_user module - add sshkey support

* ios_user - Add version_added to sshkey option

* ios_user - pep8 indentation fixes in unit tests

* ios_user - use b64decode method that works on python 2 and 3
2018-07-19 10:28:52 -04:00
Samer Deeb
3ca4a35334 Add support for global IGMP configuration on onyx switches (#42164)
* Add support for global IGMP configuration on onyx switches

Signed-off-by: Samer Deeb <samerd@mellanox.com>

* Add support for global IGMP configuration on onyx switches

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-07-18 12:20:21 -04:00
Anil Kumar Muraleedharan
0897e79bd1 Persistence connection for cnos_vlan (#42500)
* Changing Lenovo Inc to Lenovo and update License file to be consistent.

* Changing cnos_vlan from paramiko to persistence connection of Ansible. Also talking care of CLI changes in CNOS commands with backward compatibility.

* Fixing Validation issues

* Trailing lines removal

* Review comments of Gundalow are getting addressed. He mentioned only at one place for cnos.py. But I have covered the entire file.

* Changes to incorporate Review comments from Qalthos

* Removing configure terminal command from module code

* Aligning with change in run_cnos_commands method changes

* Editing cliconf for latest CNOS CLIs
2018-07-18 12:17:08 -04:00
Sloane Hertel
1fdd84b88c Rename AWS unit tests that are not running when changing the module (#42712)
now can use `ansible-test units module_name` for the aws_s3 and aws_api_gateway modules

changes to modules/cloud/amazon/aws_api_gateway and modules/cloud/amazon/aws_s3 are not triggering the unit tests; also fix aws_s3 from importing non-exist module and skipping tests

changes to module_utils/aws/core.py are only being unit tested on modules that import from the file (if they have a corresponding test) or tests that import from the file themselves.
2018-07-13 10:56:57 -04:00
Ryan Brown
45f5964fed Fix patching of wrong boto3_conn in API Gateway tests (#42700) 2018-07-12 13:06:31 -04:00
Clement Trebuchet
7c97bb5077 Devel ios vrf submode (#41659)
* add submode features ipv4/ipv6

* add tests for submode

* the parameters both_ * were not idempotent, in what is read in the configuration we have a list with 2 entries (import, export) while the input parameter has only one parameter which will be applied twice

* add docstring to the ios_vrf module + provide a fix for: https://github.com/ansible/ansible/issues/41581

* complete tests

* add missing description

* fix KeyError for address-family ipv*

* fix both_* tests

* fix E231, W292, W293

* fix W293

* remove set has it doesn't preserve order of routes

* fix E106

* remove ImportError: cannot import name OrderedDict

* We should be able to mix the parameters for the routes targets , while remaining imdepotent. During the first implementation we did not take this into account, which did not correspond to the reality of the needs in production (to be able to use each parameter indifemently together)

* remove epdb reference

* FIX E111, E106

* FIX E302

* using loop produce a result who  was not imdepotent

* FIX E241

* fix: used pass intead of list
2018-07-12 20:27:10 +05:30
Clement Trebuchet
c7981c4cc8 Add the NIOS RECORD PTR Module (#41900)
* Add the NIOS RECORD PTR Module

* FIX E241,E231, E105

* FIX module should not be executable

* FIX module RWX

* Remove change in nios_srv_record

* Remove change in nios_srv_record

* FIX test_nios_ptr_record_update_comment

* ADD: Integration and target tests for the NIOS PTR RECORD module.

* FIX module name in integrations tests

* Update integration

* Refactor nios_ptr_record module

* Refactor the nios_ptr_record_idempotence

* FIX name

* Smoketests for the NIOS modules does not take care of the PTR:RECORD object

* REM the default for view

* Add finals test, after adding the PR (https://github.com/ansible/nios-test-container/pull/1) in order to handle PTR:RECORD

* add the define nios specific constant for PTR:RECORD

* fix: documentation style

* add create an ipv6 ptr record

* rename class name, add ipv6 unittest
2018-07-11 23:55:28 +05:30
hitsumabushi
cf7a42b4f4 allow empty line in src template file (#42493) 2018-07-11 11:29:07 +05:30
Zhikang Zhang
70e33ef92c
Make ios_vlan identify vlans starting with 9 (#42247)
* Make ios_vlan identify vlans starting with 9

* Add unit test for vlan id start with 9
2018-07-09 09:50:06 -04:00
Jakub Libosvar
26b0908270 openvswitch_db: Make 'key' parameter optional (#42110)
The OVSDB schema consists of typed columns. The 'key' parameter is
required only for columns with type of a 'map'. This patch makes 'key'
an optional parameter to allow setting values for other column types
like int.

Fixes #42108
2018-07-09 19:12:41 +05:30
Paul Neumann
dfb2b3fdd5 ios_facts: Report space of file systems (#41850)
* ios_facts: Report file system space

Parse total and free space from dir output. For this, add a hash
filesystems_info containing the keys spacetotal_kb and spacefree_kb.

* ios_facts: Add unit test for file system space reporting

* ios_facts: Add integration test for file system space reporting
2018-07-09 09:15:31 -04:00
Ganesh Nalawade
c068b88b38
Update eos, ios, vyos cliconf plugin (#42300)
* Update eos cliconf plugin methods

*  Refactor eos cliconf plugin
*  Changes in eos module_utils as per cliconf plugin refactor

* Fix unit test and sanity failures

* Fix review comment
2018-07-04 19:45:21 +05:30
hlrichardson
2aa81bf05d add tests for exos_command module (#42268) 2018-07-04 19:42:51 +05:30
Ganesh Nalawade
e41d427d1b
Add run_commands api for ios and vyos cliconf plugin (#42093)
* Add run_commands api for ios and vyos cliconf plugin

*  Add run_commands api to ios and vyos cliconf plugin
*  Refactor ios and vyos module_utils to check return code
   in run_commands

* Fix Ci failures
2018-06-29 15:07:38 +05:30
Yanis Guenane
42c2fd72ae Fix test_create_jks_success failing on SELinux machine (#42001)
Currently TestCreateJavaKeystore::test_create_jks_success is failing on
a machine with SELinux because set_context_if_different is not mocked
and hence tries to access a file that doesn't exist because it has been
mocked previously.

Also, changing path to a path that won't exist for sure.
2018-06-27 11:43:31 -04:00
Troy Murray
15ce7c5bab change OS X to macOS (#41294)
* change OS X to macOS

<!--- Your description here -->

+label: docsite_pr

* Update all Mac OS X references to be macOS

* Drop extra Mac
2018-06-26 14:09:23 -04:00
Matthew Stone
c5c3900c52 Adding slxos_lldp module (#39259)
* Adding slxos_lldp module
2018-06-26 09:27:52 -07:00
Dennis Benkert
28d0a173db [aws] add limit on number of CloudFormation stack events fetched by cloudformation module (#41840)
* Add a module parameter to configure the max fetched AWS CFN stack events
* Add version documentation for new configuration option
* Increase default in order to make sure that enough are fetched by default. This align roughly with the limit of manageable resources in CloudFormation.
2018-06-25 12:39:32 -04:00
Ganesh Nalawade
773c031d33
vyos and ios cliconf plugin refactor (#41846)
* vyos and ios cliconf plugin refactor

*  Refactor vyos cliconf plugin
*  Change vyos module_utils and vyos_config as per refactor
*  Minor changes in ios cliconf plugin

* Fix unit test failure

* Fix sanity issues

* Add get_diff to rpc list
2018-06-25 09:43:37 +05:30
Nathaniel Case
9aa8c652ba
Netconf bytes fixes (#41607)
* Solve some bytes issues on iosxr

* Solve some bytes issues in junos

* Do the correct thing with tostring based on lxml or not
2018-06-22 11:50:44 -04:00
Tim Rupp
6c654b6947
Fixes the default assignment of values (#41672)
Fixes: #41640

The defaults should be inherited from the parent during initial
creation. This patch fixes that.
2018-06-18 16:06:13 -07:00
Tim Rupp
16466f3171
Fixes usage of popen in bigip iapplx package (#41612)
This functionality is superceeded by the run_command method in the
ansible module class.
2018-06-15 15:41:57 -07:00
Sharp Hall
3935cce394 docker: Allow publishing of ports with the same number but different protocol (#38412)
* Don't deduplicate docker container ports with different protocols

* Test _parse_exposed_ports
2018-06-15 12:36:20 -04:00
Ganesh Nalawade
ba4b12358c
Refactor ios cliconf plugin and ios_config module (#39695)
* Refactor ios cliconf plugin and ios_config module

*  Refactor ios cliconf plugin to support generic network_config module
*  Refactor ios_config module to work with cliconf api's
*  Enable command and response logging in cliconf pulgin
*  cliconf api documentation

* Fix unit test and other minor changes

* Doc update

* Fix CI failure

* Add default flag related changes

* Minor changes

* redact input command logging by default
2018-06-06 11:12:45 +05:30
Nathaniel Case
e7afd3d378
Search for macaddresses more stringently (#40901)
* Search for macaddresses more stringently

Fixes #40829
2018-05-31 10:45:17 -04:00
James Mighion
083ddb9bc2 Adding changed option to save_when for aireos (#40681)
* Adding changed option to save_when for aireos

* Deprecating save option for aireos_config.

* Updating version_added to 2.7 since the PR missed the window for 2.6
2018-05-31 10:35:12 -04:00
Sumit Jaiswal
81510970ae
Fix for updating the name in case of host record and network view and also display meaningful error in case of connection timeout (#40597)
* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* To fix following github issues 35774, 36574 and 39494

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* removed old_name new entry to make ui cleaner

* to resolve the bug 40709

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* reslove shippable error

* to fix shippable nios automation error

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* modified the name input parsing method

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* shippable error fix

* review comment fix

* shippable error fix

* shippable error fix
2018-05-31 12:25:15 +05:30
Nathaniel Case
82dfa542c2
Replace bogus (but routeable) ip addresses with RFC 5737 example addresses (#40554)
* Remove 1.1.1.1 from *_config tests

* remove from *_smoke and *_system

* Miscellaneous other tests

* Remove from module documentation as well

* Remove from unit tests as well

* Remove accidental duplication from rebase
2018-05-30 13:03:20 -04:00
Guillaume Grossetie
5ffa1a1b2a Add a module to create a java key store (jks) from a certificate (#35273)
* Add a module to create a java key store (jks) from a certificate
* Create a jks from a certificate and a private key (secured by a password)
* Add an option to recreate the jks (useful when you want to update the jks password)
* If the certificate changed, recreate the jks
* Version added is now 2.7
2018-05-30 13:53:09 +05:30
James Mighion
d9533c3cbf Adding changed option to save_when (#40640)
* Adding changed option to save_when

* Fixing version when changed was added.
2018-05-24 22:18:59 +05:30
Ryan Brown
858a1b09bb EC2_group module refactor (formerly pr/37255) (#38678)
* Refactor ec2_group

Replace nested for loops with list comprehensions

Purge rules before adding new ones in case sg has maximum permitted rules

* Add check mode tests for ec2_group

* add tests

* Remove dead code

* Fix integration test assertions for old boto versions

* Add waiter for security group that is autocreated

* Add support for in-account group rules

* Add common util to get AWS account ID

Fixes #31383

* Fix protocol number and add separate tests for egress rule handling

* Return egress rule treatment to be backwards compatible

* Remove functions that were obsoleted by `Rule` namedtuple

* IP tests

* Move description updates to a function

* Fix string formatting missing index

* Add tests for auto-creation of the same group in quick succession

* Resolve use of brand-new group in a rule without a description

* Clean up duplicated get-security-group function

* Add reverse cleanup in case of dependency issues

* Add crossaccount ELB group support

* Deal with non-STS calls to account API

* Add filtering of owner IDs that match the current account
2018-05-24 11:53:21 -04:00
Adam Miller
bc7ff83cd9 parted module not idempotent for esp flag and name (#40547)
* parted module not idempotent for esp flag and name

Fixes #40452

Currently the parted module doesn't take into account names with
spaces in them which leads to non-idempotent transactions on the
state of the system because the name comparison will never succeed.

Also, when the esp flag is set, parted infers the boot flag and the
parted module did not previously account for this. This lead to
non-idempotent transactions as well.

Signed-off-by: Adam Miller <admiller@redhat.com>

* fix unit tests, expected command changed in the patch

Signed-off-by: Adam Miller <admiller@redhat.com>
2018-05-23 11:06:26 -04:00
pierremahot
3903ca5c8e Fix ios_vlan to correctly identify unmodified config when having long interface names (#40145)
Change the command to get the interface in a vlan "show vlan" => "show vlan brief"
Change the parsing of the return command of the switch.
The return of the ios command is fixed so i cut with fix number of carracter.
Adding looking for the next line to add the forgeted interfaces.
2018-05-23 10:15:54 -04:00
Ken Evensen
fabce98104 Pamd++ (#35709)
* Cleaner, more pythonic, shorter, easier to maintain

* Added validation
2018-05-23 08:24:54 -05:00
Matt Clay
8deced3e04
Fix shebangs and file modes and update tests. (#40563)
* Add execute bit sanity test and apply fixes.
* Add shebang test for `lib` dirs and apply fixes.
* Shebang and execute bit cleanup.
2018-05-22 14:25:36 -07:00
Tim Rupp
29559d8f25
Adds the bigip_gtm_monitor_external module (#40560)
This module can be used to manage GTM external monitors
2018-05-22 12:50:05 -07:00
Tim Rupp
1d2d4a9015
Adds bigip_monitor_external module (#40558)
This module can be used to manage external LTM monitors on a bigip
2018-05-22 12:11:30 -07:00
Matthew Stone
c0b264d7b7 Adding slxos_vlan module (#39197)
* Adding slxos_vlan module
2018-05-22 11:43:46 +01:00
Matthew Stone
683ab9bb9f Adding slxos_l3_interface module (#39320)
* Adding slxos_l3_interface module

* Corrected return values

The returned IPv4 address has a prefix length, not a subnet mask
2018-05-22 11:41:25 +01:00
Tim Rupp
9b22438a9b
Adds bigiq utility license module (#40518)
This module can be used to manage utility licenses on a BIG-IQ
2018-05-21 20:18:41 -07:00
Antoine Catton
39f9d3e4a6 Add the ability to specify an install_dir to the gem module (#38195)
* Add the ability to specify an install_dir to the gem module

* Add GEM_HOME when installing a non-global gem

* Add tests for custom gem path

* Fix sanity tests

* Add changelog entry

* Rebase and add tests for incorrect options

Co-authored by: Antoine Catton <devel@antoine.catton.fr>
2018-05-21 09:55:43 -04:00
Sumit Jaiswal
fc8663edc0
Integration tests for Infoblox 2.5 modules (#40344)
* Update nios.py

* Update nios.py

* Update nios.py

* nios lookup errors out when there are no results #37970  Open	

Indentation failure issue resolved

* Returning empty list instead of None

In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment)

* infoblox ipv6 support changes

* infoblox ipv6 support changes

* for fixing pep8 errors

* moving ipaddr check to utils

* adding ipv6addr check

* increasing space to resolve pep8 error

* modified the playbook examples to valid ones

* Update nios_network.py

* integration tests for nios 2.5 modules

* modification done in existing integration nios testcases

* dns_view nios module tc

* host_record nios module tc

* network nios module tc

* network_view nios module tc

* zone nios module tc

* changes to fix shippabe errors for PR 40344

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable fix

* PR40344 shippable error fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* 40344 shippable fix

* PR40344 shippable error fix for block comment should start with '# '
2018-05-21 17:04:20 +05:30
Tim Rupp
1190591e3c
Adds the bigip_gtm_global module (#40430)
This module can be used to manage the global GTM settings on a BIGIP
2018-05-18 20:48:09 -07:00
Tim Rupp
510995bd83
Adds remaining fqdn params to bigip_node (#40427)
This patch adds params for auto_populate, address type, up interval
and down interval params to bigip node
2018-05-18 19:14:07 -07:00
Tim Rupp
f87cda8a54
small fixes and additions to bigip_virtual_address (#40362)
* Updated parameter names to match updated features in BIGIP
* Added support for route domains
2018-05-17 20:45:53 -07:00
Sam Doran
c9d3bb59a4 Do not join flag parameters in iptables module (#36658)
* Do not join flag parameters

This put a comma between every character of the tcp flag parameters, resulting in a bad iptables command.

Fixes #36490

* Use suboptions to ensure tcp_flags options are lists

* Add unit tests for tcp_flags

* Add example of how to use tcp_flags
2018-05-17 13:53:51 -04:00
Marcus Watkins
279cf596dc New Module: gitlab_hooks module and related tests (#40096)
* Added gitlab_hooks module and related tests

* Fix sanity check issues

* Refactor to use common util method, add check_mode support

* Fix module shebang
2018-05-17 13:52:48 -04:00
Marcus Watkins
7d87995207 New Module: gitlab_deploy_key and related tests (#40097)
* Added module gitlab_deploy_key and related tests

* Fix sanity check issues

* Refactor to use common util method, add check_mode support

* Fix module shebang
2018-05-17 13:52:40 -04:00
Anil Kumar Muraleedharan
1cb4619c9a Modifying cnos-facts, cnos_command and cnos-config in line with the design followed in Ansible. Adding unit test cases for these modules. Added plugins to support them. (#39955)
* Modifying cnos-facts, cnos_command and cnos-config in line with the design followed in Ansible. Adding unit test cases for these modules. Added plugins to support them.

* Removing doc fragment conflicts with other modules

* Replacing show with display
2018-05-17 10:06:24 -04:00
Tim Rupp
b325e9900c
Adds BIGIQ application HTTPS WAF module (#40270)
This module can be used to manage HTTPS WAF applications on a BIGIQ
2018-05-16 12:49:21 -07:00