Commit aefef4f4 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add gnt-instance (start|stop) --submit

Finish the --submit changes with these two, which (because they are
multi-opcode commands) require special handling.

Reviewed-by: ultrotter
parent e74798c1
......@@ -460,7 +460,11 @@ def StartupInstance(opts, args):
extra_args=opts.extra_args)
if multi_on:
logger.ToStdout("Starting up %s" % name)
SubmitOpCode(op)
try:
SubmitOrSend(op, opts)
except JobSubmittedException, err:
_, txt = FormatError(err)
logger.ToStdout("%s" % txt)
return 0
......@@ -511,7 +515,11 @@ def ShutdownInstance(opts, args):
op = opcodes.OpShutdownInstance(instance_name=name)
if multi_on:
logger.ToStdout("Shutting down %s" % name)
SubmitOpCode(op)
try:
SubmitOrSend(op, opts)
except JobSubmittedException, err:
_, txt = FormatError(err)
logger.ToStdout("%s" % txt)
return 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment