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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZ defd��YZ!de!fd��YZ"d e!fd!��YZ#d"e$fd#��YZ%d$e$fd%��YZ&d&e$fd'��YZ'd(�Z(e)d)kre(�nd*S(+i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	certifiedtsupported_bys�
---
module: bigip_iapp_service
short_description: Manages TCL iApp services on a BIG-IP
description:
  - Manages TCL iApp services on a BIG-IP.
  - If you are looking for the API that is communicated with on the BIG-IP,
    the one the is used is C(/mgmt/tm/sys/application/service/).
version_added: 2.4
options:
  name:
    description:
      - The name of the iApp service that you want to deploy.
    type: str
    required: True
  template:
    description:
      - The iApp template from which to instantiate a new service. This
        template must exist on your BIG-IP before you can successfully
        create a service.
      - When creating a new service, this parameter is required.
    type: str
  parameters:
    description:
      - A hash of all the required template variables for the iApp template.
        If your parameters are stored in a file (the more common scenario)
        it is recommended you use either the C(file) or C(template) lookups
        to supply the expected parameters.
      - These parameters typically consist of the C(lists), C(tables), and
        C(variables) fields.
    type: dict
  force:
    description:
      - Forces the updating of an iApp service even if the parameters to the
        service have not changed. This option is of particular importance if
        the iApp template that underlies the service has been updated in-place.
        This option is equivalent to re-configuring the iApp if that template
        has changed.
    type: bool
    default: no
  state:
    description:
      - When C(present), ensures that the iApp service is created and running.
        When C(absent), ensures that the iApp service has been removed.
    type: str
    choices:
      - present
      - absent
    default: present
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
    version_added: 2.5
  strict_updates:
    description:
      - Indicates whether the application service is tied to the template,
        so when the template is updated, the application service changes to
        reflect the updates.
      - When C(yes), disallows any updates to the resources that the iApp
        service has created, if they are not updated directly through the
        iApp.
      - When C(no), allows updates outside of the iApp.
      - If this option is specified in the Ansible task, it will take precedence
        over any similar setting in the iApp Service payload that you provide in
        the C(parameters) field.
    type: bool
    default: yes
    version_added: 2.5
  traffic_group:
    description:
      - The traffic group for the iApp service. When creating a new service, if
        this value is not specified, the default of C(/Common/traffic-group-1)
        will be used.
      - If this option is specified in the Ansible task, it will take precedence
        over any similar setting in the iApp Service payload that you provide in
        the C(parameters) field.
    type: str
    version_added: 2.5
  metadata:
    description:
      - Metadata associated with the iApp service.
      - If this option is specified in the Ansible task, it will take precedence
        over any similar setting in the iApp Service payload that you provide in
        the C(parameters) field.
    type: list
    version_added: 2.7
  description:
    description:
      - Description of the iApp service.
      - If this option is specified in the Ansible task, it will take precedence
        over any similar setting in the iApp Service payload that you provide in
        the C(parameters) field.
    type: str
    version_added: 2.7
  device_group:
    description:
      - The device group for the iApp service.
      - If this option is specified in the Ansible task, it will take precedence
        over any similar setting in the iApp Service payload that you provide in
        the C(parameters) field.
    type: str
    version_added: 2.7
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s�

- name: Create HTTP iApp service from iApp template
  bigip_iapp_service:
    name: foo-service
    template: f5.http
    parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Upgrade foo-service to v1.2.0rc4 of the f5.http template
  bigip_iapp_service:
    name: foo-service
    template: f5.http.v1.2.0rc4
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Configure a service using parameters in YAML
  bigip_iapp_service:
    name: tests
    template: web_frontends
    state: present
    parameters:
      variables:
        - name: var__vs_address
          value: 1.1.1.1
        - name: pm__apache_servers_for_http
          value: 2.2.2.1:80
        - name: pm__apache_servers_for_https
          value: 2.2.2.2:80
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Re-configure a service whose underlying iApp was updated in place
  bigip_iapp_service:
    name: tests
    template: web_frontends
    force: yes
    state: present
    parameters:
      variables:
        - name: var__vs_address
          value: 1.1.1.1
        - name: pm__apache_servers_for_http
          value: 2.2.2.1:80
        - name: pm__apache_servers_for_https
          value: 2.2.2.2:80
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost

- name: Try to remove the iApp template before the associated Service is removed
  bigip_iapp_template:
    name: web_frontends
    state: absent
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  register: result
  failed_when:
    - result is not success
    - "'referenced by one or more applications' not in result.msg"

