1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Removes ignores for f5 (#40038)

Removes ignores for f5 from unit tests and fixes any issues that
are being suppressed by the ignores
This commit is contained in:
Tim Rupp 2018-05-11 17:12:17 -07:00 committed by GitHub
parent 383a4f026e
commit 06f76d6407
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 101 additions and 86 deletions

View file

@ -42,6 +42,7 @@ options:
choices: choices:
- present - present
- absent - absent
default: present
file: file:
description: description:
- Full path to a policy file to be imported into the BIG-IP ASM. - Full path to a policy file to be imported into the BIG-IP ASM.

View file

@ -55,6 +55,9 @@ options:
then all conditionals in the I(wait_for) must be satisfied. If then all conditionals in the I(wait_for) must be satisfied. If
the value is set to C(any) then only one of the values must be the value is set to C(any) then only one of the values must be
satisfied. satisfied.
choices:
- any
- all
default: all default: all
retries: retries:
description: description:

View file

@ -29,13 +29,13 @@ options:
save: save:
description: description:
- The C(save) argument instructs the module to save the - The C(save) argument instructs the module to save the
running-config to startup-config. This operation is performed running-config to startup-config.
after any changes are made to the current running config. If - This operation is performed after any changes are made to the
no changes are made, the configuration is still saved to the current running config. If no changes are made, the configuration
startup config. This option will always cause the module to is still saved to the startup config.
return changed. - This option will always cause the module to return changed.
type: bool type: bool
default: no default: yes
reset: reset:
description: description:
- Loads the default configuration on the device. - Loads the default configuration on the device.
@ -323,7 +323,7 @@ class ArgumentSpec(object):
), ),
save=dict( save=dict(
type='bool', type='bool',
default=True default='yes'
) )
) )
self.argument_spec = {} self.argument_spec = {}

View file

@ -26,10 +26,11 @@ options:
operation each time a lookup is needed. Please note that this applies operation each time a lookup is needed. Please note that this applies
only to Access Policy Manager features, such as ACLs, web application only to Access Policy Manager features, such as ACLs, web application
rewrites, and authentication. rewrites, and authentication.
default: disable
choices: choices:
- enabled - enabled
- disabled - disabled
- enable
- disable
name_servers: name_servers:
description: description:
- A list of name servers that the system uses to validate DNS lookups - A list of name servers that the system uses to validate DNS lookups
@ -320,18 +321,12 @@ class ArgumentSpec(object):
choices=['disabled', 'enabled', 'disable', 'enable'] choices=['disabled', 'enabled', 'disable', 'enable']
), ),
name_servers=dict( name_servers=dict(
required=False,
default=None,
type='list' type='list'
), ),
search=dict( search=dict(
required=False,
default=None,
type='list' type='list'
), ),
ip_version=dict( ip_version=dict(
required=False,
default=None,
choices=[4, 6], choices=[4, 6],
type='int' type='int'
), ),

View file

@ -83,6 +83,7 @@ options:
choices: choices:
- present - present
- absent - absent
default: present
notes: notes:
- This module is primarily used as a component of configuring HA pairs of - This module is primarily used as a component of configuring HA pairs of
BIG-IP devices. BIG-IP devices.

View file

@ -25,10 +25,9 @@ options:
description: description:
- Specifies, if you have enabled HTTPD access, the IP address or address - Specifies, if you have enabled HTTPD access, the IP address or address
range for other systems that can communicate with this system. range for other systems that can communicate with this system.
choices: - To specify all addresses, use the value C(all).
- all - IP address can be specified, such as 172.27.1.10.
- IP address, such as 172.27.1.10 - IP rangees can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
- IP range, such as 172.27.*.* or 172.27.0.0/255.255.0.0
auth_name: auth_name:
description: description:
- Sets the BIG-IP authentication realm name. - Sets the BIG-IP authentication realm name.

View file

@ -36,7 +36,6 @@ options:
description: description:
- The timezone to set for NTP lookups. At least one of C(ntp_servers) or - The timezone to set for NTP lookups. At least one of C(ntp_servers) or
C(timezone) is required. C(timezone) is required.
default: UTC
extends_documentation_fragment: f5 extends_documentation_fragment: f5
author: author:
- Tim Rupp (@caphrim007) - Tim Rupp (@caphrim007)

View file

@ -24,10 +24,9 @@ options:
- Specifies, if you have enabled SSH access, the IP address or address - Specifies, if you have enabled SSH access, the IP address or address
range for other systems that can use SSH to communicate with this range for other systems that can use SSH to communicate with this
system. system.
choices: - To specify all addresses, use the value C(all).
- all - IP address can be specified, such as 172.27.1.10.
- IP address, such as 172.27.1.10 - IP rangees can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
- IP range, such as 172.27.*.* or 172.27.0.0/255.255.0.0
banner: banner:
description: description:
- Whether to enable the banner or not. - Whether to enable the banner or not.

