mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-23 01:19:08 -07:00
add a10_server_axapi3 module (#3239)
* add a10_server_axapi3 module * added return documentation * modified a10_server_axapi3.py per feedback * fixed line 60 s/action/operation/ * modified a10_server_axapi3.py per feedback * modified a10_server_axapi3.py per feedback * corrected YAML format error in documentation * removed slp_server_ip and slp_server check in code since the arguments are labeled as required, per feedback * modified: a10_server.py modified: a10_service_group.py modified: a10_virtual_server.py Changed main() block, restricted import to only functions used. * removed space for main() to be last line * removed invalid lines * Modified Documentations for a10_server.py, a10_service_group.py, a10_virtual_server.py * Take out alias:[] and choices:[] in Documentation from a10_service_group.py and a10_virtual_server.py since they are now the default * deleted a10_server.py, a10_service_group.py, a10_virtual_server.py * deleted 'version_last_modified' line in Documentation across a10_server.py, a10_service_group.py and a10_virtual_server.py as they were added in error, change validate_certs version_added in a10_server.py * added newline after main() * added newline after main() for a10_server_axapi3.py
This commit is contained in:
parent
d1304eb749
commit
c570d533b9
4 changed files with 333 additions and 33 deletions
|
@ -3,7 +3,8 @@
|
|||
|
||||
"""
|
||||
Ansible module to manage A10 Networks slb server objects
|
||||
(c) 2014, Mischa Peters <mpeters@a10networks.com>
|
||||
(c) 2014, Mischa Peters <mpeters@a10networks.com>,
|
||||
2016, Eric Chou <ericc@a10networks.com>
|
||||
|
||||
This file is part of Ansible
|
||||
|
||||
|
@ -25,26 +26,28 @@ DOCUMENTATION = '''
|
|||
---
|
||||
module: a10_server
|
||||
version_added: 1.8
|
||||
short_description: Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
|
||||
short_description: Manage A10 Networks AX/SoftAX/Thunder/vThunder devices' server object.
|
||||
description:
|
||||
- Manage slb server objects on A10 Networks devices via aXAPI
|
||||
author: "Mischa Peters (@mischapeters)"
|
||||
- Manage SLB (Server Load Balancer) server objects on A10 Networks devices via aXAPIv2.
|
||||
author: "Eric Chou (@ericchou) 2016, Mischa Peters (@mischapeters) 2014"
|
||||
notes:
|
||||
- Requires A10 Networks aXAPI 2.1.
|
||||
extends_documentation_fragment: a10
|
||||
options:
|
||||
server_name:
|
||||
description:
|
||||
- SLB server name.
|
||||
- The SLB (Server Load Balancer) server name.
|
||||
required: true
|
||||
aliases: ['server']
|
||||
server_ip:
|
||||
description:
|
||||
- SLB server IP address.
|
||||
- The SLB server IPv4 address.
|
||||
required: false
|
||||
default: null
|
||||
aliases: ['ip', 'address']
|
||||
server_status:
|
||||
description:
|
||||
- SLB virtual server status.
|
||||
- The SLB virtual server status.
|
||||
required: false
|
||||
default: enabled
|
||||
aliases: ['status']
|
||||
|
@ -59,13 +62,25 @@ options:
|
|||
default: null
|
||||
state:
|
||||
description:
|
||||
- Create, update or remove slb server.
|
||||
- This is to specify the operation to create, update or remove SLB server.
|
||||
required: false
|
||||
default: present
|
||||
choices: ['present', 'absent']
|
||||
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.
|
||||
required: false
|
||||
version_added: 2.3
|
||||
default: 'yes'
|
||||
choices: ['yes', 'no']
|
||||
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
#
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Create a new server
|
||||
- a10_server:
|
||||
|
@ -253,10 +268,12 @@ def main():
|
|||
axapi_call(module, session_url + '&method=session.close')
|
||||
module.exit_json(changed=changed, content=result)
|
||||
|
||||
# standard ansible module imports
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
from ansible.module_utils.a10 import *
|
||||
# ansible module imports
|
||||
import json
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.urls import url_argument_spec
|
||||
from ansible.module_utils.a10 import axapi_call, a10_argument_spec, axapi_authenticate, axapi_failure, axapi_get_port_protocol, axapi_enabled_disabled
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue