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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl mZnXdefd��YZ!de!fd��YZ"de!fd��YZ#de!fd��YZ$de$fd ��YZ%d!e$fd"��YZ&d#e'fd$��YZ(d%e'fd&��YZ)d'e'fd(��YZ*d)�Z+e,d*kr�e+�nd+S(,i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys

---
module: bigip_message_routing_protocol
short_description: Manage generic message parser profile.
description:
  - Manages generic message parser profile for use with the message routing framework.
version_added: 2.9
options:
  name:
    description:
      - Specifies the name of the generic parser profile.
    required: True
    type: str
  description:
    description:
      - The user defined description of the generic parser profile.
    type: str
  parent:
    description:
      - The parent template of this parser profile. Once this value has been set, it cannot be changed.
      - When creating a new profile, if this parameter is not specified,
        the default is the system-supplied C(genericmsg) profile.
    type: str
  disable_parser:
    description:
      - When C(yes), the generic message parser will be disabled ignoring all incoming packets and not directly
        send message data.
      - This mode supports iRule script protocol implementations that will generate messages from the incoming transport
        stream and send outgoing messages on the outgoing transport stream.
    type: bool
  max_egress_buffer:
    description:
      - Specifies the maximum size of the send buffer in bytes. If the number of bytes in the send buffer for a
        connection exceeds this value, the generic message protocol will stop receiving outgoing messages from the
        router until the size of the size of the buffer drops below this setting.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  max_msg_size:
    description:
      - Specifies the maximum size of a received message. If a message exceeds this size, the connection will be reset.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  msg_terminator:
    description:
      - The string of characters used to terminate a message. If the message-terminator is not specified,
        the generic message parser will not separate the input stream into messages.
    type: str
  no_response:
    description:
      - When set, matching of responses to requests is disabled.
    type: bool
  partition:
    description:
      - Device partition to create route object on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the route exists.
      - When C(absent), ensures the route is removed.
    type: str
    choices:
      - present
      - absent
    default: present
notes:
  - Requires BIG-IP >= 14.0.0
extends_documentation_fragment: f5
author:
  - Wojciech Wypior (@wojtek0806)
s�
- name: Create a generic parser
  bigip_message_routing_protocol:
    name: foo
    description: 'This is parser'
    no_response: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Modify a generic parser
  bigip_message_routing_protocol:
    name: foo
    no_response: no
    max_egress_buffer: 10000
    max_msg_size: 2000
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove generic parser
  bigip_message_routing_protocol:
    name: foo
    state: absent
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
sj
description:
  description: The user defined description of the parser profile.
  returned: changed
  type: str
  sample: My description
parent:
  description: The parent template of this parser profile.
  returned: changed
  type: str
  sample: /Common/genericmsg
disable_parser:
  description: Disables generic message parser.
  returned: changed
  type: bool
  sample: yes
max_egress_buffer:
  description: The maximum size of the send buffer in bytes.
  returned: changed
  type: int
  sample: 10000
max_msg_size:
  description: The maximum size of a received message.
  returned: changed
  type: int
  sample: 4000
msg_terminator:
  description: The string of characters used to terminate a message.
  returned: changed
  type: str
  sample: '%%%%'
no_response:
  description: Disables matching of responses to requests.
  returned: changed
  type: bool
  sample: yes
