1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Panos/doc fragment (#37696)

* Create PanOS module documentation fragment

- Module documentation fragment currently holds 3 parameters
- It most likely won't be used in every single module since there is
some variance

* Modified PanOS module for use doc_frags

- Where documentation is consistent, module documentation now uses a
documentation fragment instead of all documentation being contained in
the module.

* Formatting and syntax error fixes

Updated some formatting errors to make ansibot happy.

* Revisions for grammar
This commit is contained in:
Kevin Breit 2018-05-09 09:13:22 -05:00 committed by Alicia Cozine
parent 75304bd121
commit c36aa6ae50
14 changed files with 38 additions and 160 deletions

View file

@ -36,18 +36,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
admin_username: admin_username:
description: description:
- username for admin user - username for admin user
@ -64,6 +52,7 @@ options:
- commit if changed - commit if changed
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -31,19 +31,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
required: false
default: "admin"
timeout: timeout:
description: description:
- timeout of API calls - timeout of API calls
@ -54,6 +41,7 @@ options:
- time waited between checks - time waited between checks
required: false required: false
default: "0" default: "0"
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -31,18 +31,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
interval: interval:
description: description:
- interval for checking commit job - interval for checking commit job
@ -55,6 +43,7 @@ options:
- if commit should be synchronous - if commit should be synchronous
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -30,18 +30,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
dag_name: dag_name:
description: description:
- name of the dynamic address group - name of the dynamic address group
@ -55,6 +43,7 @@ options:
- commit if changed - commit if changed
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -39,21 +39,9 @@ notes:
- Checkmode is not supported. - Checkmode is not supported.
- Panorama is not supported. - Panorama is not supported.
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
api_key: api_key:
description: description:
- API key that can be used instead of I(username)/I(password) credentials. - API key that can be used instead of I(username)/I(password) credentials.
username:
description:
- username for authentication
default: "admin"
description: description:
description: description:
- The purpose / objective of the static Address Group - The purpose / objective of the static Address Group
@ -74,6 +62,7 @@ options:
ip_to_register: ip_to_register:
description: description:
- IP that will be registered with the given tag names. - IP that will be registered with the given tag names.
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -35,18 +35,6 @@ requirements:
- requests - requests
- requests_toolbelt - requests_toolbelt
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device.
required: true
password:
description:
- Password for device authentication.
required: true
username:
description:
- Username for device authentication.
default: "admin"
category: category:
description: description:
- Category of file uploaded. The default is software. - Category of file uploaded. The default is software.
@ -64,6 +52,7 @@ options:
default: yes default: yes
type: bool type: bool
version_added: "2.6" version_added: "2.6"
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -37,18 +37,6 @@ requirements:
notes: notes:
- Checkmode is not supported. - Checkmode is not supported.
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device being configured.
required: true
username:
description:
- Username credentials to use for auth.
default: "admin"
password:
description:
- Password credentials to use for auth.
required: true
if_name: if_name:
description: description:
- Name of the interface to configure. - Name of the interface to configure.
@ -66,6 +54,7 @@ options:
description: description:
- Commit if changed - Commit if changed
default: true default: true
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -32,19 +32,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
required: false
default: "admin"
auth_code: auth_code:
description: description:
- authcode to be applied - authcode to be applied
@ -54,6 +41,7 @@ options:
- whether to apply authcode even if device is already licensed - whether to apply authcode even if device is already licensed
required: false required: false
default: "false" default: "false"
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -30,18 +30,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
file: file:
description: description:
- configuration file to load - configuration file to load
@ -50,6 +38,7 @@ options:
- commit if changed - commit if changed
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -30,18 +30,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
dns_server_primary: dns_server_primary:
description: description:
- address of primary DNS server - address of primary DNS server
@ -59,6 +47,7 @@ options:
- commit if changed - commit if changed
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -30,18 +30,6 @@ version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
pg_name: pg_name:
description: description:
- name of the security profile group - name of the security profile group
@ -72,6 +60,7 @@ options:
- commit if changed - commit if changed
type: bool type: bool
default: 'yes' default: 'yes'
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -29,20 +29,7 @@ author: "Luigi Mori (@jtschichold), Ivan Bojer (@ivanbojer)"
version_added: "2.3" version_added: "2.3"
requirements: requirements:
- pan-python - pan-python
options: extends_documentation_fragment: panos
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
required: false
default: "admin"
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -32,18 +32,6 @@ requirements:
- pandevice can be obtained from PyPi U(https://pypi.python.org/pypi/pandevice) - pandevice can be obtained from PyPi U(https://pypi.python.org/pypi/pandevice)
- xmltodict can be obtained from PyPi U(https://pypi.python.org/pypi/xmltodict) - xmltodict can be obtained from PyPi U(https://pypi.python.org/pypi/xmltodict)
options: options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device
required: true
password:
description:
- password for authentication
required: true
username:
description:
- username for authentication
default: "admin"
api_key: api_key:
description: description:
- API key that can be used instead of I(username)/I(password) credentials. - API key that can be used instead of I(username)/I(password) credentials.
@ -74,6 +62,7 @@ options:
description: description:
- The operation to perform Supported values are I(add)/I(list)/I(delete). - The operation to perform Supported values are I(add)/I(list)/I(delete).
required: true required: true
extends_documentation_fragment: panos
''' '''
EXAMPLES = ''' EXAMPLES = '''

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, techbizdev <techbizdev@paloaltonetworks.com>
# Copyright: (c) 2018, Kevin Breit (@kbreit)
# 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 = '''
options:
ip_address:
description:
- IP address (or hostname) of PAN-OS device.
required: true
password:
description:
- Password for authentication.
required: true
username:
description:
- Username for authentication.
default: "admin"
'''