Revision 4d025f0b lib/cli.py

b/lib/cli.py
89 89
  "GLOBAL_FILEDIR_OPT",
90 90
  "HID_OS_OPT",
91 91
  "GLOBAL_SHARED_FILEDIR_OPT",
92
  "HOTPLUG_OPT",
92 93
  "HVLIST_OPT",
93 94
  "HVOPTS_OPT",
94 95
  "HYPERVISOR_OPT",
......
1436 1437
                          help="Marks the grow as absolute instead of the"
1437 1438
                          " (default) relative mode")
1438 1439

  
1440
HOTPLUG_OPT = cli_option("--hotplug", dest="hotplug",
1441
                         action="store_true", default=False,
1442
                         help="Enable disk/nic hotplug")
1443

  
1439 1444
#: Options provided by all commands
1440 1445
COMMON_OPTS = [DEBUG_OPT]
1441 1446

  
......
2395 2400
  else:
2396 2401
    raise errors.ProgrammerError("Invalid creation mode %s" % mode)
2397 2402

  
2403
  if opts.hotplug:
2404
    hotplug = True
2405
  else:
2406
    hotplug = False
2407

  
2398 2408
  op = opcodes.OpInstanceCreate(instance_name=instance,
2399 2409
                                disks=disks,
2400 2410
                                disk_template=opts.disk_template,
......
2417 2427
                                src_node=src_node,
2418 2428
                                src_path=src_path,
2419 2429
                                tags=tags,
2430
                                hotplug=hotplug,
2420 2431
                                no_install=no_install,
2421 2432
                                identify_defaults=identify_defaults,
2422 2433
                                ignore_ipolicy=opts.ignore_ipolicy)

Also available in: Unified diff