Removes bigip_iapp_service from skip list (#32482)

This commit is contained in:
Tim Rupp 2017-11-01 21:47:56 -07:00 committed by GitHub
parent 60281b85fe
commit 015baf5149
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 361 additions and 105 deletions

View file

@ -14,7 +14,6 @@ lib/ansible/modules/cloud/webfaction/webfaction_mailbox.py
lib/ansible/modules/cloud/webfaction/webfaction_site.py
lib/ansible/modules/clustering/consul_acl.py
lib/ansible/modules/network/cloudengine/ce_file_copy.py
lib/ansible/modules/network/f5/bigip_iapp_service.py
lib/ansible/modules/network/f5/bigip_iapp_template.py
lib/ansible/modules/network/f5/bigip_irule.py
lib/ansible/modules/network/f5/bigip_pool.py

View file

@ -1,21 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
@ -38,11 +24,13 @@ try:
from library.bigip_iapp_service import Parameters
from library.bigip_iapp_service import ModuleManager
from library.bigip_iapp_service import ArgumentSpec
from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError
except ImportError:
try:
from ansible.modules.network.f5.bigip_iapp_service import Parameters
from ansible.modules.network.f5.bigip_iapp_service import ModuleManager
from ansible.modules.network.f5.bigip_iapp_service import ArgumentSpec
from ansible.module_utils.f5_utils import iControlUnexpectedHTTPError
except ImportError:
raise SkipTest("F5 Ansible modules require the f5-sdk Python library")
@ -86,7 +74,7 @@ class TestParameters(unittest.TestCase):
assert p.deviceGroup == 'none'
assert p.inheritedTrafficGroup == 'true'
assert p.inheritedDevicegroup == 'true'
assert p.trafficGroup == '/Common/traffic-group-local-only'
assert p.traffic_group == '/Common/traffic-group-local-only'
def test_module_parameters_lists(self):
args = load_fixture('create_iapp_service_parameters_f5_http.json')
@ -150,6 +138,70 @@ class TestParameters(unittest.TestCase):
assert p.variables[1]['name'] == 'afm__policy'
assert p.variables[1]['value'] == '/#do_not_use#'
def test_module_strict_updates_from_top_level(self):
# Assumes the user did not provide any parameters
args = dict(
strict_updates=True
)
p = Parameters(args)
assert p.strict_updates == 'enabled'
args = dict(
strict_updates=False
)
p = Parameters(args)
assert p.strict_updates == 'disabled'
def test_module_strict_updates_override_from_top_level(self):
args = dict(
strict_updates=True,
parameters=dict(
strictUpdates='disabled'
)
)
p = Parameters(args)
assert p.strict_updates == 'enabled'
args = dict(
strict_updates=False,
parameters=dict(
strictUpdates='enabled'
)
)
p = Parameters(args)
assert p.strict_updates == 'disabled'
def test_module_strict_updates_only_parameters(self):
args = dict(
parameters=dict(
strictUpdates='disabled'
)
)
p = Parameters(args)
assert p.strict_updates == 'disabled'
args = dict(
parameters=dict(
strictUpdates='enabled'
)
)
p = Parameters(args)
assert p.strict_updates == 'enabled'
def test_api_strict_updates_from_top_level(self):
args = dict(
strictUpdates='enabled'
)
p = Parameters(args)
assert p.strict_updates == 'enabled'
args = dict(
strictUpdates='disabled'
)
p = Parameters(args)
assert p.strict_updates == 'disabled'
def test_api_parameters_variables(self):
args = dict(
variables=[
@ -227,7 +279,7 @@ class TestParameters(unittest.TestCase):
trafficGroup='/Common/traffic-group-local-only'
)
p = Parameters(args)
assert p.trafficGroup == '/Common/traffic-group-local-only'
assert p.traffic_group == '/Common/traffic-group-local-only'
def test_module_template_same_partition(self):
args = dict(