2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 10:32:31 +00:00

Support clear of custom attributes

middle name attributes and custom attributes should
be checked for explicitly during a clear.
This commit is contained in:
Jarrod Johnson
2025-08-11 11:46:35 -04:00
parent c0a99f63a5
commit c9b9275bb1

View File

@@ -319,6 +319,12 @@ def update_nodes(nodes, element, configmanager, inputdata):
if fnmatch(candattrib, attrib):
clearattribs.append(candattrib)
foundattrib = True
currnodeattrs = configmanager.get_node_attributes(node, attrib)
for matchattrib in currnodeattrs.get(node, {}):
if matchattrib != attrib:
continue
clearattribs.append(matchattrib)
foundattrib = True
if not foundattrib:
raise exc.InvalidArgumentException("No attribute matches '" + attrib + "' (try wildcard if trying to clear a group)")
elif '*' in attrib: