2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-27 11:30:06 +00:00

Skip empty nodes list

A noderange based nodegroup would have
the empty nodes list cluttering the output.
Skip empty nodes list in current settings.
This commit is contained in:
Jarrod Johnson 2019-04-05 09:17:45 -04:00
parent 5c4944a1e4
commit d7d3ae344c

View File

@ -74,6 +74,8 @@ def retrieve_nodegroup(nodegroup, element, configmanager, inputdata):
for attribute in sorted(list(grpcfg)):
currattr = grpcfg[attribute]
if attribute == 'nodes':
if not currattr:
continue
desc = 'The nodes belonging to this group'
elif attribute == 'noderange':
desc = 'A dynamic noderange that this group refers to in noderange expansion'
@ -97,8 +99,8 @@ def retrieve_nodegroup(nodegroup, element, configmanager, inputdata):
kv={attribute: currattr},
desc=desc)
else:
print attribute
print repr(currattr)
print(attribute)
print(repr(currattr))
raise Exception("BUGGY ATTRIBUTE FOR NODEGROUP")