From 058832184a7e5b23b7c398e443bc961af0ff3b5f Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 1 Apr 2015 16:01:50 -0400 Subject: fixing naming of environment variables --- library/zbxapi.py | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'library/zbxapi.py') diff --git a/library/zbxapi.py b/library/zbxapi.py index 198914bcb..94b48ed61 100755 --- a/library/zbxapi.py +++ b/library/zbxapi.py @@ -28,45 +28,45 @@ class ZabbixAPI(object): ZabbixAPI class ''' classes = { - 'Triggerprototype': ['get', 'update', 'delete', 'create'], - 'Script': ['getscriptsbyhosts', 'get', 'update', 'delete', 'execute', 'create'], - 'Templatescreenitem': ['get'], - 'Service': ['deletedependencies', 'create', 'isreadable', 'deletetimes', 'getsla', 'get', 'addtimes', 'update', 'delete', 'adddependencies', 'iswritable'], - 'Drule': ['delete', 'isreadable', 'create', 'get', 'update', 'copy', 'iswritable'], - 'Iconmap': ['create', 'update', 'isreadable', 'get', 'iswritable', 'delete'], - 'Dservice': ['get'], - 'History': ['get'], - 'Trigger': ['delete', 'deletedependencies', 'create', 'iswritable', 'isreadable', 'adddependencies', 'get', 'update'], - 'Graph': ['delete', 'get', 'update', 'create'], - 'Usergroup': ['get', 'update', 'create', 'massupdate', 'isreadable', 'delete', 'iswritable', 'massadd'], - 'Map': ['get', 'create', 'delete', 'update', 'isreadable', 'iswritable'], + 'Action': ['create', 'delete', 'get', 'update'], 'Alert': ['get'], - 'Screenitem': ['updatebyposition', 'iswritable', 'isreadable', 'update', 'get', 'create', 'delete'], - 'Httptest': ['create', 'delete', 'get', 'iswritable', 'update', 'isreadable'], - 'Graphitem': ['get'], + 'Application': ['create', 'delete', 'get', 'massadd', 'update'], + 'Configuration': ['export', 'import'], 'Dcheck': ['get'], - 'Template': ['isreadable', 'massupdate', 'delete', 'iswritable', 'massremove', 'massadd', 'create', 'update', 'get'], - 'Templatescreen': ['get', 'create', 'copy', 'delete', 'isreadable', 'update', 'iswritable'], - 'Application': ['update', 'delete', 'massadd', 'get', 'create'], - 'Item': ['delete', 'get', 'iswritable', 'isreadable', 'update', 'create'], - 'Proxy': ['create', 'delete', 'update', 'iswritable', 'isreadable', 'get'], - 'Action': ['get', 'delete', 'update', 'create'], - 'Mediatype': ['update', 'delete', 'get', 'create'], - 'Maintenance': ['get', 'update', 'create', 'delete'], - 'Screen': ['delete', 'update', 'create', 'get'], 'Dhost': ['get'], - 'Itemprototype': ['delete', 'iswritable', 'get', 'update', 'create', 'isreadable'], - 'Host': ['massadd', 'massremove', 'isreadable', 'get', 'create', 'update', 'delete', 'massupdate', 'iswritable'], + 'Drule': ['copy', 'create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Dservice': ['get'], 'Event': ['acknowledge', 'get'], - 'Hostprototype': ['iswritable', 'create', 'update', 'delete', 'get', 'isreadable'], - 'Hostgroup': ['massadd', 'massupdate', 'update', 'isreadable', 'get', 'massremove', 'create', 'delete', 'iswritable'], - 'Image': ['get', 'update', 'delete', 'create'], - 'User': ['delete', 'get', 'updatemedia', 'updateprofile', 'update', 'iswritable', 'logout', 'addmedia', 'create', 'login', 'deletemedia', 'isreadable'], - 'Graphprototype': ['update', 'get', 'delete', 'create'], - 'Hostinterface': ['replacehostinterfaces', 'delete', 'get', 'massadd', 'create', 'update', 'massremove'], - 'Usermacro': ['create', 'deleteglobal', 'updateglobal', 'delete', 'update', 'createglobal', 'get'], + 'Graph': ['create', 'delete', 'get', 'update'], + 'Graphitem': ['get'], + 'Graphprototype': ['create', 'delete', 'get', 'update'], + 'History': ['get'], + 'Hostgroup': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'massadd', 'massremove', 'massupdate', 'update'], + 'Hostinterface': ['create', 'delete', 'get', 'massadd', 'massremove', 'replacehostinterfaces', 'update'], + 'Host': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'massadd', 'massremove', 'massupdate', 'update'], + 'Hostprototype': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Httptest': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Iconmap': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Image': ['create', 'delete', 'get', 'update'], + 'Item': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Itemprototype': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Maintenance': ['create', 'delete', 'get', 'update'], + 'Map': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Mediatype': ['create', 'delete', 'get', 'update'], + 'Proxy': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Screen': ['create', 'delete', 'get', 'update'], + 'Screenitem': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'update', 'updatebyposition'], + 'Script': ['create', 'delete', 'execute', 'get', 'getscriptsbyhosts', 'update'], + 'Service': ['adddependencies', 'addtimes', 'create', 'delete', 'deletedependencies', 'deletetimes', 'get', 'getsla', 'isreadable', 'iswritable', 'update'], + 'Template': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'massadd', 'massremove', 'massupdate', 'update'], + 'Templatescreen': ['copy', 'create', 'delete', 'get', 'isreadable', 'iswritable', 'update'], + 'Templatescreenitem': ['get'], + 'Trigger': ['adddependencies', 'create', 'delete', 'deletedependencies', 'get', 'isreadable', 'iswritable', 'update'], + 'Triggerprototype': ['create', 'delete', 'get', 'update'], + 'User': ['addmedia', 'create', 'delete', 'deletemedia', 'get', 'isreadable', 'iswritable', 'login', 'logout', 'update', 'updatemedia', 'updateprofile'], + 'Usergroup': ['create', 'delete', 'get', 'isreadable', 'iswritable', 'massadd', 'massupdate', 'update'], + 'Usermacro': ['create', 'createglobal', 'delete', 'deleteglobal', 'get', 'update', 'updateglobal'], 'Usermedia': ['get'], - 'Configuration': ['import', 'export'], } def __init__(self, data={}): @@ -230,7 +230,7 @@ def main(): pw = module.params.get('password', None) if not pw: - pw = os.environ['ZABBIX_PW'] + pw = os.environ['ZABBIX_PASSWORD'] server = module.params['server'] -- cgit v1.2.3