Citrix Netscaler Modules

May 30, 2017 ยท View on GitHub


Requirements

  • Python requests
  • Everything tested was with Netscaler version 11.x

Modules


netscaler_lbvserver

Manages LB VServer resources and attributes.

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler LB VServer configurations using Nitro API.

Options

Parameterrequireddefaultchoicescomments
commentnoA comment about the lbvserver
lbvserver_portnoThe port the lbvserver will listen on. Valid protocol port ranges and "*" are supported.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
service_typeno
  • HTTP
  • FTP
  • TCP
  • UDP
  • SSL
  • SSL_BRIDGE
  • SSL_TCP
  • DTLS
  • NNTP
  • DNS
  • DHCPRA
  • ANY
  • SIP_UDP
  • SIP_TCP
  • SIP_SSL
  • DNS_TCP
  • RTSP
  • PUSH
  • SSL_PUSH
  • RADIUS
  • RDP
  • MYSQL
  • MSSQL
  • DIAMETER
  • SSL_DIAMETER
  • TFTP
  • ORACLE
  • SMPP
  • SYSLOGTCP
  • SYSLOGUDP
  • FIX
The type of service the lbvserver provides.
conn_failoverno
  • DISABLED
  • STATEFUL
  • STATELESS
The lbvserver connection setting
lbmethodno
  • ROUNDROBIN
  • LEASTCONNECTION
  • LEASTRESPONSETIME
  • URLHASH
  • DOMAINHASH
  • DESTINATIONIPHASH
  • SOURCEIPHASH
  • SRCIPDESTIPHASH
  • LEASTBANDWIDTH
  • LEASTPACKETS
  • TOKEN
  • SRCIPSRCPORTHASH
  • LRTM
  • CALLIDHASH
  • CUSTOMLOAD
  • LEASTREQUEST
  • AUDITLOGHASH
  • STATICPROXIMITY
The method to load balance traffic.
persistenceno
  • SOURCEIP
  • COOKIEINSERT
  • SSLSESSION
  • RULE
  • URLPASSIVE
  • CUSTOMSERVERID
  • DESTIP
  • SRCIPDESTIP
  • CALLID
  • RTSPSID
  • DIAMETER
  • FIXSESSION
  • NONE
The persistence type used by the lbvserver.
client_timeoutnoSeconds to wait before terminating a client session. Valid inputs are from 0 to 31536000.
usernameyesThe username used to authenticate with the Netscaler.
cookie_namenoThe name of the cookie to use. Used with a COOKIE persistence type.
lbvserver_statenoenabled
  • disabled
  • enabled
The resources desired activity. Disabled marks it out of service. Enabled marks it serviceable.
hostyesThe Netscaler's Address.
passwordnoThe password associated with the username account.
ip_addressnoThe IP address of the Server Object.
backup_lbvservernoThe name of the backup lbvserver
traffic_domainno0The traffic domain associated with the servicegroup
partitionnoThe Netscaler's partition if not the "default" partition.
lbvserver_nameyesThe name of the lbvserver object
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)

netscaler_monitor

Manages Monitor resources and attributes

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler Monitor configurations using Nitro API

Options

Parameterrequireddefaultchoicescomments
monitor_secondary_passwordnoA secondary password to authenticate with the monitored service
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
monitor_nameyesThe name of the monitor
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).
response_code_actionnoadd
  • add
  • remove
The action to take for response code items that differ from existing response codes. add will add any missing values to the existing response codes. remove will remove any matching values to the existing response codes.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
monitor_use_sslno
  • YES
  • NO
Specifies to use SSL for the monitor
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
usernameyesThe username used to authenticate with the Netscaler.
http_requestnoThe request to send to the server
monitor_dest_ipnoThe IP address to monitor.
monitor_dest_portnoThe port to monitor on the server
monitor_statenoenabled
  • disabled
  • enabled
