mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-24 18:09:10 -07: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:
parent
1a411e9c6b
commit
348b6e7da9
40 changed files with 776 additions and 431 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue