Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/f5/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dd
lmZddlmZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddl mZddl mZddl mZddl mZddl mZddl!mZddl!mZddl"mZnXdefd��YZ#de#fd��YZ$de#fd��YZ%de#fd��YZ&d e&fd!��YZ'd"e&fd#��YZ(d$e)fd%��YZ*d&e)fd'��YZ+d(e)fd)��YZ,d*e,fd+��YZ-d,e,fd-��YZ.d.e)fd/��YZ/d0�Z0e1d1kr�e0�ndS(2i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	certifiedtsupported_bys:
---
module: bigip_gtm_pool
short_description: Manages F5 BIG-IP GTM pools
description:
    - Manages F5 BIG-IP GTM pools.
version_added: 2.4
options:
  state:
    description:
      - Pool state. When C(present), ensures that the pool is created and enabled.
        When C(absent), ensures that the pool is removed from the system. When
        C(enabled) or C(disabled), ensures that the pool is enabled or disabled
        (respectively) on the remote device.
    type: str
    choices:
      - present
      - absent
      - enabled
      - disabled
    default: present
  preferred_lb_method:
    description:
      - The load balancing mode that the system tries first.
    type: str
    choices:
      - round-robin
      - return-to-dns
      - ratio
      - topology
      - static-persistence
      - global-availability
      - virtual-server-capacity
      - least-connections
      - lowest-round-trip-time
      - fewest-hops
      - packet-rate
      - cpu
      - completion-rate
      - quality-of-service
      - kilobytes-per-second
      - drop-packet
      - fallback-ip
      - virtual-server-score
  alternate_lb_method:
    description:
      - The load balancing mode that the system tries if the
        C(preferred_lb_method) is unsuccessful in picking a pool.
    type: str
    choices:
      - round-robin
      - return-to-dns
      - none
      - ratio
      - topology
      - static-persistence
      - global-availability
      - virtual-server-capacity
      - packet-rate
      - drop-packet
      - fallback-ip
      - virtual-server-score
  fallback_lb_method:
    description:
      - The load balancing mode that the system tries if both the
        C(preferred_lb_method) and C(alternate_lb_method)s are unsuccessful
        in picking a pool.
    type: str
    choices:
      - round-robin
      - return-to-dns
      - ratio
      - topology
      - static-persistence
      - global-availability
      - virtual-server-capacity
      - least-connections
      - lowest-round-trip-time
      - fewest-hops
      - packet-rate
      - cpu
      - completion-rate
      - quality-of-service
      - kilobytes-per-second
      - drop-packet
      - fallback-ip
      - virtual-server-score
      - none
  fallback_ip:
    description:
      - Specifies the IPv4, or IPv6 address of the server to which the system
        directs requests when it cannot use one of its pools to do so.
        Note that the system uses the fallback IP only if you select the
        C(fallback_ip) load balancing method.
    type: str
  type:
    description:
      - The type of GTM pool that you want to create. On BIG-IP releases
        prior to version 12, this parameter is not required. On later versions
        of BIG-IP, this is a required parameter.
    type: str
    choices:
      - a
      - aaaa
      - cname
      - mx
      - naptr
      - srv
  name:
    description:
      - Name of the GTM pool.
    type: str
    required: True
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
    version_added: 2.5
  members:
    description:
      - Members to assign to the pool.
      - The order of the members in this list is the order that they will be listed in the pool.
    suboptions:
      server:
        description:
          - Name of the server which the pool member is a part of.
        type: str
        required: True
      virtual_server:
        description:
          - Name of the virtual server, associated with the server, that the pool member is a part of.
        type: str
        required: True
    type: list
    version_added: 2.6
  monitors:
    description:
      - Specifies the health monitors that the system currently uses to monitor this resource.
      - When C(availability_requirements.type) is C(require), you may only have a single monitor in the
        C(monitors) list.
    type: list
    version_added: 2.6
  availability_requirements:
    description:
      - Specifies, if you activate more than one health monitor, the number of health
        monitors that must receive successful responses in order for the link to be
        considered available.
    suboptions:
      type:
        description:
          - Monitor rule type when C(monitors) is specified.
          - When creating a new pool, if this value is not specified, the default of 'all' will be used.
        type: str
        choices:
          - all
          - at_least
          - require
      at_least:
        description:
          - Specifies the minimum number of active health monitors that must be successful
            before the link is considered up.
          - This parameter is only relevant when a C(type) of C(at_least) is used.
          - This parameter will be ignored if a type of either C(all) or C(require) is used.
        type: int
      number_of_probes:
        description:
          - Specifies the minimum number of probes that must succeed for this server to be declared up.
          - When creating a new virtual server, if this parameter is specified, then the C(number_of_probers)
            parameter must also be specified.
          - The value of this parameter should always be B(lower) than, or B(equal to), the value of C(number_of_probers).
          - This parameter is only relevant when a C(type) of C(require) is used.
          - This parameter will be ignored if a type of either C(all) or C(at_least) is used.
        type: int
      number_of_probers:
        description:
          - Specifies the number of probers that should be used when running probes.
          - When creating a new virtual server, if this parameter is specified, then the C(number_of_probes)
            parameter must also be specified.
          - The value of this parameter should always be B(higher) than, or B(equal to), the value of C(number_of_probers).
          - This parameter is only relevant when a C(type) of C(require) is used.
          - This parameter will be ignored if a type of either C(all) or C(at_least) is used.
        type: int
    type: dict
    version_added: 2.6
  max_answers_returned:
    description:
      - Specifies the maximum number of available virtual servers that the system lists in a response.
      - The maximum is 500.
    type: int
    version_added: 2.8
  ttl:
    description:
      - Specifies the number of seconds that the IP address, once found, is valid.
    type: int
    version_added: 2.8
