nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00477
[Merge] ~xavpaice/hw-health-charm:fix_clear_sel into hw-health-charm:master
Xav Paice has proposed merging ~xavpaice/hw-health-charm:fix_clear_sel into hw-health-charm:master.
Requested reviews:
Nagios Charm developers (nagios-charmers)
For more details, see:
https://code.launchpad.net/~xavpaice/hw-health-charm/+git/hw-health-charm/+merge/367880
--
Your team Nagios Charm developers is requested to review the proposed merge of ~xavpaice/hw-health-charm:fix_clear_sel into hw-health-charm:master.
diff --git a/src/actions/actions.py b/src/actions/actions.py
index 9e27f0c..f27c2ee 100755
--- a/src/actions/actions.py
+++ b/src/actions/actions.py
@@ -21,7 +21,7 @@ import sys
from charmhelpers.core.hookenv import action_set, action_fail, log
-def clear_sel(args):
+def clear_sel():
"""Action to clear the IPMI system event log.
Uses ipmi-sel --post-clear, clears the SEL log and stores the cleared entries
@@ -31,7 +31,7 @@ def clear_sel(args):
try:
output = subprocess.check_output(command)
log("Action clear-sel completed, sel log cleared: {}".format(output))
- action_set({"cleared_log": output})
+ action_set({'message': output.decode('UTF-8')})
except subprocess.CalledProcessError as e:
action_fail("Action failed with {}".format(e))
@@ -44,7 +44,7 @@ ACTIONS = {"clear-sel": clear_sel}
def main(args):
action_name = os.path.basename(args[0])
try:
- ACTIONS[action_name]
+ ACTIONS[action_name]()
except Exception as e:
action_fail(str(e))
Follow ups