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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZy�dd
l
mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�dd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddl 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_bys�$
---
module: bigip_monitor_dns
short_description: Manage DNS monitors on a BIG-IP
description:
  - Manages DNS monitors on a BIG-IP.
version_added: 2.7
options:
  name:
    description:
      - Specifies the name of the monitor.
    type: str
    required: True
  parent:
    description:
      - The parent template of this monitor template. Once this value has
        been set, it cannot be changed. By default, this value is the C(dns)
        parent on the C(Common) partition.
    type: str
    default: /Common/dns
  description:
    description:
      - The description of the monitor.
    type: str
  interval:
    description:
      - The interval specifying how frequently the monitor instance of this
        template will run.
      - This value B(must) be less than the C(timeout) value.
      - When creating a new monitor, if this parameter is not provided, the
        default C(5) will be used.
    type: int
  up_interval:
    description:
      - Specifies the interval for the system to use to perform the health check
        when a resource is up.
      - When C(0), specifies that the system uses the interval specified in
        C(interval) to check the health of the resource.
      - When any other number, enables specification of a different interval to
        use when checking the health of a resource that is up.
      - When creating a new monitor, if this parameter is not provided, the
        default C(0) will be used.
    type: int
  timeout:
    description:
      - The number of seconds in which the node or service must respond to
        the monitor request.
      - If the target responds within the set time period, it is considered up.
      - If the target does not respond within the set time period, it is considered down.
      - You can change this number to any number you want, however, it should be 3 times the
        interval number of seconds plus 1 second.
      - If this parameter is not provided when creating a new monitor, then the default
        value will be C(16).
    type: int
  transparent:
    description:
      - Specifies whether the monitor operates in transparent mode.
      - Monitors in transparent mode can monitor pool members through firewalls.
      - When creating a new monitor, if this parameter is not provided, then the default
        value will be C(no).
    type: bool
  reverse:
    description:
      - Specifies whether the monitor operates in reverse mode.
      - When the monitor is in reverse mode, a successful receive string match
        marks the monitored object down instead of up. You can use the
        this mode only if you configure the C(receive) option.
      - This parameter is not compatible with the C(time_until_up) parameter. If
        C(time_until_up) is specified, it must be C(0). Or, if it already exists, it
        must be C(0).
    type: bool
  receive:
    description:
      - Specifies the IP address that the monitor uses from the resource record sections
        of the DNS response.
      - The IP address should be specified in the dotted-decimal notation or IPv6 notation.
    type: str
  time_until_up:
    description:
      - Specifies the amount of time in seconds after the first successful
        response before a node will be marked up.
      - A value of 0 will cause a node to be marked up immediately after a valid
        response is received from the node.
      - If this parameter is not provided when creating a new monitor, then the default
        value will be C(0).
    type: int
  manual_resume:
    description:
      - Specifies whether the system automatically changes the status of a resource
        to B(enabled) at the next successful monitor check.
      - If you set this option to C(yes), you must manually re-enable the resource
        before the system can use it for load balancing connections.
      - When creating a new monitor, if this parameter is not specified, the default
        value is C(no).
      - When C(yes), specifies that you must manually re-enable the resource after an
        unsuccessful monitor check.
      - When C(no), specifies that the system automatically changes the status of a
        resource to B(enabled) at the next successful monitor check.
    type: bool
  ip:
    description:
      - IP address part of the IP/port definition.
      - If this parameter is not provided when creating a new monitor, then the
        default value will be C(*).
    type: str
  port:
    description:
      - Port address part of the IP/port definition.
      - If this parameter is not provided when creating a new monitor, then the default
        value will be C(*).
      - Note that if specifying an IP address, a value between 1 and 65535 must be specified.
    type: str
  query_name:
    description:
      - Specifies a query name for the monitor to use in a DNS query.
    type: str
  query_type:
    description:
      - Specifies the type of DNS query that the monitor sends.
      - When creating a new monitor, if this parameter is not specified, the default
        value is C(a).
      - When C(a), specifies that the monitor will send a DNS query of type A.
      - When C(aaaa), specifies that the monitor will send a DNS query of type AAAA.
    type: str
    choices:
      - a
      - aaaa
  answer_section_contains:
    description:
      - Specifies the type of DNS query that the monitor sends.
      - When creating a new monitor, if this value is not specified, the default
        value is C(query-type).
      - When C(query-type), specifies that the response should contain at least one
        answer of which the resource record type matches the query type.
      - When C(any-type), specifies that the DNS message should contain at least one answer.
      - When C(anything), specifies that an empty answer is enough to mark the status of
        the node up.
    type: str
    choices:
      - any-type
      - anything
      - query-type
  accept_rcode:
    description:
      - Specifies the RCODE required in the response for an up status.
      - When creating a new monitor, if this parameter is not specified, the default
        value is C(no-error).
      - When C(no-error), specifies that the status of the node will be marked up if
        the received DNS message has no error.
      - When C(anything), specifies that the status of the node will be marked up
        irrespective of the RCODE in the DNS message received.
      - If this parameter is set to C(anything), it will disregard the C(receive)
        string, and nullify it if the monitor is being updated.
    type: str
    choices:
      - no-error
      - anything
  adaptive:
    description:
      - Specifies whether adaptive response time monitoring is enabled for this monitor.
      - When C(yes), the monitor determines the state of a service based on how divergent
        from the mean latency a monitor probe for that service is allowed to be.
        Also, values for the C(allowed_divergence), C(adaptive_limit), and
        and C(sampling_timespan) will be enforced.
      - When C(disabled), the monitor determines the state of a service based on the
        C(interval), C(up_interval), C(time_until_up), and C(timeout) monitor settings.
    type: bool
  allowed_divergence_type:
    description:
      - When specifying a new monitor, if C(adaptive) is C(yes), the default is
        C(relative)
      - When C(absolute), the number of milliseconds the latency of a monitor probe
        can exceed the mean latency of a monitor probe for the service being probed.
        In typical cases, if the monitor detects three probes in a row that miss the
        latency value you set, the pool member or node is marked down.
      - When C(relative), the percentage of deviation the latency of a monitor probe
        can exceed the mean latency of a monitor probe for the service being probed.
    type: str
    choices:
      - relative
      - absolute
  allowed_divergence_value:
    description:
      - When specifying a new monitor, if C(adaptive) is C(yes), and C(type) is
        C(relative), the default is C(25) percent.
    type: int
  adaptive_limit:
    description:
      - Specifies the absolute number of milliseconds that may not be exceeded by a monitor
        probe, regardless of C(allowed_divergence) setting, for a probe to be
        considered successful.
      - This value applies regardless of the value of the C(allowed_divergence) setting.
      - While this value can be configured when C(adaptive) is C(no), it will not take
        effect on the system until C(adaptive) is C(yes).
    type: int
  sampling_timespan:
    description:
      - Specifies the length, in seconds, of the probe history window that the system
        uses to calculate the mean latency and standard deviation of a monitor probe.
      - While this value can be configured when C(adaptive) is C(no), it will not take
        effect on the system until C(adaptive) is C(yes).
    type: int
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
  state:
    description:
      - When C(present), ensures that the monitor exists.
      - When C(absent), ensures the monitor is removed.
    type: str
    choices:
      - present
      - absent
    default: present
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s,
- name: Create a DNS monitor
  bigip_monitor_dns:
    name: DNS-UDP-V6
    interval: 2
    query_name: localhost
    query_type: aaaa
    up_interval: 5
    adaptive: no
    state: present
    provider:
      user: admin
      password: secret
      server: lb.mydomain.com
  delegate_to: localhost