The resources desired activity. Disabled marks it out of service. Enabled marks it serviceable.
monitor_passwordnoThe password used to authenticate with the monitored service.
hostyesThe Netscaler's Address.
custom_headersnoCustom headers to add to the monitor request
passwordnoThe password associated with the username account.
response_codenoThe HTTP response code expected back from the monitored resource.
partitionnoThe Netscaler's partition if not the "default" partition.
monitor_usernamenoThe username used to authenticate with the monitored service.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
monitor_typeno
  • PING
  • TCP
  • HTTP
  • TCP-ECV
  • HTTP-ECV
  • UDP-ECV
  • DNS
  • FTP
  • LDNS-PING
  • LDNS-TCP
  • LDNS-DNS
  • RADIUS
  • USER
  • HTTP-INLINE
  • SIP-UDP
  • SIP-TCP
  • LOAD
  • FTP-EXTENDED
  • SMTP
  • SNMP
  • NNTP
  • MYSQL
  • MYSQL-ECV
  • MSSQL-ECV
  • ORACLE-ECV
  • LDAP
  • POP3
  • CITRIX-XML-SERVICE
  • CITRIX-WEB-INTERFACE
  • DNS-TCP
  • RTSP
  • ARP
  • CITRIX-AG
  • CITRIX-AAC-LOGINPAGE
  • CITRIX-AAC-LAS
  • CITRIX-XD-DDC
  • ND6
  • CITRIX-WI-EXTENDED
  • DIAMETER
  • RADIUS_ACCOUNTING
  • STOREFRONT
  • APPC
  • SMPP
  • CITRIX-XNC-ECV
  • CITRIX-XDM
The type of service to monitor

netscaler_lbvserver_certkey

Manages lbvserver to cert key bindings

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler lbvserver to cert key binding configurations using Nitro API

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
vserver_nameyesThe name of the vserver to bind the cert key to.
ocsp_checkno
  • Mandatory
  • Optional
The state of the OCSP check parameter.
skip_ca_nameno
  • true
  • false
Used to indicate whether CA Name needs to be sent to the SSL client during the SSL handshake.
ca_certno
  • true
  • false
Specifies if the certificate is a CA.
partitionnoThe Netscaler's partition if not the "default" partition.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
crl_check
  • Mandatory
  • Optional
The state of the CRL check parameter.
sni_cert
  • true
  • false
Specifies if SNI processing is in use.
hostyesThe Netscaler's Address.
cert_key_nameyesThe name of the cert key to bind to the lbvserver.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_servicegroup_server

Manages service group to server bindings.

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler service group to server binding configurations using Nitro API.

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
servicegroup_nameyesThe service group name which the server is being bound to.
server_nameyesThe server name which is being bound to a service group.
partitionnoThe Netscaler's partition if not the "default" partition.
hostyesThe Netscaler's Address.
weightnoThe weight to assing the servers in the Service Group.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
server_portyesThe port the server is listening on to offer services.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_lbvserver_servicegroup

Manages lbvserver to service group bindings.

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler lbvserver to service group binding configurations using Nitro API.

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
servicegroup_nameyesThe service group name which the lbvserver is being bound to.
partitionnoThe Netscaler's partition if not the "default" partition.
hostyesThe Netscaler's Address.
lbvserver_nameyesThe lbvserver name which is being bound to a service group.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_servicegroup_monitor

Manages service group to monitor bindings.

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler service group to monitor binding configurations using Nitro API.

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
servicegroup_nameyesThe service group name which the server is being bound to.
weightnoThe weight to assing the servers in the Service Group.
monitor_nameyesThe monitor name which is being bound to a service group.
partitionnoThe Netscaler's partition if not the "default" partition.
hostyesThe Netscaler's Address.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_facts

Gathers Netscaler Facts

  • Synopsis
  • Options
  • Examples

Synopsis

Gathers System, Hardware, and Configuration Facts for Netscaler Nitro API

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
partitionnoThe Netscaler's partition if not the "default" partition.
config_scopenofalse
  • true
  • false