- name: Configure a service using more complicated parameters
  bigip_iapp_service:
    name: tests
    template: web_frontends
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
    parameters:
      variables:
        - name: var__vs_address
          value: 1.1.1.1
        - name: pm__apache_servers_for_http
          value: 2.2.2.1:80
        - name: pm__apache_servers_for_https
          value: 2.2.2.2:80
      lists:
        - name: irules__irules
          value:
            - foo
            - bar
      tables:
        - name: basic__snatpool_members
        - name: net__snatpool_members
        - name: optimizations__hosts
        - name: pool__hosts
          columnNames:
            - name
          rows:
            - row:
                - internal.company.bar
        - name: pool__members
          columnNames:
            - addr
            - port
            - connection_limit
          rows:
            - row:
                - "none"
                - 80
                - 0
        - name: server_pools__servers
  delegate_to: localhost

- name: Override metadata that may or may not exist in parameters
  bigip_iapp_service:
    name: foo-service
    template: f5.http
    parameters: "{{ lookup('file', 'f5.http.parameters.json') }}"
    metadata:
      - persist: yes
        name: data 1
      - persist: yes
        name: data 2
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
s
# only common fields returned
(t
AnsibleModule(tenv_fallback(t	iteritems(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tflatten_boolean(tbuild_service_urit
Parametersc
B`s�eZidd6dd6dd6Zddddddd	d
dg	Zddd
dddd
dddg
Zddddddd	dgZd�Zd�Zd�Zd�Z	d�Z
RS(tstrict_updatest
strictUpdatest
traffic_groupttrafficGrouptdevice_grouptdeviceGroupttablest	variablestliststmetadatattemplatetdescriptiontinheritedDevicegrouptinheritedTrafficGroupcC`s@i}x$|jD]}t||�||<qW|j|�}|S(N(treturnablestgetattrt_filter_params(tselftresultt
returnable((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt	to_returnPs
c
	C`s.g}x|D]}t�}|jdd�}|dkrItd��nt|�|d<|jdd�}|rg|D]}t|�^qx|d<|jdd�}|rg|d<xH|D]=}	|djtdg|	dD]}t|�^q���q�Wqn|j|�q
Wt|dd��}|S(Ntnames/One of the provided tables does not have a nametcolumnNamestrowstrowtkeycS`s|dS(NR)((tk((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt<lambda>ks(tdicttgettNoneRtstrtappendtsorted(
R%RR&ttablettmpR)tcolumnstxR+R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytnormalize_tablesWs&
	#

AcC`s�g}xt|D]l}td�t|�D��}d|krHd|d<nd|krad|d<n�|ddkr~d|d<nw|ddkr�d|d<nZ|dd	kr�d|d<n=t|dt�r�|dtkr�d|d<q�d|d<n|ddkrd|d<nZ|dd	kr/d|d<n=t|dt�rl|dtkr_d|d<qld|d<n|j|�q
Wt|d
d��}|S(Ncs`s-|]#\}}t|�t|�fVqdS(N(R3(t.0R.tv((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pys	<genexpr>qst	encryptedtnotvaluettnonetTruetyestFalseR-cS`s|dS(NR)((R.((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR/�s(R0R
t
isinstancetboolRBR4R5(R%RR&tvariableR7((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytnormalize_variablesns8











cC`s8g}x|D]}td�t|�D��}d|krHd|d<nd|kr�t|d�dkr�g|dD]}t|�^qu|d<q�n|ddkr�d|d<nZ|ddkr�d|d<n=t|dt�r|dtkrd|d<qd|d<n|j|�q
Wt|d	d
��}|S(Ncs`s9|]/\}}|dkrt|�t|�fVqdS(R?N(R3(R;R.R<((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pys	<genexpr>�sR=R>R?iRBRCRDR-cS`s|dS(NR)((R.((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR/�s(	R0R
tlenR3RERFRBR4R5(R%RR&tlistR7R9((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytnormalize_list�s&

-



cC`s{g}xn|D]f}|jdd�}t|jdd��}|dkrRd}nd}|ji|d6|d6�q
W|S(NR)tpersistR>RCttruetfalse(R1R2RR4(R%RR&titemR)RL((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytnormalize_metadata�s
		(t__name__t
__module__tapi_mapR"tapi_attributest
updatablesR(R:RHRKRP(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR$sH
						'	t
ApiParameterscB`sSeZed��Zed��Zed��Zed��Zed��ZRS(cC`s"|jddkrdS|jdS(NR(t_valuesR2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�scC`s+|jddkrdS|j|jd�S(NR(RWR2R:(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�scC`s+|jddkrdS|j|jd�S(NR(RWR2RK(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�scC`s+|jddkrdS|j|jd�S(NR(RWR2RH(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�scC`s"|jddkrdS|jdS(NRRA(Nsnone(RWR2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�s(RQRRtpropertyRRRRR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRV�s
tModuleParameterscB`seZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
ed��Zed��Zed
��Zed��Zed��Zed��ZRS(cC`s4|jddkrdS|jdjdd�}|S(Nt
parametersR(RWR2R1(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_lists�scC`s4|jddkrdS|jdjdd�}|S(NRZR(RWR2R1(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_tables�scC`s4|jddkrdS|jdjdd�}|S(NRZR(RWR2R1(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_variables�scC`s4|jddkrdS|jdjdd�}|S(NRZR(RWR2R1(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_metadata�scC`s4|jddkrdS|jdjdd�}|S(NRZR(RWR2R1(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_description�scC`sJ|jddkrdS|jdjdd�}|s:|St|j|�S(NRZR(RWR2R1Rt	partition(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_traffic_groupscC`sJ|jddkrdS|jdjdd�}|s:|St|j|�S(NRZR(RWR2R1RR`(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_device_groupscC`s:|jddkrdS|jdjdd�}t|�S(NRZR(RWR2R1R(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytparam_strict_updatesscC`s>|jdr!|j|jd�S|jr:|j|j�SdS(NR(RWR:R\R2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRs

	cC`s>|jdr!|j|jd�S|jr:|j|j�SdS(NR(RWRKR[R2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR's

	cC`s>|jdr!|j|jd�S|jr:|j|j�SdS(NR(RWRHR]R2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR/s

	cC`sL|jdr&|j|jd�}n"|jrD|j|j�}ndS|S(NR(RWRPR^R2(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR7s
	cC`s.|jddkrdSt|j|jd�S(NR(RWR2RR`(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRAscC`sp|jddkr/t|j|jd�}n|jdkrJ|j}ndS|jd�sltd��n|S(NRRAs/Common/s'Device groups can only exist in /Common(Nsnone(Nsnone(RWR2RR`Rbt
startswithR(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRGscC`sd|jdr)t|j|jd�}n|jr>|j}ndS|jd�s`td��n|S(NRs/Common/s(Traffic groups can only exist in /Common(RWRR`RaR2RdR(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRUs
	cC`sb|jddk	r)t|jd�}n%|jdk	rJt|j�}ndS|dkr^dSdS(NRRCtenabledtdisabled(RWR2RRc(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRcscC`s,|jdr|jdS|jr(|jSdS(NR(RWR_R2(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRos

	(RQRRRXR[R\R]R^R_RaRbRcRRRRRRRRR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRY�s"		
tChangescB`seZRS((RQRR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRgxst
UsableChangescB`seZRS((RQRR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRh|stReportableChangescB`seZRS((RQRR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRi�st
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R%RkRl((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R#tAttributeErrort_Difference__default(R%tparamR&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R#RkRlRn(R%Rptattr1tattr2((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt	__default�s
cC`s�|jjdkrdS|jjdkr2|jjSg|jjD]+}t|�D]\}}||f^qOq?}g|jjD]+}t|�D]\}}||f^q�q}}t|�t|�kr�td|jj�SdS(NR(RkRR2RlR
tsetR0(R%tdR.R<RkRl((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�s
>>N(RQRRR2RmRqRoRXR(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRj�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�|_d|_td|jj�|_t	�|_
dS(Ntmoduletparams(R1R2RxRRytclientRlRYRkRhtchanges(R%targstkwargs((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRm�s
	cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRy(RR"R#RkR2RhR{(R%tchangedR-((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.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(NRy(RjRkRlRRUR0RqR2REtupdateRhR{RBRD(R%tdiffRUR~R.tchange((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt_update_changed_options�s		
cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}n|jj�}|j|�|jtd|��|S(NtpresenttabsentR~(	RDR0RktstateR�R�R{R(R�(R%R~R&R�R{((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytexec_module�s	
cC`s$|j�r|j�S|j�SdS(N(texistsR�tcreate(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s
cC`s|j�r|j�StS(N(R�tremoveRD(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s
cC`so|j�|jjdkr6|jjidd6�n|j�sQtd��n|jjrat	S|j
�t	S(Ns/Common/traffic-group-1Rs@The specified template does not exist in the provided partition.(RRkRR2R�ttemplate_existsRRxt
check_modeRBtcreate_on_device(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s

cC`s9|jjrtS|j�|j�r5td��ntS(Ns!Failed to delete the iApp service(RxR�RBtremove_from_deviceR�R(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s
cC`sK|j�|_|j�r-|jjr-tS|jjr=tS|j	�tS(N(
tread_current_from_deviceRlt
should_updateRktforceRDRxR�RBtupdate_on_device(R%((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s
cC`s|j�}|rtStS(N(R�RBRD(R%R&((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�scC`s�dj|jjd|jjd�}t||jj|jj�}|jjj|�}y|j	�}Wnt
k
r}tSX|jdks�d|kr�|ddkr�tSt
S(Ns0https://{0}:{1}/mgmt/tm/sys/application/service/tservertserver_porti�tcode(tformatRztproviderRRkR`R)tapiR1tjsont
ValueErrorRDRRB(R%tbase_urituritresptresponse((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�s

+cC`s&|jj�}|rd|d<dj|jjd|jjd�}t||jj|jj�}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr|ddkrd	|kr�t
|d	��qt
|j��qn|jjr"td
|jj�}|jidd6�dj|jjd|jjd�}t||jj|jj�}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr"|ddkr"d	|kr
t
|d	��qt
|j��q"ndS(Nt
definitionsexecute-actions0https://{0}:{1}/mgmt/tm/sys/application/service/R�R�R�R�i�tmessageR(R{t
api_paramsR�RzR�RRkR`R)R�tpatchR�R�RR3tcontentRR0R�(R%RyR�R�R�R�tex((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�s@


cC`s�dj|jjd|jjd�}t||jj|jj�}|jjj|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j
��ntd|�S(Ns0https://{0}:{1}/mgmt/tm/sys/application/service/R�R�R�i�R�Ry(R�RzR�RRkR`R)R�R1R�R�RR3R�RV(R%R�R�R�R�R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�@s
cC`s�t|jj|jj�}|jd�}dj|jjd|jjdt|d|d��}|jj	j
|�}y|j�}Wntk
r�t
SX|jdks�d|kr�|ddkr�t
StS(	Nt/s4https://{0}:{1}/mgmt/tm/sys/application/template/{2}R�R�iii�R�(RRkR`RtsplitR�RzR�RR�R1R�R�RDRRB(R%R)tpartsR�R�R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�Ts


+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|jjr�td|jj�}dj|jjd|jjd�}t||jj|jj�}|jjj|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d
|kr�t|d
��q�t|j��q�ndS(
NR)R`s0https://{0}:{1}/mgmt/tm/sys/application/service/R�R�R�R�i�i�R�R(i�i�(R{R�RkR)R`R�RzR�R�tpostR�R�RR3R�RR0RR�(R%RyR�R�R�R�tpayloadR�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR�es<

cC`s.dj|jjd|jjd�}t||jj|jj�}tdg�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d|kr�t|d��q�t|j��n|jjj|�}|jd	krtSt|j��dS(
Ns0https://{0}:{1}/mgmt/tm/sys/application/service/R�R�RR�R�i�R�i�(R�RzR�RRkR`R)R0R�R�R�R�RR3R�tdeleteRRB(R%R�R�R�R�R�R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��s$
(RQRRRmRR�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRw�s 							
						*			(tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdt�dt�dt�dt�dtdd�d	td
ddd
dg�dtd
ddd�dtddd
d�dtdd�dt�dtd
ddtdgf��}i|_|jjt�|jj|�dS(NR)trequiredRRRRZttypeR0R�tdefaultR�tchoicesR�R�R>RFRRCRRJRR`tCommontfallbacktF5_PARTITION(RBtsupports_check_modeR0R	t
argument_specR�R(R%R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyRm�s2									(RQRRRm(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�Rxtmsg(
R�RR�R�RwR�t	exit_jsonRt	fail_jsonR3(tspecRxtmmtresultsR�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pytmain�s		t__main__N(*t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	tansible.module_utils.sixR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRRRt$library.module_utils.network.f5.urlsRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont$ansible.module_utils.network.f5.urlsRRVRYRgRhRitobjectRjRwR�R�RQ(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_iapp_service.pyt<module>sR


n�
� �#�#	

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