summaryrefslogtreecommitdiffstats
path: root/roles/lib_zabbix/library
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-09-10 11:30:15 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-09-10 11:30:15 -0400
commit105fcbc28f96c9283b4ff4da3a6dfb8f671e38e1 (patch)
tree598e541f2ffaadcef9409c35178d7a4e1e71b8ed /roles/lib_zabbix/library
parent6dfeaccd2a6966e5b4e43cc315f88018e268e084 (diff)
parent4e5ddae5018ebab6cba0ba83de2702adfabeb478 (diff)
downloadopenshift-105fcbc28f96c9283b4ff4da3a6dfb8f671e38e1.tar.gz
openshift-105fcbc28f96c9283b4ff4da3a6dfb8f671e38e1.tar.bz2
openshift-105fcbc28f96c9283b4ff4da3a6dfb8f671e38e1.tar.xz
openshift-105fcbc28f96c9283b4ff4da3a6dfb8f671e38e1.zip
Merge pull request #573 from kwoodson/triggerfix
Adding support for triggers to have descriptions.
Diffstat (limited to 'roles/lib_zabbix/library')
-rw-r--r--roles/lib_zabbix/library/zbx_trigger.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/lib_zabbix/library/zbx_trigger.py b/roles/lib_zabbix/library/zbx_trigger.py
index c384f6fa3..a05de7e68 100644
--- a/roles/lib_zabbix/library/zbx_trigger.py
+++ b/roles/lib_zabbix/library/zbx_trigger.py
@@ -98,6 +98,7 @@ def main():
zbx_password=dict(default=os.environ.get('ZABBIX_PASSWORD', None), type='str'),
zbx_debug=dict(default=False, type='bool'),
expression=dict(default=None, type='str'),
+ name=dict(default=None, type='str'),
description=dict(default=None, type='str'),
dependencies=dict(default=[], type='list'),
priority=dict(default='avg', type='str'),
@@ -116,11 +117,11 @@ def main():
zbx_class_name = 'trigger'
idname = "triggerid"
state = module.params['state']
- description = module.params['description']
+ tname = module.params['name']
content = zapi.get_content(zbx_class_name,
'get',
- {'filter': {'description': description},
+ {'filter': {'description': tname},
'expandExpression': True,
'selectDependencies': 'triggerid',
})
@@ -138,7 +139,8 @@ def main():
# Create and Update
if state == 'present':
- params = {'description': description,
+ params = {'description': tname,
+ 'comments': module.params['description'],
'expression': module.params['expression'],
'dependencies': get_deps(zapi, module.params['dependencies']),
'priority': get_priority(module.params['priority']),