mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Refactors main() function and module manager in multiple modules in line with recent changes (#53982)
Adds variable types to docs Refactors unit tests to remove deprecated parameters
This commit is contained in:
committed by
Tim Rupp
parent
1a411e9c6b
commit
348b6e7da9
@@ -98,14 +98,17 @@ class TestManager(unittest.TestCase):
|
||||
],
|
||||
partition='Common',
|
||||
state='present',
|
||||
password='password',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
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
|
||||
)
|
||||
mm = ModuleManager(module=module)
|
||||
|
||||
@@ -126,16 +129,19 @@ class TestManager(unittest.TestCase):
|
||||
],
|
||||
partition='Common',
|
||||
state='present',
|
||||
password='password',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
current = ApiParameters(params=load_fixture('load_ltm_node_3.json'))
|
||||
|
||||
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
|
||||
)
|
||||
mm = ModuleManager(module=module)
|
||||
|
||||
@@ -156,14 +162,17 @@ class TestManager(unittest.TestCase):
|
||||
],
|
||||
partition='Common',
|
||||
state='present',
|
||||
password='password',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
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
|
||||
)
|
||||
mm = ModuleManager(module=module)
|
||||
|
||||
@@ -185,15 +194,18 @@ class TestManager(unittest.TestCase):
|
||||
],
|
||||
partition='Common',
|
||||
state='present',
|
||||
password='password',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
current = ApiParameters(params=load_fixture('load_ltm_node_2.json'))
|
||||
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
|
||||
)
|
||||
mm = ModuleManager(module=module)
|
||||
|
||||
@@ -217,15 +229,18 @@ class TestManager(unittest.TestCase):
|
||||
],
|
||||
partition='Common',
|
||||
state='present',
|
||||
password='password',
|
||||
server='localhost',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
current = ApiParameters(params=load_fixture('load_ltm_node_2.json'))
|
||||
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
|
||||
)
|
||||
mm = ModuleManager(module=module)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user