2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Final fix for nodedeploy without profile

This commit is contained in:
Jarrod Johnson 2020-08-25 14:27:46 -04:00
parent 14767e2909
commit ff0955d6be

View File

@ -57,7 +57,7 @@ def setpending(nr, profile, cli):
pass
def clearpending(nr, profile, cli):
def clearpending(nr, cli):
for rsp in cli.update('/noderange/{0}/attributes/current'.format(nr),
{'deployment.pendingprofile': ''}):
pass
@ -70,12 +70,17 @@ def main(args):
ap.add_argument('-m', '--maxnodes', help='Specifiy a maximum nodes to be deployed')
ap.add_argument('noderange', help='Set of nodes to deploy')
ap.add_argument('profile', nargs='?', help='Profile name to deploy')
args = ap.parse_args(args)
args, extra = ap.parse_args(args)
if not args.network and not args.prepare and not args.clear:
sys.stderr.write('-n or -p is a required argument currently\n')
return 1
if args.profile is None and len(extra) == 1:
args.profile = extra[0]
extra = extra[1:]
if extra:
sys.stderr.write('Unrecognized arguments: ' + repr(extra) + '\n')
if not args.clear and args.profile is None:
sys.stderr.write('<profile> is a required argument')
sys.stderr.write('<profile> is a required argument\n')
return 1
c = client.Command()
c.stop_if_noderange_over(args.noderange, args.maxnodes)