s�
parent:
  description: New parent template of the monitor.
  returned: changed
  type: str
  sample: http
ip:
  description: The new IP of IP/port definition.
  returned: changed
  type: str
  sample: 10.12.13.14
interval:
  description: The new interval in which to run the monitor check.
  returned: changed
  type: int
  sample: 2
timeout:
  description: The new timeout in which the remote system must respond to the monitor.
  returned: changed
  type: int
  sample: 10
time_until_up:
  description: The new time in which to mark a system as up after first successful response.
  returned: changed
  type: int
  sample: 2
adaptive:
  description: Whether adaptive is enabled or not.
  returned: changed
  type: bool
  sample: yes
accept_rcode:
  description: RCODE required in the response for an up status.
  returned: changed
  type: str
  sample: no-error
allowed_divergence_type:
  description: Type of divergence used for adaptive response time monitoring.
  returned: changed
  type: str
  sample: absolute
allowed_divergence_value:
  description:
    - Value of the type of divergence used for adaptive response time monitoring.
    - May be C(percent) or C(ms) depending on whether C(relative) or C(absolute).
  returned: changed
  type: int
  sample: 25
description:
  description: The description of the monitor.
  returned: changed
  type: str
  sample: Important Monitor
adaptive_limit:
  description: Absolute number of milliseconds that may not be exceeded by a monitor probe.
  returned: changed
  type: int
  sample: 200
