From 307a1020a22cb20d61869cf75f110f9185869a11 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sat, 15 Aug 2026 12:57:52 +0200 Subject: [PATCH] Set one bmc contact rather than one per letter A contact name arrives from the client as a string, and handing it to set_location_information made a Contacts entry of every character. --- .../confluent/plugins/hardwaremanagement/redfish.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py index 98cd30f2..ff8f2855 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/redfish.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/redfish.py @@ -1438,6 +1438,13 @@ class IpmiHandler: raise exc.InvalidArgumentException( 'Location accepts only: {0}'.format( ', '.join(self._locationfields))) + contacts = locargs.get('contactnames', None) + if isinstance(contacts, str): + # A read answers with a list of names, but a caller setting one + # gives a string, and iterating that would make a contact of + # every letter + locargs['contactnames'] = [x.strip() for x in + contacts.split(',') if x.strip()] await self.ipmicmd.set_location_information(**locargs) return