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/bigiq_application_https_waf.pyc

�
�Udac@`soddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddlmZytddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddl 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)krke+�ndS(*i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys|
---
module: bigiq_application_https_waf
short_description: Manages BIG-IQ HTTPS WAF applications
description:
  - Manages BIG-IQ applications used for load balancing an HTTPS application on port 443
    with a Web Application Firewall (WAF) using an ASM Rapid Deployment policy.
version_added: 2.6
options:
  name:
    description:
      - Name of the new application.
    type: str
    required: True
  description:
    description:
      - Description of the application.
    type: str
  servers:
    description:
      - A list of servers that the application is hosted on.
      - If you are familiar with other BIG-IP setting, you might also refer to this
        list as the list of pool members.
      - When creating a new application, at least one server is required.
    suboptions:
      address:
        description:
          - The IP address of the server.
        type: str
      port:
        description:
          - The port of the server.
        type: str
        default: 80
    type: list
  inbound_virtual:
    description:
      - Settings to configure the virtual which will receive the inbound connection.
      - This virtual will be used to host the HTTPS endpoint of the application.
      - Traffic destined to the C(redirect_virtual) will be offloaded to this
        parameter to ensure that proper redirection from insecure, to secure, occurs.
    suboptions:
      address:
        description:
          - Specifies destination IP address information to which the virtual server
            sends traffic.
          - This parameter is required when creating a new application.
        type: str
      netmask:
        description:
          - Specifies the netmask to associate with the given C(destination).
          - This parameter is required when creating a new application.
        type: str
      port:
        description:
          - The port that the virtual listens for connections on.
          - When creating a new application, if this parameter is not specified, the
            default value of C(443) will be used.
        type: str
        default: 443
    type: dict
  redirect_virtual:
    description:
      - Settings to configure the virtual which will receive the connection to be
        redirected.
      - This virtual will be used to host the HTTP endpoint of the application.
      - Traffic destined to this parameter will be offloaded to the
        C(inbound_virtual) parameter to ensure that proper redirection from insecure,
        to secure, occurs.
    suboptions:
      address:
        description:
          - Specifies destination IP address information to which the virtual server
            sends traffic.
          - This parameter is required when creating a new application.
        type: str
      netmask:
        description:
          - Specifies the netmask to associate with the given C(destination).
          - This parameter is required when creating a new application.
        type: str
      port:
        description:
          - The port that the virtual listens for connections on.
          - When creating a new application, if this parameter is not specified, the
            default value of C(80) will be used.
        type: str
        default: 80
    type: dict
  client_ssl_profile:
    description:
      - Specifies the SSL profile for managing client-side SSL traffic.
    suboptions:
      name:
        description:
          - The name of the client SSL profile to created and used.
          - When creating a new application, if this value is not specified, the
            default value of C(clientssl) will be used.
        type: str
      cert_key_chain:
        description:
          - One or more certificates and keys to associate with the SSL profile.
          - This option is always a list. The keys in the list dictate the details
            of the client/key/chain/passphrase combination.
          - Note that BIG-IPs can only have one of each type of each certificate/key
            type. This means that you can only have one RSA, one DSA, and one ECDSA
            per profile.
          - If you attempt to assign two RSA, DSA, or ECDSA certificate/key combo,
            the device will reject this.
          - This list is a complex list that specifies a number of keys.
          - When creating a new profile, if this parameter is not specified, the
            default value of C(inherit) will be used.
        suboptions:
          cert:
            description:
              - Specifies a cert name for use.
            type: str
            required: True
          key:
            description:
              - Specifies a key name.
            type: str
            required: True
          chain:
            description:
              - Specifies a certificate chain that is relevant to the certificate and
                key mentioned earlier.
              - This key is optional.
            type: str
          passphrase:
            description:
              - Contains the passphrase of the key file, should it require one.
              - Passphrases are encrypted on the remote BIG-IP device.
            type: str
        type: raw
    type: dict
  service_environment:
    description:
      - Specifies the name of service environment that the application will be
        deployed to.
      - When creating a new application, this parameter is required.
    type: str
  add_analytics:
    description:
      - Collects statistics of the BIG-IP that the application is deployed to.
      - This parameter is only relevant when specifying a C(service_environment) which
        is a BIG-IP; not an SSG.
    type: bool
    default: no
  domain_names:
    description:
      - Specifies host names that are used to access the web application that this
        security policy protects.
      - When creating a new application, this parameter is required.
    type: list
  state:
    description:
      - The state of the resource on the system.
      - When C(present), guarantees that the resource exists with the provided attributes.
      - When C(absent), removes the resource from the system.
    type: str
    choices:
      - absent
      - present
    default: present
  wait:
    description:
      - If the module should wait for the application to be created, deleted or updated.
    type: bool
    default: yes
extends_documentation_fragment: f5
notes:
  - This module will not work on BIGIQ version 6.1.x or greater.
author:
  - Tim Rupp (@caphrim007)
sh
- name: Load balance an HTTPS application on port 443 with a WAF using ASM
  bigiq_application_https_waf:
    name: my-app
    description: Redirect HTTP to HTTPS via WAF
    service_environment: my-ssg
    servers:
      - address: 1.2.3.4
        port: 8080
      - address: 5.6.7.8
        port: 8080
    inbound_virtual:
      address: 2.2.2.2
      netmask: 255.255.255.255
      port: 443
    redirect_virtual:
      address: 2.2.2.2
      netmask: 255.255.255.255
      port: 80
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
    state: present
  delegate_to: localhost
sd
description:
  description: The new description of the application of the resource.
  returned: changed
  type: str
  sample: My application
service_environment:
  description: The environment which the service was deployed to.
  returned: changed
  type: str
  sample: my-ssg1
inbound_virtual_destination:
  description: The destination of the virtual that was created.
  returned: changed
  type: str
  sample: 6.7.8.9
inbound_virtual_netmask:
  description: The network mask of the provided inbound destination.
  returned: changed
  type: str
  sample: 255.255.255.0
inbound_virtual_port:
  description: The port the inbound virtual address listens on.
  returned: changed
  type: int
  sample: 80
servers:
  description: List of servers, and their ports, that make up the application.
  type: complex
  returned: changed
  contains:
    address:
      description: The IP address of the server.
      returned: changed
      type: str
      sample: 2.3.4.5
    port:
      description: The port that the server listens on.
      returned: changed
      type: int
      sample: 8080
  sample: hash/dictionary of values
N(tLooseVersion(t
AnsibleModule(tstring_types(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tf5_argument_spec(tfq_name(tis_valid_ip(t
bigiq_versiont
Parametersc
B`s�eZidd6dd6dd6dd6dd	6d
d6dd
6Zddddddd	dd
g	Zdddddddddddd
dg
Zddddddddd
dg
ZRS(ttemplate_referencettemplateReferencetsub_pathtsubPatht
ssg_referencetssgReferencetconfig_set_namet
configSetNametdefault_device_referencetdefaultDeviceReferencet
add_analyticstaddAnalyticstdomain_namestdomainst	resourcestdescriptiontserverstinbound_virtualtredirect_virtualtclient_ssl_profile(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRs
t
ApiParameterscB`seZRS((R'R((((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR-;stModuleParameterscB`sqeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	RS(cC`sdS(Ntprofile_http((tself((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pythttp_profile@scC`s|jS(N(tname(R0((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRDscC`s|jS(N(R2(R0((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRHscC`sd}dj|jjd|jjd|�}|jjj|�}y|j�}Wn%tk
r{}tt|���nX|j	dkr�|ddkr�td��nMd	|kr�|d	d
kr�d|kr�t|d��q�t|j
��ntd|d
dd�}|S(Ns*name+eq+'Default-f5-HTTPS-WAF-lb-template'sMhttps://{0}:{1}/mgmt/cm/global/templates/?$filter={2}&$top=1&$select=selfLinktservertserver_porti�t
totalItemsis&No default HTTP LB template was found.tcodei�tmessagetlinktitemstselfLink(tformattclienttprovidertapitgettjsont
ValueErrorRtstrRt_contenttdict(R0tfilterturitresptresponsetextresult((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRLs(

	cC`s;t|j�r$dj|j�}ndj|j�}dj|jjd|jjd|�}|jjj|�}y|j�}Wn%tk
r�}t	t
|���nX|jdkr�|ddkr�dSd	|kr|d	d
krd|kr
t	|d��qt	|j
��ntd|d
dd�}|S(Nsaddress+eq+'{0}'shostname+eq+'{0}'szhttps://{0}:{1}/mgmt/shared/resolver/device-groups/cm-adccore-allbigipDevices/devices/?$filter={2}&$top=1&$select=selfLinkR3R4i�R5iR6i�R7R8R9R:(Rtservice_environmentR;R<R=R>R?R@RARRBRtNoneRCRD(R0RERFRGRHRIRJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRhs*

	cC`sdj|j�}dj|jjd|jjd|�}|jjj|�}y|j�}Wn%tk
r�}tt	|���nX|j
dkr�|ddkr�dSd|kr�|dd	kr�d
|kr�t|d
��q�t|j��nt
d|ddd
�}|S(Ns
name+eq+'{0}'sYhttps://{0}:{1}/mgmt/cm/cloud/service-scaling-groups/?$filter={2}&$top=1&$select=selfLinkR3R4i�R5iR6i�R7R8R9R:(R;RKR<R=R>R?R@RARRBRRLRCRD(R0RERFRGRHRIRJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�s&

	cC`sO|jddkrdSg}x+|jdD]}|jtd|��q+W|S(NRt
domainName(t_valuesRLtappendRD(R0RJtdomain((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�s(
R'R(tpropertyR1RRRRRR(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR.?stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R+tgetattrt_filter_paramst	Exception(R0RJt
returnable((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt	to_return�s
(R'R(RW(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRR�st
UsableChangescB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
ed��Zd�Zd
�Zed��ZRS(cC`s}t�}|j|j�|j|j�|j|j�|j|j�|j|j�|j|j�|j|j�|S(N(	RDtupdateR1thttp_monitortinbound_virtual_servertredirect_virtual_servertpooltnodestssl_profile(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR!�s	cC`s\t�}tdtddd|jdd|jdd|jd	�d
|j�g|d<|S(Nt
parametersR2t
default_vstdestinationAddresstaddresstmasktnetmasktdestinationPorttporttsubcollectionResourcessltm:virtual:90735960bf4b(RDR$tinbound_profiles(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR[�s	

cC`sLitdt��gd6tdt��gd6tdt��gd6}|S(NR`sprofiles:78b1bcfdafadsprofiles:2f52acac9fdesprofiles:9448fe71611e(RD(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRi�scC`s\t�}tdtddd|jdd|jdd|jd	�d
|j�g|d<|S(NR`R2tdefault_redirect_vsRbRcRdReRfRgRhsltm:virtual:3341f412b980(RDR%tredirect_profiles(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR\�s	

cC`s6itdt��gd6tdt��gd6}|S(NR`sprofiles:2f52acac9fdesprofiles:9448fe71611e(RD(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRk�scC`s5t�}tdtdd�d|j�g|d<|S(NR`R2tpool_0Rhsltm:pool:8bc5b256f9d1(RDtpool_members(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR]s		cC`s�t�}g|d<xm|jD]b}tdtd|ddtddj|d�dd	j|d����}|dj|�qW|S(
Nsmembers:dec6d24dc625R`Rgt
nodeReferenceR8s%#/resources/ltm:node:c072248f8e6a/{0}RctfullPaths# {0}(RDR#R;RO(R0RJtxtmember((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRms	

cC`s,t�}tdtdd��g|d<|S(NR`R2R/sltm:profile:http:2f52acac9fde(RD(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR1*s
	cC`s,t�}tdtdd��g|d<|S(NR`R2smonitor-httpsltm:monitor:http:18765a198150(RD(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRZ6s
	c	C`sbt�}g|d<xH|jD]=}tdtd|dd|d��}|dj|�qW|S(Nsltm:node:c072248f8e6aR`R2Rc(RDR#RO(R0RJRpttmp((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR^Bs	

cC`s$g|jD]}|d^q
}|S(NRc(R#(R0RpRJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytnode_addressesPs cC`s5t�}tdtddd|j��g|d<|S(NR`R2t	clientssltcertKeyChains#ltm:profile:client-ssl:78b1bcfdafad(RDtcert_key_chains(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR_Us	cC`s�t�}dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
r{}tt	|���nXx7|dD]+}t
|d|d�}|d||<q�W|S(NsBhttps://{0}:{1}/mgmt/cm/adc-core/working-config/sys/file/ssl-cert/R3R4R9t	partitionR2R:(RDR;R<R=R>R?R@RARRBR(R0RJRFRGRHRItcerttkey((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt_get_cert_referencesbs	
cC`s�t�}dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
r{}tt	|���nXx7|dD]+}t
|d|d�}|d||<q�W|S(NsAhttps://{0}:{1}/mgmt/cm/adc-core/working-config/sys/file/ssl-key/R3R4R9RwR2R:(RDR;R<R=R>R?R@RARRBR(R0RJRFRGRHRIRxRy((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt_get_key_referencesss	
c	C`sg}|jdkrdSd|jkr,dS|jd}t|t�rc|dkrctd��nt|t�s�td��n|j�}|j�}xpt|�D]b\}}t	ddj
|��}d|kr�td��nF|d|krtd	��n'|d}t	d
||d|�|d<d
|krFtd��nF|d
|kretd��n'|d
}t	d
||d|�|d<d|kr�|d|kr�td��n'|d}t	d
||d|�|d<d|kr�|d|d<n|j|�q�W|S(Ntcert_key_chaintinheritsJOnly the 'inherit' setting is available when 'cert_key_chain' is a string.s@The value of 'cert_key_chain' is not one of the supported types.R2sclientssl{0}RxsLA 'cert' option is required when specifying the 'cert_key_chain' parameter..sBThe specified 'cert' was not found. Did you specify its full path?R8Rot
certReferenceRysKA 'key' option is required when specifying the 'cert_key_chain' parameter..sAThe specified 'key' was not found. Did you specify its full path?tkeyReferencetchaintchainReferencet
passphrase(R&RLt
isinstanceR
RtlistRzR{t	enumerateRDR;RO(	R0RJtkctcert_referencestkey_referencestidxRpRrRy((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRv�s`









(R'R(RQR!R[RiR\RkR]RmR1RZR^RsR_RzR{Rv(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyRX�s

		tReportableChangescB`seZRS((R'R((((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��st
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(R0R�R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RStAttributeErrort_Difference__default(R0tparamRJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RSR�R�R�(R0R�tattr1tattr2((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt	__default�s
N(R'R(RLR�R�R�(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��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`sm|jdd�|_t|jj�|_td|jj�|_|j|j_t�|_	t
�|_dS(Ntmoduletparams(R?RLR�RR�R<R.R�R-R�RXtchanges(R0targstkwargs((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��scC`syi}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rutd|�|_|j|j_ndS(NR�(RR+RSR�RLRXR�R<(R0tchangedRy((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt_set_changed_options�scC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_|j|j_t
StS(NR�(R�R�R�RR,RDR�RLR�RYRXR�R<tTruetFalse(R0tdiffR,R�tktchange((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(R�R�R�(R0RJ((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt
should_updatescC`s:t|j�}t|�td�kr6td��ndS(Ns6.1.0s2Module supports only BIGIQ version 6.0.x or lower.(RR<RR(R0tversion((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytcheck_bigiq_versionscC`s�|j�t}t�}|jj}|dkr@|j�}n|dkr[|j�}ntd|jj	��}|j	�}|j
|�|j
td|��|j|�|S(NtpresenttabsentR�R�(R�R�RDR�tstateR�R�R�R�RWRYt_announce_deprecations(R0R�RJR�t
reportableR�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytexec_modules
	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgR�(tpopR<R�t	deprecate(R0RJtwarningstwarning((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�+s


cC`s|j�rtS|j�SdS(N(texistsR�tcreate(R0((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�3scC`s�dj|jjd|jjd|jj�}|jjj|�}y|j�}Wn%tk
r{}t	t
|���nX|jdkr�d|kr�d|dkr�|dddkr�tSt
S(Nsbhttps://{0}:{1}/mgmt/ap/query/v1/tenants/default/reports/AllApplicationsList?$filter=name+eq+'{2}'R3R4i�RJR5i(R;R<R=R�R2R>R?R@RARRBRR�R�(R0RFRGRHRI((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�9s

?cC`sW|jjrtS|j�}|jjrS|j|�|j�rStd��qSntS(NsFailed to delete the resource.(	R�t
check_modeR�tremove_from_deviceR�twaittwait_for_apply_template_taskR�R(R0t	self_link((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytremoveHs
cC`s,|jjdkr(|jjdkr(tStS(N(R�RRLRR�R�(R0((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pythas_no_service_environmentRs$cC`s|jjdkr!td��n|jjdkrBtd��n|jjdkrctd��n|jjdkr�td��n|j�|j�r�tdj	|jj���n|j
jr�tS|j
�}|jjr|j|�|j�std��qntS(NsJA 'service_environment' must be specified when creating a new application.sFAt least one 'servers' item is needed when creating a new application.sGAn 'inbound_virtual' must be specified when creating a new application.sDYou must provide at least one value in the 'domain_names' parameter.s8The specified 'service_environment' ({0}) was not found.sFailed to deploy application.(R�RKRLRR#R$RR�R�R;R�R�R�tcreate_on_deviceR�R�R�(R0R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�Ws2

cC`s�|jj�}d|d<dj|jjd|jjd�}|jjj|d|�}y|j�}Wn%tk
r�}t	t
|���nXd|kr�|ddkr�d	|kr�t	|d	��q�t	|j��n|d
S(NtCREATEtmodes3https://{0}:{1}/mgmt/cm/global/tasks/apply-templateR3R4R@R6i�R7R:(R�t
api_paramsR;R<R=R>tpostR@RARRBRC(R0R�RFRGRHRI((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR�zs

cC`s|j�r|j�StS(N(R�R�R�(R0((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��s
cC`s�td|jjdd�}dj|jjd|jjd�}|jjj|d|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|dd	kr�d
|kr�t
|d
��q�t
|j��n|dS(NRR�tDELETEs3https://{0}:{1}/mgmt/cm/global/tasks/apply-templateR3R4R@R6i�R7R:(
RDR�R2R;R<R=R>R�R@RARRBRC(R0R�RFRGRHRI((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��s 	
cC`s�dj|jjd|jjd�}|jd|�}x�tr�|jjj|�}y|j�}Wn%tk
r�}t	t
|���nX|ddkr�|jdd�dkr�tSd	|kr�t	|d	��ntj
d
�q;WdS(Nshttps://{0}:{1}R3R4shttps://localhostRtFINISHEDtcurrentSteptDONEterrorMessagei(R;R<R=treplaceR�R>R?R@RARRBRLttimetsleep(R0R�thostRFRGRHRI((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��s
	((R'R(R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��s 											
		#			tArgumentSpeccB`seZd�ZRS(c#C`s�t|_tdtdt�dt�dtdddtdtdt�d	td
d���dtdd
dtdtdt�dtdt�d	td
d���dtdd
dtdtdt�dtdt�d	td
d���dt�dtd
ddddg�dtdd
dtd
d�dtdddtdt�dt�dt�dt����dtddd
d �d!tdd�d"tddd
d#��}i|_|jjt�|jj|�d$dgg|_dS(%NR2trequiredR"R#ttypeR�toptionsRcRgtdefaultiPR$RDRei�R%RKR�R�tchoicesR�R&RtR|trawRxRyR�R�RtbooltnoRR�tyestinherit_cert_key_chain(R�tsupports_check_modeRDt
argument_specRYRtmutually_exclusive(R0R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��sT							(R'R(R�(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyR��scC`s�t�}td|jd|jd|j�}y,td|�}|j�}|j|�Wn)tk
r�}|j	dt
|��nXdS(NR�R�R�R�R�(R�R	R�R�R�R�R�t	exit_jsonRt	fail_jsonRB(tspecR�tmmtresultsRI((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pytmain�s			t__main__(-t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR�tdistutils.versionRtansible.module_utils.basicR	tansible.module_utils.sixR
t%library.module_utils.network.f5.bigiqRt&library.module_utils.network.f5.commonRR
RRt)library.module_utils.network.f5.ipaddressRt(library.module_utils.network.f5.icontrolRtImportErrort%ansible.module_utils.network.f5.bigiqt&ansible.module_utils.network.f5.commont)ansible.module_utils.network.f5.ipaddresst(ansible.module_utils.network.f5.icontrolRR-R.RRRXR�tobjectR�R�R�R�R'(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigiq_application_https_waf.pyt<module>sP


�,
o��;	

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