Revision a14db5ff

b/lib/cli.py
64 64
  "IGNORE_FAILURES_OPT",
65 65
  "FORCE_OPT",
66 66
  "NET_OPT",
67
  "NEW_SECONDARY_OPT",
67 68
  "NODE_LIST_OPT",
68 69
  "NODE_PLACEMENT_OPT",
69 70
  "NOHDR_OPT",
......
636 637
                                 " configuration even if there are failures"
637 638
                                 " during the removal process")
638 639

  
640
NEW_SECONDARY_OPT = cli_option("-n", "--new-secondary", dest="dst_node",
641
                               help="Specifies the new secondary node",
642
                               metavar="NODE", default=None,
643
                               completion_suggest=OPT_COMPL_ONE_NODE)
644

  
639 645

  
640 646
def _ParseArgs(argv, commands, aliases):
641 647
  """Parser for the command line arguments.
b/scripts/gnt-instance
845 845

  
846 846
  """
847 847
  instance_name = args[0]
848
  new_2ndary = opts.new_secondary
848
  new_2ndary = opts.dst_node
849 849
  iallocator = opts.iallocator
850 850
  if opts.disks is None:
851 851
    disks = []
......
1436 1436
             "<instance> <new_name>", "Rename the instance"),
1437 1437
  'replace-disks': (ReplaceDisks, ARGS_ONE_INSTANCE,
1438 1438
                    [DEBUG_OPT,
1439
                     cli_option("-n", "--new-secondary", dest="new_secondary",
1440
                                help=("New secondary node (for secondary"
1441
                                      " node change)"), metavar="NODE",
1442
                                default=None,
1443
                                completion_suggest=OPT_COMPL_ONE_NODE),
1439
                     NEW_SECONDARY_OPT,
1444 1440
                     cli_option("-p", "--on-primary", dest="on_primary",
1445 1441
                                default=False, action="store_true",
1446 1442
                                help=("Replace the disk(s) on the primary"
b/scripts/gnt-node
637 637
          "[-s ip] [--readd] [--no-ssh-key-check] <node_name>",
638 638
          "Add a node to the cluster"),
639 639
  'evacuate': (EvacuateNode, ARGS_ONE_NODE,
640
               [DEBUG_OPT, FORCE_OPT, IALLOCATOR_OPT,
641
                cli_option("-n", "--new-secondary", dest="dst_node",
642
                           help="New secondary node", metavar="NODE",
643
                           default=None,
644
                           completion_suggest=OPT_COMPL_ONE_NODE),
645
                ],
640
               [DEBUG_OPT, FORCE_OPT, IALLOCATOR_OPT, NEW_SECONDARY_OPT],
646 641
               "[-f] {-I <iallocator> | -n <dst>} <node>",
647 642
               "Relocate the secondary instances from a node"
648 643
               " to other nodes (only for instances with drbd disk template)"),

Also available in: Unified diff