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:
parent
d854383be5
commit
d269be6f8b
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user