2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00

Implement 'unset' on group attributes

This commit is contained in:
jbjohnso 2014-04-22 16:23:33 -04:00
parent d854383be5
commit d269be6f8b

View File

@ -136,6 +136,14 @@ def update(nodes, element, configmanager, inputdata):
def update_nodegroup(group, element, configmanager, inputdata):
try:
clearattribs = []
for attrib in inputdata.attribs.iterkeys():
if inputdata.attribs[attrib] is None:
clearattribs.append(attrib)
for attrib in clearattribs:
del inputdata.attribs[attrib]
if clearattribs:
configmanager.clear_group_attributes(group, clearattribs)
configmanager.set_group_attributes({group: inputdata.attribs})
except ValueError:
raise exc.InvalidArgumentException()