Revision 783a6c0b scripts/gnt-instance

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

  
4
# Copyright (C) 2006, 2007 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
......
898 898
      return 1
899 899

  
900 900
  # this should be removed once --non-live is deprecated
901
  if not opts.live and opts.migration_type is not None:
901
  if not opts.live and opts.migration_mode is not None:
902 902
    raise errors.OpPrereqError("Only one of the --non-live and "
903
                               "--migration-type options can be passed",
903
                               "--migration-mode options can be passed",
904 904
                               errors.ECODE_INVAL)
905 905
  if not opts.live: # --non-live passed
906 906
    live = constants.HT_MIGRATION_NONLIVE
907 907
  else:
908
    live = opts.migration_type
908
    live = opts.migration_mode
909 909

  
910 910
  op = opcodes.OpMigrateInstance(instance_name=instance_name, live=live,
911 911
                                 cleanup=opts.cleanup)
......
1419 1419
    " using the remote mirror (only for instances of type drbd)"),
1420 1420
  'migrate': (
1421 1421
    MigrateInstance, ARGS_ONE_INSTANCE,
1422
    [FORCE_OPT, NONLIVE_OPT, MIGRATION_TYPE_OPT, CLEANUP_OPT],
1422
    [FORCE_OPT, NONLIVE_OPT, MIGRATION_MODE_OPT, CLEANUP_OPT],
1423 1423
    "[-f] <instance>", "Migrate instance to its secondary node"
1424 1424
    " (only for instances of type drbd)"),
1425 1425
  'move': (

Also available in: Unified diff