zabbix_action - allowing string for esc_period (#66841)

* allowing string for esc_period

* add changelog fragment

* Update zabbix_action.py

* remove now unneeded test
This commit is contained in:
Markus Fischbacher 2020-02-15 13:57:02 +01:00 committed by GitHub
parent f98874e4f9
commit 98bc53d3cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 7 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- zabbix_action - allow str values for ``esc_period`` options (https://github.com/ansible/ansible/pull/66841).

View file

@ -63,7 +63,9 @@ options:
default: true default: true
esc_period: esc_period:
description: description:
- Default operation step duration. Must be greater than 60 seconds. Accepts seconds, time unit with suffix and user macro. - Default operation step duration. Must be greater than 60 seconds.
- Accepts only seconds in int for <= Zabbix 3.2
- Accepts seconds, time unit with suffix and user macro since => Zabbix 3.4
- Required when C(state=present). - Required when C(state=present).
required: false required: false
conditions: conditions:
@ -226,7 +228,8 @@ options:
description: description:
- Duration of an escalation step in seconds. - Duration of an escalation step in seconds.
- Must be greater than 60 seconds. - Must be greater than 60 seconds.
- Accepts seconds, time unit with suffix and user macro. - Accepts only seconds in int for <= Zabbix 3.2
- Accepts seconds, time unit with suffix and user macro since => Zabbix 3.4
- If set to 0 or 0s, the default action escalation period will be used. - If set to 0 or 0s, the default action escalation period will be used.
default: 0s default: 0s
esc_step_from: esc_step_from:
@ -396,7 +399,7 @@ EXAMPLES = '''
event_source: 'trigger' event_source: 'trigger'
state: present state: present
status: enabled status: enabled
esc_period: 60 esc_period: 1m
conditions: conditions:
- type: 'trigger_name' - type: 'trigger_name'
operator: 'like' operator: 'like'
@ -429,7 +432,7 @@ EXAMPLES = '''
event_source: 'trigger' event_source: 'trigger'
state: present state: present
status: enabled status: enabled
esc_period: 60 esc_period: 1h
conditions: conditions:
- type: 'trigger_severity' - type: 'trigger_severity'
operator: '>=' operator: '>='
@ -1687,7 +1690,7 @@ def main():
http_login_user=dict(type='str', required=False, default=None), http_login_user=dict(type='str', required=False, default=None),
http_login_password=dict(type='str', required=False, default=None, no_log=True), http_login_password=dict(type='str', required=False, default=None, no_log=True),
validate_certs=dict(type='bool', required=False, default=True), validate_certs=dict(type='bool', required=False, default=True),
esc_period=dict(type='int', required=False), esc_period=dict(type='str', required=False),
timeout=dict(type='int', default=10), timeout=dict(type='int', default=10),
name=dict(type='str', required=True), name=dict(type='str', required=True),
event_source=dict(type='str', required=False, choices=['trigger', 'discovery', 'auto_registration', 'internal']), event_source=dict(type='str', required=False, choices=['trigger', 'discovery', 'auto_registration', 'internal']),
@ -1738,7 +1741,7 @@ def main():
'set_host_inventory_mode', 'set_host_inventory_mode',
] ]
), ),
esc_period=dict(type='int', required=False), esc_period=dict(type='str', required=False),
esc_step_from=dict(type='int', required=False, default=1), esc_step_from=dict(type='int', required=False, default=1),
esc_step_to=dict(type='int', required=False, default=1), esc_step_to=dict(type='int', required=False, default=1),
operation_condition=dict( operation_condition=dict(

View file

@ -2691,7 +2691,6 @@ lib/ansible/modules/monitoring/statusio_maintenance.py validate-modules:paramete
lib/ansible/modules/monitoring/uptimerobot.py validate-modules:doc-missing-type lib/ansible/modules/monitoring/uptimerobot.py validate-modules:doc-missing-type
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-choices-do-not-match-spec lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-default-incompatible-type
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-elements-mismatch lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-elements-mismatch
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-required-mismatch lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:doc-required-mismatch
lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:missing-suboption-docs lib/ansible/modules/monitoring/zabbix/zabbix_action.py validate-modules:missing-suboption-docs