View file

@ -19,7 +19,7 @@ module: bigip_facts
short_description: Collect facts from F5 BIG-IP devices short_description: Collect facts from F5 BIG-IP devices
description: description:
- Collect facts from F5 BIG-IP devices via iControl SOAP API - Collect facts from F5 BIG-IP devices via iControl SOAP API
version_added: "1.6" version_added: 1.6
author: author:
- Matt Hite (@mhite) - Matt Hite (@mhite)
- Tim Rupp (@caphrim007) - Tim Rupp (@caphrim007)
@ -36,12 +36,12 @@ options:
description: description:
- BIG-IP session support; may be useful to avoid concurrency - BIG-IP session support; may be useful to avoid concurrency
issues in certain circumstances. issues in certain circumstances.
default: no
type: bool type: bool
default: 'yes'
include: include:
description: description:
- Fact category or list of categories to collect - Fact category or list of categories to collect
required: true required: True
choices: choices:
- address_class - address_class
- certificate - certificate
@ -83,20 +83,22 @@ import fnmatch
import re import re
import traceback import traceback
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import string_types
from ansible.module_utils.six.moves import map, zip
try:
from library.module_utils.network.f5.legacy import bigip_api, bigsuds_found
from library.module_utils.network.f5.common import f5_argument_spec
except ImportError:
from ansible.module_utils.network.f5.legacy import bigip_api, bigsuds_found
from ansible.module_utils.network.f5.common import f5_argument_spec
try: try:
from suds import MethodNotFound, WebFault from suds import MethodNotFound, WebFault
except ImportError: except ImportError:
pass # Handle via f5_utils.bigsuds_found pass # Handle via f5_utils.bigsuds_found
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.f5_utils import bigip_api, bigsuds_found
from ansible.module_utils.six.moves import map, zip
try:
from library.module_utils.network.f5.common import f5_argument_spec
except ImportError:
from ansible.module_utils.network.f5.common import f5_argument_spec
class F5(object): class F5(object):
"""F5 iControl class. """F5 iControl class.
@ -1089,6 +1091,9 @@ class AddressClasses(object):
F5 BIG-IP address group/class class. F5 BIG-IP address group/class class.
In TMUI these things are known as Address Data Groups. Examples that ship with the
box include /Common/aol and /Common/private_net
Attributes: Attributes:
api: iControl API instance. api: iControl API instance.
address_classes: List of address classes. address_classes: List of address classes.
@ -1107,7 +1112,15 @@ class AddressClasses(object):
def get_address_class(self): def get_address_class(self):
key = self.api.LocalLB.Class.get_address_class(self.address_classes) key = self.api.LocalLB.Class.get_address_class(self.address_classes)
value = self.api.LocalLB.Class.get_address_class_member_data_value(key) value = self.api.LocalLB.Class.get_address_class_member_data_value(key)
result = list(map(zip, [x['members'] for x in key], value))
result = []
for idx, v in enumerate(key):
for idx2, member in enumerate(v['members']):
dg_value = dict(
value=value[idx][idx2]
)
dg_value.update(member)
result.append(dg_value)
return result return result
def get_description(self): def get_description(self):
@ -1639,9 +1652,18 @@ def generate_provision_dict(f5):
def main(): def main():
argument_spec = f5_argument_spec argument_spec = f5_argument_spec
meta_args = dict( meta_args = dict(
session=dict(type='bool', default=False), session=dict(type='bool', default='no'),
include=dict(type='list', required=True), include=dict(
filter=dict(type='str', required=False), type='raw',
required=True,
choices=[
'address_class', 'certificate', 'client_ssl_profile', 'device',
'device_group', 'interface', 'key', 'node', 'pool', 'provision',
'rule', 'self_ip', 'software', 'system_info', 'traffic_group',
'trunk', 'virtual_address', 'virtual_server', 'vlan'
]
),
filter=dict(type='str'),
) )
argument_spec.update(meta_args) argument_spec.update(meta_args)
@ -1671,7 +1693,11 @@ def main():
regex = fnmatch.translate(fact_filter) regex = fnmatch.translate(fact_filter)
else: else:
regex = None regex = None
include = [x.lower() for x in module.params['include']] if isinstance(module.params['include'], string_types):
includes = module.params['include'].split(',')
else:
includes = module.params['include']
include = [x.lower() for x in includes]
valid_includes = ('address_class', 'certificate', 'client_ssl_profile', valid_includes = ('address_class', 'certificate', 'client_ssl_profile',
'device', 'device_group', 'interface', 'key', 'node', 'device', 'device_group', 'interface', 'key', 'node',
'pool', 'provision', 'rule', 'self_ip', 'software', 'pool', 'provision', 'rule', 'self_ip', 'software',
@ -1679,7 +1705,7 @@ def main():
'virtual_address', 'virtual_server', 'vlan') 'virtual_address', 'virtual_server', 'vlan')
include_test = (x in valid_includes for x in include) include_test = (x in valid_includes for x in include)
if not all(include_test): if not all(include_test):
module.fail_json(msg="value of include must be one or more of: %s, got: %s" % (",".join(valid_includes), ",".join(include))) module.fail_json(msg="Value of include must be one or more of: %s, got: %s" % (",".join(valid_includes), ",".join(include)))
try: try:
facts = {} facts = {}

