Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/netscaler/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZmZmZmZmZyZdd
lmZddlmZddlmZddlmZddlmZeZWne k
rZ!e"ZnXd�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-d�Z.d�Z/d�Z0e1d kr�e0�nd!S("i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_byssK
---
module: netscaler_cs_vserver
short_description: Manage content switching vserver
description:
    - Manage content switching vserver
    - This module is intended to run either on the ansible  control node or a bastion (jumpserver) with access to the actual netscaler instance

version_added: "2.4"

author: George Nikolopoulos (@giorgos-nikolopoulos)

options:

    name:
        description:
            - >-
                Name for the content switching virtual server. Must begin with an ASCII alphanumeric or underscore
                C(_) character, and must contain only ASCII alphanumeric, underscore C(_), hash C(#), period C(.), space,
                colon C(:), at sign C(@), equal sign C(=), and hyphen C(-) characters.
            - "Cannot be changed after the CS virtual server is created."
            - "Minimum length = 1"

    td:
        description:
            - >-
                Integer value that uniquely identifies the traffic domain in which you want to configure the entity.
                If you do not specify an ID, the entity becomes part of the default traffic domain, which has an ID
                of 0.
            - "Minimum value = 0"
            - "Maximum value = 4094"

    servicetype:
        choices:
            - 'HTTP'
            - 'SSL'
            - 'TCP'
            - 'FTP'
            - 'RTSP'
            - 'SSL_TCP'
            - 'UDP'
            - 'DNS'
            - 'SIP_UDP'
            - 'SIP_TCP'
            - 'SIP_SSL'
            - 'ANY'
            - 'RADIUS'
            - 'RDP'
            - 'MYSQL'
            - 'MSSQL'
            - 'DIAMETER'
            - 'SSL_DIAMETER'
            - 'DNS_TCP'
            - 'ORACLE'
            - 'SMPP'
        description:
            - "Protocol used by the virtual server."

    ipv46:
        description:
            - "IP address of the content switching virtual server."
            - "Minimum length = 1"

    targettype:
        choices:
            - 'GSLB'
        description:
            - "Virtual server target type."

    ippattern:
        description:
            - >-
                IP address pattern, in dotted decimal notation, for identifying packets to be accepted by the virtual
                server. The IP Mask parameter specifies which part of the destination IP address is matched against
                the pattern. Mutually exclusive with the IP Address parameter.
            - >-
                For example, if the IP pattern assigned to the virtual server is C(198.51.100.0) and the IP mask is
                C(255.255.240.0) (a forward mask), the first 20 bits in the destination IP addresses are matched with
                the first 20 bits in the pattern. The virtual server accepts requests with IP addresses that range
                from 198.51.96.1 to 198.51.111.254. You can also use a pattern such as C(0.0.2.2) and a mask such as
                C(0.0.255.255) (a reverse mask).
            - >-
                If a destination IP address matches more than one IP pattern, the pattern with the longest match is
                selected, and the associated virtual server processes the request. For example, if the virtual
                servers, C(vs1) and C(vs2), have the same IP pattern, C(0.0.100.128), but different IP masks of C(0.0.255.255)
                and C(0.0.224.255), a destination IP address of 198.51.100.128 has the longest match with the IP pattern
                of C(vs1). If a destination IP address matches two or more virtual servers to the same extent, the
                request is processed by the virtual server whose port number matches the port number in the request.

    ipmask:
        description:
            - >-
                IP mask, in dotted decimal notation, for the IP Pattern parameter. Can have leading or trailing
                non-zero octets (for example, C(255.255.240.0) or C(0.0.255.255)). Accordingly, the mask specifies whether
                the first n bits or the last n bits of the destination IP address in a client request are to be
                matched with the corresponding bits in the IP pattern. The former is called a forward mask. The
                latter is called a reverse mask.

    range:
        description:
            - >-
                Number of consecutive IP addresses, starting with the address specified by the IP Address parameter,
                to include in a range of addresses assigned to this virtual server.
            - "Minimum value = C(1)"
            - "Maximum value = C(254)"

    port:
        description:
            - "Port number for content switching virtual server."
            - "Minimum value = 1"
            - "Range C(1) - C(65535)"
            - "* in CLI is represented as 65535 in NITRO API"

    stateupdate:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - >-
                Enable state updates for a specific content switching virtual server. By default, the Content
                Switching virtual server is always UP, regardless of the state of the Load Balancing virtual servers
                bound to it. This parameter interacts with the global setting as follows:
            - "Global Level | Vserver Level | Result"
            - "enabled enabled enabled"
            - "enabled disabled enabled"
            - "disabled enabled enabled"
            - "disabled disabled disabled"
            - >-
                If you want to enable state updates for only some content switching virtual servers, be sure to
                disable the state update parameter.

    cacheable:
        description:
            - >-
                Use this option to specify whether a virtual server, used for load balancing or content switching,
                routes requests to the cache redirection virtual server before sending it to the configured servers.
        type: bool

    redirecturl:
        description:
            - >-
                URL to which traffic is redirected if the virtual server becomes unavailable. The service type of the
                virtual server should be either C(HTTP) or C(SSL).
            - >-
                Caution: Make sure that the domain in the URL does not match the domain specified for a content
                switching policy. If it does, requests are continuously redirected to the unavailable virtual server.
            - "Minimum length = 1"

    clttimeout:
        description:
            - "Idle time, in seconds, after which the client connection is terminated. The default values are:"
            - "Minimum value = C(0)"
            - "Maximum value = C(31536000)"

    precedence:
        choices:
            - 'RULE'
            - 'URL'
        description:
            - >-
                Type of precedence to use for both RULE-based and URL-based policies on the content switching virtual
                server. With the default C(RULE) setting, incoming requests are evaluated against the rule-based
                content switching policies. If none of the rules match, the URL in the request is evaluated against
                the URL-based content switching policies.

    casesensitive:
        description:
            - >-
                Consider case in URLs (for policies that use URLs instead of RULES). For example, with the C(on)
                setting, the URLs /a/1.html and /A/1.HTML are treated differently and can have different targets (set
                by content switching policies). With the C(off) setting, /a/1.html and /A/1.HTML are switched to the
                same target.
        type: bool

    somethod:
        choices:
            - 'CONNECTION'
            - 'DYNAMICCONNECTION'
            - 'BANDWIDTH'
            - 'HEALTH'
            - 'NONE'
        description:
            - >-
                Type of spillover used to divert traffic to the backup virtual server when the primary virtual server
                reaches the spillover threshold. Connection spillover is based on the number of connections.
                Bandwidth spillover is based on the total Kbps of incoming and outgoing traffic.

    sopersistence:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - "Maintain source-IP based persistence on primary and backup virtual servers."

    sopersistencetimeout:
        description:
            - "Time-out value, in minutes, for spillover persistence."
            - "Minimum value = C(2)"
            - "Maximum value = C(1440)"

    sothreshold:
        description:
            - >-
                Depending on the spillover method, the maximum number of connections or the maximum total bandwidth
                (Kbps) that a virtual server can handle before spillover occurs.
            - "Minimum value = C(1)"
            - "Maximum value = C(4294967287)"

    sobackupaction:
        choices:
            - 'DROP'
            - 'ACCEPT'
            - 'REDIRECT'
        description:
            - >-
                Action to be performed if spillover is to take effect, but no backup chain to spillover is usable or
                exists.

    redirectportrewrite:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - "State of port rewrite while performing HTTP redirect."

    downstateflush:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - >-
                Flush all active transactions associated with a virtual server whose state transitions from UP to
                DOWN. Do not enable this option for applications that must complete their transactions.

    backupvserver:
        description:
            - >-
                Name of the backup virtual server that you are configuring. Must begin with an ASCII alphanumeric or
                underscore C(_) character, and must contain only ASCII alphanumeric, underscore C(_), hash C(#), period C(.),
                space C( ), colon C(:), at sign C(@), equal sign C(=), and hyphen C(-) characters. Can be changed after the
                backup virtual server is created. You can assign a different backup virtual server or rename the
                existing virtual server.
            - "Minimum length = 1"

    disableprimaryondown:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - >-
                Continue forwarding the traffic to backup virtual server even after the primary server comes UP from
                the DOWN state.

    insertvserveripport:
        choices:
            - 'OFF'
            - 'VIPADDR'
            - 'V6TOV4MAPPING'
        description:
            - >-
                Insert the virtual server's VIP address and port number in the request header. Available values
                function as follows:
            - "C(VIPADDR) - Header contains the vserver's IP address and port number without any translation."
            - "C(OFF) - The virtual IP and port header insertion option is disabled."
            - >-
                C(V6TOV4MAPPING) - Header contains the mapped IPv4 address corresponding to the IPv6 address of the
                vserver and the port number. An IPv6 address can be mapped to a user-specified IPv4 address using the
                set ns ip6 command.

    vipheader:
        description:
            - "Name of virtual server IP and port header, for use with the VServer IP Port Insertion parameter."
            - "Minimum length = 1"

    rtspnat:
        description:
            - "Enable network address translation (NAT) for real-time streaming protocol (RTSP) connections."
        type: bool

    authenticationhost:
        description:
            - >-
                FQDN of the authentication virtual server. The service type of the virtual server should be either
                C(HTTP) or C(SSL).
            - "Minimum length = 3"
            - "Maximum length = 252"

    authentication:
        description:
            - "Authenticate users who request a connection to the content switching virtual server."
        type: bool

    listenpolicy:
        description:
            - >-
                String specifying the listen policy for the content switching virtual server. Can be either the name
                of an existing expression or an in-line expression.

    authn401:
        description:
            - "Enable HTTP 401-response based authentication."
        type: bool

    authnvsname:
        description:
            - >-
                Name of authentication virtual server that authenticates the incoming user requests to this content
                switching virtual server. .
            - "Minimum length = 1"
            - "Maximum length = 252"

    push:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - >-
                Process traffic with the push virtual server that is bound to this content switching virtual server
                (specified by the Push VServer parameter). The service type of the push virtual server should be
                either C(HTTP) or C(SSL).

    pushvserver:
        description:
            - >-
                Name of the load balancing virtual server, of type C(PUSH) or C(SSL_PUSH), to which the server pushes
                updates received on the client-facing load balancing virtual server.
            - "Minimum length = 1"

    pushlabel:
        description:
            - >-
                Expression for extracting the label from the response received from server. This string can be either
                an existing rule name or an inline expression. The service type of the virtual server should be
                either C(HTTP) or C(SSL).

    pushmulticlients:
        description:
            - >-
                Allow multiple Web 2.0 connections from the same client to connect to the virtual server and expect
                updates.
        type: bool

    tcpprofilename:
        description:
            - "Name of the TCP profile containing TCP configuration settings for the virtual server."
            - "Minimum length = 1"
            - "Maximum length = 127"

    httpprofilename:
        description:
            - >-
                Name of the HTTP profile containing HTTP configuration settings for the virtual server. The service
                type of the virtual server should be either C(HTTP) or C(SSL).
            - "Minimum length = 1"
            - "Maximum length = 127"

    dbprofilename:
        description:
            - "Name of the DB profile."
            - "Minimum length = 1"
            - "Maximum length = 127"

    oracleserverversion:
        choices:
            - '10G'
            - '11G'
        description:
            - "Oracle server version."

    comment:
        description:
            - "Information about this virtual server."

    mssqlserverversion:
        choices:
            - '70'
            - '2000'
            - '2000SP1'
            - '2005'
            - '2008'
            - '2008R2'
            - '2012'
            - '2014'
        description:
            - "The version of the MSSQL server."

    l2conn:
        description:
            - "Use L2 Parameters to identify a connection."
        type: bool

    mysqlprotocolversion:
        description:
            - "The protocol version returned by the mysql vserver."

    mysqlserverversion:
        description:
            - "The server version string returned by the mysql vserver."
            - "Minimum length = 1"
            - "Maximum length = 31"

    mysqlcharacterset:
        description:
            - "The character set returned by the mysql vserver."

    mysqlservercapabilities:
        description:
            - "The server capabilities returned by the mysql vserver."

    appflowlog:
        choices:
            - 'enabled'
            - 'disabled'
        description:
            - "Enable logging appflow flow information."

    netprofile:
        description:
            - "The name of the network profile."
            - "Minimum length = 1"
            - "Maximum length = 127"

    icmpvsrresponse:
        choices:
            - 'PASSIVE'
            - 'ACTIVE'
        description:
            - "Can be active or passive."

    rhistate:
        choices:
            - 'PASSIVE'
            - 'ACTIVE'
        description:
            - "A host route is injected according to the setting on the virtual servers"
            - >-
                * If set to C(PASSIVE) on all the virtual servers that share the IP address, the appliance always
                injects the hostroute.
            - >-
                * If set to C(ACTIVE) on all the virtual servers that share the IP address, the appliance injects even
                if one virtual server is UP.
            - >-
                * If set to C(ACTIVE) on some virtual servers and C(PASSIVE) on the others, the appliance, injects even if
                one virtual server set to C(ACTIVE) is UP.

    authnprofile:
        description:
            - "Name of the authentication profile to be used when authentication is turned on."

    dnsprofilename:
        description:
            - >-
                Name of the DNS profile to be associated with the VServer. DNS profile properties will applied to the
                transactions processed by a VServer. This parameter is valid only for DNS and DNS-TCP VServers.
            - "Minimum length = 1"
            - "Maximum length = 127"

    domainname:
        description:
            - "Domain name for which to change the time to live (TTL) and/or backup service IP address."
            - "Minimum length = 1"

    ttl:
        description:
            - "."
            - "Minimum value = C(1)"

    backupip:
        description:
            - "."
            - "Minimum length = 1"

    cookiedomain:
        description:
            - "."
            - "Minimum length = 1"

    cookietimeout:
        description:
            - "."
            - "Minimum value = C(0)"
            - "Maximum value = C(1440)"

    sitedomainttl:
        description:
            - "."
            - "Minimum value = C(1)"

    lbvserver:
        description:
            - The default Load Balancing virtual server.
        version_added: "2.5"

    ssl_certkey:
        description:
            - The name of the ssl certificate that is bound to this service.
            - The ssl certificate must already exist.
            - Creating the certificate can be done with the M(netscaler_ssl_certkey) module.
            - This option is only applicable only when C(servicetype) is C(SSL).
        version_added: "2.5"

    disabled:
        description:
            - When set to C(yes) the cs vserver will be disabled.
            - When set to C(no) the cs vserver will be enabled.
            - >-
                Note that due to limitations of the underlying NITRO API a C(disabled) state change alone
                does not cause the module result to report a changed status.
        type: bool
        default: 'no'

extends_documentation_fragment: netscaler
requirements:
    - nitro python sdk
s�
# policy_1 must have been already created with the netscaler_cs_policy module
# lbvserver_1 must have been already created with the netscaler_lb_vserver module

- name: Setup content switching vserver
  delegate_to: localhost
  netscaler_cs_vserver:
    nsip: 172.18.0.2
    nitro_user: nsroot
    nitro_pass: nsroot

    state: present

    name: cs_vserver_1
    ipv46: 192.168.1.1
    port: 80
    servicetype: HTTP

    policybindings:
      - policyname: policy_1
        targetlbvserver: lbvserver_1
s	
loglines:
    description: list of logged messages by the module
    returned: always
    type: list
    sample: ['message 1', 'message 2']

msg:
    description: Message detailing the failure reason
    returned: failure
    type: str
    sample: "Action does not exist"

diff:
    description: List of differences between the actual configured object and the configuration specified in the module
    returned: failure
    type: dict
    sample: { 'clttimeout': 'difference. ours: (float) 100.0 other: (float) 60.0' }
(t
AnsibleModule(tConfigProxytget_nitro_clienttnetscaler_common_argumentstlogtloglinestensure_feature_is_enabledtget_immutables_intersection(t	csvserver(tcsvserver_lbvserver_binding(tcsvserver_cspolicy_binding(tsslvserver_sslcertkey_binding(tnitro_exceptioncC`s/tj|d|jd�dkr'tStSdS(Nsname:%stnamei(Rtcount_filteredtparamstTruetFalse(tclienttmodule((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytcs_vserver_existsTs#cC`sNtj|d|jd�}|j|d�}t|�dkrFtStSdS(Nsname:%sRi(Rtget_filteredRtdiff_objecttlenRR(RRtcsvserver_proxytcsvserver_listt	diff_dict((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytcs_vserver_identical[s
cC`s�td�i}|jddkr'|Sx|jdD]p}|jd|d<|d}tdt�d|ddd	dd
dddd
dg	dgd|�}|||<q5W|S(Ns!Getting configured policy bindigstpolicybindingsRt
policynametactualRtreadwrite_attrstpriorityt	bindpointt	labelnametgotopriorityexpressionttargetlbvservertinvoket	labeltypetreadonly_attrstattribute_values_dict(RRtNoneR	R(RRtbindingstbindingtkeyt
binding_proxy((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytget_configured_policybindingsds.

			cC`sXy%tj||jd�}|dSWn,tk
rS}|jdkrMt�S�nXdS(NRii(RtgetRRt	errorcode(RRtdefault_lb_vserverte((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytget_default_lb_vserver�scC`st||�}tdt�d|dddgdi|jdd6|jdd6�}td|j|jff�|jdkr�|jddkr�td�tS|jdk	r�|jddkr�td	�t	S|j
|�r�td
�tStd�t	SdS(NR&RR'Rt	lbvserverR0sdefault lb vserver %ss$Default lb vserver identical missings!Default lb vserver needs removingsDefault lb vserver identicals Default lb vserver not identical(R;R	RRRRR<R1RRthas_equal_attributes(RRtdt
configured((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytdefault_lb_vserver_identical�s*		"
"


cC`st||�}|jddk	r�tdt�d|dddgdi|jdd6|jdd6�}|j|�s�|jdk	r�td|j�tj	||�ntd|j�|j
�q�n3|jdk	r�td|j�tj	||�ndS(	NR<R&RR'RR0sDeleting default lb vserver %ssAdding default lb vserver %s(R;RR1R	RR=RRR<tdeletetadd(RRR>R?((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytsync_default_lb_vserver�s&		cC`s�td�i}y0tj|d|jd�}|dkr?|SWn)tk
rk}|jdkre|S�nXx7tj|d|jd�D]}|j}|||<q�W|S(NsGetting actual policy bindigsRii(RRtcountRRR8R7R%(RRR2RDR:R3R4((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytget_actual_policybindings�s
#	c	C`s�td�t||�}t||�}t|j��}t|j��}t||A�dkrftSx;|j�D]-}||}||}|j|�sstSqsWtS(Ns"Checking policy bindings identicali(	RRER6tsettkeysRRR=R(	RRtactual_bindingstconfigured_bindingst
actual_keysettconfigured_keysetR4tconfigured_binding_proxytactual_binding_object((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytcs_policybindings_identical�s


cC`s_td�t||�}t||�}tt|j��t|j���}x0|D](}td|�tj|||�qWWtt|j��t|j���}x*|D]"}td|�||j�q�Wtt|j��t|j��@�}xX|D]P}||j	||�std|�tj|||�||j�qqWdS(NsSyncing cs policybindingssDeleting binding for policy %ssAdding binding for policy %ssUpdating binding for policy %s(
RRER6tlistRFRGRRARBR=(RRRHRItdelete_keysR4tadd_keystmodify_keys((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytsync_cs_policybindings�s"
(
(
(
cC`s�td�|jd}tj||�dkr8g}ntj||�}|jddkrzt|�dkrstStSn:g|D]}|j	^q�}||jdgkr�tStSdS(Ns/Checking if ssl cert key bindings are identicalRitssl_certkey(
RRRRDR7R1RRRtcertkeyname(RRtvservernameR2titemtcertificate_list((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytssl_certkey_bindings_identical
s

	cC`s�td�|jd}tj||�dkr8g}ntj||�}x/|D]'}td|j�tj||�qQW|jddk	r�td|jd�t�}|jd|_|jd|_tj	||�ndS(NsSyncing certkey bindingsRis(Deleting existing binding for certkey %sRTsAdding binding for certkey %s(
RRRRDR7RURAR1RVRB(RRRVR2R3((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytssl_certkey_bindings_syncs

	
	cC`s.tj|d|jd�}|j|d�S(Nsname:%sRi(RRRR(RRR R!((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyt	diff_list5scC`sR|jdr/td�tj||j�}ntd�tj||j�}|S(NtdisabledsDisabling cs vserversEnabling cs vserver(RRRtdisableR&tenable(RRR tresult((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytdo_state_change:s


ckC`sytdtdd�dtdd�dtddddd	d
ddd
dddddddddddddddg�dtdd�dtddddd d!d"g�d#tdd�d$tdd�d%tdd�d&tdd'�d(tdddd)d*g�d+tdd,�d-tdd�d.tdd�d/tdddd0d1g�d2tdd,�d3tdddd4d5d6d7d8g�d9tdddd)d*g�d:tdd�d;tdd�d<tdddd=d>d?g�d@tdddd)d*g�dAtdddd)d*g�dBtdddd)d*g�dCtddddDdEdFg�dGtdd�dHtdd,�dItdd�dJtdd,�dKtdd�dLtdd,�dMtdd�dNtdddd)d*g�dOtdd�dPtdd�dQtdd,�dRtdd�dStdd�dTtdd�dUtddddVdWg�dXtdd�dYtddddZd[d\d]d^d_d`dag�dbtdd,�dctdd�ddtdd�detdd�dftdd�dgtdddd)d*g�dhtdd�ditddddjdkg�dltddddjdkg�dmtdd�dntdd��4}tdotddp�dqtdd�d*tdd,drt�dstdd��}t�}|jt�|j|�|j|�tdt|dut�}tdvtdwtdxt�}ts|jdydz�nt	|�}y|j
�Wn�tk
r`}d{t|j
�|jf}|jdy|�n�tk
r�}tt|��d|kr�|jdyd}t|��q�tt|��d~kr�|jdydt|��q�|jdyd�t|��nXdddddd#d$d%d&d(d+d-d.d/d2d3d9d:d;d<d@dAdBdCdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdXdYdbdcdddedfdgdhdidldmdng4}d�d�d�dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dsd�g}	ddddd�d%d&d�dGd�g
}
id�gd+6d�gdH6d�gdL6d�gd26d�gdJ6d�gdb6d�gdQ6d��gd(6d��gd96d��gd@6d��gdA6d��gdB6d��gdN6d��gdg6}td�t�d�|d�|jd�|d�|	d�|
d�|�}yt|d��|jd�d�krgtd��t||�sy|jsl|j�|jd�rl|j�qlnt|dv<n�t|||�s$	t|t|||�j��}
|
gkr�|jdyd�|
fd�t|||�|�n|js	|j�|jd�r	|j�q	nt|dv<n
t|dv<t||�s}	|jsp	t||�|jd�rp	|j�qp	nt|dv<n|jdd	kr�	|jdqdk	r�	|jdyd�|�n|jdd	kr
t!||�s
|js�	t"||�nt|dv<q
nt#||�s9
|js,
t$||�nt|dv<n|js�
t%|||�}|j
d�kr�
d�|j
|jf}|jdy||�q�
n|jstd��t||�s�
|jdyd�|�nt|||�s|jdyd�d�t|||�|�nt||�s&|jdyd��n|jdd	krdt!||�sa|jdyd�|�qaqdqn�|jd�d�krtd��t||�r�|js�|j&�|jd�r�|j�q�nt|dv<n
t|dv<|jstd��t||�r|jdyd�|�qqnWnBtk
r]}d�t|j
�|jf}|jdy||�nX|j'�|j(|�dS(�NRttypetstrttdtfloattservicetypetchoicestHTTPtSSLtTCPtFTPtRTSPtSSL_TCPtUDPtDNStSIP_UDPtSIP_TCPtSIP_SSLtANYtRADIUStRDPtMYSQLtMSSQLtDIAMETERtSSL_DIAMETERtDNS_TCPtORACLEtSMPPtipv46t
dnsrecordtypetAtAAAAtCNAMEtNAPTRt	ippatterntipmasktrangetporttinttstateupdatetenabledR\t	cacheabletbooltredirecturlt
clttimeoutt
precedencetRULEtURLt
casesensitivetsomethodt
CONNECTIONtDYNAMICCONNECTIONt	BANDWIDTHtHEALTHtNONEt
sopersistencetsopersistencetimeouttsothresholdtsobackupactiontDROPtACCEPTtREDIRECTtredirectportrewritetdownstateflushtdisableprimaryondowntinsertvserveripporttOFFtVIPADDRt
V6TOV4MAPPINGt	vipheadertrtspnattauthenticationhosttauthenticationtlistenpolicytauthn401tauthnvsnametpushtpushvservert	pushlabeltpushmulticlientsttcpprofilenamethttpprofilenamet
dbprofilenametoracleserverversiont10Gt11Gtcommenttmssqlserverversiont70t2000t2000SP1t2005t2008t2008R2t2012t2014tl2conntmysqlprotocolversiontmysqlserverversiontmysqlcharactersettmysqlservercapabilitiest
appflowlogt
netprofileticmpvsrresponsetPASSIVEtACTIVEtrhistatetauthnprofiletdnsprofilenameR$RORTtdefaultR<t
argument_spectsupports_check_modetchangedtfailedR
tmsgsCould not load nitro python sdks6nitro exception during login. errorcode=%s, message=%ss-<class 'requests.exceptions.ConnectionError'>sConnection error %ss&<class 'requests.exceptions.SSLError'>sSSL Error %ss Unexpected error during login %stiptvaluetngnametcurstatetscRt	cachetypetredirectthomepagetdnsvservernametdomainR%tservicenametweighttcachevservert
targetvserverR(turlR+R)R-R.R*tgt2gbtstatechangetimesectstatechangetimemsecttickssincelaststatechangetruletypeR,t
targettypetstatetnewnametbool_yes_notbool_on_offcS`s
|j�S(N(tupper(tv((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyt<lambda>�scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��scS`s
|j�S(N(R�(R�((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyR��sR&RR0R'R/timmutable_attrst
transformstCStpresents"Applying actions for state presenttsave_configs%Cannot update immutable attributes %stdiffs.ssl_certkey is applicable only to SSL vserversis<Error when setting disabled state. errorcode: %s message: %ssSanity checks for state presentsCS vserver does not exists"CS vserver differs from configuredsPolicy bindings differs"sll certkey bindings not identicaltabsents!Applying actions for state absentsSanity checks for state absentsCS vserver still existss(nitro exception errorcode=%s, message=%s()tdictRtupdateRRRR
tPYTHON_SDK_IMPORTEDt	fail_jsonR
tloginRRbR8tmessaget	ExceptionRaR	RRRRRt
check_modeRBR�R#RR[RGRNRSR1RYRZR@RCR`RAtlogoutt	exit_json(tmodule_specific_argumentsthand_inserted_argumentsR�Rt
module_resultRR:R�R'R/R�R�R timmutables_changedtres((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pytmainDs�		


					












			

	


!	

	



	


&		
		
(
	



	
 
t__main__N(2t
__future__RRRRat
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt0ansible.module_utils.network.netscaler.netscalerR	R
RRR
RRt=nssrc.com.citrix.netscaler.nitro.resource.config.cs.csvserverRtOnssrc.com.citrix.netscaler.nitro.resource.config.cs.csvserver_lbvserver_bindingRtNnssrc.com.citrix.netscaler.nitro.resource.config.cs.csvserver_cspolicy_bindingRtRnssrc.com.citrix.netscaler.nitro.resource.config.ssl.sslvserver_sslcertkey_bindingRt:nssrc.com.citrix.netscaler.nitro.exception.nitro_exceptionRRR�tImportErrorR:RRR#R6R;R@RCRERNRSRYRZR[R`Rt__name__(((sZ/usr/lib/python2.7/site-packages/ansible/modules/network/netscaler/netscaler_cs_vserver.pyt<module>sJ


��4	

														
	��

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