These commands use or display the result from the LU, so in case of
dry-run, they will crash or display just 'None'. At least checking that
the result is 'true' (in the boolean sense) will make them work better.
As for gnt-os modify, it didn't pass the 'opts' parameter properly to
SubmitOpCode, so the dry-run option was silently ignored.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
op = opcodes.OpRenameCluster(name=new_name)
result = SubmitOpCode(op, opts=opts, cl=cl)
- ToStdout("Cluster renamed from '%s' to '%s'", cluster_name, result)
+ if result:
+ ToStdout("Cluster renamed from '%s' to '%s'", cluster_name, result)
return 0
name_check=opts.name_check)
result = SubmitOrSend(op, opts)
- ToStdout("Instance '%s' renamed to '%s'", args[0], result)
+ if result:
+ ToStdout("Instance '%s' renamed to '%s'", args[0], result)
return 0
op = opcodes.OpPowercycleNode(node_name=node, force=opts.force)
result = SubmitOpCode(op, opts=opts)
- ToStderr(result)
+ if result:
+ ToStderr(result)
return 0
candidate_pool_size=None,
os_hvp=os_hvp,
osparams=osp)
- SubmitOpCode(op)
+ SubmitOpCode(op, opts=opts)
return 0