2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-10-21 15:18:28 +00:00

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.
This commit is contained in:
Markus Hilger
2026-08-15 12:57:52 +02:00
parent 78048d01a1
commit 307a1020a2
@@ -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