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

�
�Udac@`s3ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZyddd
l
mZddlmZddlmZddlmZddlmZddlmZWnqek
rIdd
lmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd ��YZd!efd"��YZ d#efd$��YZ!d%�Z"e#d&kr/e"�nd'S((i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bysm
---
module: bigip_profile_udp
short_description: Manage UDP profiles on a BIG-IP
description:
  - Manage UDP profiles on a BIG-IP. Many of UDP profiles exist; each with their
    own adjustments to the standard C(udp) 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(udp) 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 UDP
        connection can remain idle before the system deletes it.
      - When C(0), or C(indefinite), specifies that UDP connections can remain idle
        indefinitely.
      - When C(immediate), specifies that you do not want the UDP connection to
        remain idle, and that it is therefore immediately eligible for deletion.
    type: str
  datagram_load_balancing:
    description:
      - Specifies, when C(yes), that the system load balances UDP traffic
        packet-by-packet.
    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 TCP profile
  bigip_profile_tcp:
    name: foo
    parent: udp
    idle_timeout: 300
    datagram_load_balancing: no
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
sh
parent:
  description: The new parent of the resource.
  returned: changed
  type: str
  sample: udp
idle_timeout:
  description: The new idle timeout of the resource.
  returned: changed
  type: int
  sample: 100
datagram_load_balancing:
  description: The new datagram load balancing setting of the resource.
  returned: changed
  type: bool
  sample: True
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_namet
ParameterscB`s_eZidd6dd6dd6ZdddgZdddgZdddgZed��ZRS(tdatagram_load_balancingtdatagramLoadBalancingtidle_timeouttidleTimeouttparenttdefaultsFromcC`sF|jddkrdS|jddkr5|jdSt|jd�S(NRt
indefinitet	immediate(RR(t_valuestNonetint(tself((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR�s
(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRs
			t
ApiParameterscB`seZed��ZRS(cC`s2|jddkrdS|jddkr.tStS(NRtenabled(RRtTruetFalse(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR�s
(RRR#R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR$�stModuleParameterscB`seZed��ZRS(cC`s4|jddkrdSt|j|jd�}|S(NR(RRR
t	partition(Rtresult((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR�s(RRR#R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR(�stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R!tgetattrt_filter_paramst	Exception(RR*t
returnable((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt	to_return�s
(RRR0(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR+�st
UsableChangescB`seZed��ZRS(cC`s,|jddkrdS|jdr(dSdS(NRR%tdisabled(RR(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR�s

(RRR#R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR1�stReportableChangescB`seZed��ZRS(cC`s2|jddkrdS|jddkr.tStS(NRR%(RRR&R'(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR�s
(RRR#R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR3�st
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(RR5R6((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R,tAttributeErrort_Difference__default(RtparamR*((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R,R5R6R8(RR:tattr1tattr2((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt	__default�s
N(RRRR7R;R9(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR4�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(tgetRR@R
RAtclientR(R5R$R6R1tchanges(Rtargstkwargs((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR7�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRA(RR!R,R5RR1RD(Rtchangedtkey((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.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(NRA(R4R5R6RR"tdictR;Rt
isinstancetupdateR1RDR&R'(RtdiffR"RGtktchange((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(RPR&R'(RR*((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt
should_updatescC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRARG(R'RJR5tstateRRRSR3RDR0RLt_announce_deprecations(RRGR*RTt
reportableRD((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pytexec_modules	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRCR@t	deprecate(RR*twarningstwarning((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRU#s


cC`s$|j�r|j�S|j�SdS(N(texistsRLtcreate(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRR+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/udp/{2}tservertserver_porti�tcode(tformatRCtproviderRR5R)tnametapiRBtjsont
ValueErrorR'RR&(Rturitresptresponse((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR_1s


+cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR6RQR'R@t
check_modeR&tupdate_on_device(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRL@s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(R@RnR&tremove_from_deviceR_R(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pytremoveIs
cC`s(|j�|jjrtS|j�tS(N(RIR@RnR&tcreate_on_device(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR`Qs


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(NRfR)s(https://{0}:{1}/mgmt/tm/ltm/profile/udp/RaRbRhRci�i�i�tmessagetselfLink(i�i�i�(RDt
api_paramsR5RfR)RdRCReRgtpostRhRiRtstrtcontent(RRARjRkRltex((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRrXs 
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/udp/{2}RaRbRhRci�i�Rs(i�i�(RDRuRdRCReRR5R)RfRgtpatchRhRiRRwRx(RRARjRkRlRy((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRoms

cC`s|j�r|j�StS(N(R_RqR'(R((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRS�s
cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns+https://{0}:{1}/mgmt/tm/ltm/profile/udp/{2}RaRbi�(
RdRCReRR5R)RfRgtdeleteRR&RRx(RRjRl((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRp�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/udp/{2}RaRbRci�RsRA(RdRCReRR5R)RfRgRBRhRiRRwRxR$(RRjRkRlRy((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyRm�s

(RRR7RIRPRQRWRURRR_RLRqR`RrRoRSRpRm(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR?�s 																tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdt�dt�dt�dtdd�dtd	d
dd
dg�d
td	ddtdgf��}i|_|jjt�|jj|�dS(NRftrequiredRRRttypetboolRTtdefaultRRtchoicesRSR)tCommontfallbacktF5_PARTITION(R&tsupports_check_modeRJR	t
argument_specRLR(RR�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR7�s				(RRR7(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyR|�scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�R@RY(
R|RR�R�R?RWt	exit_jsonRt	fail_jsonRw(tspecR@tmmtresultsRy((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pytmain�s		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
RRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commonRR$R(R+R1R3tobjectR4R?R|R�R(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_udp.pyt<module>sF


<
"
	

�	

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