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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddl mZddl mZddl mZddl mZddl mZddl mZddl!mZddl!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+�Z-e.d,kr�e-�nd-S(.i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bysu
---
module: bigip_asm_dos_application
short_description: Manage application settings for DOS profile
description:
  - Manages Application settings for ASM/AFM DOS profile.
version_added: 2.9
options:
  profile:
    description:
      - Specifies the name of the profile to manage application settings in.
    type: str
    required: True
  rtbh_duration:
    description:
      - Specifies the duration of the RTBH BGP route advertisement, in seconds.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  rtbh_enable:
    description:
      - Specifies whether to enable Remote Triggered Black Hole C(RTBH) of attacking IPs by advertising BGP routes.
    type: bool
  scrubbing_duration:
    description:
      - Specifies the duration of the Traffic Scrubbing BGP route advertisement, in seconds.
      - The accepted range is between 0 and 4294967295 inclusive.
    type: int
  scrubbing_enable:
    description:
      - Specifies whether to enable Traffic Scrubbing during attacks by advertising BGP routes.
    type: bool
  single_page_application:
    description:
      - Specifies, when C(yes), that the system supports a Single Page Applications.
    type: bool
  trigger_irule:
    description:
      - Specifies, when C(yes), that the system activates an Application DoS iRule event.
    type: bool
  geolocations:
    description:
      - Manages the geolocations countries whitelist, blacklist.
    type: dict
    suboptions:
      whitelist:
        description:
          - A list of countries to be put on whitelist, must not have overlapping elements with C(blacklist).
        type: list
      blacklist:
        description:
          - A list of countries to be put on blacklist, must not have overlapping elements with C(whitelist).
        type: list
  heavy_urls:
    description:
      - Manages Heavy URL protection.
      - Heavy URLs are a small number of site URLs that might consume considerable server resources per request.
    type: dict
    suboptions:
      auto_detect:
        description:
          - Enables or disables automatic heavy URL detection.
        type: bool
      latency_threshold:
        description:
          - Specifies the latency threshold for automatic heavy URL detection.
          - The accepted range is between 0 and 4294967295 milliseconds inclusive.
        type: int
      exclude:
        description:
          - Specifies a list of URLs or wildcards to exclude from the heavy URLs.
        type: list
      include:
        description:
          - Configures additional URLs to include in the heavy URLs that were auto detected.
        type: list
        suboptions:
          url:
            description:
              - Specifies the URL to be added to the list of heavy URLs, in addition to the automatically detected ones.
            type: str
          threshold:
            description:
              - Specifies the threshold of requests per second, where the URL in question is considered under attack.
              - The accepted range is between 1 and 4294967295 inclusive, or C(auto).
            type: str
  mobile_detection:
    description:
      - Configures detection of mobile applications built with the Anti-Bot Mobile SDK and defines how requests
        from these mobile application clients are handled.
    type: dict
    suboptions:
      enabled:
        description:
          - When C(yes), requests from mobile applications built with Anti-Bot Mobile SDK will be detected and handled
            according to the parameters set.
          - When C(no), these requests will be handled like any other request which may let attacks in, or cause false
            positives.
        type: bool
      allow_android_rooted_device:
        description:
          - When C(yes) device will allow traffic from rooted Android devices.
        type: bool
      allow_any_android_package:
        description:
          - When C(yes) allows any application publisher.
          - A publisher is identified by the certificate used to sign the application.
        type: bool
      allow_any_ios_package:
        description:
          - When C(yes) allows any iOS package.
          - A package name is the unique identifier of the mobile application.
        type: bool
      allow_jailbroken_devices:
        description:
          - When C(yes) allows traffic from jailbroken iOS devices.
        type: bool
      allow_emulators:
        description:
          - When C(yes) allows traffic from applications run on emulators.
        type: bool
      client_side_challenge_mode:
        description:
          - Action to take when a CAPTCHA or Client Side Integrity challenge needs to be presented.
          - The mobile application user will not see a CAPTCHA challenge and the mobile application will not be
            presented with the Client Side Integrity challenge. The such options for mobile applications are C(pass)
            or C(cshui).
          - When C(pass) the traffic is passed without incident.
          - When C(cshui) the SDK checks for human interactions with the screen in the last few seconds.
            If none are detected, the traffic is blocked.
        type: str
        choices:
          - pass
          - cshui
      ios_allowed_package_names:
        description:
          - Specifies the names of iOS packages to allow traffic on.
          - This option has no effect when C(allow_any_ios_package) is set to C(yes).
        type: list
      android_publishers:
        description:
          - This option has no effect when C(allow_any_android_package) is set to C(yes).
          - Specifies the allowed publisher certificates for android applications.
          - The publisher certificate needs to be installed on the BIG-IP beforehand.
          - "The certificate name located on a different partition than the one specified
            in C(partition) parameter needs to be provided in C(full_path) format C(/Foo/cert.crt)."
        type: list
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  state:
    description:
      - When C(state) is C(present), ensures that the Application object exists.
      - When C(state) is C(absent), ensures that the Application object is removed.
    type: str
    choices:
      - present
      - absent
    default: present
notes:
  - Requires BIG-IP >= 13.1.0
extends_documentation_fragment: f5
author:
  - Wojciech Wypior (@wojtek0806)
s�
- name: Create an ASM dos application profile
  bigip_asm_dos_application:
    profile: dos_foo
    geolocations:
      blacklist:
        - Afghanistan
        - Andora
      whitelist:
        - Cuba
    heavy_urls:
      auto_detect: yes
      latency_threshold: 1000
    rtbh_duration: 3600
    rtbh_enable: yes
    single_page_application: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Update an ASM dos application profile
  bigip_asm_dos_application:
    profile: dos_foo
    mobile_detection:
      enabled: yes
      allow_any_ios_package: yes
      allow_emulators: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Remove an ASM dos application profile
  bigip_asm_dos_application:
    profile: dos_foo
    state: absent
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s�
rtbh_enable:
  description: Enables Remote Triggered Black Hole of attacking IPs.
  returned: changed
  type: bool
  sample: no
rtbh_duration:
  description: The duration of the RTBH BGP route advertisement.
  returned: changed
  type: int
  sample: 3600
scrubbing_enable:
  description: Enables Traffic Scrubbing during attacks.
  returned: changed
  type: bool
  sample: yes
scrubbing_duration:
  description: The duration of the Traffic Scrubbing BGP route advertisement.
  returned: changed
  type: int
  sample: 3600
single_page_application:
  description: Enables support of a Single Page Applications.
  returned: changed
  type: bool
  sample: no
trigger_irule:
  description: Activates an Application DoS iRule event.
  returned: changed
  type: bool
  sample: yes
geolocations:
  description: Specifies geolocations countries whitelist, blacklist.
  type: complex
  returned: changed
  contains:
    whitelist:
      description: A list of countries to be put on whitelist.
      returned: changed
      type: list
      sample: ['United States, United Kingdom']
    blacklist:
      description: A list of countries to be put on blacklist.
      returned: changed
      type: list
      sample: ['Russia', 'Germany']
  sample: hash/dictionary of values
heavy_urls:
  description: Manages Heavy URL protection.
  type: complex
  returned: changed
  contains:
    auto_detect:
      description: Enables or disables automatic heavy URL detection.
      returned: changed
      type: bool
      sample: yes
    latency_threshold:
      description: Specifies the latency threshold for automatic heavy URL detection.
      returned: changed
      type: int
      sample: 2000
    exclude:
      description: Specifies a list of URLs or wildcards to exclude from the heavy URLs.
      returned: changed
      type: list
      sample: ['/exclude.html', '/exclude2.html']
    include:
      description: Configures additional URLs to include in the heavy URLs.
      type: complex
      returned: changed
      contains:
        url:
          description: The URL to be added to the list of heavy URLs.
          returned: changed
          type: str
          sample: /include.html
        threshold:
          description: The threshold of requests per second
          returned: changed
          type: str
          sample: auto
      sample: hash/dictionary of values
  sample: hash/dictionary of values
mobile_detection:
  description: Configures detection of mobile applications built with the Anti-Bot Mobile SDK.
  type: complex
  returned: changed
  contains:
    enable:
      description: Enables or disables automatic mobile detection.
      returned: changed
      type: bool
      sample: yes
    allow_android_rooted_device:
      description: Allows traffic from rooted Android devices.
      returned: changed
      type: bool
      sample: no
    allow_any_android_package:
      description: Allows any application publisher.
      returned: changed
      type: bool
      sample: no
    allow_any_ios_package:
      description: Allows any iOS package.
      returned: changed
      type: bool
      sample: yes
    allow_jailbroken_devices:
      description: Allows traffic from jailbroken iOS devices.
      returned: changed
      type: bool
      sample: no
    allow_emulators:
      description: Allows traffic from applications run on emulators.
      returned: changed
      type: bool
      sample: yes
    client_side_challenge_mode:
      description: Action to take when a CAPTCHA or Client Side Integrity challenge needs to be presented.
      returned: changed
      type: str
      sample: pass
    ios_allowed_package_names:
      description: The names of iOS packages to allow traffic on.
      returned: changed
      type: list
      sample: ['package1','package2']
    android_publishers:
      description: The allowed publisher certificates for android applications.
      returned: changed
      type: list
      sample: ['/Common/cert1.crt', '/Common/cert2.crt']
  sample: hash/dictionary of values
(t
AnsibleModule(tenv_fallback(tLooseVersion(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(ttransform_name(tflatten_boolean(tf5_argument_spec(tcompare_complex_list(tcmp_simple_list(ttmos_version(tmodule_provisionedt
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6Zdddddd	dd
dg	Zdddddd
dddddddddddddddgZdddddd
dddddddddddddddgZRS( t
rtbh_durationtrtbhDurationSectrtbh_enablet
rtbhEnabletscrubbing_durationtscrubbingDurationSectscrubbing_enabletscrubbingEnabletsingle_page_applicationtsinglePageApplicationt
trigger_irulettriggerIrulet
heavy_urlst	heavyUrlstmobile_detectiontmobileDetectiontgeolocationstenable_mobile_detectiontallow_android_rooted_devicetallow_any_android_packagetallow_any_ios_packagetallow_jailbroken_devicestallow_emulatorstclient_side_challenge_modetios_allowed_package_namestandroid_publisherstauto_detecttlatency_thresholdthw_url_excludethw_url_includet
geo_blacklistt
geo_whitelist(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�sx
		t
ApiParameterscB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
ed��Zed��Zed
��Zed��ZRS(cC`s&|jddkrdS|jddS(NR%tenabled(t_valuestNone(tself((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR(�scC`s&|jddkrdS|jddS(NR%tallowAndroidRootedDevice(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR)�scC`s&|jddkrdS|jddS(NR%tallowAnyAndroidPackage(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR*�scC`s&|jddkrdS|jddS(NR%tallowAnyIosPackage(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR+�scC`s&|jddkrdS|jddS(NR%tallowJailbrokenDevices(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR,�scC`s&|jddkrdS|jddS(NR%tallowEmulators(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR-�scC`s&|jddkrdS|jddS(NR%tclientSideChallengeMode(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR.�scC`s.|jddkrdS|jdjdd�S(NR%tiosAllowedPackageNames(R?R@tget(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR/�scC`sc|jddks&d|jdkr*dSg|jddD]}t|d|d�^q<}|S(NR%tandroidPublisherst	partitiontname(R?R@R(RAt	publishertresult((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR0s
&2cC`s&|jddkrdS|jddS(NR#tautomaticDetection(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR1scC`s&|jddkrdS|jddS(NR#tlatencyThreshold(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR2scC`s.|jddkrdS|jdjdd�S(NR#texclude(R?R@RI(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR3scC`s.|jddkrdS|jdjdd�S(NR#tincludeList(R?R@RI(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR4scC`sv|jddkrdSt�}xE|jdD]6}d|kr.|dtkr.|j|d�q.q.W|rr|SdS(NR'tblackListedRL(R?R@tlisttTruetappend(RARNtitem((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR5$s	cC`sv|jddkrdSt�}xE|jdD]6}d|kr.|dtkr.|j|d�q.q.W|rr|SdS(NR'twhiteListedRL(R?R@RTRURV(RARNRW((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR6/s	(R7R8tpropertyR(R)R*R+R,R-R.R/R0R1R2R3R4R5R6(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR=�stModuleParameterscB`sUeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
ed��Zed��Zed
��Zed��Zed��Zed��Zed��Zed��Zd�Zd�Zed��Zed��ZRS(cC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����s>Valid 'rtbh_duration' must be in range 0 - 4294967295 seconds.(R?R@R(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR<s#cC`s7t|jd�}|dkr#dS|dkr3dS|S(NRtyesR>tnotdisabled(RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRFscC`sU|jddkrdSd|jdko5dknrE|jdStd��dS(NRiI����sCValid 'scrubbing_duration' must be in range 0 - 4294967295 seconds.(R?R@R(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyROs#cC`s7t|jd�}|dkr#dS|dkr3dS|S(NRR[R>R\R](RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRYscC`s7t|jd�}|dkr#dS|dkr3dS|S(NRR[R>R\R](RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRbscC`s7t|jd�}|dkr#dS|dkr3dS|S(NR!R[R>R\R](RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR!kscC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R>R[R\R](R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR(tscC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R)R[ttrueR\tfalse(R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR)scC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R*R[R^R\R_(R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR*�scC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R+R[R^R\R_(R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR+�scC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R,R[R^R\R_(R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR,�scC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR%R-R[R^R\R_(R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR-�scC`s&|jddkrdS|jddS(NR%R.(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR.�scC`s&|jddkrdS|jddS(NR%R/(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR/�scC`sb|jddks*|jdddkr.dSg|jddD]}t|j|�^q@}|S(NR%R0(R?R@RRK(RARWRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR0�s*0cC`sR|jddkrdSt|jdd�}|dkr>dS|dkrNdS|S(NR#R1R[R>R\R](R?R@R(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR1�scC`st|jddks*|jdddkr.dSd|jddkoPdknrd|jddStd��dS(NR#R2iI����sGValid 'latency_threshold' must be in range 0 - 4294967295 milliseconds.(R?R@R(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR2�s*'cC`s&|jddkrdS|jddS(NR#RQ(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR3�scC`s�|jddks*|jdddkr.dSt�}x�|jddD]y}t�}|j|d�|d<dj|j|d��|d<d|kr�|j|d�|d<n|j|�qIW|S(NR#tincludeturlsURL{0}RLt	threshold(R?R@RTtdictt_correct_urltformatt_validate_thresholdRV(RARNRWtelement((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR4�s*		 cC`sF|dkr|Sdt|�ko-dknr6|Std��dS(NtautoiI����sTValid 'url threshold' must be in range 1 - 4294967295 requests per second or 'auto'.(tintR(RARW((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRf�s"cC`s |jd�r|Sdj|�S(Nt/s/{0}(t
startswithRe(RARW((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRd�scC`sn|jddkrdS|j}|jdd}|rj|rjt|�jt|��sjtd��qjn|S(NR't	blacklists;Cannot specify the same element in blacklist and whitelist.(R?R@R6tsett
isdisjointR(RAt	whitelistRl((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR5s	cC`s&|jddkrdS|jddS(NR'Ro(R?R@(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR6s(R7R8RYRRRRRR!R(R)R*R+R,R-R.R/R0R1R2R3R4RfRdR5R6(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRZ;s.
	
			
			tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R;tgetattrt_filter_paramst	Exception(RARNt
returnable((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt	to_returns
(R7R8Ru(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRpst
UsableChangescB`s5eZed��Zed��Zed��ZRS(cC`s�|jddkr*|jddkr*dSt�}|jdr�xB|jdD]0}t�}||d<t|d<|j|�qNWn|jdr�xB|jdD]0}t�}||d<t|d<|j|�q�Wn|r�|SdS(NR5R6RLRSRX(R?R@RTRcRURV(RARNRWRg((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR's"&	
	


	

cC`sjt�}|jd|d<|jd|d<|jd|d<|jd|d<|j|�}|rf|SdS(	NR1ROR2RPR3RQR4RR(RcR?Rr(RAttmpRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR#3s	cC`s�t�}|jd|d<|jd|d<|jd|d<|jd|d<|jd	|d
<|jd|d<|jd
|d<|jd|d<|jd|d<|j|�}|r�|SdS(NR(R>R)RBR*RCR+RDR,RER-RFR.RGR/RHR0RJ(RcR?Rr(RARwRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR%>s	(R7R8RYR'R#R%(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRvstReportableChangesc	B`s�eZdddddddddg	Zd	�Zed
��Zed��Zed��Zed
��Zed��Z	ed��Z
ed��ZRS(RRRRRR!R#R%R'cC`sit�}xO|D]G}t�}|d|d<d|krJ|d|d<n|j|�qW|re|SdS(NRaRb(RTRcRV(RAtitemsRNRWRg((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt_convert_include_list\s	
	cC`sHt�}|jd|d<|jd|d<|j|�}|rD|SdS(NR5RlR6Ro(RcR?Rr(RARwRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR'gs	cC`syt�}t|jd�|d<|jd|d<|jd|d<|j|jd�|d<|j|�}|ru|SdS(NR1R2R3RQR4R`(RcRR?RzRr(RARwRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR#ps	cC`s�t�}t|jd�|d<t|jd�|d<t|jd�|d<t|jd�|d<t|jd�|d<t|jd�|d<|jd|d<|jd	|d	<|jd
|d
<|j|�}|r�|SdS(NR(R>R)R*R+R,R-R.R/R0(RcRR?Rr(RARwRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR%{s	cC`st|jd�}|S(NR(RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�scC`st|jd�}|S(NR(RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�scC`st|jd�}|S(NR(RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�scC`st|jd�}|S(NR!(RR?(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR!�s(R7R8R;RzRYR'R#R%RRRR!(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyRxOs"			t
DifferencecB`s�eZd
d�Zd�Zd�Zed��Zd�Zed��Z	ed��Z
ed��Zed��Zed	��Z
RS(cC`s||_||_dS(N(twantthave(RAR|R}((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RqtAttributeErrort_Difference__default(RAtparamRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RqR|R}R(RAR�tattr1tattr2((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt	__default�s
cC`s�|jjdkrdS|jjdkr>|jjgkr>dS|jjdkrZ|jjS|jj}t�}x[|D]S}xJ|jjD]<}|d|dkr�|j||�}|j|�q�q�WqvWt||�}|S(NRa(R|R4R@R}RTt_filter_haveRVR(RAtwantsthavesR|R}tentryRN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR4�s$
	
cC`sYt|j��jt|j���}t�}x"t|�D]}||||<q=W|S(N(RmtkeystintersectionRcRT(RAR|R}tto_checkRNtk((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s
'	cC`st|jj|jj�}|S(N(RR|R3R}(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR3�scC`st|jj|jj�}|S(N(RR|R5R}(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR5�scC`st|jj|jj�}|S(N(RR|R6R}(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR6�scC`st|jj|jj�}|S(N(RR|R0R}(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR0�scC`st|jj|jj�}|S(N(RR|R/R}(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR/�sN(R7R8R@R~R�R�RYR4R�R3R5R6R0R/(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.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�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(RIR@R�RR�tclientRZR|R=R}Rvtchanges(RAtargstkwargs((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR~�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR�(RR;RqR|R@RvR�(RAtchangedtkey((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.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(NR�(R{R|R}RR<RcR�R@t
isinstancetupdateRvR�RUtFalse(RAtdiffR<R�R�tchange((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt_update_changed_options�s		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopR�R�t	deprecate(RARNtwarningstwarning((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt_announce_deprecations
s


cC`s�t|jd�s!td��n|j�r<td��nt}t�}|jj}|dkrr|j�}n|dkr�|j	�}nt
d|jj��}|j�}|j
|�|j
td|��|j|�|S(Ntasms+ASM must be provisioned to use this module.s2Module supported on TMOS versions 13.1.x and abovetpresenttabsentR�R�(RR�Rtversion_less_than_13_1R�RcR|tstateR�R�RxR�RuR�R�(RAR�RNR�t
reportableR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pytexec_modules$	

cC`s/t|j�}t|�td�kr+tStS(Ns13.1.0(RR�R
RUR�(RAR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�.scC`s$|j�r|j�S|j�SdS(N(texistsR�tcreate(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�4s
cC`s|j�r|j�StS(N(R�tremoveR�(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�:s
cC`s|j�}|rtStS(N(R�RUR�(RARN((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt
should_update?scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceR}R�R�R�t
check_modeRUtupdate_on_device(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�Es
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(R�R�RUtremove_from_deviceR�R(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�Ns
cC`s(|j�|jjrtS|j�tS(N(R�R�R�RUtcreate_on_device(RA((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�Vs


cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns1https://{0}:{1}/mgmt/tm/security/dos/profile/{2}/tservertserver_porti�tcode(ReR�tproviderRR|RKtprofiletapiRItjsont
ValueErrorR�RRU(RAturitresptresponse((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pytprofile_exists]s


+cC`s�|j�s3tdj|jj|jj���ndj|jjd|jjdt|jj|jj�|jj�}|jj	j
|�}y|j�}Wntk
r�t
SX|jdks�d|kr�|ddkr�t
StS(Ns<Specified DOS profile: {0} on partition: {1} does not exist.s@https://{0}:{1}/mgmt/tm/security/dos/profile/{2}/application/{3}R�R�i�R�(R�RReR|R�RKR�R�RR�RIR�R�R�RRU(RAR�R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR�ls"


+cC`s|jj�}|jj|d<dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|dd
kr�d	|kr�t
|d	��q�t
|j��ntS(NRLs=https://{0}:{1}/mgmt/tm/security/dos/profile/{2}/application/R�R�R�R�i�i�tmessage(i�i�(R�t
api_paramsR|R�ReR�R�RRKR�tpostR�R�RtstrtcontentRU(RAR�R�R�R�tex((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s 

cC`s�|jj�}dj|jjd|jjdt|jj|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/security/dos/profile/{2}/application/{3}R�R�R�R�i�R�(R�R�ReR�R�RR|RKR�R�tpatchR�R�RR�R�(RAR�R�R�R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s

cC`s�dj|jjd|jjdt|jj|jj�|jj�}|jjj|�}|j	dkrot
St|j��dS(Ns@https://{0}:{1}/mgmt/tm/security/dos/profile/{2}/application/{3}R�R�i�(
ReR�R�RR|RKR�R�tdeleteRRURR�(RAR�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s

cC`s�dj|jjd|jjdt|jj|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/security/dos/profile/{2}/application/{3}R�R�R�i�R�R�(ReR�R�RR|RKR�R�RIR�R�RR�R�R=(RAR�R�R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s

(R7R8R~R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��s$																		tArgumentSpeccB`seZd�ZRS(c!C`s7t|_tdtdt�dtdddtdtdd�d	tdd���d
tdddtdtdd�d
tdd�dtdd�dtdddddtdtdt�dt�����dtdddtdtdd�dtdd�dtdd�dtdd�dtdd�dtdd�dtdddg�dtdd�d tdd��	�d!tdd�d"tdd�d#tdd�d$tdd�d%tdd�d&tdd�d'td(d)d*td+gf�d,td(d-dd-d.g��}i|_|jjt�|jj|�dS(/NR�trequiredR'ttypeRctoptionsRlRTRoR#R1tboolR2RiRQR`telementsRaRbR%R>R)R*R+R,R-R.tchoicestcshuitpassR/R0RRRRRR!RKtdefaulttCommontfallbacktF5_PARTITIONR�R�R�(RUtsupports_check_modeRcR	t
argument_specR�R(RAR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR~�s`			(R7R8R~(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�R�R�(
R�RR�R�R�R�t	exit_jsonRt	fail_jsonR�(tspecR�tmmtresultsR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pytmains		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.compareRRt(library.module_utils.network.f5.icontrolRRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont'ansible.module_utils.network.f5.comparet(ansible.module_utils.network.f5.icontrolRR=RZRpRvRxtobjectR{R�R�R�R7(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_dos_application.pyt<module>s\


�.�
Ih�1QK�@	

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