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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dd
lmZddlmZddlmZytddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��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*kr�e*�ndS(+i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_node
short_description: Manages F5 BIG-IP LTM nodes
description:
  - Manages F5 BIG-IP LTM nodes.
version_added: 1.4
options:
  state:
    description:
      - Specifies the current state of the node. C(enabled) (All traffic
        allowed), specifies that system sends traffic to this node regardless
        of the node's state. C(disabled) (Only persistent or active connections
        allowed), Specifies that the node can handle only persistent or
        active connections. C(offline) (Only active connections allowed),
        Specifies that the node can handle only active connections. In all
        cases except C(absent), the node will be created if it does not yet
        exist.
      - Be particularly careful about changing the status of a node whose FQDN
        cannot be resolved. These situations disable your ability to change their
        C(state) to C(disabled) or C(offline). They will remain in an
        *Unavailable - Enabled* state.
    type: str
    choices:
      - present
      - absent
      - enabled
      - disabled
      - offline
    default: present
  name:
    description:
      - Specifies the name of the node.
    type: str
    required: True
  monitor_type:
    description:
      - Monitor rule type when C(monitors) is specified. When creating a new
        pool, if this value is not specified, the default of 'and_list' will
        be used.
      - Both C(single) and C(and_list) are functionally identical since BIG-IP
        considers all monitors as "a list". BIG=IP either has a list of many,
        or it has a list of one. Where they differ is in the extra guards that
        C(single) provides; namely that it only allows a single monitor.
    version_added: "1.3"
    type: str
    choices:
     - and_list
     - m_of_n
     - single
  quorum:
    description:
      - Monitor quorum value when C(monitor_type) is C(m_of_n).
    type: int
    version_added: 2.2
  monitors:
    description:
      - Specifies the health monitors that the system currently uses to
        monitor this node.
    type: list
    version_added: 2.2
  address:
    description:
      - IP address of the node. This can be either IPv4 or IPv6. When creating a
        new node, one of either C(address) or C(fqdn) must be provided. This
        parameter cannot be updated after it is set.
    type: str
    aliases:
      - ip
      - host
    version_added: 2.2
  fqdn:
    description:
      - FQDN name of the node. This can be any name that is a valid RFC 1123 DNS
        name. Therefore, the only characters that can be used are "A" to "Z",
        "a" to "z", "0" to "9", the hyphen ("-") and the period (".").
      - FQDN names must include at lease one period; delineating the host from
        the domain. ex. C(host.domain).
      - FQDN names must end with a letter or a number.
      - When creating a new node, one of either C(address) or C(fqdn) must be
        provided. This parameter cannot be updated after it is set.
    type: str
    aliases:
      - hostname
    version_added: 2.5
  fqdn_address_type:
    description:
      - Specifies whether the FQDN of the node resolves to an IPv4 or IPv6 address.
      - When creating a new node, if this parameter is not specified and C(fqdn) is
        specified, this parameter will default to C(ipv4).
      - This parameter cannot be changed after it has been set.
    type: str
    choices:
      - ipv4
      - ipv6
      - all
    version_added: 2.6
  fqdn_auto_populate:
    description:
      - Specifies whether the system automatically creates ephemeral nodes using
        the IP addresses returned by the resolution of a DNS query for a node defined
        by an FQDN.
      - When C(yes), the system generates an ephemeral node for each IP address
        returned in response to a DNS query for the FQDN of the node. Additionally,
        when a DNS response indicates the IP address of an ephemeral node no longer
        exists, the system deletes the ephemeral node.
      - When C(no), the system resolves a DNS query for the FQDN of the node with the
        single IP address associated with the FQDN.
      - When creating a new node, if this parameter is not specified and C(fqdn) is
        specified, this parameter will default to C(yes).
      - This parameter cannot be changed after it has been set.
    type: bool
    version_added: 2.6
  fqdn_up_interval:
    description:
      - Specifies the interval in which a query occurs, when the DNS server is up.
        The associated monitor attempts to probe three times, and marks the server
        down if it there is no response within the span of three times the interval
        value, in seconds.
      - This parameter accepts a value of C(ttl) to query based off of the TTL of
        the FQDN. The default TTL interval is akin to specifying C(3600).
      - When creating a new node, if this parameter is not specified and C(fqdn) is
        specified, this parameter will default to C(3600).
    type: str
    version_added: 2.6
  fqdn_down_interval:
    description:
      - Specifies the interval in which a query occurs, when the DNS server is down.
        The associated monitor continues polling as long as the DNS server is down.
      - When creating a new node, if this parameter is not specified and C(fqdn) is
        specified, this parameter will default to C(5).
    type: int
    version_added: 2.6
  description:
    description:
      - Specifies descriptive text that identifies the node.
      - You can remove a description by either specifying an empty string, or by
        specifying the special value C(none).
    type: str
  connection_limit:
    description:
      - Node connection limit. Setting this to 0 disables the limit.
    type: int
    version_added: 2.7
  rate_limit:
    description:
      - Node rate limit (connections-per-second). Setting this to 0 disables the limit.
    type: int
    version_added: 2.7
  ratio:
    description:
      - Node ratio weight. Valid values range from 1 through 100.
      - When creating a new node, if this parameter is not specified, the default of
        C(1) will be used.
    type: int
    version_added: 2.7
  dynamic_ratio:
    description:
      - The dynamic ratio number for the node. Used for dynamic ratio load balancing.
      - When creating a new node, if this parameter is not specified, the default of
        C(1) will be used.
    type: int
    version_added: 2.7
  availability_requirements:
    description:
      - Specifies, if you activate more than one health monitor, the number of health
        monitors that must receive successful responses in order for the link to be
        considered available.
    suboptions:
      type:
        description:
          - Monitor rule type when C(monitors) is specified.
          - When creating a new pool, if this value is not specified, the default of
            'all' will be used.
        type: str
        choices:
          - all
          - at_least
      at_least:
        description:
          - Specifies the minimum number of active health monitors that must be successful
            before the link is considered up.
          - This parameter is only relevant when a C(type) of C(at_least) is used.
          - This parameter will be ignored if a type of C(all) is used.
        type: int
    type: dict
    version_added: 2.8
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
    version_added: 2.5
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
  - Wojciech Wypior (@wojtek0806)