notes:
  - Support for TMOS versions below v12.x has been deprecated for this module, and will be removed in Ansible 2.12.
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
si
- name: Create a GTM pool
  bigip_gtm_pool:
    name: my_pool
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Disable pool
  bigip_gtm_pool:
    state: disabled
    name: my_pool
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
s�
preferred_lb_method:
  description: New preferred load balancing method for the pool.
  returned: changed
  type: str
  sample: topology
alternate_lb_method:
  description: New alternate load balancing method for the pool.
  returned: changed
  type: str
  sample: drop-packet
fallback_lb_method:
  description: New fallback load balancing method for the pool.
  returned: changed
  type: str
  sample: fewest-hops
fallback_ip:
  description: New fallback IP used when load balancing using the C(fallback_ip) method.
  returned: changed
  type: str
  sample: 10.10.10.10
monitors:
  description: The new list of monitors for the resource.
  returned: changed
  type: list
  sample: ['/Common/monitor1', '/Common/monitor2']
members:
  description: List of members in the pool.
  returned: changed
  type: complex
  contains:
    server:
      description: The name of the server portion of the member.
      returned: changed
      type: str
    virtual_server:
      description: The name of the virtual server portion of the member.
      returned: changed
      type: str
max_answers_returned:
  description: The new Maximum Answers Returned value.
  returned: changed
  type: int
  sample: 25
