diff options
Diffstat (limited to 'plugins/server_utils.py')
-rwxr-xr-x | plugins/server_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/server_utils.py b/plugins/server_utils.py index ab5b4e8..83470cf 100755 --- a/plugins/server_utils.py +++ b/plugins/server_utils.py @@ -84,6 +84,15 @@ def getHostGroup(name): return None +def getUuidToHostConfigDict(): + hostConfigs = Model.Host.objects.all + resultDict = {} + for hostConfig in hostConfigs: + if hostConfig.get("_HOST_UUID", None) is not None: + resultDict[hostConfig.get("_HOST_UUID")] = hostConfig + return resultDict + + def getNRPEBaseCommand(host, timeout=None): command = NRPE_PATH + " -H " + host if timeout is not None: |