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_tcp.pyc

�
�Udac@`sSddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZytdd
l
mZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
ridd
lmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZd efd!��YZ d"efd#��YZ!d$efd%��YZ"d&�Z#e$d'krOe#�nd(S()i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys-
---
module: bigip_profile_tcp
short_description: Manage TCP profiles on a BIG-IP
description:
  - Manage TCP profiles on a BIG-IP. Many TCP profiles; each with their
    own adjustments to the standard C(tcp) profile. Users of this module should be aware
    that many of the adjustable knobs have no module default. Instead, the default is
    assigned by the BIG-IP system itself which, in most cases, is acceptable.
version_added: 2.6
options:
  name:
    description:
      - Specifies the name of the 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(tcp) profile.
    type: str
  idle_timeout:
    description:
      - Specifies the length of time that a connection is idle (has no traffic) before
        the connection is eligible for deletion.
      - When creating a new profile, if this parameter is not specified, the remote
        device will choose a default value appropriate for the profile, based on its
        C(parent) profile.
      - When a number is specified, indicates the number of seconds that the TCP
        connection can remain idle before the system deletes it.
      - When C(0), or C(indefinite), specifies that the system does not delete TCP connections
        regardless of how long they remain idle.
    type: str
  time_wait_recycle:
    description:
      - Specifies that connections in a TIME-WAIT state are reused, if a SYN packet,
        indicating a request for a new connection, is received.
      - When C(no), connections in a TIME-WAIT state remain unused for a specified length of time.
      - When creating a new profile, if this parameter is not specified, the default
        is provided by the parent profile.
    type: bool
    version_added: 2.7
  nagle:
    description:
      - When C(enabled) the system applies Nagle's algorithm to reduce the number of short segments on the network.
      - When C(auto), the use of Nagle's algorithm is decided based on network conditions.
      - Note that for interactive protocols such as Telnet, rlogin, or SSH, F5 recommends disabling this setting on
        high-latency networks, to improve application responsiveness.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: str
    choices:
      - auto
      - enabled
      - disabled
    version_added: 2.9
  early_retransmit:
    description:
      - When C(yes) the system uses early fast retransmits to reduce the recovery time for connections that are
        receive-buffer or user-data limited.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: bool
    version_added: 2.9
  proxy_options:
    description:
      - When C(yes) the system advertises an option, such as a time-stamp to the server only if it was negotiated
        with the client.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: bool
    version_added: 2.9
  initial_congestion_window_size:
    description:
      - Specifies the initial congestion window size for connections to this destination. The actual window size is
        this value multiplied by the MSS for the same connection.
      - When set to C(0) the system uses the values specified in RFC2414.
      - The valid value range is 0 - 16 inclusive.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: int
    version_added: 2.9
  initial_receive_window_size:
    description:
      - Specifies the initial receive window size for connections to this destination. The actual window size is
        this value multiplied by the MSS for the same connection.
      - When set to C(0) the system uses the Slow Start value.
      - The valid value range is 0 - 16 inclusive.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: int
    version_added: 2.9
  syn_rto_base:
    description:
      - Specifies the initial RTO C(Retransmission TimeOut) base multiplier for SYN retransmission, in C(milliseconds).
      - This value is modified by the exponential backoff table to select the interval for subsequent retransmissions.
      - The valid value range is 0 - 5000 inclusive.
      - When creating a new profile, if this parameter is not specified, the default is provided by the parent profile.
    type: int
    version_added: 2.9
  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)
  - Wojciech Wypior (@wojtek0806)
s
- name: Create a TCP profile
  bigip_profile_tcp:
    name: foo
    parent: f5-tcp-progressive
    time_wait_recycle: no
    idle_timeout: 300
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
s�
parent:
  description: The new parent of the resource.
  returned: changed
  type: str
  sample: f5-tcp-optimized
idle_timeout:
  description: The new idle timeout of the resource.
  returned: changed
  type: int
  sample: 100
time_wait_recycle:
  description: Reuse connections in TIME-WAIT state.
  returned: changed
  type: bool
  sample: yes
nagle:
  description: Specifies the use of Nagle's algorithm.
  returned: changed
  type: str
  sample: auto
early_retransmit:
  description: Specifies the use of early fast retransmits.
  returned: changed
  type: bool
  sample: yes
proxy_options:
  description: Specifies if that the system advertises negotiated options to the server.
  returned: changed
  type: bool
  sample: no
initial_congestion_window_size:
  description: Specifies the initial congestion window size for connections to this destination.
  returned: changed
  type: int
  sample: 5
initial_receive_window_size:
  description: Specifies the initial receive window size for connections to this destination.
  returned: changed
  type: int
  sample: 10
syn_rto_base:
  description: Specifies the initial Retransmission TimeOut base multiplier for SYN retransmission.
  returned: changed
  type: int
  sample: 2000
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(tflatten_boolean(ttransform_namet
Parametersc	B`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6Zdddddd	dd
dg	Zddddddd
ddg	Zddddddd
ddg	ZRS(tidle_timeouttidleTimeouttparenttdefaultsFromttime_wait_recyclettimeWaitRecycletearly_retransmittearlyRetransmitt
proxy_optionstproxyOptionstinitial_congestion_window_sizetinitCwndtinitial_receive_window_sizetinitRwndtsyn_rto_baset
synRtoBasetnagle(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR�sH
		t
ApiParameterscB`seZRS((R#R$(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR)stModuleParameterscB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
RS(cC`s4|jddkrdSt|j|jd�}|S(NR(t_valuestNoneR
t	partition(tselftresult((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR
scC`s?|jddkrdS|jddkr.dSt|jd�S(NRt
indefiniteI����(R+R,tint(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRs
cC`s7t|jd�}|dkr#dS|dkr3dSdS(NRtyestenabledtdisabled(RR+R,(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRscC`s7t|jd�}|dkr#dS|dkr3dSdS(NRR2R3R4(RR+R,(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR%scC`s7t|jd�}|dkr#dS|dkr3dSdS(NRR2R3R4(RR+R,(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR.scC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiisIValid 'initial_congestion_window_size' must be in range 0 - 16 MSS units.(R+R,R(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR7s#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiisFValid 'initial_receive_window_size' must be in range 0 - 16 MSS units.(R+R,R(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRAs#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NR ii�s<Valid 'syn_rto_base' must be in range 0 - 5000 milliseconds.(R+R,R(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR Ks#(R#R$tpropertyRRRRRRRR (((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR*s			

tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R'tgetattrt_filter_paramst	Exception(R.R/t
returnable((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt	to_returnWs
(R#R$R;(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR6Vst
UsableChangescB`seZed��ZRS(cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����sFValid 'idle_timeout' must be in range 1 - 4294967295, or 'indefinite'.(R+R,R(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRcs#(R#R$R5R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR<bstReportableChangescB`sDeZed��Zed��Zed��Zed��ZRS(cC`s?|jddkrdS|jddkr.dSt|jd�S(NRI����R0(R+R,R1(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRos
cC`s2|jddkrdS|jddkr.dSdS(NRR3R2tno(R+R,(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRws
cC`st|jd�}|S(NR(RR+(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRscC`st|jd�}|S(NR(RR+(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR�s(R#R$R5RRRR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR=nst
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(R.R@RA((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R7tAttributeErrort_Difference__default(R.tparamR/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R7R@RARC(R.REtattr1tattr2((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt	__default�s
N(R#R$R,RBRFRD(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR?�s	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,RKR
RLtclientR*R@R)RAR<tchanges(R.targstkwargs((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRB�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRL(RR'R7R@R,R<RO(R.tchangedtkey((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.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(NRL(R?R@RARR(tdictRFR,t
isinstancetupdateR<ROtTruetFalse(R.tdiffR(RRtktchange((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(R]RXRY(R.R/((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt
should_update�scC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRLRR(RYRUR@tstateR_R`R=ROR;RWt_announce_deprecations(R.RRR/Rat
reportableRO((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pytexec_module�s	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRNRKt	deprecate(R.R/twarningstwarning((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRb�s


cC`s$|j�r|j�S|j�SdS(N(texistsRWtcreate(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR_�s
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/ltm/profile/tcp/{2}tservertserver_porti�tcode(tformatRNtproviderRR@R-tnametapiRMtjsont
ValueErrorRYRRX(R.turitresptresponse((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRl�s


+cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRAR^RYRKt
check_modeRXtupdate_on_device(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRW�s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RKR{RXtremove_from_deviceRlR(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pytremove�s
cC`sc|jjdkr;|jjit|jjd�d6�n|j�|jjrUt	S|j
�t	S(NttcpR(R@RR,RWR
R-RTRKR{RXtcreate_on_device(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRms)

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(NRsR-s(https://{0}:{1}/mgmt/tm/ltm/profile/tcp/RnRoRuRpi�i�i�tmessagetselfLink(i�i�i�(ROt
api_paramsR@RsR-RqRNRrRttpostRuRvRtstrtcontent(R.RLRwRxRytex((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.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(
Ns+https://{0}:{1}/mgmt/tm/ltm/profile/tcp/{2}RnRoRuRpi�i�R�(i�i�(ROR�RqRNRrRR@R-RsRttpatchRuRvRR�R�(R.RLRwRxRyR�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR|%s

cC`s|j�r|j�StS(N(RlR~RY(R.((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR`8s
cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns+https://{0}:{1}/mgmt/tm/ltm/profile/tcp/{2}RnRoi�(
RqRNRrRR@R-RsRttdeleteRRXRR�(R.RwRy((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.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(Ns+https://{0}:{1}/mgmt/tm/ltm/profile/tcp/{2}RnRoRpi�R�RL(RqRNRrRR@R-RsRtRMRuRvRR�R�R)(R.RwRxRyR�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRzHs

(R#R$RBRTR]R^RdRbR_RlRWR~RmR�R|R`R}Rz(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRJ�s 																	tArgumentSpeccB`seZd�ZRS(cC`st|_tdtdt�dt�dt�dtddddd	g�d
tdd�d
tddddg�dtdd�dtdd�dtdd�dtdd�dtdd�dtdddtdgf��}i|_|jjt�|jj|�dS(NRstrequiredRRRatdefaultR_tchoicesR`RttypetboolR"R3R4tautoRRRR1RR R-tCommontfallbacktF5_PARTITION(RXtsupports_check_modeRUR	t
argument_specRWR(R.R�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyRB]s,				(R#R$RB(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyR�\scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RKRf(
R�RR�R�RJRdt	exit_jsonRt	fail_jsonR�(tspecRKtmmtresultsR�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pytmainzs		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
RRRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commonRR)R*R6R<R=tobjectR?RJR�R�R#(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_tcp.pyt<module>sJ


t0
1J�	

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