Commit graph

449 commits

Author SHA1 Message Date
Trishna Guha
9d2182bcf8 Deprecate nxos_switchport and Add nxos_l2_interface DI module (#33813)
* Deprecate nxos_switchport

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

* Add nxos_l2_interface DI module

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

* pep8 fixes

* aggregate test for nxos_l2_interface

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

* revert nxos_switchport test change

* gundalow's comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2018-01-05 07:44:02 +00:00
Tim Rupp
6c97c340ea
Various bigip_gtm_datacenter fixes (#34440)
Code refactor to use f5 coding conventions. Removed deprecated
"enabled/disabled" params (this is now a state). Adds token cleanup
for cases where many api calls are made.
2018-01-03 21:18:34 -08:00
Tim Rupp
bdafb42156
Refactors the bigip_sys_global module (#34438)
Changes include the current f5 coding standards and unit tests
for the module
2018-01-03 20:39:08 -08:00
Tim Rupp
9bd4070bdf
Adds bigip_traffic_group module (#34436)
This module can be used to create and remove traffic groups. Managing
members of the group is not yet supported.
2018-01-03 20:26:18 -08:00
Tim Rupp
c132b977e8
Refactors bigip_virtual_server (#34412)
This refactors the bigip_virtual_server module to address several issues and
missing features. Additionally it adds tests and updates the coding standards
to the recent version used by f5. Finally, it removes deprecated items that
were announced in 2.4
2018-01-03 13:42:17 -08:00
Tim Rupp
9e4aed15ff
Adds bigip_software_update module (#34410)
This module can be used to adjust the ways by which a bigip communicates
back to F5 to check for system updates.
2018-01-03 11:30:11 -08:00
bdowling
552d1df901 Adds parents to mutually_exclusive with src for *_config modules (#33957)
* mutually_exclusive add - ios_config parents works with lines by not src

* mutually_execlusive parents,src added to all other net modules

* tests for mutually_exclusive parents,src and whitespce removal
2018-01-03 09:47:12 -05:00
Jim Pfleger
af236f2531 Accept other ios_banner types (#33961)
* Accept other ios_banner types

* Use 2.6-compatible format string

* Doc option values prior to this update
2018-01-03 14:38:14 +00:00
Samer Deeb
1afd076dac Add new module mlnxos_magp for managing MAGP protocol on Mellanox (#34307)
MLMX-OS network devices

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-01-03 12:43:46 +00:00
Samer Deeb
42d5aeec3e Add support for vlan and loopback interfaces in mlnxos_interface (#34323)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-01-03 12:43:13 +00:00
Samer Deeb
52bea8dab6 Add new module mlnxos_mlag_ipl for managing IPL (inter-peer link) (#34326)
Signed-off-by: Samer Deeb <samerd@mellanox.com>
2018-01-03 12:41:26 +00:00
Abhijeet Kasurde
5496326c4d nmcli: Add 'generic' connection type (#34251)
This fix adds 'generic' connection type in nmcli module.

Fixes: #33648

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2018-01-02 12:37:22 +01:00
Samer Deeb
585b3449c6 Add module mlnxos_lldp_interface for managing lldp interfaces configuration (#34179)
* Add module mlnxos_lldp_interface for managing lldp interfaces
configuration

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

* Fix unit test

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-29 10:51:31 +05:30
Samer Deeb
84a10903db Add module mlnxos_linkagg for configuring LAG and MLAG on Mellanox switches (#34204)
* Add module mlnxos_linkagg for configuring LAG and MLAG on Mellanox
switches

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

* Remove unnecessary  method in unit-test

remove _execute_module and use execute_module from base class
2017-12-29 09:03:45 +05:30
Trishna Guha
80ba767204
Convert nxos_interface to DI (#34240)
* Convert nxos_interface to DI

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

* Add integration test

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

* commit for ganeshrn's comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-12-28 16:41:09 +05:30
Samer Deeb
89670133c1 Module mlnxos_l3_interface (#34199)
* Add module mlnxos_l3_interface for configuring L3 on Mellanox switches

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

* Rename test class

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-25 13:21:40 +05:30
Samer Deeb
8ddb84a155 Add module mlnxos_vlan for supporting vlan configuration on Mellanox switches (#34113)
* Add module mlnxos_vlan for supporting vlan configuration on Mellanox
switches

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

* use sgort header and fix METADATA

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-23 12:11:25 +05:30
Samer Deeb
dbcfea587c Add module mlnxos_l2_interface for supporting configuration of L2 interfaces on Mellanox switches (#34158)
* Add module mlnxos_l2_interface for supporting configuration of L2
interfaces on Mellanox switches

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

* use shorter header and fix METADATA

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-23 11:24:35 +05:30
Samer Deeb
0deda64231 Add module mlnxos_lldp for supporting configuration of LLDP protocol on Mellanox switches (#34159)
* Add module mlnxos_lldp for supporting configuration of LLDP protocol on Mellanox switches

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

* Fix header and metadata

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

* Fix imports

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-23 10:54:05 +05:30
Tim Rupp
75fbfb9e36
Fixes and additions to bigip_pool (#34205)
Removes deprecated host/port params. Adds metadata param. Adds new
classes to better support refactoring and maintenance.
2017-12-22 12:39:19 -08:00
Claes Nästén
5bd8a8f491 Add nso_query module to query Cisco NSO using XPath (#34188) 2017-12-22 16:56:50 +00:00
Claes Nästén
d6fd9703f1 Add nso_show module for Cisco NSO (#34142)
* update version parsing and move requirements to nso_* modules

prepare for introduction of nso_show module that has other version
requirements than the existing nso_* modules.

* Add nso_show module for retreiving config from Cisco NSO

New module that supports getting configuration and operational data
from Cisco NSO.
2017-12-22 09:43:22 +00:00
Trishna Guha
60f3649ebd
Convert nxos_vlan to DI module (#31866)
* Convert nxos_vlan to DI

* fix conflict

* push fix for qalthos's comment

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-12-21 14:08:33 +05:30
Nathaniel Case
cb1b705218
ios integration tests to network_cli (#33920)
* Preliminary steps

* Fix Python3 network_cli ios

* Add connection to debug strings

* Fix ios confirm prompt by way of optional newline

Also update ios_user delete tests
2017-12-20 09:03:29 -05:00
Fedor Sumkin
8a9865cb10 Fix for dns4 empty setting (#30757)
This fix check if DNS4 is None or not before proceeding with
other operations. Also, added unit test for this change.

Signed-off-by: Fedor Sumkin <qosys.net@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-12-20 12:48:22 +05:30
Trishna Guha
be89822bb5
Deprecate nxos_portchannel and add nxos_linkagg DI module (#33376)
* deprecate nxos_portchannel

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

* Add nxos_linkagg DI module

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

* remove nxos_portchannel unit test

* fix syntax issues

* fix ansible-doc failure

* update nxos_portchannel unittest

* minor fixes and integration test

* update nxos_linkagg
2017-12-20 11:26:07 +05:30
Trishna Guha
3cce8dfafd
Deprecate nxos_ip_interface and Add nxos_l3_interface DI module (#33866)
* Deprecate nxos_ip_interface module

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

* Add nxos_l3_interface DI module

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

* Add integration test

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

* pep8 fixes

* Add nxapi cli test

* Improve complexity

* manage layer3 interface

* fix unit test
2017-12-20 11:07:23 +05:30
Trishna Guha
27be2a0f5a
Handle nxos platform diffs with cli conf implementation (#34020)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-12-20 10:41:10 +05:30
Samer Deeb
1df57ac1ac Add mlnxos_interface module (#33839)
* Add new module: mlnxos_interface for configuring mlnxos ethernet
interfaces

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

* Update mlnxos.py

* Fix Documentation

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

* Add missing documentation

Signed-off-by: Samer Deeb <samerd@mellanox.com>
2017-12-19 17:24:42 +00:00
Trishna Guha
9f86b923e9
[CLI_CONF] Refactor nxos module common library to use cliconf plugin (#31524)
* refactor nxos modules

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

* get_config update

* fix get_config

* update nxos module

* device_info

* fix conflict

* add failure message check

* pep8 fixes

* use get_capabilities to check cliconf

* Add logic to detect platform in get_capabilities and cache in module_utils

* return msg in edit_config

* fix conflicts

* make modules compatible

* fix nxos cliconf api

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

* cache capabilities

* Update transport queries to get_capabilities in module level

* fix unit tests

* load_config error code

* remove unnecessary change

* Refactor nxos_install_os module
2017-12-19 12:22:33 +05:30
Claes Nästén
5fdb39c4d1 nso_verify for Cisco NSO (#33945)
Module for verifying that configuration is as expected in Cisco NSO.
2017-12-15 13:43:07 +00:00
Claes Nästén
b2bc98c161 nso_action for Cisco NSO (#32781)
nso_action module for execution actions/RPCs in NSO.
2017-12-15 11:29:04 +00:00
Tim Rupp
22059cbe67
Adds bigip_device_httpd module (#33924)
this module can be used to adjust the details of the server that
hosts the BIG-IP web ui.
2017-12-14 14:16:28 -08:00
James Mighion
f8e3cfe9e2 Aruba indenting (#33884)
* Fixing aruba's inconsitent indenting.

* Adding config with different children indentation and unit test to confirm the different spacing does not matter.

* Fixing pylint check. Missed an r prefix.
2017-12-14 14:37:34 +05:30
David Kretch
98260f9884 Fix pamd error when inserting a new rule at the end. Fixes #28487 (#28488)
* When inserting a new rule in `insert_after_rule`, check if the old rule is
the last rule, to avoid a list index out of range error when attempting to
access the next rule.
* Add a test for inserting a new rule after the last rule.
2017-12-13 15:31:20 -06:00
James Mighion
3a9083cf48 ios_config save (#33791)
* Fixing save so it still works. Adding changed as an option for save_when.

* Updating unit tests.

* Updating description to state that changed was added in 2.5.
2017-12-13 07:36:43 -07:00
Tim Rupp
9a807e6316
Adds bigip_security_port_list module (#33845)
This module can be used to manage port lists in an AFM configuration.
2017-12-12 21:13:06 -08:00
Tim Rupp
cb026bb660
Adds bigip_profile_client_ssl module (#33844)
This module can be used to manage client ssl profiles on a BIG-IP
2017-12-12 19:54:43 -08:00
Pilou
58fdbe7415 rhn_channel/register: Porting tests to pytest (#33719)
* rhn_channel/register: Porting tests to pytest

Related: #33387

* rhn unit tests: use mock_request as a fixture
2017-12-12 07:25:49 -08:00
Tim Rupp
7b76124c07
Fixes for gtm wide ip (#33725)
Adds pools argument. Refactors code to support new conventions.
Adds more unit tests
2017-12-08 14:17:30 -08:00
Kedar Kekan
012a96dabd
code cleanup for --diff and --check modes (#33665)
* code cleanup for `--diff` and `--check` modes

* fixes UT to remove exec_command
2017-12-07 20:14:57 +05:30
Kedar Kekan
2bc4c4f156
IOS-XR NetConf and Cliconf plugin work (#33332)
*  - Netconf plugin addition for iosxr
 - Utilities refactoring to support netconf and cliconf
 - iosx_banner refactoring for netconf and cliconf
 - Integration testcases changes to accomodate above changes

* Fix sanity failures, shippable errors and review comments

* fix pep8 issue

* changes run_command method to send specific command args

* - Review comment fixes
- iosxr_command changes to remove ComplexDict based command_spec

* - Move namespaces removal method from utils to netconf plugin

* Minor refactoring in utils and change in deprecation message

* rewrite build_xml logic and import changes for new utils dir structure

* - Review comment changes and minor changes to documentation

* * refactor common code and docs updates
2017-12-06 22:37:31 +05:30
Evgeny Fedoruk
e73d3dfe20 Fixing bug when returned 404 status code considered as invalid (#33530)
In case of workflow delete action, the returned 404 status code
considered as invalid although it's a valid code for not found (deleted)
entity.
Removed verification of the status. Only success should be verified.

Fixes #33524
2017-12-06 14:18:45 +00:00
Toshio Kuratomi
cd36164239
Porting tests to pytest (#33387)
* Porting tests to pytest

* Achievement Get: No longer need mock/generator.py
  * Now done via pytest's parametrization
  * Port safe_eval to pytest
  * Port text tests to pytest
  * Port test_set_mode_if_different to pytest

* Change conftest AnsibleModule fixtures to be more flexible
  * Move the AnsibleModules fixtures to module_utils/conftest.py for sharing
  * Testing the argspec code requires:
    * injecting both the argspec and the arguments.
    * Patching the arguments into sys.stdin at a different level

* More porting to obsolete mock/procenv.py
  * Port run_command to pytest
  * Port known_hosts tests to pytest
  * Port safe_eval to pytest
  * Port test_distribution_version.py to pytest
  * Port test_log to pytest
  * Port test__log_invocation to pytest
  * Remove unneeded import of procenv in test_postgresql

* Port test_pip to pytest style
  * As part of this, create a pytest ansiblemodule fixture in
    modules/conftest.py.  This is slightly different than the
    approach taken in module_utils because here we need to override the
    AnsibleModule that the modules will inherit from instead of one that
    we're instantiating ourselves.

* Fixup usage of parametrization in test_deprecate_warn

* Check that the pip module failed in our test
2017-12-05 12:43:13 -08:00
Kaz Cheng
60b5c6890a [cloud] Add template_body parameter to cloudformation module to allow lookups (#33485) 2017-12-05 13:42:05 -05:00
Ryan S. Brown
5087ce9273 Remove botocore from top-level execution in lambda_policy tests
Even though the tests are skipped, the `ClientError` uses outside the
test cause a failure even though the tests never run
2017-12-04 10:14:32 -05:00
Ganesh Nalawade
11c9ad23d5
Refactor common network shared and platform utils code into package (#33452)
* Refactor common network shared and platform specific code into package (part-1)

As per proposal #76 refactor common network shared and platform specific
code into sub-package.
https://github.com/ansible/proposals/issues/76

*  ansible.module_utils.network.common - command shared functions
*  ansible.module_utils.network.{{ platform }} - where platform is platform specific shared functions

*  Fix review comments

* Fix review comments
2017-12-03 21:42:30 +05:30
Tim Rupp
18aca48075
Various errors and formatting fixes (#33503)
* Various errors and formatting fixes

Mostly formatting fixes and small changes to better support debugging

* Fixes upstream errors
2017-12-02 22:33:18 -08:00
Tim Rupp
9f544cf926
Adds traffic group and fixes (#33502)
Adds the traffic group param. Adds conventions for updated f5
standards
2017-12-02 22:20:00 -08:00
Tim Rupp
00bf4ee210
routedomain fixes (#33501)
* routedomain fixes

Adds partition. Adds name. Makes name and id mutually exclusive.

* Fixes upstream errors
2017-12-02 22:10:04 -08:00