The configuration scope to retrieve; used when gathering "config" fact. setting to "true" will include default configuration values.
hostyesThe Netscaler's Address.
gather_subsetno[u'all']
  • all
  • hardware_data
  • interface_data
  • lbvserver_stats
  • config
  • server_config
  • service_group_config
  • lbvserver_config
  • monitor_config
  • !all
  • !hardware_data
  • !interface_data
  • !lbvserver_stats
  • !config
  • !server_config
  • !service_group_config
  • !lbvserver_config
  • !monitor_config
The list of facts to gather. Gathered facts are limited using either an include list, or using an exclude list ("!...").
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_server

Manages Server resources and attributes

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler Server configurations using Nitro API

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
commentnoA comment to add to the object.
server_namenoThe name of the Server Object.
server_statenoenabled
  • disabled
  • enabled
The server's desired activity. Disabled marks it out of service. Enabled marks it serviceable.
traffic_domainno0The traffic domain the server should belong to.
partitionnoThe Netscaler's partition if not the "default" partition.
hostyesThe Netscaler's Address.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
ip_addressnoThe IP address of the Server Object.
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).

netscaler_save_config

Saves the running configuration to the Netscaler.

  • Synopsis
  • Options
  • Examples

Synopsis

Saves the running configuration to the Netscaler for the specified partition.

Options

Parameterrequireddefaultchoicescomments

netscaler_servicegroup

Manages Service Group resources and attributes

  • Synopsis
  • Options
  • Examples

Synopsis

Manages Netscaler Service Group configurations using Nitro API

Options

Parameterrequireddefaultchoicescomments
usernameyesThe username used to authenticate with the Netscaler.
commentnoA comment about the servicegroup.
servicegroup_statenoenabled
  • disabled
  • enabled
The servicegroup's desired activity. Disabled marks it out of service. Enabled marks it serviceable.
server_timeoutnoSeconds to wait before terminating a server session. Valid inputs are from 0 to 31536000
servicegroup_nameyesThe name of the servicegroup object
max_clientnomaximum number of simultaneous open connections Valid inputs are from 0 to 65535
traffic_domainno0The traffic domain associated with the servicegroup
partitionnoThe Netscaler's partition if not the "default" partition.
statenopresent
  • absent
  • present
The desired state of the specified object. Absent will delete resource. Present will create resource.
hostyesThe Netscaler's Address.
max_reqnomaximum number of simultaneous open connections Valid inputs are from 0 to 65535
providernoDictionary which acts as a collection of arguments used to define the characteristics of how to connect to the device. Arguments hostname, username, and password must be specified in either provider or local param. Local params take precedence, e.g. hostname is preferred to provider["hostname"] when both are specefied.
service_typeno
  • HTTP
  • FTP
  • TCP
  • UDP
  • SSL
  • SSL_BRIDGE
  • SSL_TCP
  • DTLS
  • NNTP
  • RPCSVR
  • DNS
  • ADNS
  • SNMP
  • RTSP
  • DHCPRA
  • ANY
  • SIP_UDP
  • SIP_TCP
  • SIP_SSL
  • DNS_TCP
  • ADNS_TCP
  • MYSQL
  • MSSQL
  • ORACLE
  • RADIUS
  • RADIUSLISTENER
  • RDP
  • DIAMETER
  • SSL_DIAMETER
  • TFTP
  • SMPP
  • PPTP
  • GRE
  • SYSLOGTCP
  • SYSLOGUDP
  • FIX
The type of service associated with the bound vservers. must be included for new servicegroup objects.
use_sslnoTrueDetermines whether to use HTTPS(True) or HTTP(False).
passwordnoThe password associated with the username account.
validate_certsnoFalseDetermines whether to validate certs against a trusted certificate file (True), or accept all certs (False)
portnoThe TCP port used to connect to the Netscaler if other than the default used by the transport method(http=80, https=443).
client_timeoutnoSeconds to wait before terminating a client session. Valid inputs are from 0 to 31536000.


Created by Network to Code, LLC For: 2015