Skip to content
Snippets Groups Projects
Commit 1b6dddc8 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Modify gnt-instance rename to support --no-check-name


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 9c5885e2
No related branches found
No related tags found
No related merge requests found
......@@ -620,9 +620,15 @@ def RenameInstance(opts, args):
@return: the desired exit code
"""
if not opts.check_name:
if not AskUser("As you disabled the check of the DNS entry, please verify"
" that '%s' is a FQDN. Continue?" % args[1]):
return 1
op = opcodes.OpRenameInstance(instance_name=args[0],
new_name=args[1],
ignore_ip=not opts.ip_check)
ignore_ip=not opts.ip_check,
check_name=opts.check_name)
SubmitOrSend(op, opts)
return 0
......@@ -1439,7 +1445,7 @@ commands = {
'rename': (
RenameInstance,
[ArgInstance(min=1, max=1), ArgHost(min=1, max=1)],
[NOIPCHECK_OPT, SUBMIT_OPT],
[NOIPCHECK_OPT, NONAMECHECK_OPT, SUBMIT_OPT],
"<instance> <new_name>", "Rename the instance"),
'replace-disks': (
ReplaceDisks, ARGS_ONE_INSTANCE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment