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

�
�Udac@`ssddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZy�dd
l
mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�dd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZ defd ��YZ!d!e"fd"��YZ#d#e"fd$��YZ$d%e"fd&��YZ%d'�Z&e'd(kroe&�nd)S(*i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys^
---
module: bigip_profile_analytics
short_description: Manage HTTP analytics profiles on a BIG-IP
description:
  - Manage HTTP analytics profiles on a BIG-IP.
version_added: 2.8
options:
  name:
    description:
      - Specifies the name of the profile.
    type: str
    required: True
  parent:
    description:
      - Specifies the profile from which this profile inherits settings.
      - When creating a new profile, if this parameter is not specified, the default
        is the system-supplied C(analytics) profile.
    type: str
  description:
    description:
      - Description of the profile.
    type: str
  collect_geo:
    description:
      - Enables or disables the collection of the names of the countries
        from where the traffic was sent.
    type: bool
  collect_ip:
    description:
      - Enables or disables the collection of client IPs statistics.
    type: bool
  collect_max_tps_and_throughput:
    description:
      - Enables or disables the collection of maximum TPS and throughput
        for all collected entities.
    type: bool
  collect_page_load_time:
    description:
      - Enables or disables the collection of the page load time
        statistics.
    type: bool
  collect_url:
    description:
      - Enables or disables the collection of requested URL statistics.
    type: bool
  collect_user_agent:
    description:
      - Enables or disables the collection of user agents.
    type: bool
  collect_user_sessions:
    description:
      - Enables or disables the collection of the unique user sessions.
    type: bool
  collected_stats_external_logging:
    description:
      - Enables or disables the external logging of the collected
        statistics.
    type: bool
  collected_stats_internal_logging:
    description:
      - Enables or disables the internal logging of the collected
        statistics.
    type: bool
  external_logging_publisher:
    description:
      - Specifies the external logging publisher used to send statistical
        data to one or more destinations.
    type: str
  notification_by_syslog:
    description:
      - Enables or disables logging of the analytics alerts into the
        Syslog.
    type: bool
  notification_by_email:
    description:
      - Enables or disables sending the analytics alerts by email.
    type: bool
  notification_email_addresses:
    description:
      - Specifies which email addresses receive alerts by email when
        C(notification_by_email) is enabled.
    type: list
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the profile exists.
      - When C(absent), ensures the profile is removed.
    type: str
    choices:
      - present
      - absent
    default: present
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
s�
- name: Create a profile
  bigip_profile_analytics:
    name: profile1
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s�
param1:
  description: The new param1 value of the resource.
  returned: changed
  type: bool
  sample: true
param2:
  description: The new param2 value of the resource.
  returned: changed
  type: str
  sample: Foo is bar
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(ttransform_name(tf5_argument_spec(tflatten_boolean(tcmp_simple_listt
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6Zdddddd	dd
dddddddgZddddd
ddddddddddgZddddd
ddddddddddgZed��Zed��Zed��Z	ed ��Z
ed!��Zed"��Zed#��Z
ed$��Zed%��Zed&��Zed'��Zed(��ZRS()tparenttdefaultsFromtcollect_geot
collectGeot
collect_ipt	collectIptcollect_max_tps_and_throughputtcollectMaxTpsAndThroughputtcollect_page_load_timetcollectPageLoadTimetcollect_urlt
collectUrltcollect_user_agenttcollectUserAgenttcollect_user_sessionstcollectUserSessionst collected_stats_external_loggingtcollectedStatsExternalLoggingt collected_stats_internal_loggingtcollectedStatsInternalLoggingtexternal_logging_publishertexternalLoggingPublishertnotification_by_syslogtnotificationBySyslogtnotification_by_emailtnotificationByEmailtnotification_email_addressestnotificationEmailAddressestdescriptioncC`sK|jddkrdS|jddkr.dSt|j|jd�}|S(NR'tnonet(R0R1(t_valuestNoneR
t	partition(tselftresult((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR'�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRscC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRscC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR	scC`st|jd�S(NR!(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR!
scC`st|jd�S(NR#(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR#scC`st|jd�S(NR%(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR%scC`st|jd�S(NR)(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR)scC`st|jd�S(NR+(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR+s(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR'RRRRRRR!R#R%R)R+(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�s�
				t
ApiParameterscB`seZed��ZRS(cC`s"|jddkrdS|jdS(NR/R0(Nsnone(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR/#s(R7R8R=R/(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR>"stModuleParameterscB`s5eZed��Zed��Zed��ZRS(cC`s9|jddkrdS|jddkr.dS|jdS(NR/R0R1(snoneR1(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR/+s
cC`s4|jddkrdSt|j|jd�}|S(NR(R2R3R
R4(R5R6((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR3scC`sV|jddkrdSt|jd�dkrK|jdddkrKgS|jdS(NR-iiR1R0(R1snone(R2R3tlen(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR-:s
0(R7R8R=R/RR-(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR?*stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R;tgetattrt_filter_paramst	Exception(R5R6t
returnable((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt	to_returnDs
(R7R8RF(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRACst
UsableChangescB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
RS(cC`s2|jddkrdS|jddkr.dSdS(NRtyestenabledtdisabled(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRPs
cC`s2|jddkrdS|jddkr.dSdS(NRRHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRXs
cC`s2|jddkrdS|jddkr.dSdS(NRRHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR`s
cC`s2|jddkrdS|jddkr.dSdS(NRRHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRhs
cC`s2|jddkrdS|jddkr.dSdS(NRRHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRps
cC`s2|jddkrdS|jddkr.dSdS(NRRHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRxs
cC`s2|jddkrdS|jddkr.dSdS(NR!RHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR!�s
cC`s2|jddkrdS|jddkr.dSdS(NR#RHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR#�s
cC`s2|jddkrdS|jddkr.dSdS(NR%RHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR%�s
cC`s2|jddkrdS|jddkr.dSdS(NR)RHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR)�s
cC`s2|jddkrdS|jddkr.dSdS(NR+RHRIRJ(R2R3(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR+�s
(R7R8R=RRRRRRR!R#R%R)R+(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRGOstReportableChangescB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
RS(cC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�scC`st|jd�S(NR!(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR!�scC`st|jd�S(NR#(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR#�scC`st|jd�S(NR%(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR%�scC`st|jd�S(NR)(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR)�scC`st|jd�S(NR+(RR2(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR+�s(R7R8R=RRRRRRR!R#R%R)R+(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRK�st
DifferencecB`sbeZdd�Zd�Zd�Zed��Zed��Zed��Z	ed��Z
RS(cC`s||_||_dS(N(twantthave(R5RMRN((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RBtAttributeErrort_Difference__default(R5tparamR6((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RBRMRNRP(R5RRtattr1tattr2((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt	__default�s
cC`sA|jjdkrdS|jj|jjkr=td��ndS(Ns$The parent profile cannot be changed(RMRR3RNR(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�s
cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NR1(RMR/R3RN(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR/�s$cC`st|jj|jj�S(N(RRMR-RN(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR-�scC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NR1(RMR'R3RN(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR's$N(R7R8R3RORSRQR=RR/R-R'(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRL�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�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR3RXR
RYtclientR?RMR>RNRGtchanges(R5targstkwargs((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRO
s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRY(RR;RBRMR3RGR\(R5tchangedtkey((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt_set_changed_optionss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(RLRMRNRR<tdictRSR3t
isinstancetupdateRGR\tTruetFalse(R5tdiffR<R_tktchange((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt_update_changed_optionss		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopR[RXt	deprecate(R5R6twarningstwarning((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt_announce_deprecations.s


cC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRYR_(RfRbRMtstateRsRtRKR\RFRdRr(R5R_R6Rut
reportableR\((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pytexec_module6s	

cC`s$|j�r|j�S|j�SdS(N(texistsRdtcreate(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRsGs
cC`s|j�r|j�StS(N(RxtremoveRf(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRtMs
cC`s|j�}|rtStS(N(RjReRf(R5R6((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt
should_updateRscC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRNR{RfRXt
check_modeRetupdate_on_device(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRdXs
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RXR}Retremove_from_deviceRxR(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRzas
cC`s(|j�|jjrtS|j�tS(N(RaRXR}Retcreate_on_device(R5((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRyis


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/ltm/profile/analytics/{2}tservertserver_porti�tcode(tformatR[tproviderRRMR4tnametapiRZtjsont
ValueErrorRfRRe(R5turitresptresponse((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRxps


+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��ntS(
NR�R4s.https://{0}:{1}/mgmt/tm/ltm/profile/analytics/R�R�R�R�i�i�i�tmessage(i�i�i�(R\t
api_paramsRMR�R4R�R[R�R�tpostR�R�RtstrtcontentRe(R5RYR�R�R�tex((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR�s 
cC`s�|jj�}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��ndS(
Ns1https://{0}:{1}/mgmt/tm/ltm/profile/analytics/{2}R�R�R�R�i�i�R�(i�i�(R\R�R�R[R�RRMR4R�R�tpatchR�R�RR�R�(R5RYR�R�R�R�((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR~�s

cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns1https://{0}:{1}/mgmt/tm/ltm/profile/analytics/{2}R�R�i�(
R�R[R�RRMR4R�R�tdeleteRReRR�(R5R�R�((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.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(Ns1https://{0}:{1}/mgmt/tm/ltm/profile/analytics/{2}R�R�R�i�R�RY(R�R[R�RRMR4R�R�RZR�R�RR�R�R>(R5R�R�R�R�((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR|�s

(R7R8RORaRjRrRwRsRtR{RdRzRyRxR�R~RR|(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRWs 																tArgumentSpeccB`seZd�ZRS(c*C`sVt|_tdtdt�dt�dt�dtdd�dtdd�d	tdd�d
tdd�dtdd�dtdd�d
tdd�dtdd�dtdd�dt�dtdd�dtdd�dtdd�dtdddddg�dtdddtdgf��}i|_|jjt�|jj|�dS(NR�trequiredRR/RttypetboolRRRRRR!R#R%R'R)R+R-tlistRutdefaultRstchoicesRtR4tCommontfallbacktF5_PARTITION(Retsupports_check_modeRbR	t
argument_specRdR(R5R�((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyRO�s6					(R7R8RO(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RXRl(
R�RR�R�RWRwt	exit_jsonRt	fail_jsonR�(tspecRXtmmtresultsR�((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pytmain�s		t__main__N((t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	t%library.module_utils.network.f5.bigipR
t&library.module_utils.network.f5.commonRRR
RRRt'library.module_utils.network.f5.compareRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont'ansible.module_utils.network.f5.compareRR>R?RARGRKtobjectRLRWR�R�R7(((sV/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_profile_analytics.pyt<module>sN


f

~Z.5�"	

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