N(t
AnsibleModule(tenv_fallback(tLooseVersion(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(ttmos_version(tmodule_provisioned(tis_valid_ipt
Parametersc
B`s#eZi
dd6dd6dd6dd6dd	6dd
6dd6dd
6dd6dd6Zdddddddddg	ZdddddddddddgZddddd	d
dddddddg
Zed��Zed��Zed��Z	ed��Z
ed��Zed��ZRS(tpreferred_lb_methodtloadBalancingModetalternate_lb_methodt
alternateModetfallback_lb_methodtfallbackModetverify_member_availabilitytverifyMemberAvailabilitytfallback_iptfallbackIpv4tfallbackIpv6t
fallbackIptmemberstmembersReferencetmonitorstmonitortmax_answers_returnedtmaxAnswersReturnedtstatetttltenabledtdisabledtavailability_requirementscC`s(|jddkrdSt|jd�S(Nttype(t_valuestNonetstr(tself((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR,sscC`s0|jddkrdS|jdr(dSdSdS(NRR)R*(R-R.(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRys

cC`ss|jddkrdS|jddkr.dS|jddkrEdSt|jd�rc|jdStd��dS(NRtanytany6s9The provided fallback address is not a valid IPv4 address(R-R.RR(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�scC`s"|jddkrdS|jdS(NR'R)tpresent(R-(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR'�scC`s|jddkrdStS(NR)(R-R.tTrue(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR)�scC`s|jddkrdStS(NR*(R-R.R4(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR*�s(
t__name__t
__module__tapi_mapt
updatablestreturnablestapi_attributestpropertyR,RRR'R)R*(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR;sd
				t
ApiParameterscB`sqeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	RS(c	C`s�g}|jddks,d|jdkr0gSx=|jddD]*}|jtd|dd|d��qBWgt|dd��D]}|d^q�}|S(	NR!titemstitemtfullPathtordertmemberOrdertkeycS`s|dS(NR@((tk((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt<lambda>�s(R-R.tappendtdicttsorted(R0tresultR>tx((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR!�s&(,cC`sM|jddkrdSd|jdkr.dSd|jdkrEdSdSdS(NR#smin tat_leastsrequire trequiretall(R-R.(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pytavailability_requirement_type�scC`sb|jddkrgSy+tjd|jd�}|j�|SWntk
r]|jdSXdS(NR#s/\w+/[^\s}]+(R-R.tretfindalltsortt	Exception(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt
monitors_list�s

cC`s�|jddkrdS|jddkr.dSg|jD]}t|j|�^q8}|jdkr�dj|�}dj|j|�}nQ|jdkr�dj|�}dj|j	|j
|�}ndj|�j�}|S(	NR#tdefaultRJt smin {0} of {{ {1} }}RKsrequire {0} from {1} {{ {2} }}s and (R-R.RRRt	partitionRMtjointformatRJtnumber_of_probestnumber_of_proberststrip(R0RIR#RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR#�s(cC`sS|jddkrdSd}tj||jd�}|dkrFdS|jd�S(s�Returns the probes value from the monitor string.

        The monitor string for a Require monitor looks like this.

            require 1 from 2 { /Common/tcp }

        This method parses out the first of the numeric values. This values represents
        the "probes" value that can be updated in the module.

        Returns:
             int: The probes value if found. None otherwise.
        R#s require\s+(?P<probes>\d+)\s+fromtprobesN(R-R.RNtsearchtgroup(R0tpatterntmatches((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRX�scC`sS|jddkrdSd}tj||jd�}|dkrFdS|jd�S(s�Returns the probers value from the monitor string.

        The monitor string for a Require monitor looks like this.

            require 1 from 2 { /Common/tcp }

        This method parses out the first of the numeric values. This values represents
        the "probers" value that can be updated in the module.

        Returns:
             int: The probers value if found. None otherwise.
        R#s*require\s+\d+\s+from\s+(?P<probers>\d+)\s+tprobersN(R-R.RNR\R](R0R^R_((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRY�scC`sS|jddkrdSd}tj||jd�}|dkrFdS|jd�S(s�Returns the 'at least' value from the monitor string.

        The monitor string for a Require monitor looks like this.

            min 1 of { /Common/gateway_icmp }

        This method parses out the first of the numeric values. This values represents
        the "at_least" value that can be updated in the module.

        Returns:
             int: The at_least value if found. None otherwise.
        R#smin\s+(?P<least>\d+)\s+of\s+tleastN(R-R.RNR\R](R0R^R_((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRJs(
R5R6R;R!RMRRR#RXRYRJ(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR<�s
tModuleParameterscB`szeZd�Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
RS(cC`sG|jddkrdS|jd|dkr2dSt|jd|�S(NR+(R-R.tint(R0R,((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt_get_availability_values
cC`s�|jddkrdSt|jd�dkrK|jdddkrKgSg}x�|jdD]�}d|kr�td��nd|kr�td��nd	j|d|d�}t|j|�}||kr�q_n|j|�q_Wt|�}|S(
NR!iittservers=One of the provided members is missing a 'server' sub-option.tvirtual_serversEOne of the provided members is missing a 'virtual_server' sub-option.s{0}:{1}(	R-R.tlenRRWRRUREtlist(R0RHtmembertname((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR!!s&0cC`sb|jddkrgSy+tjd|jd�}|j�|SWntk
r]|jdSXdS(NR#s/\w+/[^\s}]+(R-R.RNRORPRQ(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRR9s

cC`sF|jddkrdSt|jd�dkrK|jdddkrKdSg|jD]}t|j|�^qU}|jdkr�|jt|j�kr�td��ndj	|�}d	j
|j|�}nr|jd
kr-dj	|�}|j|jkrtd��ndj
|j|j|�}nd
j	|�j
�}|S(NR#iiReRSRJs>The 'at_least' value must not exceed the number of 'monitors'.RTsmin {0} of {{ {1} }}RKs?The 'number_of_probes' must not exceed the 'number_of_probers'.srequire {0} from {1} {{ {2} }}s and (R-R.RhRRRRURMRJRRVRWRXRYRZ(R0RIR#RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR#Ds&0(cC`s&|jddkrdS|jddS(NR+R,(R-R.(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRM^scC`s
|jd�S(NRX(Rd(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRXdscC`s
|jd�S(NRY(Rd(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRYhscC`s
|jd�S(NRJ(Rd(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRJls(R5R6RdR;R!RRR#RMRXRYRJ(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRbs	tChangescB`seZd�ZRS(cC`s@i}x$|jD]}t||�||<qW|j|�}|S(N(R9tgetattrt_filter_params(R0RHt
returnable((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt	to_returnrs
(R5R6Rp(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRlqst
UsableChangescB`s&eZed��Zed��ZRS(cC`sd|jd}|dkrdSd|kr`dr`|jd�jd�}dj|�j�}|S|S(NR#t{t}Re(R-R.RZtsplitRVtrstrip(R0tmonitor_stringttmpR$((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR#{s
cC`sgg}|jddkrdSxCt|jd�D].\}}td|d|�}|j|�q1W|S(NR!RkRA(R-R.t	enumerateRFRE(R0tresultstidxRjRH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR!�s 	(R5R6R;R#R!(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRqzstReportableChangescB`sqeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	RS(c
C`s�g}|jddkrdSx`|jdD]Q}|jd�}|jtdt|j|d�dt|j|d���q+W|S(NR!t:RfiRgi(R-R.RtRERFRRU(R0RyRjtparts((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR!�scC`sb|jddkrgSy+tjd|jd�}|j�|SWntk
r]|jdSXdS(NR#s/\w+/[^\s}]+(R-R.RNRORPRQ(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR#�s

cC`sM|jddkrdSd|jdkr.dSd|jdkrEdSdSdS(NR#smin RJsrequire RKRL(R-R.(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRM�scC`sY|jddkrdSd}tj||jd�}|dkrFdSt|jd��S(s�Returns the probes value from the monitor string.
        The monitor string for a Require monitor looks like this.
            require 1 from 2 { /Common/tcp }
        This method parses out the first of the numeric values. This values represents
        the "probes" value that can be updated in the module.
        Returns:
             int: The probes value if found. None otherwise.
        R#s require\s+(?P<probes>\d+)\s+fromR[N(R-R.RNR\RcR](R0R^R_((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRX�s
cC`sY|jddkrdSd}tj||jd�}|dkrFdSt|jd��S(s�Returns the probers value from the monitor string.
        The monitor string for a Require monitor looks like this.
            require 1 from 2 { /Common/tcp }
        This method parses out the first of the numeric values. This values represents
        the "probers" value that can be updated in the module.
        Returns:
             int: The probers value if found. None otherwise.
        R#s*require\s+\d+\s+from\s+(?P<probers>\d+)\s+R`N(R-R.RNR\RcR](R0R^R_((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRY�s
cC`sY|jddkrdSd}tj||jd�}|dkrFdSt|jd��S(s�Returns the 'at least' value from the monitor string.
        The monitor string for a Require monitor looks like this.
            min 1 of { /Common/gateway_icmp }
        This method parses out the first of the numeric values. This values represents
        the "at_least" value that can be updated in the module.
        Returns:
             int: The at_least value if found. None otherwise.
        R#smin\s+(?P<least>\d+)\s+of\s+RaN(R-R.RNR\RcR](R0R^R_((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyRJ�s
cC`sX|jddkrdSt�}|j|d<|j|d<|j|d<|j|d<|S(NR#R,RJRYRX(R-R.RFRMRJRYRX(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR+�s	



(
R5R6R;R!R#RMRXRYRJR+(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR{�s
t
DifferencecB`sDeZdd�Zd�Zd�Zed��Zed��ZRS(cC`s||_||_dS(N(twantthave(R0RR�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RmtAttributeErrort_Difference__default(R0tparamRH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RmRR�R�(R0R�tattr1tattr2((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt	__defaults
cC`sZ|jjdkr+|jjr+tdt�S|jjdkrV|jjrVtdt�SdS(NR*R3R)(spresentsenabled(RR'R�R)RFR4R*(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR'scC`s�|jjdkrdS|jjdkr>|jjdkr>dS|jjdkrf|jjdkrfdS|jjdkr�t|jj�dkr�dS|jjdkr�|jjS|jj|jjkr�|jjSdS(NRSi(RR#R.R�Rh(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR#s$$*
N(	R5R6R.R�R�R�R;R'R#(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR~�s
			t
ModuleManagercB`s,eZd�Zd�Zd�Zd�ZRS(cO`s7|jdd�|_t|jj�|_||_dS(Ntmodule(tgetR.R�Rtparamstclienttkwargs(R0targsR�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�+scC`sXt|jd�s!td��n|j�r?|jd�}n|jd�}|j�S(Ntgtms+GTM must be provisioned to use this module.tuntypedttyped(RR�Rtversion_is_less_than_12tget_managertexec_module(R0tmanager((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�0scC`s6|dkrt|j�S|dkr2t|j�SdS(NR�R�(tTypedManagerR�tUntypedManager(R0R,((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�;s
cC`s3t|j�}t|�td�kr+tStSdS(Ns12.0.0(RR�R
R4tFalse(R0tversion((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�As(R5R6R�R�R�R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�*s			tBaseManagercB`s}eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�ZRS(
cO`s[|jdd�|_t|jj�|_d|_td|jj�|_t	�|_
dS(NR�R�(R�R.R�RR�R�R�RbRRqtchanges(R0R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�Js
	cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR�(RR9RmRR.RqR�(R0tchangedRB((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt_set_changed_optionsQscC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_tSt
S(NR�(R~RR�RR8RFR�R.t
isinstancetupdateRqR�R4R�(R0tdiffR8R�RCtchange((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt_update_changed_optionsYs		
cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NR3R*tabsentR�R�(spresentsdisabled(R�RFRR'R3R�R{R�RpR�t_announce_deprecations(R0R�RHR't
reportableR�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�ks	

cC`sd|jdg�}|j�r.|j|�nx/|D]'}|jjd|dd|d�q5WdS(Nt
__warningstmsgR�(tpopR�t_deprecate_v11R�t	deprecate(R0RHtwarningstwarning((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�|s

cC`s3t|j�}t|�td�kr+tStSdS(Ns12.0.0(RR�R
R4R�(R0R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��scC`s |jtdddd��dS(NR�s0The support for this TMOS version is deprecated.R�s2.12(RERF(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��scC`s$|j�r|j�S|j�SdS(N(texistsR�tcreate(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR3�s
cC`s|j�r|j�StS(N(R�tremoveR�(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s
cC`s|j�}|rtStS(N(R�R4R�(R0RH((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt
should_update�scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR�R�R�R�t
check_modeR4tupdate_on_device(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s
cC`s�|jjdkr,|jjitd6�n,|jjdkrX|jjitd6�n|j�|jjdkr�t|jj�dkr�td��n|j	j
r�tS|j�|j�r�tStd��dS(	NR*R3R)RKisZOnly one monitor may be specified when using an availability_requirement type of 'require'sFailed to create the GTM pool(spresentsenabled(
RR'R�R4R�RMRhRRRR�R�tcreate_on_deviceR�(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s
*
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the GTM pool(R�R�R4tremove_from_deviceR�R(R0((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s
(R5R6R�R�R�R�R�R�R�R3R�R�R�R�R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�Is					
								R�cB`sGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cO`s;tt|�j|�|jjdkr7td��ndS(NsPThe 'type' option is required for BIG-IP instances greater than or equal to 12.x(tsuperR�R�RR,R.R(R0R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��scC`smddddddg}|jjdkr9td��n!|jj|krZtd��ntt|�j�S(	NtataaaatcnametmxtnaptrtsrvsA pool 'type' must be specifieds"The specified pool type is invalid(RR,R.RR�R�R3(R0ttypes((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR3�scC`s�dj|jjd|jjd|jjt|jj|jj��}|jjj	|�}y|j
�}Wntk
r�tSX|j
dks�d|kr�|ddkr�tStS(Ns(https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}Rftserver_porti�tcode(RWR�tproviderRR,RRURktapiR�tjsont
ValueErrorR�RR4(R0turitresptresponse((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s

	
+cC`s�|jj�}dj|jjd|jjd|jjt|jj|jj	��}|jj
j|d|�}y|j�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j��ndS(Ns(https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}RfR�R�R�i�tmessage(R�t
api_paramsRWR�R�RR,RRURkR�tpatchR�R�RR/tcontent(R0R�R�R�R�tex((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s

	cC`s�dj|jjd|jjd|jjt|jj|jj��}d}|jjj	||�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d|kr�t|d��q�t|j��ntd|�S(	Ns(https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}RfR�s?expandSubcollections=trueR�i�R�R�(RWR�R�RR,RRURkR�R�R�R�RR/R�R<(R0R�tqueryR�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�	s 

	cC`s|jj�}|jj|d<|jj|d<dj|jjd|jjd|jj�}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d
|kr�t
|d
��q�t
|j��n|dS(
NRkRUs$https://{0}:{1}/mgmt/tm/gtm/pool/{2}RfR�R�R�i�i�R�tselfLink(i�i�(R�R�RRkRURWR�R�R,R�tpostR�R�RR/R�(R0R�R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR� s"

cC`s�dj|jjd|jjd|jjt|jj|jj��}|jjj	|�}|j
dkrotSt|j
��dS(Ns(https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}RfR�i�(RWR�R�RR,RRURkR�tdeleteRR4RR�(R0R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�6s

	(	R5R6R�R3R�R�R�R�R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s						R�cB`s5eZd�Zd�Zd�Zd�Zd�ZRS(cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns$https://{0}:{1}/mgmt/tm/gtm/pool/{2}RfR�i�R�(RWR�R�RRRURkR�R�R�R�R�RR4(R0R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�Ds


+cC`s�|jj�}|jj|d<|jj|d<dj|jjd|jjd�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d
|kr�t|d
��q�t|j��n|dS(
NRkRUs!https://{0}:{1}/mgmt/tm/gtm/pool/RfR�R�R�i�i�R�R�(i�i�(R�R�RRkRURWR�R�R�R�R�R�RR/R�(R0R�R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�Ss 
cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d|kr�t
|d��q�t
|j��ndS(Ns$https://{0}:{1}/mgmt/tm/gtm/pool/{2}RfR�R�R�i�R�(R�R�RWR�R�RRRURkR�R�R�R�RR/R�(R0R�R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�hs

cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j
��ntd|�S(Ns$https://{0}:{1}/mgmt/tm/gtm/pool/{2}RfR�R�i�R�R�(RWR�R�RRRURkR�R�R�R�RR/R�R<(R0R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�{s

cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns$https://{0}:{1}/mgmt/tm/gtm/pool/{2}RfR�i�(
RWR�R�RRRURkR�R�RR4RR�(R0R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��s

(R5R6R�R�R�R�R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR�Cs
				tArgumentSpeccB`seZd�ZRS(c#C`s�ddddg|_ddddd	d
ddd
dddddddddg|_dddddd	d
dddddg|_tj|j�|_|jjd�ddddddg|_t|_t	dt	dt�d t	d!dd"|j�d#t	d"|j�d$t	d"|j�d%t	d"|j�d&t	�d't	d"|j�d(t	d!d)d*t
d+gf�d,t	d'd-d.t	d/t	dt�d0t	dt���d1t	d'd2d.t	d't	d"d3d4d5gdt�d4t	d'd6�d7t	d'd6�d8t	d'd6��d9d4d7gd4d8ggd:d'd4d4ggd'd5d7d8ggg�d;t	d'd-�d<t	d'd6�d=t	d'd6��
}i|_|jjt
�|jj|�d#dd&ggd$dd&ggd%dd&ggg|_dS(>NR�R3R)R*sround-robins
return-to-dnstratiottopologysstatic-persistencesglobal-availabilitysvirtual-server-capacitysleast-connectionsslowest-round-trip-timesfewest-hopsspacket-ratetcpuscompletion-ratesquality-of-serviceskilobytes-per-secondsdrop-packetsfallback-ipsvirtual-server-scoretnoneR�R�R�R�R�R�RktrequiredR'RStchoicesRRRRR,RUtCommontfallbacktF5_PARTITIONR!RitoptionsRfRgR+RFRLRJRKRcRXRYtmutually_exclusivetrequired_ifR#R%R((tstatestpreferred_lb_methodstalternate_lb_methodstcopytfallback_lb_methodsRER�R4tsupports_check_modeRFR	t
argument_specR�RR�(R0R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��sv							(R5R6R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyR��scC`s�t�}td|jd|jd|j�}y,td|�}|j�}|j|�Wn)tk
r�}|j	dt
|��nXdS(NR�R�R�R�R�(R�RR�R�R�R�R�t	exit_jsonRt	fail_jsonR/(tspecR�tmmRyR�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pytmain�s			t__main__(2t
__future__RRRR,t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR�RNtansible.module_utils.basicRR	tdistutils.versionR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRRt(library.module_utils.network.f5.icontrolRRt)library.module_utils.network.f5.ipaddressRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont(ansible.module_utils.network.f5.icontrolt)ansible.module_utils.network.f5.ipaddressRR<RbRlRqR{tobjectR~R�R�R�R�R�R�R5(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool.pyt<module>s^


�.
iuX	f0�vWW	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]