sampling_timespan:
  description: Absolute number of milliseconds that may not be exceeded by a monitor probe.
  returned: changed
  type: int
  sample: 200
answer_section_contains:
  description: Type of DNS query that the monitor sends.
  returned: changed
  type: str
  sample: query-type
manual_resume:
  description:
    - Whether the system automatically changes the status of a resource to enabled at the
      next successful monitor check.
  returned: changed
  type: str
  sample: query-type
up_interval:
  description: Interval for the system to use to perform the health check when a resource is up.
  returned: changed
  type: int
  sample: 0
query_name:
  description: Query name for the monitor to use in a DNS query.
  returned: changed
  type: str
  sample: foo
query_type:
  description: Type of DNS query that the monitor sends. Either C(a) or C(aaaa).
  returned: changed
  type: str
  sample: aaaa
receive:
  description: IP address that the monitor uses from the resource record sections of the DNS response.
  returned: changed
  type: str
  sample: 2.3.2.4
reverse:
  description: Whether the monitor operates in reverse mode.
  returned: changed
  type: bool
  sample: yes
port:
  description:
    - Alias port or service for the monitor to check, on behalf of the pools or pool
      members with which the monitor is associated.
  returned: changed
  type: str
  sample: 80
transparent:
  description: Whether the monitor operates in transparent mode.
  returned: changed
  type: bool
  sample: no