s�
- name: Add node
  bigip_node:
    host: 10.20.30.40
    name: 10.20.30.40
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Add node with a single 'ping' monitor
  bigip_node:
    host: 10.20.30.40
    name: mytestserver
    monitors:
      - /Common/icmp
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Modify node description
  bigip_node:
    name: 10.20.30.40
    description: Our best server yet
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Delete node
  bigip_node:
    state: absent
    name: 10.20.30.40
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Force node offline
  bigip_node:
    state: disabled
    name: 10.20.30.40
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost

- name: Add node by their FQDN
  bigip_node:
    fqdn: foo.bar.com
    name: foobar.net
    provider:
      server: lb.mydomain.com
      user: admin
      password: secret
  delegate_to: localhost
sf
monitor_type:
  description:
    - Changed value for the monitor_type of the node.
  returned: changed and success
  type: str
  sample: m_of_n
quorum:
  description:
    - Changed value for the quorum of the node.
  returned: changed and success
  type: int
  sample: 1
monitors:
  description:
    - Changed list of monitors for the node.
  returned: changed and success
  type: list
  sample: ['icmp', 'tcp_echo']
description:
  description:
    - Changed value for the description of the node.
  returned: changed and success
  type: str
  sample: E-Commerce webserver in ORD
session:
  description:
    - Changed value for the internal session of the node.
  returned: changed and success
  type: str
  sample: user-disabled
state:
  description:
    - Changed value for the internal state of the node.
  returned: changed and success
  type: str
  sample: m_of_n
