else:
os_name = opts.os
- # third, get confirmation: multi-reinstall requires --force-multi
- # *and* --force, single-reinstall just --force
+ # third, get confirmation: multi-reinstall requires --force-multi,
+ # single-reinstall either --force or --force-multi (--force-multi is
+ # a stronger --force)
multi_on = opts.multi_mode != _SHUTDOWN_INSTANCES or len(inames) > 1
if multi_on:
warn_msg = "Note: this will remove *all* data for the below instances!\n"
- if not ((opts.force_multi and opts.force) or
+ if not (opts.force_multi or
_ConfirmOperation(inames, "reinstall", extra=warn_msg)):
return 1
else:
- if not opts.force:
+ if not (opts.force or opts.force_multi):
usertext = ("This will reinstall the instance %s and remove"
" all data. Continue?") % inames[0]
if not AskUser(usertext):
new_name=args[1],
ip_check=opts.ip_check,
name_check=opts.name_check)
- SubmitOrSend(op, opts)
+ result = SubmitOrSend(op, opts)
+
+ ToStdout("Instance '%s' renamed to '%s'", args[0], result)
+
return 0