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

�
�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_transport_config
short_description: Manages configuration for an outgoing connection
description:
  - Manages configuration for an outgoing connection in BIG-IP message routing.
version_added: 2.9
options:
  name:
    description:
      - Specifies the name of the transport config to manage.
    type: str
    required: True
  description:
    description:
      - The user defined description of the transport config.
    type: str
  profiles:
    description:
      - Specifies a list profiles for the outgoing connection to use to direct and manage traffic.
    type: list
  src_addr_translation:
    description:
      - Specifies the type of source address translation enabled for the transport config and the pool
        that the source address translation will use.
    suboptions:
      type:
        description:
          - Specifies the type of source address translation associated with the specified transport config.
          - When set to C(snat) the C(pool) parameter needs to contain a name for a valid LSN or SNAT pool.
        type: str
        choices:
          - snat
          - none
          - automap
      pool:
        description:
          - Specifies the name of a LSN or SNAT pool used by the specified transport config.
          - "Name can also be specified in C(fullPath) format: C(/Common/foobar)"
          - When C(type) is C(none) or C(automap) the pool parameter will be replaced by C(none) keyword,
            thus any defined C(pool) parameter will be ignored.
        type: str
    type: dict
  src_port:
    description:
      - Specifies the source port to be used for the connection being created.
      - If no value is specified an ephemeral port is chosen for the connection being created.
      - The accepted range is between 0 and 65535 inclusive.
    type: int
  rules:
    description:
      - The iRules you want run on this transport config. iRules help automate the intercepting, processing,
        and routing of application traffic.
    type: list
  type:
    description:
      - Parameter used to specify the type of the transport-config object to manage.
      - Default setting is C(generic) with more options added in future.
    type: str
    choices:
      - generic
    default: generic
  partition:
    description:
      - Device partition to create transport-config object on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the transport-config object exists.
      - When C(absent), ensures the transport-config object 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 generic transport config
  bigip_message_routing_transport_config:
    name: foo
    profiles:
      transport: genericmsg
      tcp: tcp-lan-optimized
    description: new_transport
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Modify generic transport config
  bigip_message_routing_transport_config:
    name: foo
    rules:
      - rule_1
      - rule_2
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove generic transport config
  bigip_message_routing_transport_config:
    name: foo
    state: absent
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
sS
description:
  description: The user defined description of the router profile.
  returned: changed
  type: str
  sample: My description
rules:
  description: The iRules running on transport config.
  returned: changed
  type: list
  sample: ['/Common/rule1', '/Common/rule2']
profiles:
  description: The profiles for the outgoing connection .
  returned: changed
  type: list
  sample: ['/Common/profile1', '/Common/profile2']
src_addr_translation:
  description: The type of source address translation enabled for the transport config.
  type: complex
  returned: changed
  contains:
    type:
      description: the type of source address translation associated with the specified transport config.
      type: str
      returned: changed
      sample: automap
    pool:
      description: The name of a LSN or SNAT pool used by the specified transport config.
      type: str
      returned: changed
      sample: /Common/pool1
  sample: hash/dictionary of values
source_port:
  description: The source port to be used for the connection being created.
  returned: changed
  type: int
  sample: 10041
