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:
- present
- absent
default: present
file:
description:
- 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
the value is set to C(any) then only one of the values must be
satisfied.
choices:
- any
- all
default: all
retries:
description:

View file

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

View file

@ -26,10 +26,11 @@ options:
operation each time a lookup is needed. Please note that this applies
only to Access Policy Manager features, such as ACLs, web application
rewrites, and authentication.
default: disable
choices:
- enabled
- disabled
- enable
- disable
name_servers:
description:
- 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']
),
name_servers=dict(
required=False,
default=None,
type='list'
),
search=dict(
required=False,
default=None,
type='list'
),
ip_version=dict(
required=False,
default=None,
choices=[4, 6],
type='int'
),

View file

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

View file

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

View file

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

View file

@ -24,10 +24,9 @@ options:
- Specifies, if you have enabled SSH access, the IP address or address
range for other systems that can use SSH to communicate with this
system.
choices:
- all
- IP address, such as 172.27.1.10
- IP range, such as 172.27.*.* or 172.27.0.0/255.255.0.0
- To specify all addresses, use the value C(all).
- IP address can be specified, such as 172.27.1.10.
- IP rangees can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
banner:
description:
- 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
description:
- Collect facts from F5 BIG-IP devices via iControl SOAP API
version_added: "1.6"
version_added: 1.6
author:
- Matt Hite (@mhite)
- Tim Rupp (@caphrim007)
@ -36,12 +36,12 @@ options:
description:
- BIG-IP session support; may be useful to avoid concurrency
issues in certain circumstances.
default: no
type: bool
default: 'yes'
include:
description:
- Fact category or list of categories to collect
required: true
required: True
choices:
- address_class
- certificate
@ -83,20 +83,22 @@ import fnmatch
import re
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:
from suds import MethodNotFound, WebFault
except ImportError:
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):
"""F5 iControl class.
@ -1089,6 +1091,9 @@ class AddressClasses(object):
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:
api: iControl API instance.
address_classes: List of address classes.
@ -1107,7 +1112,15 @@ class AddressClasses(object):
def get_address_class(self):
key = self.api.LocalLB.Class.get_address_class(self.address_classes)
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
def get_description(self):
@ -1639,9 +1652,18 @@ def generate_provision_dict(f5):
def main():
argument_spec = f5_argument_spec
meta_args = dict(
session=dict(type='bool', default=False),
include=dict(type='list', required=True),
filter=dict(type='str', required=False),
session=dict(type='bool', default='no'),
include=dict(
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)
@ -1671,7 +1693,11 @@ def main():
regex = fnmatch.translate(fact_filter)
else:
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',
'device', 'device_group', 'interface', 'key', 'node',
'pool', 'provision', 'rule', 'self_ip', 'software',
@ -1679,7 +1705,7 @@ def main():
'virtual_address', 'virtual_server', 'vlan')
include_test = (x in valid_includes for x in include)
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:
facts = {}

View file

@ -31,6 +31,7 @@ options:
- absent
- enabled
- disabled
default: present
preferred_lb_method:
description:
- The load balancing mode that the system tries first.
@ -94,6 +95,7 @@ options:
- drop-packet
- fallback-ip
- virtual-server-score
- none
fallback_ip:
description:
- 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):
self.states = ['absent', 'present', 'enabled', 'disabled']
self.server_types = [
'alteon-ace-director', 'cisco-css', 'cisco-server-load-balancer',
'generic-host', 'radware-wsd', 'windows-nt-4.0', 'bigip',
'cisco-local-director-v2', 'extreme', 'generic-load-balancer',
'sun-solaris', 'cacheflow', 'cisco-local-director-v3',
'foundry-server-iron', 'netapp', 'standalone-bigip',
'redundant-bigip', 'windows-2000-server'
'alteon-ace-director',
'cisco-css',
'cisco-server-load-balancer',
'generic-host',
'radware-wsd',
'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
argument_spec = dict(

View file

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

View file

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

View file

@ -47,6 +47,7 @@ options:
- present
- absent
- draft
default: present
strategy:
description:
- 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
been set, it cannot be changed. By default, this value is the C(clientssl)
parent on the C(Common) partition.
default: "/Common/clientssl"
default: /Common/clientssl
ciphers:
description:
- 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
argument_spec = dict(
name=dict(required=True),
parent=dict(),
parent=dict(default='/Common/clientssl'),
ciphers=dict(),
cert_key_chain=dict(
type='list',

View file

@ -34,8 +34,9 @@ options:
name:
description:
- 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
default: Value of C(address)
netmask:
description:
- 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):
self.supports_check_mode = True
self.states = ['present']
self.on_off_choices = ['enabled', 'disabled', 'True', 'False'] + list(BOOLEANS)
argument_spec = dict(
security_banner=dict(
choices=self.on_off_choices
type='bool'
),
banner_text=dict(),
gui_setup=dict(
choices=self.on_off_choices
type='bool'
),
lcd_display=dict(
choices=self.on_off_choices
type='bool'
),
mgmt_dhcp=dict(
choices=self.on_off_choices
type='bool'
),
net_reboot=dict(
choices=self.on_off_choices
type='bool'
),
quiet_boot=dict(
choices=self.on_off_choices
type='bool'
),
console_timeout=dict(required=False, type='int', default=None),
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(reject), this parameter will be ignored.
- When C(type) is C(internal), this parameter will be ignored.
choices:
- None
- Automap
- Name of a SNAT pool (eg "/Common/snat_pool_name") to enable SNAT
with the specific pool
- The name of a SNAT pool (eg "/Common/snat_pool_name") can be specified to enable SNAT
with the specific pool.
- To remove SNAT, specify the word C(none).
- To specify automap, use the word C(automap).
default_persistence_profile:
description:
- 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_vlan.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/fortios/fortios_address.py E324
lib/ansible/modules/network/illumos/dladm_iptun.py E325