View file

@ -31,6 +31,7 @@ options:
- absent - absent
- enabled - enabled
- disabled - disabled
default: present
preferred_lb_method: preferred_lb_method:
description: description:
- The load balancing mode that the system tries first. - The load balancing mode that the system tries first.
@ -94,6 +95,7 @@ options:
- drop-packet - drop-packet
- fallback-ip - fallback-ip
- virtual-server-score - virtual-server-score
- none
fallback_ip: fallback_ip:
description: description:
- Specifies the IPv4, or IPv6 address of the server to which the system - Specifies the IPv4, or IPv6 address of the server to which the system

View file

@ -769,12 +769,22 @@ class ArgumentSpec(object):
def __init__(self): def __init__(self):
self.states = ['absent', 'present', 'enabled', 'disabled'] self.states = ['absent', 'present', 'enabled', 'disabled']
self.server_types = [ self.server_types = [
'alteon-ace-director', 'cisco-css', 'cisco-server-load-balancer', 'alteon-ace-director',
'generic-host', 'radware-wsd', 'windows-nt-4.0', 'bigip', 'cisco-css',
'cisco-local-director-v2', 'extreme', 'generic-load-balancer', 'cisco-server-load-balancer',
'sun-solaris', 'cacheflow', 'cisco-local-director-v3', 'generic-host',
'foundry-server-iron', 'netapp', 'standalone-bigip', 'radware-wsd',
'redundant-bigip', 'windows-2000-server' 'windows-nt-4.0',
'bigip',
'cisco-local-director-v2',
'extreme',
'generic-load-balancer',
'sun-solaris',
'cacheflow',
'cisco-local-director-v3',
'foundry-server-iron',
'netapp',
'windows-2000-server'
] ]
self.supports_check_mode = True self.supports_check_mode = True
argument_spec = dict( argument_spec = dict(

View file

@ -77,6 +77,7 @@ options:
over any similar setting in the iApp Server payload that you provide in over any similar setting in the iApp Server payload that you provide in
the C(parameters) field. the C(parameters) field.
default: yes default: yes
type: bool
version_added: 2.5 version_added: 2.5
traffic_group: traffic_group:
description: description:
@ -618,7 +619,8 @@ class ArgumentSpec(object):
type='bool' type='bool'
), ),
strict_updates=dict( strict_updates=dict(
type='bool' type='bool',
default='yes'
), ),
traffic_group=dict(), traffic_group=dict(),
partition=dict( partition=dict(

View file

@ -598,7 +598,7 @@ class ArgumentSpec(object):
timeout=dict(type='int'), timeout=dict(type='int'),
time_until_up=dict(type='int'), time_until_up=dict(type='int'),
community=dict(), community=dict(),
version=dict(), version=dict(choices=['v1', 'v2c']),
agent_type=dict( agent_type=dict(
choices=['UCD', 'WIN2000', 'GENERIC'] choices=['UCD', 'WIN2000', 'GENERIC']
), ),

View file

@ -47,6 +47,7 @@ options:
- present - present
- absent - absent
- draft - draft
default: present
strategy: strategy:
description: description:
- Specifies the method to determine which actions get executed in the - Specifies the method to determine which actions get executed in the

View file

@ -29,7 +29,7 @@ options:
- The parent template of this monitor template. Once this value has - The parent template of this monitor template. Once this value has
been set, it cannot be changed. By default, this value is the C(clientssl) been set, it cannot be changed. By default, this value is the C(clientssl)
parent on the C(Common) partition. parent on the C(Common) partition.
default: "/Common/clientssl" default: /Common/clientssl
ciphers: ciphers:
description: description:
- Specifies the list of ciphers that the system supports. When creating a new - Specifies the list of ciphers that the system supports. When creating a new
@ -480,7 +480,7 @@ class ArgumentSpec(object):
self.supports_check_mode = True self.supports_check_mode = True
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
parent=dict(), parent=dict(default='/Common/clientssl'),
ciphers=dict(), ciphers=dict(),
cert_key_chain=dict( cert_key_chain=dict(
type='list', type='list',

View file

@ -34,8 +34,9 @@ options:
name: name:
description: description:
- The self IP to create. - The self IP to create.
- If this parameter is not specified, then it will default to the value supplied
in the C(address) parameter.
required: True required: True
default: Value of C(address)
netmask: netmask:
description: description:
- The netmask for the self IP. When creating a new Self IP, this value - The netmask for the self IP. When creating a new Self IP, this value

View file

@ -383,26 +383,25 @@ class ArgumentSpec(object):
def __init__(self): def __init__(self):
self.supports_check_mode = True self.supports_check_mode = True
self.states = ['present'] self.states = ['present']
self.on_off_choices = ['enabled', 'disabled', 'True', 'False'] + list(BOOLEANS)
argument_spec = dict( argument_spec = dict(
security_banner=dict( security_banner=dict(
choices=self.on_off_choices type='bool'
), ),
banner_text=dict(), banner_text=dict(),
gui_setup=dict( gui_setup=dict(
choices=self.on_off_choices type='bool'
), ),
lcd_display=dict( lcd_display=dict(
choices=self.on_off_choices type='bool'
), ),
mgmt_dhcp=dict( mgmt_dhcp=dict(
choices=self.on_off_choices type='bool'
), ),
net_reboot=dict( net_reboot=dict(
choices=self.on_off_choices type='bool'
), ),
quiet_boot=dict( quiet_boot=dict(
choices=self.on_off_choices type='bool'
), ),
console_timeout=dict(required=False, type='int', default=None), console_timeout=dict(required=False, type='int', default=None),
state=dict(default='present', choices=['present']) state=dict(default='present', choices=['present'])

View file

@ -224,11 +224,10 @@ options:
- When C(type) is C(dhcp), this parameter is ignored. - When C(type) is C(dhcp), this parameter is ignored.
- When C(type) is C(reject), this parameter will be ignored. - When C(type) is C(reject), this parameter will be ignored.
- When C(type) is C(internal), this parameter will be ignored. - When C(type) is C(internal), this parameter will be ignored.
choices: - The name of a SNAT pool (eg "/Common/snat_pool_name") can be specified to enable SNAT
- None with the specific pool.
- Automap - To remove SNAT, specify the word C(none).
- Name of a SNAT pool (eg "/Common/snat_pool_name") to enable SNAT - To specify automap, use the word C(automap).
with the specific pool
default_persistence_profile: default_persistence_profile:
description: description:
- Default Profile which manages the session persistence. - Default Profile which manages the session persistence.

View file

@ -929,28 +929,6 @@ lib/ansible/modules/network/eos/eos_lldp.py E326
lib/ansible/modules/network/eos/eos_logging.py E326 lib/ansible/modules/network/eos/eos_logging.py E326
lib/ansible/modules/network/eos/eos_vlan.py E325 lib/ansible/modules/network/eos/eos_vlan.py E325
lib/ansible/modules/network/eos/eos_vrf.py E325 lib/ansible/modules/network/eos/eos_vrf.py E325
lib/ansible/modules/network/f5/bigip_asm_policy.py E324
lib/ansible/modules/network/f5/bigip_command.py E326
lib/ansible/modules/network/f5/bigip_config.py E324
lib/ansible/modules/network/f5/bigip_device_dns.py E324
lib/ansible/modules/network/f5/bigip_device_dns.py E326
lib/ansible/modules/network/f5/bigip_device_group.py E324
lib/ansible/modules/network/f5/bigip_device_httpd.py E326
lib/ansible/modules/network/f5/bigip_device_ntp.py E324
lib/ansible/modules/network/f5/bigip_device_sshd.py E326
lib/ansible/modules/network/f5/bigip_facts.py E324
lib/ansible/modules/network/f5/bigip_facts.py E326
lib/ansible/modules/network/f5/bigip_gtm_pool.py E324
lib/ansible/modules/network/f5/bigip_gtm_pool.py E326
lib/ansible/modules/network/f5/bigip_gtm_server.py E326
lib/ansible/modules/network/f5/bigip_iapp_service.py E324
lib/ansible/modules/network/f5/bigip_iapp_service.py E325
lib/ansible/modules/network/f5/bigip_monitor_snmp_dca.py E326
lib/ansible/modules/network/f5/bigip_policy.py E324
lib/ansible/modules/network/f5/bigip_profile_client_ssl.py E324
lib/ansible/modules/network/f5/bigip_selfip.py E324
lib/ansible/modules/network/f5/bigip_sys_global.py E326
lib/ansible/modules/network/f5/bigip_virtual_server.py E326
lib/ansible/modules/network/fortimanager/fmgr_script.py E324 lib/ansible/modules/network/fortimanager/fmgr_script.py E324
lib/ansible/modules/network/fortios/fortios_address.py E324 lib/ansible/modules/network/fortios/fortios_address.py E324
lib/ansible/modules/network/illumos/dladm_iptun.py E325 lib/ansible/modules/network/illumos/dladm_iptun.py E325