[PR #9389/a9fca563 backport][stable-10] ma*.py: normalize docs (#9405)

ma*.py: normalize docs (#9389)

* ma*.py: normalize docs

* Update plugins/modules/matrix.py

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a9fca56374)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-26 14:01:25 +01:00 committed by GitHub
commit 29e9afcbf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 596 additions and 639 deletions

View file

@ -8,8 +8,7 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
module: manageiq_alerts
short_description: Configuration of alerts in ManageIQ
@ -20,7 +19,6 @@ extends_documentation_fragment:
author: Elad Alfassa (@elad661) <ealfassa@redhat.com>
description:
- The manageiq_alerts module supports adding, updating and deleting alerts in ManageIQ.
attributes:
check_mode:
support: none
@ -31,8 +29,8 @@ options:
state:
type: str
description:
- absent - alert should not exist,
- present - alert should exist,
- V(absent) - alert should not exist,
- V(present) - alert should exist.
required: false
choices: ['absent', 'present']
default: 'present'
@ -44,9 +42,8 @@ options:
resource_type:
type: str
description:
- The entity type for the alert in ManageIQ. Required when state is "present".
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster',
'ExtManagementSystem', 'MiddlewareServer']
- The entity type for the alert in ManageIQ. Required when O(state=present).
choices: ['Vm', 'ContainerNode', 'MiqServer', 'Host', 'Storage', 'EmsCluster', 'ExtManagementSystem', 'MiddlewareServer']
expression_type:
type: str
description:
@ -58,20 +55,18 @@ options:
description:
- The alert expression for ManageIQ.
- Can either be in the "Miq Expression" format or the "Hash Expression format".
- Required if state is "present".
- Required if O(state=present).
enabled:
description:
- Enable or disable the alert. Required if state is "present".
- Enable or disable the alert. Required if O(state=present).
type: bool
options:
type: dict
description:
- Additional alert options, such as notification type and frequency
- Additional alert options, such as notification type and frequency.
"""
'''
EXAMPLES = '''
EXAMPLES = r"""
- name: Add an alert with a "hash expression" to ManageIQ
community.general.manageiq_alerts:
state: present
@ -83,15 +78,15 @@ EXAMPLES = '''
from: "example@example.com"
resource_type: ContainerNode
expression:
eval_method: hostd_log_threshold
mode: internal
options: {}
eval_method: hostd_log_threshold
mode: internal
options: {}
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
validate_certs: false # only do this when you trust the network!
- name: Add an alert with a "miq expression" to ManageIQ
community.general.manageiq_alerts:
@ -105,20 +100,20 @@ EXAMPLES = '''
resource_type: Vm
expression_type: miq
expression:
and:
- CONTAINS:
tag: Vm.managed-environment
value: prod
- not:
CONTAINS:
tag: Vm.host.managed-environment
value: prod
and:
- CONTAINS:
tag: Vm.managed-environment
value: prod
- not:
CONTAINS:
tag: Vm.host.managed-environment
value: prod
enabled: true
manageiq_connection:
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
validate_certs: false # only do this when you trust the network!
- name: Delete an alert from ManageIQ
community.general.manageiq_alerts:
@ -128,11 +123,11 @@ EXAMPLES = '''
url: 'http://127.0.0.1:3000'
username: 'admin'
password: 'smartvm'
validate_certs: false # only do this when you trust the network!
'''
validate_certs: false # only do this when you trust the network!
"""
RETURN = '''
'''
RETURN = r"""
"""
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec