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:
Wojciech Wypior 2019-03-19 07:12:17 +01:00 committed by Tim Rupp
parent 1a411e9c6b
commit 348b6e7da9
40 changed files with 776 additions and 431 deletions

View file

@ -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)