|
|
@ -36,7 +36,9 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Netmask of the provided virtual address. This value cannot be
|
|
|
|
- Netmask of the provided virtual address. This value cannot be
|
|
|
|
modified after it is set.
|
|
|
|
modified after it is set.
|
|
|
|
default: 255.255.255.255
|
|
|
|
- When creating a new virtual address, if this parameter is not specified, the
|
|
|
|
|
|
|
|
default value is C(255.255.255.255) for IPv4 addresses and
|
|
|
|
|
|
|
|
C(ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff) for IPv6 addresses.
|
|
|
|
connection_limit:
|
|
|
|
connection_limit:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Specifies the number of concurrent connections that the system
|
|
|
|
- Specifies the number of concurrent connections that the system
|
|
|
@ -279,6 +281,7 @@ try:
|
|
|
|
from library.module_utils.network.f5.common import fq_name
|
|
|
|
from library.module_utils.network.f5.common import fq_name
|
|
|
|
from library.module_utils.network.f5.common import f5_argument_spec
|
|
|
|
from library.module_utils.network.f5.common import f5_argument_spec
|
|
|
|
from library.module_utils.network.f5.ipaddress import is_valid_ip
|
|
|
|
from library.module_utils.network.f5.ipaddress import is_valid_ip
|
|
|
|
|
|
|
|
from library.module_utils.network.f5.ipaddress import compress_address
|
|
|
|
from library.module_utils.network.f5.icontrol import tmos_version
|
|
|
|
from library.module_utils.network.f5.icontrol import tmos_version
|
|
|
|
except ImportError:
|
|
|
|
except ImportError:
|
|
|
|
from ansible.module_utils.network.f5.bigip import F5RestClient
|
|
|
|
from ansible.module_utils.network.f5.bigip import F5RestClient
|
|
|
@ -291,6 +294,7 @@ except ImportError:
|
|
|
|
from ansible.module_utils.network.f5.common import fq_name
|
|
|
|
from ansible.module_utils.network.f5.common import fq_name
|
|
|
|
from ansible.module_utils.network.f5.common import f5_argument_spec
|
|
|
|
from ansible.module_utils.network.f5.common import f5_argument_spec
|
|
|
|
from ansible.module_utils.network.f5.ipaddress import is_valid_ip
|
|
|
|
from ansible.module_utils.network.f5.ipaddress import is_valid_ip
|
|
|
|
|
|
|
|
from ansible.module_utils.network.f5.ipaddress import compress_address
|
|
|
|
from ansible.module_utils.network.f5.icontrol import tmos_version
|
|
|
|
from ansible.module_utils.network.f5.icontrol import tmos_version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -487,7 +491,7 @@ class ModuleParameters(Parameters):
|
|
|
|
if self._values['address'] is None:
|
|
|
|
if self._values['address'] is None:
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
if is_valid_ip(self._values['address']):
|
|
|
|
if is_valid_ip(self._values['address']):
|
|
|
|
return self._values['address']
|
|
|
|
return compress_address(self._values['address'])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise F5ModuleError(
|
|
|
|
raise F5ModuleError(
|
|
|
|
"The provided 'address' is not a valid IP address"
|
|
|
|
"The provided 'address' is not a valid IP address"
|
|
|
@ -713,6 +717,7 @@ class ModuleManager(object):
|
|
|
|
|
|
|
|
|
|
|
|
def create(self):
|
|
|
|
def create(self):
|
|
|
|
self._set_changed_options()
|
|
|
|
self._set_changed_options()
|
|
|
|
|
|
|
|
|
|
|
|
if self.want.traffic_group is None:
|
|
|
|
if self.want.traffic_group is None:
|
|
|
|
self.want.update({'traffic_group': '/Common/traffic-group-1'})
|
|
|
|
self.want.update({'traffic_group': '/Common/traffic-group-1'})
|
|
|
|
if self.want.arp is None:
|
|
|
|
if self.want.arp is None:
|
|
|
@ -720,6 +725,12 @@ class ModuleManager(object):
|
|
|
|
if self.want.spanning is None:
|
|
|
|
if self.want.spanning is None:
|
|
|
|
self.want.update({'spanning': False})
|
|
|
|
self.want.update({'spanning': False})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.want.netmask is None:
|
|
|
|
|
|
|
|
if is_valid_ip(self.want.address, type='ipv4'):
|
|
|
|
|
|
|
|
self.want.update({'netmask': '255.255.255.255'})
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.want.update({'netmask': 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff'})
|
|
|
|
|
|
|
|
|
|
|
|
if self.want.arp and self.want.spanning:
|
|
|
|
if self.want.arp and self.want.spanning:
|
|
|
|
raise F5ModuleError(
|
|
|
|
raise F5ModuleError(
|
|
|
|
"'arp' and 'spanning' cannot both be enabled on virtual address."
|
|
|
|
"'arp' and 'spanning' cannot both be enabled on virtual address."
|
|
|
@ -866,10 +877,7 @@ class ArgumentSpec(object):
|
|
|
|
),
|
|
|
|
),
|
|
|
|
name=dict(),
|
|
|
|
name=dict(),
|
|
|
|
address=dict(),
|
|
|
|
address=dict(),
|
|
|
|
netmask=dict(
|
|
|
|
netmask=dict(),
|
|
|
|
type='str',
|
|
|
|
|
|
|
|
default='255.255.255.255',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
connection_limit=dict(
|
|
|
|
connection_limit=dict(
|
|
|
|
type='int'
|
|
|
|
type='int'
|
|
|
|
),
|
|
|
|
),
|
|
|
|