From 38669ddbbcff45ea591778af3c03cd44f24d618b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Sep 2021 14:01:46 -0400 Subject: [PATCH] Have nodegroupremove accept comma delimited groups --- confluent_client/bin/nodegroupremove | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/confluent_client/bin/nodegroupremove b/confluent_client/bin/nodegroupremove index e06d09e0..c0861825 100755 --- a/confluent_client/bin/nodegroupremove +++ b/confluent_client/bin/nodegroupremove @@ -43,10 +43,11 @@ noderange = args[0] client.check_globbing(noderange) session = client.Command() exitcode = 0 -for r in session.delete('/nodegroups/{0}'.format(noderange)): - if 'error' in r: - sys.stderr.write(r['error'] + '\n') - exitcode |= 1 - if 'deleted' in r: - print('{0}: deleted'.format(r['deleted'])) +for group in noderange.split(','): + for r in session.delete('/nodegroups/{0}'.format(noderange)): + if 'error' in r: + sys.stderr.write(r['error'] + '\n') + exitcode |= 1 + if 'deleted' in r: + print('{0}: deleted'.format(r['deleted'])) sys.exit(exitcode)