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_member.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
dd
lmZddlmZddlmZddlmZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl m"Z"Wn�e#k
r	ddl$mZddl%mZddl&mZddl&mZddl&mZddl&mZddl&mZddl&mZddl'm!Z!ddl'm"Z"nXdefd��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*��YZ0d+e.fd,��YZ1d-�Z2e3d.kr�e2�nd/S(0i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys-
---
module: bigip_gtm_pool_member
short_description: Manage GTM pool member settings
description:
  - Manages a variety of settings on GTM pool members. The settings that can be
    adjusted with this module are much more broad that what can be done in the
    C(bigip_gtm_pool) module. The pool module is intended to allow you to adjust
    the member order in the pool, not the various settings of the members. The
    C(bigip_gtm_pool_member) module should be used to adjust all of the other
    settings.
version_added: 2.6
options:
  virtual_server:
    description:
      - Specifies the name of the GTM virtual server which is assigned to the specified
        C(server).
    type: str
    required: True
  server_name:
    description:
      - Specifies the GTM server which contains the C(virtual_server).
    type: str
    required: True
  type:
    description:
      - The type of GTM pool that the member is in.
    type: str
    choices:
      - a
      - aaaa
      - cname
      - mx
      - naptr
      - srv
    required: True
  pool:
    description:
      - Name of the GTM pool.
      - For pools created on different partitions, you must specify partition of the pool in the full path format,
        for example, C(/FooBar/pool_name).
    type: str
    required: True
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  member_order:
    description:
      - Specifies the order in which the member will appear in the pool.
      - The system uses this number with load balancing methods that involve prioritizing
        pool members, such as the Ratio load balancing method.
      - When creating a new member using this module, if the C(member_order) parameter
        is not specified, it will default to C(0) (first member in the pool).
    type: int
  monitor:
    description:
      - Specifies the monitor assigned to this pool member.
      - Pool members only support a single monitor.
      - If the C(port) of the C(gtm_virtual_server) is C(*), the accepted values of this
        parameter will be affected.
      - When creating a new pool member, if this parameter is not specified, the default
        of C(default) will be used.
      - To remove the monitor from the pool member, use the value C(none).
      - For pool members created on different partitions, you can also specify the full
        path to the Common monitor. For example, C(/Common/tcp).
    type: str
  ratio:
    description:
      - Specifies the weight of the pool member for load balancing purposes.
    type: int
  description:
    description:
      - The description of the pool member.
    type: str
  aggregate:
    description:
      - List of GTM pool member definitions to be created, modified or removed.
      - When using C(aggregates) if one of the aggregate definitions is invalid, the aggregate run will fail,
        indicating the error it last encountered.
      - The module will C(NOT) rollback any changes it has made prior to encountering the error.
      - The module also will not indicate what changes were made prior to failure, therefore it is strongly advised
        to run the module in check mode to make basic validation, prior to module execution.
    type: list
    aliases:
      - members
    version_added: 2.8
  replace_all_with:
    description:
      - Remove members not defined in the C(aggregate) parameter.
      - This operation is all or none, meaning that it will stop if there are some pool members
        that cannot be removed.
    default: no
    type: bool
    aliases:
      - purge
    version_added: 2.8
  limits:
    description:
      - Specifies resource thresholds or limit requirements at the pool member level.
      - When you enable one or more limit settings, the system then uses that data to take
        members in and out of service.
      - You can define limits for any or all of the limit settings. However, when a
        member does not meet the resource threshold limit requirement, the system marks
        the member as unavailable and directs load-balancing traffic to another resource.
    suboptions:
      bits_enabled:
        description:
          - Whether the bits limit it enabled or not.
          - This parameter allows you to switch on or off the effect of the limit.
        type: bool
      packets_enabled:
        description:
          - Whether the packets limit it enabled or not.
          - This parameter allows you to switch on or off the effect of the limit.
        type: bool
      connections_enabled:
        description:
          - Whether the current connections limit it enabled or not.
          - This parameter allows you to switch on or off the effect of the limit.
        type: bool
      bits_limit:
        description:
          - Specifies the maximum allowable data throughput rate, in bits per second,
            for the member.
          - If the network traffic volume exceeds this limit, the system marks the
            member as unavailable.
        type: int
      packets_limit:
        description:
          - Specifies the maximum allowable data transfer rate, in packets per second,
            for the member.
          - If the network traffic volume exceeds this limit, the system marks the
            member as unavailable.
        type: int
      connections_limit:
        description:
          - Specifies the maximum number of concurrent connections, combined, for all of
            the member.
          - If the connections exceed this limit, the system marks the server as
            unavailable.
        type: int
    type: dict
  state:
    description:
      - Pool member state. When C(present), ensures that the pool member is
        created and enabled. When C(absent), ensures that the pool member is
        removed from the system. When C(enabled) or C(disabled), ensures
        that the pool member is enabled or disabled (respectively) on the remote
        device.
      - It is recommended that you use the C(members) parameter of the C(bigip_gtm_pool)
        module when adding and removing members and it provides an easier way of
        specifying order. If this is not possible, then the C(state) parameter here
        should be used.
      - Remember that the order of the members will be affected if you add or remove them
        using this method. To some extent, this can be controlled using the C(member_order)
        parameter.
    type: str
    choices:
      - present
      - absent
      - enabled
      - disabled
    default: present
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s]
- name: Create a GTM pool member
  bigip_gtm_pool_member:
    pool: pool1
    server_name: server1
    virtual_server: vs1
    type: a
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Create a GTM pool member different partition
  bigip_gtm_pool_member:
    server_name: /Common/foo_name
    virtual_server: GTMVSName
    type: a
    pool: /FooBar/foo-pool
    partition: Common
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Add GTM pool members aggregate
  bigip_gtm_pool_member:
    pool: pool1
    type: a
    aggregate:
      - server_name: server1
        virtual_server: vs1
        partition: Common
        description: web server1
        member_order: 0
      - server_name: server2
        virtual_server: vs2
        partition: Common
        description: web server2
        member_order: 1
      - server_name: server3
        virtual_server: vs3
        partition: Common
        description: web server3
        member_order: 2
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Add GTM pool members aggregate, remove non aggregates
  bigip_gtm_pool_member:
    pool: pool1
    type: a
    aggregate:
      - server_name: server1
        virtual_server: vs1
        partition: Common
        description: web server1
        member_order: 0
      - server_name: server2
        virtual_server: vs2
        partition: Common
        description: web server2
        member_order: 1
      - server_name: server3
        virtual_server: vs3
        partition: Common
        description: web server3
        member_order: 2
    replace_all_with: yes
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost
s�
bits_enabled:
  description: Whether the bits limit is enabled.
  returned: changed
  type: bool
  sample: yes
