From 7cb0065a98fa6e84113346fc68680183a430f988 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 5 Mar 2018 09:18:19 -0500 Subject: [PATCH] Payload data for clear action --- .../lib/python/agent/hwctl/executor/openbmc_eventlog.py | 2 +- xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_eventlog.py b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_eventlog.py index f582270e5..ee3ba2458 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_eventlog.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/executor/openbmc_eventlog.py @@ -60,11 +60,11 @@ class OpenBMCEventlogTask(ParallelNodesCommand): try: obmc.login() obmc.clear_all_eventlog_records() + self.callback.info('%s: %s' % (node, "Logs cleared")) except (SelfServerException, SelfClientException) as e: self.callback.error('%s' % e.message, node) - self.callback.info('%s: %s' % (node, "Logs cleared")) def resolve_ev_records(self, resolve_list, **kw): diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py index 892c687da..8a9f4640d 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc_client.py @@ -661,7 +661,8 @@ class OpenBMCRest(object): # Clear all eventlog records def clear_all_eventlog_records(self): - return self.request('POST', EVENTLOG_URLS['clear_all'], cmd='clear_all_eventlog_records') + payload = { "data": [] } + return self.request('POST', EVENTLOG_URLS['clear_all'], payload=payload, cmd='clear_all_eventlog_records') def set_apis_values(self, key, value):