mirror of
https://github.com/xcat2/confluent.git
synced 2026-10-20 06:35:33 +00:00
Leave it to OpenBMC to say which of its logs are not events
Reading an event log skipped every log service whose id or name said journal, dump, post code, host logger or crash, on every implementation. Those names are bmcweb's: the AMI and Lenovo bmcs call theirs SEL, EventLog, AuditLog and PlatformLog. bmcweb does need the distinction, keeping its event log under the system while a clear would destroy its dumps, so it gets a handler that names the words and generic names none, reading whatever a platform publishes.
This commit is contained in:
@@ -562,12 +562,10 @@ class OEMHandler(object):
|
||||
}
|
||||
yield certdesc
|
||||
|
||||
# A log service whose id or name says one of these is not an event log:
|
||||
# the bmc's own systemd journal, dumps of several kinds, and firmware boot
|
||||
# progress. Reading them buries the events that were asked for, and
|
||||
# clearing them destroys diagnostic data that has nothing to do with the
|
||||
# event log.
|
||||
noneventlogwords = ('journal', 'dump', 'postcode', 'hostlogger', 'crash')
|
||||
# Words in a log service's id or name that say it holds something other than
|
||||
# events. Redfish does not settle what a log service is called, so each
|
||||
# handler names its platform's and generic reads every service it finds.
|
||||
noneventlogwords = ()
|
||||
|
||||
@classmethod
|
||||
def is_event_log(cls, loginfo):
|
||||
|
||||
@@ -17,6 +17,7 @@ import aiohmi.redfish.oem.generic as generic
|
||||
import aiohmi.redfish.oem.lenovo.main as lenovo
|
||||
import aiohmi.redfish.oem.ami.main as ami
|
||||
import aiohmi.redfish.oem.megware.main as megware
|
||||
import aiohmi.redfish.oem.openbmc.main as openbmc
|
||||
|
||||
OEMMAP = {
|
||||
'Lenovo': lenovo,
|
||||
@@ -24,6 +25,9 @@ OEMMAP = {
|
||||
'AMI': ami,
|
||||
'Ami': ami,
|
||||
'Megware': megware,
|
||||
# bmcweb spells its oem key OpenBmc on the manager and OpenBMC elsewhere
|
||||
'OpenBMC': openbmc,
|
||||
'OpenBmc': openbmc,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Copyright 2026 MEGWARE Computer Vertrieb und Service GmbH
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""
|
||||
OEM handler for the OpenBMC (bmcweb) redfish service.
|
||||
"""
|
||||
|
||||
import aiohmi.redfish.oem.openbmc.openbmc as openbmc
|
||||
|
||||
|
||||
async def get_handler(sysinfo, sysurl, webclient, cache, cmd, rootinfo={}):
|
||||
return await openbmc.OEMHandler.create(sysinfo, sysurl, webclient, cache,
|
||||
gpool=cmd._gpool, rootinfo=rootinfo)
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright 2026 MEGWARE Computer Vertrieb und Service GmbH
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import aiohmi.redfish.oem.generic as generic
|
||||
|
||||
|
||||
class OEMHandler(generic.OEMHandler):
|
||||
# bmcweb keeps its journal, dumps, post codes and console capture under the
|
||||
# manager and the event log under the system, so reading those buries the
|
||||
# events asked for and clearing them destroys diagnostic data.
|
||||
noneventlogwords = ('journal', 'dump', 'postcode', 'hostlogger', 'crash')
|
||||
@@ -34,6 +34,7 @@ setup(
|
||||
'aiohmi/redfish/oem/lenovo',
|
||||
'aiohmi/redfish/oem/ami',
|
||||
'aiohmi/redfish/oem/megware',
|
||||
'aiohmi/redfish/oem/openbmc',
|
||||
'aiohmi/util'],
|
||||
scripts=['bin/confluent', 'bin/confluent_selfcheck', 'bin/confluentdbutil', 'bin/collective', 'bin/osdeploy'],
|
||||
data_files=[('/etc/init.d', ['sysvinit/confluent']),
|
||||
|
||||
Reference in New Issue
Block a user