mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-14 12:51:04 +00:00
BIGIP: Bugfix.multiple modules 3 (#53969)
* Moving comparision functions to compare.py from common.py * Refactors main() function and module manager in multiple modules in line with recent changes Adds variable types to docs Refactors unit tests to remove deprecated parameters
This commit is contained in:
committed by
Tim Rupp
parent
284565c39e
commit
9744ef80a0
@@ -113,9 +113,11 @@ class TestManager(unittest.TestCase):
|
||||
interval=20,
|
||||
timeout=30,
|
||||
partition='Common',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
||||
@@ -157,9 +157,11 @@ class TestManager(unittest.TestCase):
|
||||
name='vs1',
|
||||
address='1.1.1.1',
|
||||
state='present',
|
||||
password='admin',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
||||
@@ -101,9 +101,11 @@ class TestManager(unittest.TestCase):
|
||||
interval=20,
|
||||
timeout=30,
|
||||
partition='Common',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
||||
@@ -90,9 +90,11 @@ class TestManager(unittest.TestCase):
|
||||
def test_create_remote_syslog(self, *args):
|
||||
set_module_args(dict(
|
||||
remote_host='1.1.1.1',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
fixture = load_fixture('load_tm_sys_syslog_1.json')
|
||||
@@ -117,9 +119,11 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='remotesyslog1',
|
||||
remote_host='10.10.10.10',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
fixture = load_fixture('load_tm_sys_syslog_1.json')
|
||||
@@ -143,9 +147,11 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
remote_host='10.10.10.10',
|
||||
remote_port=800,
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
fixture = load_fixture('load_tm_sys_syslog_1.json')
|
||||
@@ -171,9 +177,11 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
remote_host='10.10.10.10',
|
||||
local_ip='2.2.2.2',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
fixture = load_fixture('load_tm_sys_syslog_1.json')
|
||||
@@ -199,9 +207,11 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
remote_host='10.10.10.10',
|
||||
local_ip='2.2.2.2',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
fixture = load_fixture('load_tm_sys_syslog_2.json')
|
||||
|
||||
@@ -92,9 +92,11 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='foo',
|
||||
description='my description',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
||||
@@ -107,15 +107,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
description='fakevlan',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common'
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -133,15 +136,18 @@ class TestManager(unittest.TestCase):
|
||||
name='somevlan',
|
||||
tagged_interface=['2.1'],
|
||||
tag=213,
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common'
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -159,15 +165,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
untagged_interface=['2.1'],
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common'
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -185,15 +194,18 @@ class TestManager(unittest.TestCase):
|
||||
name='somevlan',
|
||||
tagged_interface=['2.1', '1.1'],
|
||||
tag=213,
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common'
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -211,15 +223,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
untagged_interface=['2.1', '1.1'],
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -236,15 +251,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
untagged_interface=['2.1'],
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -267,15 +285,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
tagged_interface=['2.1'],
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
@@ -296,15 +317,18 @@ class TestManager(unittest.TestCase):
|
||||
set_module_args(dict(
|
||||
name='somevlan',
|
||||
description='changed_that',
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
partition='Common',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=self.spec.argument_spec,
|
||||
supports_check_mode=self.spec.supports_check_mode
|
||||
supports_check_mode=self.spec.supports_check_mode,
|
||||
mutually_exclusive=self.spec.mutually_exclusive
|
||||
)
|
||||
|
||||
# Override methods to force specific logic in the module to happen
|
||||
|
||||
Reference in New Issue
Block a user