From c6d0d87ca94369d6d1aa03e78053b7164d953374 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 15 May 2015 16:49:52 -0400 Subject: [PATCH] Add event log to interface Add a draft event log interface along with an ipmi implementation. This requires current git master of pyghmi. Release of pyghmi will be done before this commit lands in a confluent release. --- confluent_server/VERSION | 2 +- confluent_server/confluent/core.py | 8 +++ confluent_server/confluent/messages.py | 52 ++++++++++++++++--- .../plugins/hardwaremanagement/ipmi.py | 25 +++++++-- 4 files changed, 75 insertions(+), 12 deletions(-) diff --git a/confluent_server/VERSION b/confluent_server/VERSION index 9459d4ba..e173b1a0 100644 --- a/confluent_server/VERSION +++ b/confluent_server/VERSION @@ -1 +1 @@ -1.1 +1.1.post1 diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index 837fb296..8c27e360 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -117,6 +117,14 @@ noderesources = { # this is a dummy value, http or socket must handle special 'session': PluginRoute({}), }, + 'events': { + 'hardware': { + 'log': PluginRoute({ + 'pluginattrs': ['hardwaremanagement.method'], + 'default': 'ipmi', + }) + } + }, 'power': { 'state': PluginRoute({ 'pluginattrs': ['hardwaremanagement.method'], diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index 03175cc3..5a8c24cb 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -21,6 +21,13 @@ import confluent.exceptions as exc import json +valid_health_values = set([ + 'ok', + 'warning', + 'critical', + 'failed', + 'unknown', +]) def _htmlify_structure(indict): ret = "