bits_limit:
  description: The new bits_enabled limit.
  returned: changed
  type: int
  sample: 100
connections_enabled:
  description: Whether the connections limit is enabled.
  returned: changed
  type: bool
  sample: yes
connections_limit:
  description: The new connections_limit limit.
  returned: changed
  type: int
  sample: 100
disabled:
  description: Whether the pool member is disabled or not.
  returned: changed
  type: bool
  sample: yes
enabled:
  description: Whether the pool member is enabled or not.
  returned: changed
  type: bool
  sample: yes
member_order:
  description: The new order in which the member appears in the pool.
  returned: changed
  type: int
  sample: 2
monitor:
  description: The new monitor assigned to the pool member.
  returned: changed
  type: str
  sample: /Common/monitor1
packets_enabled:
  description: Whether the packets limit is enabled.
  returned: changed
  type: bool
  sample: yes
packets_limit:
  description: The new packets_limit limit.
  returned: changed
  type: int
  sample: 100
ratio:
  description: The new weight of the member for load balancing.
  returned: changed
  type: int
  sample: 10
description:
  description: The new description of the member.
  returned: changed
  type: str
  sample: My description
replace_all_with:
  description: Purges all non-aggregate pool members from device
  returned: changed
  type: bool
  sample: yes
(tdeepcopy(turlparse(t
AnsibleModule(tenv_fallback(t	iteritems(tremove_default_spec(t
ip_address(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tflatten_boolean(tmodule_provisioned(tTransactionContextManagert
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6Zddddddd	dd
dddgZddddddddd
dddgZddddddddd
ddgZed��ZRS(t
bits_limittlimitMaxBpstbits_enabledtlimitMaxBpsStatustconnections_limittlimitMaxConnectionstconnections_enabledtlimitMaxConnectionsStatust
packets_limittlimitMaxPpstpackets_enabledtlimitMaxPpsStatustmember_ordertmemberOrdertdisabledtenabledtmonitortratiotdescriptioncC`s(|jddkrdSt|jd�S(NR*(t_valuestNonetint(tself((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR*�s(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR*(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRnsX
			t
ApiParameterscB`s>eZd�Zed��Zed��Zed��ZRS(cC`s:|jddkr|jdS|jd|jd}|S(NtsubPathtname(R,R-(R/tresult((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR9�scC`sd|jkrtStSdS(NR((R,tTruetFalse(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR(�scC`sd|jkrtStS(NR'(R,R;R<(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR'�scC`s(|jddkrdS|jdj�S(NR)(R,R-tstrip(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR)�s(R0R1R9R6R(R'R)(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR7�s	tModuleParameterscB`s�eZd�Zd�Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
ed��Zed��ZRS(
cC`sG|jddkrdS|jd|dkr2dSt|jd|�S(Ntlimits(R,R-R.(R/ttype((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_get_limit_value�s
cC`sK|jddkrdS|jd|dkr2dS|jd|rGdSdS(NR?R(R'(R,R-(R/R@((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_get_limit_status�scC`sdj|j|j�}|S(Ns{0}:{1}(tformattserver_nametvirtual_server(R/R:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR9�scC`s(|jddkrdSt|jd�S(NR@(R,R-tstr(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR@�scC`s6|jddkrtS|jddkr.tSdSdS(NtstateR(R'(R,R;R<R-(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR(�s
cC`s6|jddkrtS|jddkr.tSdSdS(NRGR(R'(R,R<R;R-(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR'�s
cC`s
|jd�S(NR(RA(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�scC`s
|jd�S(NR!(RA(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR!�scC`s
|jd�S(NR(RA(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRscC`s
|jd�S(NR(RB(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRscC`s
|jd�S(NR#(RB(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR#scC`s
|jd�S(NR(RB(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRscC`sE|jddkrdS|jddkr.dSt|j|jd�S(NR)tdefaultt(sdefaultRI(R,R-Rt	partition(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR)s
(R0R1RARBR6R9R@R(R'RR!RRR#RR)(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR>�s					tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R4tgetattrt_filter_paramst	Exception(R/R:t
returnable((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt	to_returns
(R0R1RP(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRKst
UsableChangescB`seZRS((R0R1(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRQ%stReportableChangescB`s&eZed��Zed��ZRS(cC`st|jd�S(NR'(RR,(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR'*scC`st|jd�S(NR((RR,(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR(.s(R0R1R6R'R((((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRR)st
DifferencecB`sDeZdd�Zd�Zd�Zed��Zed��ZRS(cC`s||_||_dS(N(twantthave(R/RTRU((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt__init__4s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RLtAttributeErrort_Difference__default(R/tparamR:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pytcompare8s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RLRTRURW(R/RYtattr1tattr2((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt	__default?s
cC`sN|jjdkr(|jjdkr(dS|jj|jjkrJ|jjSdS(NRI(RTR+RUR-(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR+Hs$cC`sr|jjdkr7|jjr7tdtdt�}|S|jjdkrn|jjrntdtdt�}|SdS(NR(R'(RTRGRUR'tdictR;R<R((R/R:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR(Os		N(	R0R1R-RVRZRXR6R+R((((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRS3s
			t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	dd�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_d|_d|_d|_d|_	t
�|_dS(Ntmodule(tgetR-R`RtparamstclientRTRUtchangestreplace_all_withtlisttpurge_links(R/targstkwargs((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRV`s				cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRb(RR4RLRTR-RQRd(R/tchangedtkey((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_set_changed_optionsis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(NRb(RSRTRURR5R^RZR-t
isinstancetupdateRQRdR;R<(R/tdiffR5Rjtktchange((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_update_changed_optionsqs		
cC`sWt|jd�s!td��nd}|jjdrCt|_n|jjdrk|j|jj�}nt	�}t
}|jr�|jr�|j�t}n|jjdrt
�|d<x�|D]=}|j|�}|dr�|d}n|dj|�q�Wn9|j|jj�}|dr3|d}n|j|�|rSt|d<n|S(Ntgtms+GTM must be provisioned to use this module.Ret	aggregateRj(RRcRR-R`RbR;Retmerge_defaults_for_aggregateR^R<RgtpurgeRftexecutetappendRn(R/twantsR:RjRTtoutput((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pytexec_module�s6	
	







cC`s�t|�}|jd�}x{t|�D]m\}}x^t|�D]P\}}|dkrA|j|d�dkr�|dk	r�||||<q�qAqAWq(W|jr�|j|�n|S(NRtRe(Rtpopt	enumerateRRaR-Retcompare_aggregate_names(R/RbtdefaultsRttitjRptv((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRu�s$	cC`s@t|d|d�}td|d�}dj||�}|S(NRJRDR9REs{0}:{1}(RRC(R/titemRDRER:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_combine_names�scC`s8d|kr$|ddkr$|dSt|d�}|S(NR8R9tfullPath(R-R(R/R�R:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_transform_api_names�scC`s�|j�}|stSg|D]}|j|�^q}g|D]}|j|�^q?}t|�t|�}|r�g|D]%}|j|�|kr}|d^q}}|jj|�ndS(NtselfLink(t_read_purge_collectionR<R�R�tsetRgtextend(R/titemst	on_deviceR�t
aggregatest
collectionRotto_purge((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR~�s""2cC`s�td|�|_t�|_t�|_t}t�}|d}|dkr^|j�}n|dkry|j	�}nt
d|jj��}|j�}|j|�|jtd|��|j
|�|S(	NRbRGtpresentR(R'tabsentRj(spresentsenabledsdisabled(R>RTR7RURQRdR<R^R�R�RRRPRnt_announce_deprecations(R/RbRjR:RGt
reportableRd((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRw�s 	


cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(R|RcR`t	deprecate(R/R:twarningstwarning((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s


cC`s$|j�r|j�S|j�SdS(N(texistsRntcreate(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s
cC`s|j�r|j�StS(N(R�tremoveR<(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s
cC`s|jjrtS|j�tS(N(R`t
check_modeR;tpurge_from_device(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRv�s
cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRUt
should_updateR<R`R�R;tupdate_on_device(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRn�s
cC`s|j�}|rtStS(N(RrR;R<(R/R:((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�scC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(R`R�R;tremove_from_deviceR�R(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�
s
cC`s�|jjdkr,|jjitd6�n,|jjdkrX|jjitd6�n|j�|jjrrtS|j�tS(NR'R�R((spresentsenabled(RTRGRnR;RlR`R�tcreate_on_device(R/((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�s

c	C`s�|j�std��ndj|jjd|jjd|jjtdt|jj	|jj
��t|jj	|jj��}|jjj
|�}y|j�}Wntk
r�tSX|jdks�d|kr�|ddkr�tStS(Ns%The specified GTM pool does not exists4https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/members/{4}tservertserver_portR9i�tcode(t
pool_existRRCRctproviderRTR@RRRJtpoolR9tapiRatjsont
ValueErrorR<RR;(R/turitresptresponse((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR� s 

	!
+cC`s|jrH|jjd}tdt|jjd|jjd��}n0tdt|jj|jj��}|jj}dj	|j
jd|j
jd||�}|j
jj
|�}y|j�}Wntk
r�tSX|jdks	d	|kr
|d	dkr
tStS(
NR@R9RJR�s(https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}R�R�i�R�(ReR`RbRRRTRJR�R@RCRcR�R�RaR�R�R<RR;(R/R@t	pool_nameR�R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�4s$	/$

	
+cC`s$|jjd}tdt|jjd|jjd��}dj|jjd|jjd||�}d}|jjj||�}y|j	�}Wn%t
k
r�}tt|���nXd	|kr|d	d
krd|kr�t|d��qt|j
��nd|kr |dSgS(
NR@R9RJR�s0https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/membersR�R�s'?$select=name,selfLink,fullPath,subPathR�i�tmessageR�(R`RbRRRCRcR�R�RaR�R�RRFtcontent(R/R@R�R�tqueryR�R�tex((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�Ls(,

	c	C`s'|jj�}|jj|d<|jj|d<dj|jjd|jjd|jjt	dt
|jj|jj���}|jjj
|d|�}y|j�}Wn%tk
r�}tt|���nXd|kr|ddkrd
|kr
t|d
��qt|j��n|dS(
NR9RJs1https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/members/R�R�R�R�i�i�R�R�(i�i�(Rdt
api_paramsRTR9RJRCRcR�R@RRR�R�tpostR�R�RRFR�(R/RbR�R�R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�hs$

	'c	C`s|jj�}dj|jjd|jjd|jjtdt|jj	|jj
��t|jj	|jj��}|jjj
|d|�}y|j�}Wn%tk
r�}tt|���nXd|kr|ddkrd|krt|d��qt|j��ndS(	Ns4https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/members/{4}R�R�R9R�R�i�R�(RdR�RCRcR�RTR@RRRJR�R9R�tpatchR�R�RRFR�(R/RbR�R�R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR�s 

	!c	C`s�dj|jjd|jjd|jjtdt|jj|jj��t|jj|jj	��}|jj
j|�}|jdkr�t
St|j��dS(Ns4https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/members/{4}R�R�R9i�(RCRcR�RTR@RRRJR�R9R�tdeleteRR;RR�(R/R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s

	!c	C`sdj|jjd|jjd|jjtdt|jj|jj��t|jj|jj	��}|jj
j|�}y|j�}Wn%t
k
r�}tt|���nXd|kr|ddkrd|kr�t|d��qt|j��ntd|�S(	Ns4https://{0}:{1}/mgmt/tm/gtm/pool/{2}/{3}/members/{4}R�R�R9R�i�R�Rb(RCRcR�RTR@RRRJR�R9R�RaR�R�RRFR�R7(R/R�R�R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s 

	!cC`s�tt|��}t�}g|D]}t|�j^q"}xD|D]<}dj|jjd|jjd|�}|j|�qDW|S(Nshttps://{0}:{1}{2}R�R�(RfR�R	tpathRCRcR�Rx(R/R�tno_dupestlinkstlinktpurge_pathsR�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt_prepare_links�s	"


	c
C`s�|j|j�}t|j���}x�|D]�}|jj|�}y|j�}Wn%tk
rz}tt	|���nXd|kr+|ddkr+d|kr�t|d��q�t|j
��q+q+WWdQXtS(NR�i�R�(R�RgRRcR�R�R�R�RRFR�R;(R/R�ttransactR�R�R�R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��s
N(R0R1RVRlRrR{RuR�R�R~R-RwR�R�R�RvRnR�R�R�R�R�R�R�R�R�R�R�R�(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR__s4					#																			
		tArgumentSpeccB`seZd�ZRS(c!C`sMt|_ddddddg|_tdt�dt�d	td
d�dt�d
td
d�dt�dtd
ddtdtd
d�dtd
d�dtd
d�dtd
d�dtd
d�dtd
d���dtdddddddg�d tdd!d"td#gf��	}t|�}t|�td$td
d%d&dd|d'd(gd)ddggd*ddgg�d+td,t�d
td|jd,t�d-td
dd'd.gdd/�d tdd!d"td#gf��|_|jj|�|jjt	�ddgg|_
dd$gdd$gg|_ddd$gg|_dS(0NtataaaatcnametmxtnaptrtsrvRDRER%R@R.R)R*R+R?R^toptionsRtboolR#RRR!RRGRHR�tchoicesR�R'R(RJtCommontfallbacktF5_PARTITIONRtRftelementstaliasestmemberstrequired_one_oftrequired_togetherR�trequiredReRvtno(
R;tsupports_check_modettypesR^RRR
t
argument_specRnRR�tmutually_exclusiveR�(R/telement_spectaggregate_spec((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyRV�sf					
						(R0R1RV(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyR��scC`s�t�}td|jd|jd|jd|jd|j�}y,td|�}|j�}|j	|�Wn)t
k
r�}|jdt|��nXdS(NR�R�R�R�R�R`R�(
R�R
R�R�R�R�R�R_R{t	exit_jsonRt	fail_jsonRF(tspecR`tmmtresultsR�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pytmain-s					t__main__N(4t
__future__RRRR@t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtcopyRtansible.module_utils.urlsR	tansible.module_utils.basicR
Rtansible.module_utils.sixRt)ansible.module_utils.network.common.utilsR
t%library.module_utils.compat.ipaddressRt%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRRRRRRt(library.module_utils.network.f5.icontrolRRtImportErrort%ansible.module_utils.compat.ipaddresst%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont(ansible.module_utils.network.f5.icontrolRR7R>RKRQRRtobjectRSR_R�R�R0(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_pool_member.pyt<module>s`


�PD
>O
,�{T	

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