mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-03 07:41:30 -07:00
junos_linkagg implementation and junos modules refactor (#26587)
* junos_linkagg implementation and junos modules refactor * junos_linkagg implementation * junos_linkagg integration test * net_linkagg integration test for junos * decouple `load_config` and `commit` operations, to allow single commit (in case on confirm commit) and to perform batch commit (multiple `load_config` followed by single `commit`) * Other related refactor * Fix CI issues * Fix unit test failure
This commit is contained in:
parent
82558baaf6
commit
be89ef3eb6
30 changed files with 1140 additions and 220 deletions
|
@ -34,8 +34,20 @@ class TestJunosCommandModule(TestJunosModule):
|
|||
self.mock_exec_command = patch('ansible.modules.network.junos.junos_netconf.exec_command')
|
||||
self.exec_command = self.mock_exec_command.start()
|
||||
|
||||
self.mock_lock_configuration = patch('ansible.module_utils.junos.lock_configuration')
|
||||
self.lock_configuration = self.mock_lock_configuration.start()
|
||||
|
||||
self.mock_unlock_configuration = patch('ansible.module_utils.junos.unlock_configuration')
|
||||
self.unlock_configuration = self.mock_unlock_configuration.start()
|
||||
|
||||
self.mock_commit_configuration = patch('ansible.modules.network.junos.junos_netconf.commit_configuration')
|
||||
self.commit_configuration = self.mock_commit_configuration.start()
|
||||
|
||||
def tearDown(self):
|
||||
self.mock_exec_command.stop()
|
||||
self.mock_lock_configuration.stop()
|
||||
self.mock_unlock_configuration.stop()
|
||||
self.mock_commit_configuration.stop()
|
||||
|
||||
def test_junos_netconf_enable(self):
|
||||
self.exec_command.return_value = 0, '', None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue