Revision 783a6c0b scripts/gnt-node

b/scripts/gnt-node
1 1
#!/usr/bin/python
2 2
#
3 3

  
4
# Copyright (C) 2006, 2007, 2008 Google Inc.
4
# Copyright (C) 2006, 2007, 2008, 2009, 2010 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
361 361
    return 2
362 362

  
363 363
  # this should be removed once --non-live is deprecated
364
  if not opts.live and opts.migration_type is not None:
364
  if not opts.live and opts.migration_mode is not None:
365 365
    raise errors.OpPrereqError("Only one of the --non-live and "
366
                               "--migration-type options can be passed",
366
                               "--migration-mode options can be passed",
367 367
                               errors.ECODE_INVAL)
368 368
  if not opts.live: # --non-live passed
369 369
    live = constants.HT_MIGRATION_NONLIVE
370 370
  else:
371
    live = opts.migration_type
371
    live = opts.migration_mode
372 372
  op = opcodes.OpMigrateNode(node_name=args[0], live=live)
373 373
  SubmitOpCode(op, cl=cl, opts=opts)
374 374

  
......
661 661
    "Stops the primary instances on a node and start them on their"
662 662
    " secondary node (only for instances with drbd disk template)"),
663 663
  'migrate': (
664
    MigrateNode, ARGS_ONE_NODE, [FORCE_OPT, NONLIVE_OPT, MIGRATION_TYPE_OPT],
664
    MigrateNode, ARGS_ONE_NODE, [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT],
665 665
    "[-f] <node>",
666 666
    "Migrate all the primary instance on a node away from it"
667 667
    " (only for instances of type drbd)"),

Also available in: Unified diff