mirror of https://github.com/ansible/ansible.git
doc_fragments: Clean up parameter types (network) (#52176)
* module_utils: Clean up parameter types This PR includes: - Parameter types added - Copyright format fixes - Short license statement - Description fixes (only for a few files, then I stopped :-)) * More network stuff * Fix typo * Fix PEP8 * Fix booleans * Fix typopull/52320/head
parent
2f3960558d
commit
9c1033422b
@ -1,63 +1,56 @@
|
|||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Created on December 12, 2016
|
# Created on December 12, 2016
|
||||||
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
|
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
|
||||||
# Avi Version: 16.3.4
|
# Avi Version: 16.3.4
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
#
|
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
# Avi common documentation fragment
|
# Avi common documentation fragment
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
controller:
|
controller:
|
||||||
description:
|
description:
|
||||||
- IP address or hostname of the controller. The default value is the environment variable C(AVI_CONTROLLER).
|
- IP address or hostname of the controller. The default value is the environment variable C(AVI_CONTROLLER).
|
||||||
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Username used for accessing Avi controller. The default value is the environment variable C(AVI_USERNAME).
|
- Username used for accessing Avi controller. The default value is the environment variable C(AVI_USERNAME).
|
||||||
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password of Avi user in Avi controller. The default value is the environment variable C(AVI_PASSWORD).
|
- Password of Avi user in Avi controller. The default value is the environment variable C(AVI_PASSWORD).
|
||||||
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
tenant:
|
tenant:
|
||||||
description:
|
description:
|
||||||
- Name of tenant used for all Avi API calls and context of object.
|
- Name of tenant used for all Avi API calls and context of object.
|
||||||
|
type: str
|
||||||
default: admin
|
default: admin
|
||||||
tenant_uuid:
|
tenant_uuid:
|
||||||
description:
|
description:
|
||||||
- UUID of tenant used for all Avi API calls and context of object.
|
- UUID of tenant used for all Avi API calls and context of object.
|
||||||
|
type: str
|
||||||
default: ''
|
default: ''
|
||||||
api_version:
|
api_version:
|
||||||
description:
|
description:
|
||||||
- Avi API version of to use for Avi API and objects.
|
- Avi API version of to use for Avi API and objects.
|
||||||
default: "16.4.4"
|
type: str
|
||||||
|
default: 16.4.4
|
||||||
avi_credentials:
|
avi_credentials:
|
||||||
description:
|
description:
|
||||||
- Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details.
|
- Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details.
|
||||||
|
type: str
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
api_context:
|
api_context:
|
||||||
description:
|
description:
|
||||||
- Avi API context that includes current session ID and CSRF Token.
|
- Avi API context that includes current session ID and CSRF Token.
|
||||||
- This allows user to perform single login and re-use the session.
|
- This allows user to perform single login and re-use the session.
|
||||||
|
type: str
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
notes:
|
notes:
|
||||||
- For more information on using Ansible to manage Avi Network devices see U(https://www.ansible.com/ansible-avi-networks).
|
- For more information on using Ansible to manage Avi Network devices see U(https://www.ansible.com/ansible-avi-networks).
|
||||||
"""
|
'''
|
||||||
|
@ -1,67 +1,61 @@
|
|||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2017, Benjamin Jolivot <bjolivot@gmail.com>
|
|
||||||
#
|
# Copyright: (c) 2017, Benjamin Jolivot <bjolivot@gmail.com>
|
||||||
# This file is part of Ansible
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
#
|
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
|
||||||
# Standard files documentation fragment
|
# Standard files documentation fragment
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
file_mode:
|
file_mode:
|
||||||
description:
|
description:
|
||||||
- Don't connect to any device, only use I(config_file) as input and Output.
|
- Don't connect to any device, only use I(config_file) as input and Output.
|
||||||
default: false
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: no
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
config_file:
|
config_file:
|
||||||
description:
|
description:
|
||||||
- Path to configuration file. Required when I(file_mode) is True.
|
- Path to configuration file. Required when I(file_mode) is True.
|
||||||
|
type: path
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False.
|
- Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False.
|
||||||
|
type: str
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- Configures the username used to authenticate to the remote device. Required when I(file_mode) is True.
|
- Configures the username used to authenticate to the remote device. Required when I(file_mode) is True.
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True.
|
- Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True.
|
||||||
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- Timeout in seconds for connecting to the remote device.
|
- Timeout in seconds for connecting to the remote device.
|
||||||
|
type: int
|
||||||
default: 60
|
default: 60
|
||||||
vdom:
|
vdom:
|
||||||
description:
|
description:
|
||||||
- Specifies on which vdom to apply configuration
|
- Specifies on which vdom to apply configuration
|
||||||
|
type: str
|
||||||
backup:
|
backup:
|
||||||
description:
|
description:
|
||||||
- This argument will cause the module to create a backup of
|
- This argument will cause the module to create a backup of
|
||||||
the current C(running-config) from the remote device before any
|
the current C(running-config) from the remote device before any
|
||||||
changes are made. The backup file is written to the i(backup)
|
changes are made. The backup file is written to the i(backup)
|
||||||
folder.
|
folder.
|
||||||
default: no
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: no
|
||||||
backup_path:
|
backup_path:
|
||||||
description:
|
description:
|
||||||
- Specifies where to store backup files. Required if I(backup=yes).
|
- Specifies where to store backup files. Required if I(backup=yes).
|
||||||
|
type: path
|
||||||
backup_filename:
|
backup_filename:
|
||||||
description:
|
description:
|
||||||
- Specifies the backup filename. If omitted filename will be
|
- Specifies the backup filename. If omitted filename will be
|
||||||
formatted like HOST_config.YYYY-MM-DD@HH:MM:SS
|
formatted like HOST_config.YYYY-MM-DD@HH:MM:SS
|
||||||
"""
|
type: str
|
||||||
|
'''
|
||||||
|
@ -1,55 +1,65 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
|
|
||||||
options:
|
options:
|
||||||
nsip:
|
nsip:
|
||||||
description:
|
description:
|
||||||
- The ip address of the netscaler appliance where the nitro API calls will be made.
|
- The ip address of the netscaler appliance where the nitro API calls will be made.
|
||||||
- "The port can be specified with the colon (:). E.g. 192.168.1.1:555."
|
- "The port can be specified with the colon (:). E.g. 192.168.1.1:555."
|
||||||
|
type: str
|
||||||
required: True
|
required: True
|
||||||
|
|
||||||
nitro_user:
|
nitro_user:
|
||||||
description:
|
description:
|
||||||
- The username with which to authenticate to the netscaler node.
|
- The username with which to authenticate to the netscaler node.
|
||||||
|
type: str
|
||||||
required: True
|
required: True
|
||||||
|
|
||||||
nitro_pass:
|
nitro_pass:
|
||||||
description:
|
description:
|
||||||
- The password with which to authenticate to the netscaler node.
|
- The password with which to authenticate to the netscaler node.
|
||||||
|
type: str
|
||||||
required: True
|
required: True
|
||||||
|
|
||||||
nitro_protocol:
|
nitro_protocol:
|
||||||
choices: [ 'http', 'https' ]
|
|
||||||
default: http
|
|
||||||
description:
|
description:
|
||||||
- Which protocol to use when accessing the nitro API objects.
|
- Which protocol to use when accessing the nitro API objects.
|
||||||
|
type: str
|
||||||
|
choices: [ http, https ]
|
||||||
|
default: http
|
||||||
|
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
|
- If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
|
||||||
required: false
|
|
||||||
default: 'yes'
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: yes
|
||||||
|
|
||||||
nitro_timeout:
|
nitro_timeout:
|
||||||
description:
|
description:
|
||||||
- Time in seconds until a timeout error is thrown when establishing a new session with Netscaler
|
- Time in seconds until a timeout error is thrown when establishing a new session with Netscaler
|
||||||
|
type: int
|
||||||
default: 310
|
default: 310
|
||||||
|
|
||||||
state:
|
state:
|
||||||
choices: ['present', 'absent']
|
|
||||||
default: 'present'
|
|
||||||
description:
|
description:
|
||||||
- The state of the resource being configured by the module on the netscaler node.
|
- The state of the resource being configured by the module on the netscaler node.
|
||||||
- When present the resource will be created if needed and configured according to the module's parameters.
|
- When present the resource will be created if needed and configured according to the module's parameters.
|
||||||
- When absent the resource will be deleted from the netscaler node.
|
- When absent the resource will be deleted from the netscaler node.
|
||||||
|
type: str
|
||||||
|
choices: [ absent, present ]
|
||||||
|
default: present
|
||||||
|
|
||||||
save_config:
|
save_config:
|
||||||
description:
|
description:
|
||||||
- If true the module will save the configuration on the netscaler node if it makes any changes.
|
- If C(yes) the module will save the configuration on the netscaler node if it makes any changes.
|
||||||
- The module will not save the configuration on the netscaler node if it made no changes.
|
- The module will not save the configuration on the netscaler node if it made no changes.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: yes
|
||||||
notes:
|
notes:
|
||||||
- For more information on using Ansible to manage Citrix NetScaler Network devices see U(https://www.ansible.com/ansible-netscaler).
|
- For more information on using Ansible to manage Citrix NetScaler Network devices see U(https://www.ansible.com/ansible-netscaler).
|
||||||
'''
|
'''
|
||||||
|
@ -1,39 +1,28 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2017 Cisco and/or its affiliates.
|
# Copyright: (c) 2017, Cisco and/or its affiliates.
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# This file is part of Ansible
|
|
||||||
#
|
|
||||||
# Ansible is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# Ansible is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
options:
|
options:
|
||||||
url:
|
url:
|
||||||
description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
|
description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
username:
|
username:
|
||||||
description: NSO username
|
description: NSO username
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
password:
|
password:
|
||||||
description: NSO password
|
description: NSO password
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
timeout:
|
timeout:
|
||||||
description: JSON-RPC request timeout in seconds
|
description: JSON-RPC request timeout in seconds
|
||||||
|
type: int
|
||||||
default: 300
|
default: 300
|
||||||
version_added: "2.6"
|
version_added: "2.6"
|
||||||
'''
|
'''
|
||||||
|
Loading…
Reference in New Issue