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_persistence_src_addr.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_persistence_src_addr
short_description: Manage source address persistence profiles
description:
  - Manages source address persistence profiles.
version_added: 2.7
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(source_addr) profile.
    type: str
  match_across_services:
    description:
      - When C(yes), specifies that all persistent connections from a client IP address that go
        to the same virtual IP address also go to the same node.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: bool
  match_across_virtuals:
    description:
      - When C(yes), specifies that all persistent connections from the same client IP address
        go to the same node.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: bool
  match_across_pools:
    description:
      - When C(yes), specifies that the system can use any pool that contains this persistence
        record.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: bool
  hash_algorithm:
    description:
      - Specifies the algorithm the system uses for hash persistence load balancing. The hash
        result is the input for the algorithm.
      - When C(default), specifies that the system uses the index of pool members to obtain the
        hash result for the input to the algorithm.
      - When C(carp), specifies that the system uses the Cache Array Routing Protocol (CARP)
        to obtain the hash result for the input to the algorithm.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
    type: str
    choices:
      - default
      - carp
  entry_timeout:
    description:
      - Specifies the duration of the persistence entries.
      - When creating a new profile, if this parameter is not specified, the
        default is provided by the parent profile.
      - To specify an indefinite timeout, use the value C(indefinite).
      - If specifying a numeric timeout, the value must be between C(1) and C(4294967295).
    type: str
  override_connection_limit:
    description:
      - When C(yes), specifies that the system allows you to specify that pool member connection
        limits will be overridden for persisted clients.
      - Per-virtual connection limits remain hard limits and are not overridden.
    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 profile
  bigip_profile_persistence_src_addr:
    name: foo
    state: present
    hash_algorithm: carp
    match_across_services: yes
    match_across_virtuals: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s�
param1:
  description: The new param1 value of the resource.
  returned: changed
  type: bool
  sample: true
param2:
  description: The new param2 value of the resource.
  returned: changed
  type: str
  sample: Foo is bar
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(tflatten_boolean(ttransform_namet
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6Zddddd	dd
gZdddddd
dgZddddd
dgZed��Zed��Zed��Z	ed��Z
ed��ZRS(tparenttdefaultsFromthash_algorithmt
hashAlgorithmtmatch_across_poolstmatchAcrossPoolstmatch_across_servicestmatchAcrossServicestmatch_across_virtualstmatchAcrossVirtualstoverride_connection_limittoverrideConnectionLimitt
entry_timeoutttimeoutcC`s`|jddkr|jdSt|jd�}d|koHdknr\td��n|S(NRt
indefiniteiI����sL'timeout' value must be between 1 and 4294967295, or the value 'indefinite'.(NR (t_valuestNonetintR(tselfR((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�scC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�scC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�scC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�scC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�s(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyRRRRR(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�sB
			t
ApiParameterscB`seZRS((R%R&(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR,�stModuleParameterscB`seZed��ZRS(cC`s4|jddkrdSt|j|jd�}|S(NR(R!R"R
t	partition(R$tresult((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�s(R%R&R+R(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR-�stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R)tgetattrt_filter_paramst	Exception(R$R/t
returnable((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt	to_return�s
(R%R&R5(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR0�st
UsableChangescB`sDeZed��Zed��Zed��Zed��ZRS(cC`s2|jddkrdS|jddkr.dSdS(NRtyestenabledtdisabled(R!R"(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�s
cC`s2|jddkrdS|jddkr.dSdS(NRR7R8R9(R!R"(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRs
cC`s2|jddkrdS|jddkr.dSdS(NRR7R8R9(R!R"(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRs
cC`s2|jddkrdS|jddkr.dSdS(NRR7R8R9(R!R"(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRs
(R%R&R+RRRR(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR6�stReportableChangescB`sDeZed��Zed��Zed��Zed��ZRS(cC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRscC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRscC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR"scC`st|jd�S(NR(RR!(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR&s(R%R&R+RRRR(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR:st
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R$R<R=((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt__init__,s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R1tAttributeErrort_Difference__default(R$tparamR/((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pytcompare0s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R1R<R=R?(R$RAtattr1tattr2((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt	__default7s
cC`s+|jj|jjkr'td��ndS(Ns$The parent profile cannot be changed(R<RR=R(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR@sN(R%R&R"R>RBR@R+R(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.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"RGR
RHtclientR-R<R,R=R6tchanges(R$targstkwargs((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR>Is
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRH(RR)R1R<R"R6RK(R$tchangedtkey((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt_set_changed_optionsPs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(NRH(R;R<R=RR*tdictRBR"t
isinstancetupdateR6RKtTruetFalse(R$tdiffR*RNtktchange((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt_update_changed_optionsXs		
cC`s|j�}|rtStS(N(RYRTRU(R$R/((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt
should_updatejscC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRHRN(RURQR<tstateR[R\R:RKR5RSt_announce_deprecations(R$RNR/R]t
reportableRK((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pytexec_moduleps	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRJRGt	deprecate(R$R/twarningstwarning((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR^�s


cC`s$|j�r|j�S|j�SdS(N(texistsRStcreate(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR[�s
cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns7https://{0}:{1}/mgmt/tm/ltm/persistence/source-addr/{2}tservertserver_porti�tcode(tformatRJtproviderRR<R.tnametapiRItjsont
ValueErrorRURRT(R$turitresptresponse((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRh�s


+cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR=RZRURGt
check_modeRTtupdate_on_device(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRS�s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RGRwRTtremove_from_deviceRhR(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pytremove�s
cC`s(|j�|jjrtS|j�tS(N(RPRGRwRTtcreate_on_device(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRi�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��ndS(
NRoR.s4https://{0}:{1}/mgmt/tm/ltm/persistence/source-addr/RjRkRqRli�i�i�tmessage(i�i�i�(RKt
api_paramsR<RoR.RmRJRnRptpostRqRrRtstrtcontent(R$RHRsRtRutex((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.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(
Ns7https://{0}:{1}/mgmt/tm/ltm/persistence/source-addr/{2}RjRkRqRli�i�R|(i�i�(RKR}RmRJRnRR<R.RoRptpatchRqRrRRR�(R$RHRsRtRuR�((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRx�s

cC`s|j�r|j�StS(N(RhRzRU(R$((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR\�s
cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns7https://{0}:{1}/mgmt/tm/ltm/persistence/source-addr/{2}RjRki�(
RmRJRnRR<R.RoRptdeleteRRTRR�(R$RsRt((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRy�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(Ns7https://{0}:{1}/mgmt/tm/ltm/persistence/source-addr/{2}RjRkRli�R|RH(RmRJRnRR<R.RoRpRIRqRrRRR�R,(R$RsRtRuR�((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRv�s

(R%R&R>RPRYRZR`R^R[RhRSRzRiR{RxR\RyRv(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyRFHs 																tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdt�dt�dtdd�dtdd�dtdd�d	td
ddg�d
t�dtdd�dtddd
ddg�dtdddtdgf��
}i|_|jjt�|jj|�dS(NRotrequiredRRttypetboolRRRtchoicestdefaulttcarpRRR]R[R\R.tCommontfallbacktF5_PARTITION(RTtsupports_check_modeRQR	t
argument_specRSR(R$R�((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR>s&				(R%R&R>(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyR�scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RGRb(
R�RR�R�RFR`t	exit_jsonRt	fail_jsonR(tspecRGtmmtresultsR�((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pytmains		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-R0R6R:tobjectR;RFR�R�R%(((sa/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_persistence_src_addr.pyt<module>sJ


W

G	"�	

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