Fixes for bigip_gtm_wide_ip (#39931)

Added the irules parameter. Misc corrections of invalid parameter
names and internal behaviors.
This commit is contained in:
Tim Rupp
2018-05-09 17:28:07 -07:00
committed by GitHub
parent 1cf07028d4
commit ad5fdf5eb7
3 changed files with 151 additions and 70 deletions

View File

@@ -21,12 +21,12 @@ from ansible.compat.tests.mock import patch
from ansible.module_utils.basic import AnsibleModule
try:
from library.bigip_gtm_wide_ip import ApiParameters
from library.bigip_gtm_wide_ip import ModuleParameters
from library.bigip_gtm_wide_ip import ModuleManager
from library.bigip_gtm_wide_ip import ArgumentSpec
from library.bigip_gtm_wide_ip import UntypedManager
from library.bigip_gtm_wide_ip import TypedManager
from library.modules.bigip_gtm_wide_ip import ApiParameters
from library.modules.bigip_gtm_wide_ip import ModuleParameters
from library.modules.bigip_gtm_wide_ip import ModuleManager
from library.modules.bigip_gtm_wide_ip import ArgumentSpec
from library.modules.bigip_gtm_wide_ip import UntypedManager
from library.modules.bigip_gtm_wide_ip import TypedManager
from library.module_utils.network.f5.common import F5ModuleError
from library.module_utils.network.f5.common import iControlUnexpectedHTTPError
from test.unit.modules.utils import set_module_args
@@ -70,7 +70,7 @@ class TestParameters(unittest.TestCase):
def test_module_parameters(self):
args = dict(
name='foo.baz.bar',
lb_method='round-robin',
pool_lb_method='round-robin',
)
p = ModuleParameters(params=args)
assert p.name == 'foo.baz.bar'
@@ -108,12 +108,12 @@ class TestParameters(unittest.TestCase):
def test_module_not_fqdn_name(self):
args = dict(
name='foo.baz',
name='foo',
lb_method='round-robin'
)
with pytest.raises(F5ModuleError) as excinfo:
p = ModuleParameters(params=args)
assert p.name == 'foo.baz'
assert p.name == 'foo'
assert 'The provided name must be a valid FQDN' in str(excinfo)