�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z m
Z
m Z m Z d d
l m Z d d l m Z d d l m Z d d d g Z d � Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: a10_server_axapi3
version_added: 2.3
short_description: Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
description:
- Manage SLB (Server Load Balancer) server objects on A10 Networks devices via aXAPIv3.
author:
- Eric Chou (@ericchou1)
extends_documentation_fragment:
- a10
- url
options:
server_name:
description:
- The SLB (Server Load Balancer) server name.
required: true
aliases: ['server']
server_ip:
description:
- The SLB (Server Load Balancer) server IPv4 address.
required: true
aliases: ['ip', 'address']
server_status:
description:
- The SLB (Server Load Balancer) virtual server status.
default: enable
aliases: ['action']
choices: ['enable', 'disable']
server_ports:
description:
- A list of ports to create for the server. Each list item should be a dictionary which specifies the C(port:)
and C(protocol:).
aliases: ['port']
operation:
description:
- Create, Update or Remove SLB server. For create and update operation, we use the IP address and server
name specified in the POST message. For delete operation, we use the server name in the request URI.
default: create
choices: ['create', 'update', 'remove']
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used
on personally controlled devices using self-signed certificates.
type: bool
default: 'yes'
s
#
s�
# Create a new server
- a10_server:
host: a10.mydomain.com
username: myadmin
password: mypassword
server: test
server_ip: 1.1.1.100
validate_certs: false
server_status: enable
write_config: yes
operation: create
server_ports:
- port-number: 8080
protocol: tcp
action: enable
- port-number: 8443
protocol: TCP
N( t
axapi_call_v3t a10_argument_spect axapi_authenticate_v3t
axapi_failure( t AXAPI_PORT_PROTOCOLS( t
AnsibleModule( t url_argument_specs port-numbert protocolt actionc C` s[ xT| D]L} x@ | D]8 } | t k r | j d d | d j t � f � q q Wd | k r� y t | d � | d <Wq� t k
r� | j d d � q� Xn | j d d � d | k r� | d } | s� | j d d d j t � � q| | d <n | j d d d j t � � d
| k rI| d
} | d k rS| j d d
� qSq d | d
<q Wd S( Nt msgs+ invalid port field (%s), must be one of: %st ,s port-numbers<