(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
ParameterscB`saeZidd6dd6ZdddddgZddddddgZddddddgZRS(	tsrc_addr_translationtsourceAddressTranslationtsrc_portt
sourcePorttdescriptiontprofilestrulest	snat_poolt	snat_type(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�s(
		t
ApiParameterscB`s5eZed��Zed��Zed��ZRS(cC`sVd|jkrdSd|jdkr*dSg|jddD]}|d^q<}|S(NtprofilesReferencetitemstfullPath(t_valuestNone(tselftitemtresult((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�s(cC`s=|jddkrdSd|jdkr9|jddSdS(NRtpool(R)R*(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�scC`s&|jddkrdS|jddS(NRttype(R)R*(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�s(RR tpropertyRRR(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR%�s	tModuleParameterscB`sSeZed��Zed��Zed��Zed��Zed��ZRS(cC`sG|jddkrdSg|jdD]}t|j|�^q%}|S(NR(R)R*Rt	partition(R+tpR-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRs,cC`sG|jddkrdSg|jdD]}t|j|�^q%}|S(NR(R)R*RR2(R+truleR-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRs,cC`sM|jddkrdS|jddrIt|j|jdd�}|SdS(NRR.(R)R*RR2(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRs
cC`s&|jddkrdS|jddS(NRR/(R)R*(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRscC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRii��s6Valid 'src_port' must be in range 0 - 65535 inclusive.(R)R*R(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR s#(RR R0RRRRR(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR1s
tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R#tgetattrt_filter_paramst	Exception(R+R-t
returnable((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt	to_return,s
(RR R:(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR5+st
UsableChangescB`seZed��ZRS(cC`sq|jddkrdS|jddkrJtddd|jd�}|Std|jdd|jd�}|S(NRtnonetautomapR.R/R(R<R=(R)R*tdict(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR8s
(RR R0R(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR;7stReportableChangescB`s,eZdddddgZed��ZRS(RRRRRcC`sW|jddkrdStd|jdd|jd�}|j|�}|rS|SdS(NRR.RR/(R)R*R>R7(R+t	to_filterR-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRSs
(RR R#R0R(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR?Js	t
DifferencecB`sSeZdd�Zd�Zd�Zed��Zed��Zed��Z	RS(cC`s||_||_dS(N(twantthave(R+RBRC((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt__init__as	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R6tAttributeErrort_Difference__default(R+tparamR-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pytcomparees

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R6RBRCRE(R+RGtattr1tattr2((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt	__defaultls
cC`st|jj|jj�}|S(N(RRBRRC(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRuscC`st|jj|jj�}|S(N(RRBRRC(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRzscC`st|jj|jj�}|S(N(RRBRRC(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRsN(
RR R*RDRHRFR0RRR(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRA`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(tgetR*RMRRNtclientR1RBR%RCR;tchanges(R+targstkwargs((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRD�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRN(RR#R6RBR*R;RQ(R+tchangedtkey((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.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(NRN(RARBRCRR$R>RHR*t
isinstancetupdateR;RQtTruetFalse(R+tdiffR$RTtktchange((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt_update_changed_options�s		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRPRMt	deprecate(R+R-twarningstwarning((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt_announce_deprecations�s


cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRNRT(RZR>RBtstateRgRhR?RQR:RXRf(R+RTR-Rit
reportableRQ((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pytexec_module�s	

cC`s$|j�r|j�S|j�SdS(N(texistsRXtcreate(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRg�s
cC`s|j�r|j�StS(N(RltremoveRZ(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRh�s
cC`s|j�}|rtStS(N(R^RYRZ(R+R-((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt
should_update�scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRCRoRZRMt
check_modeRYtupdate_on_device(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRX�s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RMRqRYtremove_from_deviceRlR(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRn�s
cC`sI|jjdkr!td��n|j�|jjr;tS|j�tS(NsHProfiles parameter needs to be specified when creating transport config.(	RBRR*RRVRMRqRYtcreate_on_device(R+((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRm�s

(
RR RDRVR^RfRkRgRhRoRXRnRm(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRL�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(NsHhttps://{0}:{1}/mgmt/tm/ltm/message-routing/generic/transport-config/{2}tservertserver_porti�tcode(tformatRPtproviderRRBR2tnametapiROtjsont
ValueErrorRZRRY(R+turitresptresponse((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRl�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(NR{R2sEhttps://{0}:{1}/mgmt/tm/ltm/message-routing/generic/transport-config/RvRwR}Rxi�i�tmessage(i�i�(RQt
api_paramsRBR{R2RyRPRzR|tpostR}R~RtstrtcontentRY(R+RNRR�R�tex((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRt�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(NsHhttps://{0}:{1}/mgmt/tm/ltm/message-routing/generic/transport-config/{2}RvRwR}Rxi�R�(RQR�RyRPRzRRBR2R{R|tpatchR}R~RR�R�(R+RNRR�R�R�((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRrs

cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(NsHhttps://{0}:{1}/mgmt/tm/ltm/message-routing/generic/transport-config/{2}RvRwi�(
RyRPRzRRBR2R{R|tdeleteRRYRR�(R+RR�((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRs&s

cC`s�dj|jjd|jjdt|jj|jj��}d}|jjj||�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j
��ntd|�S(	NsHhttps://{0}:{1}/mgmt/tm/ltm/message-routing/generic/transport-config/{2}RvRws?expandSubcollections=trueRxi�R�RN(RyRPRzRRBR2R{R|ROR}R~RR�R�R%(R+RtqueryR�R�R�((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRp1s

(RR RlRtRrRsRp(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRu�s
				t
ModuleManagercB`s,eZd�Zd�Zd�Zd�ZRS(cO`s7|jdd�|_t|jj�|_||_dS(NRM(ROR*RMRRNRPRS(R+RRRS((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRDGscC`s/t|j�}t|�td�kr+tStS(Ns14.0.0(RRPR
RYRZ(R+Ra((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pytversion_less_than_14LscC`sY|j�rtd��n|jjddkrC|jd�}ntd��|j�S(Ns;Message routing is not supported on TMOS version below 14.xR/tgenericsUnknown type specified.(R�RRMRNtget_managerRk(R+tmanager((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRkRs	cC`s|dkrt|j�SdS(NR�(RuRS(R+R/((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�]s(RR RDR�RkR�(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�Fs			tArgumentSpeccB`seZd�ZRS(cC`s#t|_tdtdt�dt�dtdd�dtdd�d	tdd
dtdtdd
ddg�dt��ddddggg�dtdd�dtddgdd�dtdddtdgf�dtdddddg��	}i|_|jjt�|jj|�dS(NR{trequiredRRR/tlistRtintRR>toptionstchoicesR<R=tsnatR.trequired_ifRR�tdefaultR2tCommontfallbacktF5_PARTITIONRiRgRh(RYtsupports_check_modeR>R	t
argument_specRXR(R+R�((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyRDcs4					(RR RD(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyR�bscC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RMR`(
R�RR�R�R�Rkt	exit_jsonRt	fail_jsonR�(tspecRMtmmtresultsR�((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.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.icontrolRR%R1R5R;R?tobjectRARLRuR�R�R�R(((se/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_message_routing_transport_config.pyt<module>s\


S%'
!(%iX(	

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