(t
AnsibleModule(tenv_fallback(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tflatten_boolean(tis_valid_ip(tvalidate_ip_v6_address(tvalidate_ip_address(tcmp_str_with_nonet
ParameterscB`s�eZi
dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6Zdddddd	dddddd
ddddddd ddgZdddddddd
dddddddddd dd!d"gZddddddd
dddddddddd dddgZed#��Zed$��Zej	d%��Zed&��Z
ed'��Zed(��Zed)��Z
ed*��Zed+��Zed,��ZRS(-taccept_rcodetacceptRcodetallowed_divergence_typetadaptiveDivergenceTypetallowed_divergence_valuetadaptiveDivergenceValuetadaptive_limitt
adaptiveLimittsampling_timespantadaptiveSamplingTimespantanswer_section_containstanswerContainst
manual_resumetmanualResumet
time_until_upttimeUntilUptup_intervalt
upIntervalt
query_nametqnamet
query_typetqtypetreceivetrecvtparenttdefaultsFromtadaptivetdescriptiontdestinationtintervaltreversettimeoutttransparenttiptportcC`sdS(Ntdns((tself((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyttype�scC`s>|jdkr"|jdkr"dSdj|j|j�}|S(Ns{0}:{1}(R7tNoneR8tformat(R:R2((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR2�scC`s3|jd�\}}||jd<||jd<dS(Nt:R7R8(tsplitt_values(R:tvalueR7R8((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR2�s
cC`s`|jddkrdSdt|jd�ko;dknrOtd��nt|jd�S(NR3ii�Qs*Interval value must be between 1 and 86400(R@R<tintR(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR3�s)cC`s(|jddkrdSt|jd�S(NR5(R@R<RB(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR5scC`s\|jddkrdS|jddkr.dSt|jd�rL|jdStd��dS(NR7t*s0.0.0.0s1The provided 'ip' parameter is not an IP address.(RCs0.0.0.0(R@R<RR(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR7	scC`s\|jddkrdS|jddkr.dSt|jd�rL|jdStd��dS(NR,tsGThe specified 'receive' parameter must be either an IPv4 or v6 address.(R@R<RR(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR,scC`s?|jddkrdS|jddkr.dSt|jd�S(NR8RC(R@R<RB(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR8"s
cC`s(|jddkrdSt|jd�S(NR$(R@R<RB(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR$*scC`s4|jddkrdSt|j|jd�}|S(NR.(R@R<R
t	partition(R:tresult((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR.0s(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR;R2tsetterR3R5R7R,R8R$R.(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR�s�
			

t
ApiParameterscB`seZed��ZRS(cC`s"|jddkrdS|jdS(NR1tnone(NRP(R@R<(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR19s(RGRHRMR1(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRO8stModuleParameterscB`sSeZed��Zed��Zed��Zed��Zed��ZRS(cC`s9|jddkrdS|jddkr.dS|jdS(NR1RPRD(snoneRD(R@R<(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR1As
cC`s2|jddkrdS|jdtkr.dSdS(NR"tenabledtdisabled(R@R<tTrue(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR"Is
cC`s2|jddkrdS|jdtkr.dSdS(NR4RRRS(R@R<RT(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR4Qs
cC`s2|jddkrdS|jdtkr.dSdS(NR6RRRS(R@R<RT(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR6Ys
cC`s2|jddkrdS|jdtkr.dSdS(NR0RRRS(R@R<RT(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR0as
(RGRHRMR1R"R4R6R0(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRQ@s
tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(RKtgetattrt_filter_paramst	Exception(R:RFt
returnable((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt	to_returnks
(RGRHRZ(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRUjst
UsableChangescB`seZRS((RGRH(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR[vstReportableChangescB`sDeZed��Zed��Zed��Zed��ZRS(cC`st|jd�S(NR"(RR@(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR"{scC`st|jd�S(NR4(RR@(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR4scC`st|jd�S(NR6(RR@(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR6�scC`st|jd�S(NR0(RR@(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR0�s(RGRHRMR"R4R6R0(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR\zst
DifferencecB`sbeZdd�Zd�Zed��Zed��Zed��Zd�Z	ed��Z
RS(cC`s||_||_dS(N(twantthave(R:R^R_((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RVtAttributeErrort_Difference__default(R:tparamRF((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pytcompare�s

cC`s+|jj|jjkr'td��ndS(Ns$The parent monitor cannot be changed(R^R.R_R(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR.�scC`s�|jjdkr(|jjdkr(dS|jjdkrZ|jji|jjd6�n|jjdkr�|jji|jjd6�n|jjdkr�|jjdkr�td��n|jj|jjkr�|jjSdS(NR8R7RCsASpecifying an IP address requires that a port number be specified(NRC(R^R7R<R8tupdateR_RR2(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR2�s$  $cC`s�|jjdk	rN|jjdk	rN|jj|jjkr�td��q�nx|jjdk	r�|jj|jjkr�td��q�n<|jjdk	r�|jj|jjkr�td��q�n|jj|jjkr�|jjSdS(Ns1Parameter 'interval' must be less than 'timeout'.(R^R5R<R3RR_(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR3�s$cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RVR^R_Ra(R:Rctattr1tattr2((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt	__default�s
cC`st|jj|jj�S(N(RR^R1R_(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR1�sN(RGRHR<R`RdRMR.R2R3RbR1(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.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�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR<RjR
RktclientRQR^ROR_R[tchanges(R:targstkwargs((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR`�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRk(RRKRVR^R<R[Rn(R:tchangedtkey((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.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(NRk(R]R^R_RRLtdictRdR<t
isinstanceReR[RnRTtFalse(R:tdiffRLRqtktchange((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt_update_changed_options�s		
cC`s|j�}|rtStS(N(RzRTRv(R:RF((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt
should_update�scC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRkRq(RvRtR^tstateR|R}R\RnRZRet_announce_deprecations(R:RqRFR~t
reportableRn((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pytexec_module�s	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRmRjt	deprecate(R:RFtwarningstwarning((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRs


cC`s$|j�r|j�S|j�SdS(N(texistsRetcreate(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR|s
cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns+https://{0}:{1}/mgmt/tm/ltm/monitor/dns/{2}tservertserver_porti�tcode(R=RmtproviderRR^REtnametapiRltjsont
ValueErrorRvRRT(R:turitresptresponse((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR�s


+cC`s{|jj|krw|jj|krw|jjdk	rL||jj�rLtS|jjdk	rw||jj�rwtSndS(N(R^R*R_R,R<RT(R:R;t	validator((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt _address_type_matches_query_type(s
$$$c	C`s�|j�|_|j�stS|jjdkr�|jjrZ|jjrZtd��n|jjdkr�|jjdkr�td��q�n|j	dt
�r�td��n!|j	dt�r�td��n|jjd	krj|jjdk	r)t|jj�r)|jjdk	r)td
��qj|jjdkrj|jjdk	rj|jjidd6�qjn|jjrztS|j�tS(
NRRs<A 'receive' string must be specified when setting 'reverse'.isXMonitors with the 'reverse' attribute are not currently compatible with 'time_until_up'.tasPMonitor has a IPv6 address. Only a 'query_type' of 'aaaa' is supported for IPv6.taaaasMMonitor has a IPv4 address. Only a 'query_type' of 'a' is supported for IPv4.tanythingsRNo 'receive' string may be specified, or exist, when 'accept_rcode' is 'anything'.RDR,(tread_current_from_deviceR_R{RvR^R4R,RR$R�RRRR<RReRjt
check_modeRTtupdate_on_device(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRe/s4$6$
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RjR�RTtremove_from_deviceR�R(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pytremoveQs
c	C`s�|j�|jjdkr[|jjdkr=td��n|jjs[td��q[n|jjdk	r�t|jj�r�|jjdkr�td��nE|jjdk	r�t	|jj�r�|jjdkr�td��n|jj
d	krY|jjdk	r*t|jj�r*td
��qY|jjdkrY|jjidd6�qYn|jj
dkrztd
��n|jjr�tS|j�tS(NRRisXMonitors with the 'reverse' attribute are not currently compatible with 'time_until_up'.s<A 'receive' string must be specified when setting 'reverse'.R�sPMonitor has a IPv6 address. Only a 'query_type' of 'aaaa' is supported for IPv6.R�sMMonitor has a IPv4 address. Only a 'query_type' of 'a' is supported for IPv4.R�sRNo 'receive' string may be specified, or exist, when 'accept_rcode' is 'anything'.RDR,s9'query_name' is required when creating a new DNS monitor.(RsR^R4R$RR,R<RR*RRRReR(RjR�RTtcreate_on_device(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR�Ys6
66$
cC`s�|jj�}|jj|d<|jj|d<dj|jjd|jjd�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d
|kr�t|d
��q�t|j��ndS(NR�REs(https://{0}:{1}/mgmt/tm/ltm/monitor/dns/R�R�R�R�i�i�tmessage(i�i�(Rnt
api_paramsR^R�RER=RmR�R�tpostR�R�Rtstrtcontent(R:RkR�R�R�tex((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR�s
cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d|kr�t
|d��q�t
|j��ndS(Ns+https://{0}:{1}/mgmt/tm/ltm/monitor/dns/{2}R�R�R�R�i�R�(RnR�R=RmR�RR^RER�R�tpatchR�R�RR�R�(R:RkR�R�R�R�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR��s

cC`s|j�r|j�StS(N(R�R�Rv(R:((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR}�s
cC`sjdj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
SdS(Ns+https://{0}:{1}/mgmt/tm/ltm/monitor/dns/{2}R�R�i�(R=RmR�RR^RER�R�tdeleteRRT(R:R�R�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.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(Ns+https://{0}:{1}/mgmt/tm/ltm/monitor/dns/{2}R�R�R�i�R�Rk(R=RmR�RR^RER�R�RlR�R�RR�R�RO(R:R�R�R�R�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR��s

(RGRHR`RsRzR{R�RR|R�R�ReR�R�R�R�R}R�R�(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyRi�s"										"		&				
tArgumentSpeccB`seZd�ZRS(c6C`s�t|_tdtdt�dtdd�dt�dt�dt�d	t�d
tdd�d
tdd�dtdd�dtdd�dtdd�dtdd�dtdd�dtdddg�dtdd�dtdd�dtdd�dtddddg�dt�dtdd d!g�d"tdd#d$g�d%tdd�d&tdd'dd'd(g�d)tdd*d+td,gf��}i|_|jjt�|jj|�dS(-NR�trequiredR.tdefaults/Common/dnsR,R7R1R8R3R;RBR5R"tboolR4R6R$R&Rtchoicessno-errorR�R0RRR sany-types
query-typeR(R*R�R�RtrelativetabsoluteRR~R|R}REtCommontfallbacktF5_PARTITION(RTtsupports_check_modeRtR	t
argument_specReR(R:R�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR`�sD							(RGRHR`(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RjR�(
R�RR�R�RiR�t	exit_jsonRt	fail_jsonR�(tspecRjtmmtresultsR�((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.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.ipaddressRRRt'library.module_utils.network.f5.compareRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont)ansible.module_utils.network.f5.ipaddresst'ansible.module_utils.network.f5.compareRRORQRUR[R\tobjectR]RiR�R�RG(((sP/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_monitor_dns.pyt<module>sZ


�r
�*F�*	

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