(t
AnsibleModule(tenv_fallback(tLooseVersion(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(ttransform_name(tf5_argument_spec(tflatten_boolean(tcmp_str_with_none(ttmos_versiont
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6Zdddddd	dgZddddddd
gZddddddd
gZed
��Zed��ZRS(tparenttdefaultsFromtdisable_parsert
disableParsertmax_egress_buffertmaxEgressBuffertmax_msg_sizetmaxMessageSizetmsg_terminatortmessageTerminatortno_responset
noResponsetdescriptioncC`st|jd�S(NR(Rt_values(tself((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�scC`st|jd�S(NR(RR"(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�s(	t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyRR(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�s<
			t
ApiParameterscB`seZRS((R$R%(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR+�stModuleParameterscB`s5eZed��Zed��Zed��ZRS(cC`s4|jddkrdSt|j|jd�}|S(NR(R"tNoneRt	partition(R#tresult((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�scC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����s5Valid 'max_msg_size' must be in range 0 - 4294967295.(R"R-R(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�s#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����s:Valid 'max_egress_buffer' must be in range 0 - 4294967295.(R"R-R(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRs#(R$R%R*RRR(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.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((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt	to_returns
(R$R%R5(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR0
st
UsableChangescB`seZRS((R$R%(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR6stReportableChangescB`seZRS((R$R%(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR7st
DifferencecB`sSeZdd�Zd�Zd�Zed��Zed��Zed��Z	RS(cC`s||_||_dS(N(twantthave(R#R9R:((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt__init__"s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R1tAttributeErrort_Difference__default(R#tparamR/((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pytcompare&s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R1R9R:R<(R#R>tattr1tattr2((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt	__default-s
cC`sA|jjdkrdS|jj|jjkr=td��ndS(Ns,The parent router profile cannot be changed.(R9RR-R:R(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR6s
cC`st|jj|jj�S(N(RR9R!R:(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR!?scC`st|jj|jj�S(N(RR9RR:(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRCsN(
R$R%R-R;R?R=R*RR!R(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR8!s				t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR-RDRREtclientR,R9R+R:R6tchanges(R#targstkwargs((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR;Is
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRE(RR(R1R9R-R6RH(R#tchangedtkey((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.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(NRE(R8R9R:RR)tdictR?R-t
isinstancetupdateR6RHtTruetFalse(R#tdiffR)RKtktchange((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt_update_changed_optionsXs		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRGRDt	deprecate(R#R/twarningstwarning((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt_announce_deprecationsjs


cC`s/t|j�}t|�td�kr+tStS(Ns14.0.0(RRGR
RQRR(R#RY((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pytversion_less_than_14rscC`s�|j�rtd��nt}t�}|jj}|dkrQ|j�}n|dkrl|j�}ntd|j	j
��}|j
�}|j|�|jtd|��|j|�|S(Ns;Message routing is not supported on TMOS version below 14.xtpresenttabsentRERK(
R_RRRRNR9tstateR`RaR7RHR5RPR^(R#RKR/Rbt
reportableRH((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pytexec_modulexs	

cC`s$|j�r|j�S|j�SdS(N(texistsRPtcreate(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR`�s
cC`s|j�r|j�StS(N(RetremoveRR(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRa�s
cC`s|j�}|rtStS(N(RVRQRR(R#R/((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt
should_update�scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR:RhRRRDt
check_modeRQtupdate_on_device(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRP�s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RDRjRQtremove_from_deviceReR(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRg�s
cC`s(|j�|jjrtS|j�tS(N(RMRDRjRQtcreate_on_device(R#((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRf�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/message-routing/generic/protocol/{2}tservertserver_porti�tcode(tformatRGtproviderRR9R.tnametapiRFtjsont
ValueErrorRRRRQ(R#turitresptresponse((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRe�s


+cC`s�|jj�}|jj|d<|jj|d<dj|jjd|jjd�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d
|kr�t|d
��q�t|j��ntS(NRsR.s=https://{0}:{1}/mgmt/tm/ltm/message-routing/generic/protocol/RnRoRuRpi�i�tmessage(i�i�(RHt
api_paramsR9RsR.RqRGRrRttpostRuRvRtstrtcontentRQ(R#RERwRxRytex((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRm�s 
cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d|kr�t
|d��q�t
|j��ndS(Ns@https://{0}:{1}/mgmt/tm/ltm/message-routing/generic/protocol/{2}RnRoRuRpi�Rz(RHR{RqRGRrRR9R.RsRttpatchRuRvRR}R~(R#RERwRxRyR((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRk�s

cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns@https://{0}:{1}/mgmt/tm/ltm/message-routing/generic/protocol/{2}RnRoi�(
RqRGRrRR9R.RsRttdeleteRRQRR~(R#RwRy((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRl�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/message-routing/generic/protocol/{2}RnRoRpi�RzRE(RqRGRrRR9R.RsRtRFRuRvRR}R~R+(R#RwRxRyR((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRi�s

(R$R%R;RMRVR^R_RdR`RaRhRPRgRfReRmRkRlRi(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyRCHs"																	tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdt�dt�dt�dtdd�dtdd	�d
tdd	�dt�dtdd�d
tdddtdgf�dtdddddg��
}i|_|jjt�|jj|�dS(NRstrequiredR!RRttypetboolRtintRRRR.tdefaulttCommontfallbacktF5_PARTITIONRbR`tchoicesRa(RQtsupports_check_modeRNR	t
argument_specRPR(R#R�((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR;s&					(R$R%R;(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyR�
scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RDRX(
R�RR�R�RCRdt	exit_jsonRt	fail_jsonR}(tspecRDtmmtresultsR((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pytmain%s		t__main__N(-t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	tdistutils.versionR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRRRt'library.module_utils.network.f5.compareRt(library.module_utils.network.f5.icontrolRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont'ansible.module_utils.network.f5.comparet(ansible.module_utils.network.f5.icontrolRR+R,R0R6R7tobjectR8RCR�R�R$(((s]/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_protocol.pyt<module>sT


H#&
2'�	

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