mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
[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:
parent
49ed3d4acf
commit
88330575ff
21 changed files with 1807 additions and 1934 deletions
|
@ -8,8 +8,7 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
DOCUMENTATION = r"""
|
||||
module: one_image_info
|
||||
short_description: Gather information on OpenNebula images
|
||||
description:
|
||||
|
@ -31,17 +30,17 @@ options:
|
|||
name:
|
||||
description:
|
||||
- A O(name) of the image whose facts will be gathered.
|
||||
- If the O(name) begins with V(~) the O(name) will be used as regex pattern
|
||||
- which restricts the list of images (whose facts will be returned) whose names match specified regex.
|
||||
- If the O(name) begins with V(~) the O(name) will be used as regex pattern,
|
||||
which restricts the list of images (whose facts will be returned) whose names match specified regex.
|
||||
- Also, if the O(name) begins with V(~*) case-insensitive matching will be performed.
|
||||
- See examples for more details.
|
||||
type: str
|
||||
author:
|
||||
- "Milan Ilic (@ilicmilan)"
|
||||
- "Jan Meerkamp (@meerkampdvv)"
|
||||
'''
|
||||
- "Milan Ilic (@ilicmilan)"
|
||||
- "Jan Meerkamp (@meerkampdvv)"
|
||||
"""
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r"""
|
||||
- name: Gather facts about all images
|
||||
community.general.one_image_info:
|
||||
register: result
|
||||
|
@ -76,201 +75,201 @@ EXAMPLES = '''
|
|||
community.general.one_image_info:
|
||||
name: '~*foo-image-.*'
|
||||
register: foo_images
|
||||
'''
|
||||
"""
|
||||
|
||||
RETURN = '''
|
||||
RETURN = r"""
|
||||
images:
|
||||
description: A list of images info
|
||||
type: complex
|
||||
returned: success
|
||||
contains:
|
||||
id:
|
||||
description: The image's id.
|
||||
type: int
|
||||
sample: 153
|
||||
name:
|
||||
description: The image's name.
|
||||
type: str
|
||||
sample: app1
|
||||
group_id:
|
||||
description: The image's group id
|
||||
type: int
|
||||
sample: 1
|
||||
group_name:
|
||||
description: The image's group name.
|
||||
type: str
|
||||
sample: one-users
|
||||
owner_id:
|
||||
description: The image's owner id.
|
||||
type: int
|
||||
sample: 143
|
||||
owner_name:
|
||||
description: The image's owner name.
|
||||
type: str
|
||||
sample: ansible-test
|
||||
state:
|
||||
description: The image's state.
|
||||
type: str
|
||||
sample: READY
|
||||
used:
|
||||
description: The image's usage status.
|
||||
type: bool
|
||||
sample: true
|
||||
running_vms:
|
||||
description: The image's count of running vms that use this image.
|
||||
type: int
|
||||
sample: 7
|
||||
permissions:
|
||||
description: The image's permissions.
|
||||
type: dict
|
||||
version_added: 9.5.0
|
||||
contains:
|
||||
owner_u:
|
||||
description: The image's owner USAGE permissions.
|
||||
type: str
|
||||
sample: 1
|
||||
owner_m:
|
||||
description: The image's owner MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
owner_a:
|
||||
description: The image's owner ADMIN permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_u:
|
||||
description: The image's group USAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_m:
|
||||
description: The image's group MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_a:
|
||||
description: The image's group ADMIN permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_u:
|
||||
description: The image's other users USAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_m:
|
||||
description: The image's other users MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_a:
|
||||
description: The image's other users ADMIN permissions
|
||||
type: str
|
||||
sample: 0
|
||||
sample:
|
||||
owner_u: 1
|
||||
owner_m: 0
|
||||
owner_a: 0
|
||||
group_u: 0
|
||||
group_m: 0
|
||||
group_a: 0
|
||||
other_u: 0
|
||||
other_m: 0
|
||||
other_a: 0
|
||||
type:
|
||||
description: The image's type.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
disk_type:
|
||||
description: The image's format type.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
persistent:
|
||||
description: The image's persistence status (1 means true, 0 means false).
|
||||
type: int
|
||||
sample: 1
|
||||
version_added: 9.5.0
|
||||
source:
|
||||
description: The image's source.
|
||||
type: str
|
||||
sample: /var/lib/one//datastores/100/somerandomstringxd
|
||||
version_added: 9.5.0
|
||||
path:
|
||||
description: The image's filesystem path.
|
||||
type: str
|
||||
sample: /var/tmp/hello.qcow2
|
||||
version_added: 9.5.0
|
||||
fstype:
|
||||
description: The image's filesystem type.
|
||||
type: str
|
||||
sample: ext4
|
||||
version_added: 9.5.0
|
||||
size:
|
||||
description: The image's size in MegaBytes.
|
||||
type: int
|
||||
sample: 10000
|
||||
version_added: 9.5.0
|
||||
cloning_ops:
|
||||
description: The image's cloning operations per second.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
cloning_id:
|
||||
description: The image's cloning ID.
|
||||
type: int
|
||||
sample: -1
|
||||
version_added: 9.5.0
|
||||
target_snapshot:
|
||||
description: The image's target snapshot.
|
||||
type: int
|
||||
sample: 1
|
||||
version_added: 9.5.0
|
||||
datastore_id:
|
||||
description: The image's datastore ID.
|
||||
type: int
|
||||
sample: 100
|
||||
version_added: 9.5.0
|
||||
datastore:
|
||||
description: The image's datastore name.
|
||||
type: int
|
||||
sample: image_datastore
|
||||
version_added: 9.5.0
|
||||
vms:
|
||||
description: The image's list of vm ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
clones:
|
||||
description: The image's list of clones ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
app_clones:
|
||||
description: The image's list of app_clones ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
snapshots:
|
||||
description: The image's list of snapshots.
|
||||
type: list
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- date: 123123
|
||||
parent: 1
|
||||
size: 10228
|
||||
allow_orphans: 1
|
||||
children: 0
|
||||
active: 1
|
||||
name: SampleName
|
||||
'''
|
||||
description: A list of images info.
|
||||
type: complex
|
||||
returned: success
|
||||
contains:
|
||||
id:
|
||||
description: The image's id.
|
||||
type: int
|
||||
sample: 153
|
||||
name:
|
||||
description: The image's name.
|
||||
type: str
|
||||
sample: app1
|
||||
group_id:
|
||||
description: The image's group id.
|
||||
type: int
|
||||
sample: 1
|
||||
group_name:
|
||||
description: The image's group name.
|
||||
type: str
|
||||
sample: one-users
|
||||
owner_id:
|
||||
description: The image's owner id.
|
||||
type: int
|
||||
sample: 143
|
||||
owner_name:
|
||||
description: The image's owner name.
|
||||
type: str
|
||||
sample: ansible-test
|
||||
state:
|
||||
description: The image's state.
|
||||
type: str
|
||||
sample: READY
|
||||
used:
|
||||
description: The image's usage status.
|
||||
type: bool
|
||||
sample: true
|
||||
running_vms:
|
||||
description: The image's count of running vms that use this image.
|
||||
type: int
|
||||
sample: 7
|
||||
permissions:
|
||||
description: The image's permissions.
|
||||
type: dict
|
||||
version_added: 9.5.0
|
||||
contains:
|
||||
owner_u:
|
||||
description: The image's owner USAGE permissions.
|
||||
type: str
|
||||
sample: 1
|
||||
owner_m:
|
||||
description: The image's owner MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
owner_a:
|
||||
description: The image's owner ADMIN permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_u:
|
||||
description: The image's group USAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_m:
|
||||
description: The image's group MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
group_a:
|
||||
description: The image's group ADMIN permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_u:
|
||||
description: The image's other users USAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_m:
|
||||
description: The image's other users MANAGE permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
other_a:
|
||||
description: The image's other users ADMIN permissions.
|
||||
type: str
|
||||
sample: 0
|
||||
sample:
|
||||
owner_u: 1
|
||||
owner_m: 0
|
||||
owner_a: 0
|
||||
group_u: 0
|
||||
group_m: 0
|
||||
group_a: 0
|
||||
other_u: 0
|
||||
other_m: 0
|
||||
other_a: 0
|
||||
type:
|
||||
description: The image's type.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
disk_type:
|
||||
description: The image's format type.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
persistent:
|
||||
description: The image's persistence status (1 means true, 0 means false).
|
||||
type: int
|
||||
sample: 1
|
||||
version_added: 9.5.0
|
||||
source:
|
||||
description: The image's source.
|
||||
type: str
|
||||
sample: /var/lib/one//datastores/100/somerandomstringxd
|
||||
version_added: 9.5.0
|
||||
path:
|
||||
description: The image's filesystem path.
|
||||
type: str
|
||||
sample: /var/tmp/hello.qcow2
|
||||
version_added: 9.5.0
|
||||
fstype:
|
||||
description: The image's filesystem type.
|
||||
type: str
|
||||
sample: ext4
|
||||
version_added: 9.5.0
|
||||
size:
|
||||
description: The image's size in MegaBytes.
|
||||
type: int
|
||||
sample: 10000
|
||||
version_added: 9.5.0
|
||||
cloning_ops:
|
||||
description: The image's cloning operations per second.
|
||||
type: int
|
||||
sample: 0
|
||||
version_added: 9.5.0
|
||||
cloning_id:
|
||||
description: The image's cloning ID.
|
||||
type: int
|
||||
sample: -1
|
||||
version_added: 9.5.0
|
||||
target_snapshot:
|
||||
description: The image's target snapshot.
|
||||
type: int
|
||||
sample: 1
|
||||
version_added: 9.5.0
|
||||
datastore_id:
|
||||
description: The image's datastore ID.
|
||||
type: int
|
||||
sample: 100
|
||||
version_added: 9.5.0
|
||||
datastore:
|
||||
description: The image's datastore name.
|
||||
type: int
|
||||
sample: image_datastore
|
||||
version_added: 9.5.0
|
||||
vms:
|
||||
description: The image's list of vm ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
clones:
|
||||
description: The image's list of clones ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
app_clones:
|
||||
description: The image's list of app_clones ID's.
|
||||
type: list
|
||||
elements: int
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
snapshots:
|
||||
description: The image's list of snapshots.
|
||||
type: list
|
||||
version_added: 9.5.0
|
||||
sample:
|
||||
- date: 123123
|
||||
parent: 1
|
||||
size: 10228
|
||||
allow_orphans: 1
|
||||
children: 0
|
||||
active: 1
|
||||
name: SampleName
|
||||
"""
|
||||
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.opennebula import OpenNebulaModule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue