mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-23 19:52:10 +00:00
Final fix for nodedeploy without profile
This commit is contained in:
parent
14767e2909
commit
ff0955d6be
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user