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
This commit is contained in:
Trishna Guha 2017-12-20 11:26:07 +05:30 committed by GitHub
commit be89822bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 677 additions and 7 deletions

View file

@ -20,27 +20,27 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.tests.mock import patch
from ansible.modules.network.nxos import nxos_portchannel
from ansible.modules.network.nxos import _nxos_portchannel
from .nxos_module import TestNxosModule, set_module_args
class TestNxosPortchannelModule(TestNxosModule):
module = nxos_portchannel
module = _nxos_portchannel
def setUp(self):
super(TestNxosPortchannelModule, self).setUp()
self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_portchannel.run_commands')
self.mock_run_commands = patch('ansible.modules.network.nxos._nxos_portchannel.run_commands')
self.run_commands = self.mock_run_commands.start()
self.mock_load_config = patch('ansible.modules.network.nxos.nxos_portchannel.load_config')
self.mock_load_config = patch('ansible.modules.network.nxos._nxos_portchannel.load_config')
self.load_config = self.mock_load_config.start()
self.mock_get_config = patch('ansible.modules.network.nxos.nxos_portchannel.get_config')
self.mock_get_config = patch('ansible.modules.network.nxos._nxos_portchannel.get_config')
self.get_config = self.mock_get_config.start()
self.mock_get_capabilities = patch('ansible.modules.network.nxos.nxos_portchannel.get_capabilities')
self.mock_get_capabilities = patch('ansible.modules.network.nxos._nxos_portchannel.get_capabilities')
self.get_capabilities = self.mock_get_capabilities.start()
self.get_capabilities.return_value = {'network_api': 'cliconf'}