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
|
||||
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
|
||||
# Avi Version: 16.3.4
|
||||
#
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# Avi common documentation fragment
|
||||
DOCUMENTATION = """
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
controller:
|
||||
description:
|
||||
- IP address or hostname of the controller. The default value is the environment variable C(AVI_CONTROLLER).
|
||||
type: str
|
||||
default: ''
|
||||
username:
|
||||
description:
|
||||
- Username used for accessing Avi controller. The default value is the environment variable C(AVI_USERNAME).
|
||||
type: str
|
||||
default: ''
|
||||
password:
|
||||
description:
|
||||
- Password of Avi user in Avi controller. The default value is the environment variable C(AVI_PASSWORD).
|
||||
type: str
|
||||
default: ''
|
||||
tenant:
|
||||
description:
|
||||
- Name of tenant used for all Avi API calls and context of object.
|
||||
type: str
|
||||
default: admin
|
||||
tenant_uuid:
|
||||
description:
|
||||
- UUID of tenant used for all Avi API calls and context of object.
|
||||
type: str
|
||||
default: ''
|
||||
api_version:
|
||||
description:
|
||||
- Avi API version of to use for Avi API and objects.
|
||||
default: "16.4.4"
|
||||
type: str
|
||||
default: 16.4.4
|
||||
avi_credentials:
|
||||
description:
|
||||
- Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details.
|
||||
type: str
|
||||
version_added: "2.5"
|
||||
api_context:
|
||||
description:
|
||||
- Avi API context that includes current session ID and CSRF Token.
|
||||
- This allows user to perform single login and re-use the session.
|
||||
type: str
|
||||
version_added: "2.5"
|
||||
notes:
|
||||
- For more information on using Ansible to manage Avi Network devices see U(https://www.ansible.com/ansible-avi-networks).
|
||||
"""
|
||||
'''
|
||||
|
@ -1,67 +1,61 @@
|
||||
#
|
||||
# (c) 2017, Benjamin Jolivot <bjolivot@gmail.com>
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, Benjamin Jolivot <bjolivot@gmail.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = """
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
file_mode:
|
||||
description:
|
||||
- Don't connect to any device, only use I(config_file) as input and Output.
|
||||
default: false
|
||||
type: bool
|
||||
default: no
|
||||
version_added: "2.4"
|
||||
config_file:
|
||||
description:
|
||||
- Path to configuration file. Required when I(file_mode) is True.
|
||||
type: path
|
||||
version_added: "2.4"
|
||||
host:
|
||||
description:
|
||||
- Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False.
|
||||
type: str
|
||||
username:
|
||||
description:
|
||||
- Configures the username used to authenticate to the remote device. Required when I(file_mode) is True.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True.
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- Timeout in seconds for connecting to the remote device.
|
||||
type: int
|
||||
default: 60
|
||||
vdom:
|
||||
description:
|
||||
- Specifies on which vdom to apply configuration
|
||||
type: str
|
||||
backup:
|
||||
description:
|
||||
- This argument will cause the module to create a backup of
|
||||
the current C(running-config) from the remote device before any
|
||||
changes are made. The backup file is written to the i(backup)
|
||||
folder.
|
||||
default: no
|
||||
type: bool
|
||||
default: no
|
||||
backup_path:
|
||||
description:
|
||||
- Specifies where to store backup files. Required if I(backup=yes).
|
||||
type: path
|
||||
backup_filename:
|
||||
description:
|
||||
- Specifies the backup filename. If omitted filename will be
|
||||
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):
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
|
||||
options:
|
||||
nsip:
|
||||
description:
|
||||
- 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."
|
||||
type: str
|
||||
required: True
|
||||
|
||||
nitro_user:
|
||||
description:
|
||||
- The username with which to authenticate to the netscaler node.
|
||||
type: str
|
||||
required: True
|
||||
|
||||
nitro_pass:
|
||||
description:
|
||||
- The password with which to authenticate to the netscaler node.
|
||||
type: str
|
||||
required: True
|
||||
|
||||
nitro_protocol:
|
||||
choices: [ 'http', 'https' ]
|
||||
default: http
|
||||
description:
|
||||
- Which protocol to use when accessing the nitro API objects.
|
||||
type: str
|
||||
choices: [ http, https ]
|
||||
default: http
|
||||
|
||||
validate_certs:
|
||||
description:
|
||||
- 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
|
||||
default: yes
|
||||
|
||||
nitro_timeout:
|
||||
description:
|
||||
- Time in seconds until a timeout error is thrown when establishing a new session with Netscaler
|
||||
type: int
|
||||
default: 310
|
||||
|
||||
state:
|
||||
choices: ['present', 'absent']
|
||||
default: 'present'
|
||||
description:
|
||||
- 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 absent the resource will be deleted from the netscaler node.
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
default: present
|
||||
|
||||
save_config:
|
||||
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.
|
||||
type: bool
|
||||
default: true
|
||||
default: yes
|
||||
notes:
|
||||
- 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 -*-
|
||||
|
||||
# Copyright (c) 2017 Cisco and/or its affiliates.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
# 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)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
url:
|
||||
description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
|
||||
type: str
|
||||
required: true
|
||||
username:
|
||||
description: NSO username
|
||||
type: str
|
||||
required: true
|
||||
password:
|
||||
description: NSO password
|
||||
type: str
|
||||
required: true
|
||||
timeout:
|
||||
description: JSON-RPC request timeout in seconds
|
||||
type: int
|
||||
default: 300
|
||||
version_added: "2.6"
|
||||
'''
|
||||
|
Loading…
Reference in New Issue