N(t
AnsibleModule(tenv_fallback(tBOOLEANS_FALSE(t
BOOLEANS_TRUE(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(t
ip_addresst
ParameterscB`s�eZidd6dd6dd6Zdddd	dddd
dg	Zddddd
ddd
ddddd	ddgZdddddddd
dd	dgZd�Zed��ZRS(tmonitorstmonitortconnection_limittconnectionLimitt
rate_limitt	rateLimittdescriptiontaddresstfqdntratiotsessiontstatetfqdn_auto_populatetfqdn_address_typetfqdn_up_intervaltfqdn_down_intervalt	fqdn_nametavailability_requirementsttmNamecC`s]i}y>x$|jD]}t||�||<qW|j|�}|SWntk
rX|SXdS(N(treturnablestgetattrt_filter_paramst	Exception(tselftresultt
returnable((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt	to_return�s
cC`s?|jddkrdS|jddkr.dSt|jd�S(NRtdisabledi(t_valuestNonetint(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s
(	t__name__t
__module__tapi_maptapi_attributesR't
updatablesR.tpropertyR(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRWsR
				
tChangescB`seZRS((R3R4(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR9�st
UsableChangescB`s&eZed��Zed��ZRS(cC`s�t�}|jddk	r0|jd|d<n|jddk	rW|jd|d<n|jddk	r~|jd|d<n|jddk	r�|jd|d<n|jd	dk	r�|jd	|d
<n|s�dS|S(NR"tintervalR#tdownIntervalR tautopopulateR$R&R!t
addressFamily(tdictR0R1(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s	cC`sd|jd}|dkrdSd|kr`dr`|jd�jd�}dj|�j�}|S|S(NRt{t}t(R0R1tstriptsplittjointrstrip(R+tmonitor_stringttmpR((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s
(R3R4R8RR(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR:�stReportableChangescB`sDeZed��Zed��Zed��Zed��ZRS(cC`sb|jddkrgSy+tjd|jd�}|j�|SWntk
r]|jdSXdS(NRs/\w+/[^\s}]+(R0R1tretfindalltsortR*(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s

cC`s6|jddkrdSd|jdkr.dSdSdS(NRsmin tat_leasttall(R0R1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pytavailability_requirement_type�s
cC`sY|jddkrdSd}tj||jd�}|dkrFdSt|jd��S(s�Returns the 'at least' value from the monitor string.
        The monitor string for a Require monitor looks like this.
            min 1 of { /Common/gateway_icmp }
        This method parses out the first of the numeric values. This values represents
        the "at_least" value that can be updated in the module.
        Returns:
             int: The at_least value if found. None otherwise.
        Rsmin\s+(?P<least>\d+)\s+of\s+tleastN(R0R1RJtsearchR2tgroup(R+tpatterntmatches((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRM�s
cC`s>|jddkrdSt�}|j|d<|j|d<|S(NRttypeRM(R0R1R?RORM(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR%�s	

(R3R4R8RRORMR%(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRI�s	tModuleParameterscB`s�eZd�Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zed	��Zed
��Z
RS(cC`sG|jddkrdS|jd|dkr2dSt|jd|�S(NR%(R0R1R2(R+RU((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt_get_availability_value�s
cC`sc|jddkrgSytjd|jd�}Wntk
rT|jd}nX|j�|S(NRs/\w+/[^\s}]+(R0R1RJRKR*RL(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt
monitors_lists

cC`s�|jddkrdSt|jd�dkrK|jdddkrKdSg|jD]}t|j|�^qU}|jdkr�|jt|j�kr�td��ndj	|�}d	j
|j|�}nd
j	|�j�}|S(NRiiRBs/Common/noneRMs>The 'at_least' value must not exceed the number of 'monitors'.t smin {0} of {{ {1} }}s and (R0R1tlenRXRt	partitionRORMR
REtformatRC(R+txRR,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRs0(cC`s|jdrY|jddkr)d}nd}tdd�|jd<||jdd<n|jddkrpdS|jddS(	Ntmonitor_typetsingletand_listRNRMRUR%(R_R`(R0R?R1(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyROs
	cC`sK|jdr>tdd�|jd<|jd|jdd<n|jd�S(NtquorumRMR%(R0R?R1RW(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRM,s
cC`s(|jddkrdSt|jd�S(NR"(R0R1tstr(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR"3scC`s(|jddkrdSt|jd�S(NR#(R0R1Rb(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR#9scC`s9|jjdd�}|tkr%dS|tkr5dSdS(NR tenabledR/(R0tgetR1RR
(R+t
auto_populate((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR ?s
cC`s|jjdd�S(NR(R0RdR1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR$Gsc
C`s�|jddkrdStd|jjdd�d|jjdd�d|jjdd�ddd	|jjdd��}|jjd
d�}|tkr�d|d<n|tkr�d|d<n|S(
NRR>R!R<R#R;R"R=R&R RcR/(R0R1R?RdRR
(R+R,Re((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRKs

cC`s9|jddkrdS|jddkr.dS|jdS(NRtnoneRB(RfRB(R0R1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR]s
(R3R4RWR8RXRRORMR"R#R R$RR(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRV�s	
t
ApiParameterscB`s�eZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	ed��Z
ed��ZRS(	cC`sC|jddkrdSd|jdkr?t|jdd�SdS(NRR;(R0R1Rb(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR"gscC`sC|jddkrdSd|jdkr?t|jdd�SdS(NRR<(R0R1Rb(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR#nscC`sC|jddkrdSd|jdkr?t|jdd�SdS(NRR>(R0R1Rb(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR!uscC`sC|jddkrdSd|jdkr?t|jdd�SdS(NRR=(R0R1Rb(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR |scC`s"|jddkrdS|jdS(NRRf(Nsnone(R0R1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�scC`s6|jddkrdSd|jdkr.dSdSdS(NRsmin RMRN(R0R1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRO�s
cC`sc|jddkrgSytjd|jd�}Wntk
rT|jd}nX|j�|S(NRs/\w+/[^\s}]+(R0R1RJRKR*RL(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRX�s

cC`s�|jddkrdS|jddkr.dSg|jD]}t|j|�^q8}|jdkr�dj|�}dj|j|�}ndj|�j	�}|S(NRtdefaultRMRYsmin {0} of {{ {1} }}s and (
R0R1RXRR[RORER\RMRC(R+R]RR,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s(cC`sS|jddkrdSd}tj||jd�}|dkrFdS|jd�S(s�Returns the 'at least' value from the monitor string.

        The monitor string for a Require monitor looks like this.

            min 1 of { /Common/gateway_icmp }

        This method parses out the first of the numeric values. This values represents
        the "at_least" value that can be updated in the module.

        Returns:
             int: The at_least value if found. None otherwise.
        Rsmin\s+(?P<least>\d+)\s+of\s+RPN(R0R1RJRQRR(R+RSRT((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRM�s(R3R4R8R"R#R!R RRORXRRM(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRgfs	t
DifferencecB`sSeZdd�Zd�Zd�Zed��Zed��Zed��Z	RS(cC`s||_||_dS(N(twantthave(R+RjRk((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R(tAttributeErrort_Difference__default(R+tparamR,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R(RjRkRm(R+Rotattr1tattr2((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt	__default�s
cC`sy|jjdkr{t|jj�dkr9td��q{t|jj�dkr{t|jj�dkr{td��q{n|jjdkr�dS|jjdkr�|jjdkr�dS|jjdkr�|jjdkr�dS|jjdkr	|jjdkr	dS|jjdkr7t|jj�dkr7dS|jjdkrS|jjS|jj|jjkru|jjSdS(NR_isJWhen using a 'monitor_type' of 'single', only one monitor may be provided.isZA single monitor must be specified if more than one monitor currently exists on your pool.Rhs/Common/none(RjR^RZRXR
RkRR1(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s*0$$$*
cC`s�d}|jjdkrE|jjd
kr�tdddd�}q�n�|jjdkr�|jjd	ks{|jjd
kr�tdd	dd�}q�n?|jjdkr�|jjd
kr�tdd	dd
�}q�n|S(NtpresentRcsuser-enabledsmonitor-enabledRRsuser-upR/s
user-disableds	user-downtoffline(spresentsenabled(suser-enabledsmonitor-enabled(R1RjRRkRR?(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s"$cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NRB(RjRR1Rk(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRs$N(
R3R4R1RlRpRnR8RRR(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRi�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�Zd�Zd�ZRS(cO`s[|jdd�|_t|jj�|_d|_td|jj�|_t	�|_
dS(Ntmoduletparams(RdR1RwRRxtclientRkRVRjR:tchanges(R+targstkwargs((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRls
	cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRx(RR'R(RjR1R:Rz(R+tchangedtkey((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.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(NRx(RiRjRkRR7R?RpR1t
isinstancetupdateR:RztTruetFalse(R+tdiffR7R}tktchange((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt_update_changed_options%s		
cC`s�g}|jr.||jjjdg�7}n|jrV||jjjdg�7}nx/|D]'}|jjd|dd|d�q]WdS(Nt
__warningstmsgtversion(RjR0RdRkRwt	deprecate(R+twarningstwarning((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt_announce_deprecations7s		

cC`s�t}t�}|jj}y:|dkr9|j�}n|dkrT|j�}nWn%tk
r|}tt|���nX|j	j
�}|j|�|jtd|��|j�|S(NRtRcR/RutabsentR}(spresentsenabledsdisabledsoffline(
R�R?RjRRtR�tIOErrorR
RbRzR.R�R�(R+R}R,RteRz((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pytexec_moduleCs	

cC`s$|j�r|j�S|j�SdS(N(texistsR�tcreate(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRtVs
cC`s�|jjdkr3|jjdkr3td��na|jjdk	rf|jjdk	rftd��n.|jjdk	r�|jjtdd��ndS(NsDAt least one of 'address' or 'fqdn' is required when creating a nodesDOnly one of 'address' or 'fqdn' can be provided when creating a nodeRtany6(RjRR1RR
R�R?(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt_check_required_creation_vars\s$$cC`s�|jjdkr4|jjtdddd��nY|jjdkrh|jjtdddd��n%|jjtdddd	d
t��dS(NRtRcRsuser-enabledRsuser-upR/s
user-disableds	user-downt
is_offline(spresentsenabled(RjRR�R?R�(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt _munge_creation_state_for_devicehs

cC`s�|j�|j�|jjdkr@|jjitd6�n|jjdkrl|jjidd6�n|jjdkr�|jjidd6�n|jj	dkr�|jjidd6�n|jj
dkr�|jjidd	6�n|jjdkr|jjidd
6�n|j�|j
jr6tS|jjrb|jji|jjd6�n|jjdk	r�|jji|jjd6�n|jj	dk	r�|jji|jj	d6�n|jjdk	r�|jji|jjd6�n|jjdk	r*|jji|jjd6�n|jjdk	r\|jji|jjd6�n|j�|j�s�td
��n|jjr�|j�ntS(NR tipv4R!iR"iR#iRt
dynamic_ratioRR$sFailed to create the node(R�R�RjR R1R�R�R!R"R#RR�RRwt
check_modeRRzR$tcreate_on_deviceR�R
R�tupdate_node_offline_on_device(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR��sF


      

cC`s|j�}|rtStS(N(R�R�R�(R+R,((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt
should_update�scC`s�|j�|_|j�stS|jjdk	r[|jj|jjkr[td��q[n|jjdk	r�|jj|jjkr�td��q�n|j	j
r�tS|j�|jj
dkr�|j�ntS(Ns5The 'fqdn_auto_populate' parameter cannot be changed.s4The 'fqdn_address_type' parameter cannot be changed.Ru(tread_current_from_deviceRkR�R�RjR R1R
R!RwR�R�tupdate_on_deviceRR�(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR��s"

cC`s|j�r|j�StS(N(R�tremoveR�(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR��s
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the node.(RwR�R�tremove_from_deviceR�R
(R+((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.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/node/{2}tservertserver_porttcodei�tmessageRx(R\RytproviderRRjR[tnametapiRdtjsont
ValueErrorR
RbtcontentRg(R+turitresptresponsetex((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.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/node/{2}R�R�i�R�(R\RyR�RRjR[R�R�RdR�R�R�RR�(R+R�R�R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR��s


+cC`s�tdddd�}dj|jjd|jjdt|jj|jj��}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd	|kr�|d	d
kr�d|kr�t|d��q�t|j��ndS(NRs
user-disabledRs	user-downs$https://{0}:{1}/mgmt/tm/ltm/node/{2}R�R�R�R�i�R�(R?R\RyR�RRjR[R�R�tpatchR�R�R
RbR�(R+RxR�R�R�R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s 	

cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|r�|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d|kr�t
|d��q�t
|j��q�ndS(Ns$https://{0}:{1}/mgmt/tm/ltm/node/{2}R�R�R�R�i�R�(Rzt
api_paramsR\RyR�RRjR[R�R�R�R�R�R
RbR�(R+RxR�R�R�R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�s

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��n|j�dS(NR�R[s!https://{0}:{1}/mgmt/tm/ltm/node/R�R�R�R�i�i�R�(i�i�(RzR�RjR�R[R\RyR�R�tpostR�R�R
RbR�t_wait_for_fqdn_checks(R+RxR�R�R�R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�.s 
cC`s=x6tr8|j�}|jdkr4tjd�qPqWdS(Ns
fqdn-checkingi(R�R�Rttimetsleep(R+Rk((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�Cs
	cC`sjdj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
SdS(Ns$https://{0}:{1}/mgmt/tm/ltm/node/{2}R�R�i�(R\RyR�RRjR[R�R�tdeleteRR�(R+R�R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�Ks

(R3R4RlRR�R�R�RtR�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRvs(								 	/										tArgumentSpeccB`seZd�ZRS(c)C`s�t|_tdtdt�dtdddg�dtddg�d	t�d
tddd
dddgdd
�dtdddtdgf�dtddddg�dtdd�dt�dtdd�d tdd�d!tdd�d"tdd�d#tdd�d$tdd%d&tdtddd'gdt�d'tdd��d(dd'd'ggg�d)tdd*�d+tdd,d-d.gd/d0�d1tddd/d0��}i|_|jjt�|jj|�d+d1d$gg|_dS(2NR�trequiredRtaliasesthosttipRthostnameRRtchoicesR�RtRcR/RuRhR[tCommontfallbacktF5_PARTITIONR!R�tipv6RNR RUtboolR"R#R2RRRR�R%R?toptionsRMtrequired_ifRtlistR^R`tm_of_nR_tremoved_in_versiong�(\��@Ra(R�tsupports_check_modeR?R	t
argument_specR�Rtmutually_exclusive(R+R�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyRlWsT							(R3R4Rl(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyR�VscC`s�t�}td|jd|jd|j�}y,td|�}|j�}|j|�Wn)tk
r�}|j	dt
|��nXdS(NR�R�R�RwR�(R�RR�R�R�RvR�t	exit_jsonR
t	fail_jsonRb(tspecRwtmmtresultsR�((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pytmain�s			t__main__(,t
__future__RRRRUt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRJR�tansible.module_utils.basicRR	t)ansible.module_utils.parsing.convert_boolR
Rt%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonR
RRRRt%library.module_utils.compat.ipaddressRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont%ansible.module_utils.compat.ipaddressRR9R:RIRVRgtobjectRiRvR�R�R3(((sI/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_node.pyt<module>sT


�@'
O1m\S�BC	

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