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

�
�Udac@`sSddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZytdd
l
mZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
ridd
lmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZ d e!fd!��YZ"d"e!fd#��YZ#d$e!fd%��YZ$d&�Z%e&d'krOe%�nd(S()i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_profile_oneconnect
short_description: Manage OneConnect profiles on a BIG-IP
description:
  - Manage OneConnect profiles on a BIG-IP.
version_added: 2.7
options:
  name:
    description:
      - Specifies the name of the OneConnect profile.
    type: str
    required: True
  parent:
    description:
      - Specifies the profile from which this profile inherits settings.
      - When creating a new profile, if this parameter is not specified, the default
        is the system-supplied C(oneconnect) profile.
    type: str
  source_mask:
    description:
      - Specifies a value that the system applies to the source address to determine
        its eligibility for reuse.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
      - The system applies the value of this setting to the server-side source address to
        determine its eligibility for reuse.
      - A mask of C(0) causes the system to share reused connections across all source
        addresses. A host mask of C(32) causes the system to share only those reused
        connections originating from the same source address.
      - When you are using a SNAT or SNAT pool, the server-side source address is
        translated first and then the OneConnect mask is applied to the translated address.
    type: str
  description:
    description:
      - Description of the profile.
    type: str
  maximum_size:
    description:
      - Specifies the maximum number of connections that the system holds in the
        connection reuse pool.
      - If the pool is already full, then a server-side connection closes after the
        response is completed.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: int
  maximum_age:
    description:
      - Specifies the maximum number of seconds allowed for a connection in the connection
        reuse pool.
      - For any connection with an age higher than this value, the system removes that
        connection from the re-use pool.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: int
  maximum_reuse:
    description:
      - Specifies the maximum number of times that a server-side connection can be reused.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: int
  idle_timeout_override:
    description:
      - Specifies the number of seconds that a connection is idle before the connection
        flow is eligible for deletion.
      - When creating a new profile, if this parameter is not specified, the default
        is provided by the parent profile.
      - You may specify a number of seconds for the timeout override.
      - When C(disabled), specifies that there is no timeout override for the connection.
      - When C(indefinite), Specifies that a connection may be idle with no timeout
        override.
    type: str
  limit_type:
    description:
      - When C(none), simultaneous in-flight requests and responses over TCP connections
        to a pool member are counted toward the limit. This is the historical behavior.
      - When C(idle), idle connections will be dropped as the TCP connection limit is
        reached. For short intervals, during the overlap of the idle connection being
        dropped and the new connection being established, the TCP connection limit may
        be exceeded.
      - When C(strict), the TCP connection limit is honored with no exceptions. This means
        that idle connections will prevent new TCP connections from being made until
        they expire, even if they could otherwise be reused.
      - C(strict) is not a recommended configuration except in very special cases with
        short expiration timeouts.
      - When creating a new profile, if this parameter is not specified, the default
        is provided by the parent profile.
    type: str
    choices:
      - none
      - idle
      - strict
  share_pools:
    description:
      - Indicates that connections may be shared not only within a virtual server, but
        also among similar virtual servers
      - When C(yes), all virtual servers that use the same OneConnect and other internal
        network profiles can share connections.
      - When creating a new profile, if this parameter is not specified, the default
        is provided by the parent profile.
    type: bool
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the profile exists.
      - When C(absent), ensures the profile is removed.
    type: str
    choices:
      - present
      - absent
    default: present
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
s�
- name: Create a OneConnect profile
  bigip_profile_oneconnect:
    name: foo
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
sI
source_mask:
  description: Value that the system applies to the source address to determine its eligibility for reuse.
  returned: changed
  type: str
  sample: 255.255.255.255
description:
  description: Description of the profile.
  returned: changed
  type: str
  sample: My profile
maximum_size:
  description: Maximum number of connections that the system holds in the connection reuse pool.
  returned: changed
  type: int
  sample: 3000
maximum_age:
  description: Maximum number of seconds allowed for a connection in the connection reuse pool.
  returned: changed
  type: int
  sample: 2000
maximum_reuse:
  description: Maximum number of times that a server-side connection can be reused.
  returned: changed
  type: int
  sample: 1000
idle_timeout_override:
  description: The new idle timeout override.
  returned: changed
  type: str
  sample: disabled
limit_type:
  description: New limit type of the profile.
  returned: changed
  type: str
  sample: idle
share_pools:
  description: Share connections among similar virtual servers.
  returned: changed
  type: bool
  sample: yes
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tis_valid_ipt
Parametersc	B`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6Zddd	ddd
dddg	Zdddddd
dddg	Zdddddd
ddgZRS(tsource_maskt
sourceMasktmaximum_sizetmaxSizet
maximum_reusetmaxReusetmaximum_agetmaxAgetparenttdefaultsFromt
limit_typet	limitTypetidle_timeout_overridetidleTimeoutOverridetshare_poolst
sharePoolstdescription(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR�sF
		t
ApiParameterscB`s&eZed��Zed��ZRS(cC`s9|jddkrdS|jddkr.dS|jdS(NRtanyi(t_valuestNone(tself((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRs
cC`sL|jddkrdSyt|jd�SWntk
rG|jdSXdS(NR(R+R,tintt
ValueError(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRs
(R#R$tpropertyRR(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR)stModuleParameterscB`sDeZed��Zed��Zed��Zed��ZRS(cC`s4|jddkrdSt|j|jd�}|S(NR(R+R,R
t	partition(R-tresult((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRscC`sL|jddkrdSyt|jd�SWntk
rG|jdSXdS(NR(R+R,R.R/(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRs
cC`s�|jddkrdS|jddkr.dSy!t|jd�td��Wntk
rbnXt|jd�r�|jdSdS(NRR*is)'source_mask' must not be in CIDR format.(R+R,R.RR/R(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR's

cC`s2|jddkrdS|jdtkr.dSdS(NR tenabledtdisabled(R+R,tTrue(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR 8s
(R#R$R0RRRR (((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR1s	tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R'tgetattrt_filter_paramst	Exception(R-R3t
returnable((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt	to_returnBs
(R#R$R<(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR7Ast
UsableChangescB`seZRS((R#R$(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR=MstReportableChangescB`s&eZed��Zed��ZRS(cC`s5yt|jd�SWntk
r0|jdSXdS(NR(R.R+R/(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRRs
cC`sI|jddkrdS|jddkr.dS|jddkrEdSdS(NRR4tyesR5tno(R+R,(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR Ys(R#R$R0RR (((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR>Qst
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R-RBRC((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt__init__ds	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R8tAttributeErrort_Difference__default(R-tparamR3((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pytcomparehs

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R8RBRCRE(R-RGtattr1tattr2((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt	__defaultos
cC`s+|jj|jjkr'td��ndS(Ns$The parent profile cannot be changed(RBRRCR(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRxsN(R#R$R,RDRHRFR0R(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRAcs			t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR,RMR
RNtclientR1RBR)RCR=tchanges(R-targstkwargs((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRD�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRN(RR'R8RBR,R=RQ(R-tchangedtkey((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt_set_changed_options�s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(NRN(RARBRCRR(tdictRHR,t
isinstancetupdateR=RQR6tFalse(R-tdiffR(RTtktchange((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(R^R6RZ(R-R3((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt
should_update�scC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRNRT(RZRWRBtstateR`RaR>RQR<RYt_announce_deprecations(R-RTR3Rbt
reportableRQ((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pytexec_module�s	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRPRMt	deprecate(R-R3twarningstwarning((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRc�s


cC`s$|j�r|j�S|j�SdS(N(texistsRYtcreate(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR`�s
cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns3https://{0}:{1}/mgmt/tm/ltm/profile/one-connect/{2}tservertserver_porti�tcode(tformatRPtproviderRRBR2tnametapiROtjsonR/RZRR6(R-turitresptresponse((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRm�s


+cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRCR_RZRMt
check_modeR6tupdate_on_device(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRY�s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RMR{R6tremove_from_deviceRmR(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pytremove�s
cC`s(|j�|jjrtS|j�tS(N(RVRMR{R6tcreate_on_device(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRn�s


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|dS(NRtR2s0https://{0}:{1}/mgmt/tm/ltm/profile/one-connect/RoRpRvRqi�i�i�tmessagetselfLink(i�i�i�(RQt
api_paramsRBRtR2RrRPRsRutpostRvR/Rtstrtcontent(R-RNRwRxRytex((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR�s 
cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|dd	kr�d|kr�t
|d��q�t
|j��ndS(
Ns3https://{0}:{1}/mgmt/tm/ltm/profile/one-connect/{2}RoRpRvRqi�i�R�(i�i�(RQR�RrRPRsRRBR2RtRutpatchRvR/RR�R�(R-RNRwRxRyR�((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR|s

cC`s|j�r|j�StS(N(RmR~RZ(R-((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRas
cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns3https://{0}:{1}/mgmt/tm/ltm/profile/one-connect/{2}RoRpi�(
RrRPRsRRBR2RtRutdeleteRR6RR�(R-RwRy((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR}s

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(Ns3https://{0}:{1}/mgmt/tm/ltm/profile/one-connect/{2}RoRpRqi�R�RN(RrRPRsRRBR2RtRuRORvR/RR�R�R)(R-RwRxRyR�((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRz&s

(R#R$RDRVR^R_ReRcR`RmRYR~RnRR|RaR}Rz(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRL�s 																tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdt�dt�dt�dt�dtdd�d	tdd�d
tdd�dtdd
ddg�dt�dtdd�dtdddddg�dtdddtdgf��}i|_|jjt�|jj|�dS(NRttrequiredR"RRRttypeR.RRRtchoicestnonetidletstrictRR tboolRbtdefaultR`RaR2tCommontfallbacktF5_PARTITION(R6tsupports_check_modeRWR	t
argument_specRYR(R-R�((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyRD;s,						(R#R$RD(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyR�:scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RMRg(
R�RR�R�RLRet	exit_jsonRt	fail_jsonR�(tspecRMtmmtresultsR�((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pytmainXs		t__main__N('t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	t%library.module_utils.network.f5.bigipR
t&library.module_utils.network.f5.commonRRR
RRt)library.module_utils.network.f5.ipaddressRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont)ansible.module_utils.network.f5.ipaddressRR)R1R7R=R>tobjectRARLR�R�R#(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_oneconnect.pyt<module>sJ


x+
0+�	

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