From a22dd62f188e412e599012f405ec2d35b5cee80e Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 11 Aug 2026 05:26:25 +0200 Subject: [PATCH] Keep OEM handler signatures in step with their base class Four calls reached a base method with an argument list it does not accept, so they raised TypeError about the argument count. Three of them would have failed either way, since the base only raises UnsupportedFunctionality. What changes there is that the failure becomes the intended, catchable one rather than an argument count error the caller cannot interpret. get_diagnostic_data grew an autosuffix argument everywhere except the ipmi generic handler, which is the handler used for unrecognized hardware. The redfish generic handler already had it. The two storage super() calls dropped the cfgspec they were given. The fourth is a real fallback rather than a message: the XCC user_delete dropped the fishclient it receives from redfish/command.py, so deleting a uid the XCC does not list raised TypeError instead of attempting the generic Redfish delete. --- confluent_server/aiohmi/ipmi/oem/generic.py | 4 +++- confluent_server/aiohmi/ipmi/oem/lenovo/handler.py | 6 ++++-- confluent_server/aiohmi/redfish/oem/lenovo/xcc.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/confluent_server/aiohmi/ipmi/oem/generic.py b/confluent_server/aiohmi/ipmi/oem/generic.py index 6ff81339..2b5019e9 100644 --- a/confluent_server/aiohmi/ipmi/oem/generic.py +++ b/confluent_server/aiohmi/ipmi/oem/generic.py @@ -189,13 +189,15 @@ class OEMHandler(object): if False: yield None - async def get_diagnostic_data(self, savefile, progress=None): + async def get_diagnostic_data(self, savefile, progress=None, + autosuffix=False): """Download diagnostic data about target to a file This should be a payload that the vendor's support team can use to do diagnostics. :param savefile: File object or filename to save to :param progress: Callback to be informed about progress + :param autosuffix: Whether to append a vendor suffix to savefile :return: """ raise exc.UnsupportedFunctionality( diff --git a/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py b/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py index b95c2763..e566ee45 100755 --- a/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py +++ b/confluent_server/aiohmi/ipmi/oem/lenovo/handler.py @@ -222,7 +222,8 @@ class OEMHandler(generic.OEMHandler): async def remove_storage_configuration(self, cfgspec): if await self.has_xcc(): return await self.immhandler.remove_storage_configuration(cfgspec) - return await super(OEMHandler, self).remove_storage_configuration() + return await super(OEMHandler, self).remove_storage_configuration( + cfgspec) async def get_ikvm_methods(self): if await self.has_xcc(): @@ -241,7 +242,8 @@ class OEMHandler(generic.OEMHandler): async def apply_storage_configuration(self, cfgspec): if await self.has_xcc(): return await self.immhandler.apply_storage_configuration(cfgspec) - return await super(OEMHandler, self).apply_storage_configuration() + return await super(OEMHandler, self).apply_storage_configuration( + cfgspec) async def check_storage_configuration(self, cfgspec): if await self.has_xcc(): diff --git a/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py b/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py index 166aad02..d9a9d173 100644 --- a/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py +++ b/confluent_server/aiohmi/redfish/oem/lenovo/xcc.py @@ -1739,7 +1739,7 @@ class OEMHandler(generic.OEMHandler): deltarget = '{0},{1}'.format(uid, uidtonamemap[uid]) await wc.grab_json_response('/api/function', {"USER_UserDelete": deltarget}) return True - return await super(OEMHandler, self).user_delete(uid) + return await super(OEMHandler, self).user_delete(uid, fishclient) async def get_user_expiration(self, uid): wc = await self.wc()