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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl mZddl mZddl!mZnXdefd��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(e*fd)��YZ+d*e(fd+��YZ,d,e(fd-��YZ-d.�Z.e/d/kr�e.�nd0S(1i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_message_routing_router
short_description: Manages router profiles for message-routing protocols
description:
  - Manages router profiles for message-routing protocols.
version_added: 2.9
options:
  name:
    description:
      - Specifies the name of the router profile.
    required: True
    type: str
  description:
    description:
      - The user defined description of the router profile.
    type: str
  type:
    description:
      - Parameter used to specify the type of the router profile to manage.
      - Default setting is C(generic) with more options added in future.
    type: str
    choices:
      - generic
    default: generic
  parent:
    description:
      - The parent template of this router profile. Once this value has been set, it cannot be changed.
      - The default values are set by the system if not specified and they correspond to the router type created, ie.
        C(/Common/messagerouter) for C(generic) C(type) and so on.
    type: str
  ignore_client_port:
    description:
      - When C(yes), the remote port on clientside connections ie. connections where the peer connected to the BIG-IP
        is ignored when searching for an existing connection.
    type: bool
  inherited_traffic_group:
    description:
      - When set to C(yes) the C(traffic_group) will be inherited from the containing folder. When not specified the
        system sets this to C(no) when creating new router profile.
    type: bool
  traffic_group:
    description:
      - Specifies the traffic-group of the router profile.
      - Setting the C(traffic_group) to an empty string value C("") will cause the device to inherit from containing
        folder, which means the value of C(inherited_traffic_group) on device will be C(yes).
    type: str
  use_local_connection:
    description:
      - If C(yes), the router will route a message to an existing connection on the same TMM as the message was
        received on.
    type: bool
  max_pending_bytes:
    description:
      - The maximum number of bytes worth of pending messages that will be held while waiting for a connection to a
        peer to be created. Once reached, any additional messages to the peer will be flagged as undeliverable
        and returned to the originator.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  max_pending_messages:
    description:
      - The maximum number of pending messages that will be held while waiting for a connection to a peer to be created.
        Once reached, any additional messages to the peer will be flagged as undeliverable and returned
        to the originator.
      - The accepted range is between 0 and 65535 inclusive.
    type: int
  max_retries:
    description:
      - Sets the maximum number of time a message may be resubmitted for rerouting by the C(MR::retry) iRule command.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  mirror:
    description:
      - Enables or disables state mirroring. State mirroring can be used to maintain the same state information in the
        standby unit that is in the active unit.
    type: bool
  mirrored_msg_sweeper_interval:
    description:
      - Specifies the maximum time in milliseconds that a message will be held on the standby device as it waits for
        the active device to route the message.
      - Messages on the standby device held for longer then the configurable sweeper interval, will be dropped.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  routes:
    description:
      - Specifies a list of static routes for the router instance to use.
      - The route must be on the same partition as router profile.
    type: list
  partition:
    description:
      - Device partition to create router profile on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the router profile exists.
      - When C(absent), ensures the router profile is removed.
    type: str
    choices:
      - present
      - absent
    default: present
notes:
  - Requires BIG-IP >= 14.0.0
extends_documentation_fragment: f5
author:
  - Wojciech Wypior (@wojtek0806)
sI
- name: Create a generic router profile
  bigip_message_routing_router:
    name: foo
    max_retries: 10
    ignore_client_port: yes
    routes:
      - /Common/route1
      - /Common/route2
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Modify a generic router profile
  bigip_message_routing_router:
    name: foo
    ignore_client_port: no
    mirror: yes
    mirrored_msg_sweeper_interval: 4000
    traffic_group: /Common/traffic-group-2
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove a generic router profile
  bigip_message_routing_router:
    name: foo
    state: absent
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s
description:
  description: The user defined description of the router profile.
  returned: changed
  type: str
  sample: My description
parent:
  description: The parent template of this router profile.
  returned: changed
  type: str
  sample: /Common/messagerouter
ignore_client_port:
  description: Enables ignoring of the remote port on clientside connections when searching for an existing connection.
  returned: changed
  type: bool
  sample: no
inherited_traffic_group:
  description: Specifies if traffic-group should be inherited from containing folder.
  returned: changed
  type: bool
  sample: yes
traffic_group:
  description: The traffic-group of the router profile.
  returned: changed
  type: str
  sample: /Common/traffic-group-1
use_local_connection:
  description: Enables routing of messages to an existing connection on the same TMM as the message was received on.
  returned: changed
  type: bool
  sample: yes
max_pending_bytes:
  description: The maximum number of bytes worth of pending messages that will be held.
  returned: changed
  type: int
  sample: 10000
max_pending_messages:
  description: The maximum number of pending messages that will be held.
  returned: changed
  type: int
  sample: 64
max_retries:
  description: The maximum number of time a message may be resubmitted for rerouting.
  returned: changed
  type: int
  sample: 10
mirror:
  description: Enables or disables state mirroring.
  returned: changed
  type: bool
  sample: yes
mirrored_msg_sweeper_interval:
  description: The maximum time in milliseconds that a message will be held on the standby device.
  returned: changed
  type: int
  sample: 2000
routes:
  description: The list of static routes for the router instance to use.
  returned: changed
  type: list
  sample: ['/Common/route1', '/Common/route2']
(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(tcmp_simple_list(ttmos_versiont
ParameterscB`s�eZi	dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6Zddddd	dd
dddddgZddddddd
dddddgZdddddd
ddddddgZed��Zed��ZRS(tparenttdefaultsFromtuse_local_connectiontuseLocalConnectiontignore_client_porttignoreClientPorttinherited_traffic_grouptinheritedTrafficGrouptmax_pending_bytestmaxPendingBytestmax_pending_messagestmaxPendingMessagestmax_retriest
maxRetriestmirrored_msg_sweeper_intervaltmirroredMessageSweeperIntervalt
traffic_groupttrafficGrouptdescriptiontmirrortroutescC`st|jd�S(NR(Rt_values(tself((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR8scC`st|jd�S(NR(RR+(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR<s(	t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyRR(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR�s`
			t
ApiParameterscB`seZRS((R-R.(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR4AstModuleParameterscB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��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_router.pyRFscC`s7t|jd�}|dkr#dS|dkr3dSdS(NRtyesttruetfalse(RR+R6(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRMscC`s7t|jd�}|dkr#dS|dkr3dSdS(NR)R9tenabledtdisabled(RR+R6(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR)VscC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����s@Valid 'max_pending_bytes' must be in range 0 - 4294967295 bytes.(R+R6R(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR_s#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NR"iI����s4Valid 'max_retries' must be in range 0 - 4294967295.(R+R6R(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR"is#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NR ii��sAValid 'max_pending_messages' must be in range 0 - 65535 messages.(R+R6R(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR ss#cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NR$iI����sSValid 'mirrored_msg_sweeper_interval' must be in range 0 - 4294967295 milliseconds.(R+R6R(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR$}s#cC`s{|jddkrdSt|jd�dkrK|jdddkrKdSg|jdD]}t|j|�^qY}|S(NR*iit(R+R6tlenRR7(R,tpeerR8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR*�s0,cC`sH|jddkrdS|jddkr.dStd|jd�}|S(NR&R>tCommon(R+R6R(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR&�s(R-R.R3RRR)RR"R R$R*R&(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR5Es		



	tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R1tgetattrt_filter_paramst	Exception(R,R8t
returnable((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt	to_return�s
(R-R.RG(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRB�st
UsableChangescB`seZRS((R-R.(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRH�stReportableChangescB`s&eZed��Zed��ZRS(cC`st|jd�}|S(NR)(RR+(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR)�scC`s1|jd}|dkrdS|dkr-dSdS(NRR:R9R;tno(R+R6(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR�s
(R-R.R3R)R(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRI�st
DifferencecB`sSeZdd�Zd�Zd�Zed��Zed��Zed��Z	RS(cC`s||_||_dS(N(twantthave(R,RLRM((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RCtAttributeErrort_Difference__default(R,tparamR8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RCRLRMRO(R,RQtattr1tattr2((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt	__default�s
cC`st|jj|jj�S(N(RRLR(RM(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR(�scC`sA|jjdkrdS|jj|jjkr=td��ndS(Ns,The parent router profile cannot be changed.(RLRR6RMR(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR�s
cC`st|jj|jj�}|S(N(RRLR*RM(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR*�sN(
R-R.R6RNRRRPR3R(RR*(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRK�s				tBaseManagercB`skeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR6RWRRXtclientR5RLR4RMRHtchanges(R,targstkwargs((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRN�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRX(RR1RCRLR6RHR[(R,tchangedtkey((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.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(NRX(RKRLRMRR2tdictRRR6t
isinstancetupdateRHR[tTruetFalse(R,tdiffR2R^tktchange((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt_update_changed_options�s		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRZRWt	deprecate(R,R8twarningstwarning((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt_announce_deprecationss


cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRXR^(ReRaRLtstateRrRsRIR[RGRcRq(R,R^R8Rtt
reportableR[((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pytexec_modules	

cC`s$|j�r|j�S|j�SdS(N(texistsRctcreate(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRrs
cC`s|j�r|j�StS(N(RwtremoveRe(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRs#s
cC`s|j�}|rtStS(N(RiRdRe(R,R8((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt
should_update(scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRMRzReRWt
check_modeRdtupdate_on_device(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRc.s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RWR|Rdtremove_from_deviceRwR(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRy7s
cC`s(|j�|jjrtS|j�tS(N(R`RWR|Rdtcreate_on_device(R,((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRx?s


(
R-R.RNR`RiRqRvRrRsRzRcRyRx(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRV�s											tGenericModuleManagercB`s5eZd�Zd�Zd�Zd�Zd�ZRS(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/router/{2}tservertserver_porti�tcode(tformatRZtproviderRRLR7tnametapiRYtjsont
ValueErrorReRRd(R,turitresptresponse((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRwHs


+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(NR�R7s;https://{0}:{1}/mgmt/tm/ltm/message-routing/generic/router/R�R�R�R�i�i�tmessage(i�i�(R[t
api_paramsRLR�R7R�RZR�R�tpostR�R�RtstrtcontentRd(R,RXR�R�R�tex((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRWs 
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/router/{2}R�R�R�R�i�R�(R[R�R�RZR�RRLR7R�R�tpatchR�R�RR�R�(R,RXR�R�R�R�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR}ls

cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns>https://{0}:{1}/mgmt/tm/ltm/message-routing/generic/router/{2}R�R�i�(
R�RZR�RRLR7R�R�tdeleteRRdRR�(R,R�R�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.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/message-routing/generic/router/{2}R�R�R�i�R�RX(R�RZR�RRLR7R�R�RYR�R�RR�R�R4(R,R�R�R�R�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR{�s

(R-R.RwRR}R~R{(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR�Gs
				t
ModuleManagercB`s,eZd�Zd�Zd�Zd�ZRS(cO`s7|jdd�|_t|jj�|_||_dS(NRW(RYR6RWRRXRZR](R,R\R]((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRN�scC`s/t|j�}t|�td�kr+tStS(Ns14.0.0(RRZR
RdRe(R,Rl((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pytversion_less_than_14�scC`sY|j�rtd��n|jjddkrC|jd�}ntd��|j�S(Ns;Message routing is not supported on TMOS version below 14.xttypetgenericsUnknown type specified.(R�RRWRXtget_managerRv(R,tmanager((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRv�s	cC`s|dkrt|j�SdS(NR�(R�R](R,R�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR��s(R-R.RNR�RvR�(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR��s			tArgumentSpeccB`seZd�ZRS(c&C`sAt|_tdtdt�dt�dt�dtdd�dtdd�d	tdd�d
tdd�dtdd�d
tdd�dtdd�dtdd�dtdd�dt�dtddgdd�dtdddtdgf�dtdddddg��}i|_|jjt�|jj|�dS(NR�trequiredR(RRR�tboolRRRtintR R"R)R$R*tlistR&tchoicesR�tdefaultR7RAtfallbacktF5_PARTITIONRtRrRs(Rdtsupports_check_modeRaR	t
argument_specRcR(R,R�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyRN�s6							(R-R.RN(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RWRk(
R�RR�R�R�Rvt	exit_jsonRt	fail_jsonR�(tspecRWtmmtresultsR�((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pytmain�s		t__main__N(0t
__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.compareRRt(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.icontrolRR4R5RBRHRItobjectRKRVR�R�R�R�R-(((s[/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_router.pyt<module>s\


m'?
CU(eW$	

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