2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-14 10:20:31 +00:00

Payload data for clear action

This commit is contained in:
Mark Gurevich
2018-03-05 09:18:19 -05:00
parent 8491449266
commit 7cb0065a98
2 changed files with 3 additions and 2 deletions

View File

@ -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):

View File

@ -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):