[oc ... onep]*.py: normalize docs (#9382)

* [oc ... onep]*.py: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-12-27 01:44:29 +13:00 committed by GitHub
parent 49ed3d4acf
commit 88330575ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 1807 additions and 1934 deletions

View file

@ -9,8 +9,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: one_template
short_description: Manages OpenNebula templates
@ -21,8 +20,7 @@ requirements:
- pyone
description:
- "Manages OpenNebula templates."
- Manages OpenNebula templates.
attributes:
check_mode:
support: partial
@ -34,14 +32,12 @@ attributes:
options:
id:
description:
- A O(id) of the template you would like to manage. If not set then a
- new template will be created with the given O(name).
- A O(id) of the template you would like to manage. If not set then a new template will be created with the given O(name).
type: int
name:
description:
- A O(name) of the template you would like to manage. If a template with
- the given name does not exist it will be created, otherwise it will be
- managed by this module.
- A O(name) of the template you would like to manage.
If a template with the given name does not exist it will be created, otherwise it will be managed by this module.
type: str
template:
description:
@ -61,9 +57,9 @@ extends_documentation_fragment:
author:
- "Jyrki Gadinger (@nilsding)"
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Fetch the TEMPLATE by id
community.general.one_template:
id: 6459
@ -110,44 +106,44 @@ EXAMPLES = '''
community.general.one_template:
id: 6459
state: absent
'''
"""
RETURN = '''
RETURN = r"""
id:
description: template id
type: int
returned: when O(state=present)
sample: 153
description: Template id.
type: int
returned: when O(state=present)
sample: 153
name:
description: template name
type: str
returned: when O(state=present)
sample: app1
description: Template name.
type: str
returned: when O(state=present)
sample: app1
template:
description: the parsed template
type: dict
returned: when O(state=present)
description: The parsed template.
type: dict
returned: when O(state=present)
group_id:
description: template's group id
type: int
returned: when O(state=present)
sample: 1
description: Template's group id.
type: int
returned: when O(state=present)
sample: 1
group_name:
description: template's group name
type: str
returned: when O(state=present)
sample: one-users
description: Template's group name.
type: str
returned: when O(state=present)
sample: one-users
owner_id:
description: template's owner id
type: int
returned: when O(state=present)
sample: 143
description: Template's owner id.
type: int
returned: when O(state=present)
sample: 143
owner_name:
description: template's owner name
type: str
returned: when O(state=present)
sample: ansible-test
'''
description: Template's owner name.
type: str
returned: when O(state=present)
sample: ansible-test
"""
from ansible_collections.community.general.plugins.module_utils.opennebula import OpenNebulaModule