# second, if requested, ask for an OS
if opts.select_os is True:
- op = opcodes.OpDiagnoseOS(output_fields=["name", "variants"], names=[])
+ op = opcodes.OpOsDiagnose(output_fields=["name", "variants"], names=[])
result = SubmitOpCode(op, opts=opts)
if not result:
"""
instance_name = args[0]
- op = opcodes.OpInstanceDeactivateDisks(instance_name=instance_name)
+ op = opcodes.OpInstanceDeactivateDisks(instance_name=instance_name,
+ force=opts.force)
SubmitOrSend(op, opts)
return 0
@return: the opcode needed for the operation
"""
- op = opcodes.OpStartupInstance(instance_name=name,
+ op = opcodes.OpInstanceStartup(instance_name=name,
force=opts.force,
ignore_offline_nodes=opts.ignore_offline)
# do not add these parameters to the opcode unless they're defined
@return: the opcode needed for the operation
"""
- return opcodes.OpShutdownInstance(instance_name=name,
+ return opcodes.OpInstanceShutdown(instance_name=name,
timeout=opts.timeout,
ignore_offline_nodes=opts.ignore_offline)
# replace secondary
mode = constants.REPLACE_DISK_CHG
- op = opcodes.OpReplaceDisks(instance_name=args[0], disks=disks,
- remote_node=new_2ndary, mode=mode,
- iallocator=iallocator,
- early_release=opts.early_release)
+ op = opcodes.OpInstanceReplaceDisks(instance_name=args[0], disks=disks,
+ remote_node=new_2ndary, mode=mode,
+ iallocator=iallocator,
+ early_release=opts.early_release)
SubmitOrSend(op, opts)
return 0
" specifying a secondary node")
return 1
- op = opcodes.OpSetInstanceParams(instance_name=args[0],
+ op = opcodes.OpInstanceSetParams(instance_name=args[0],
nics=opts.nics,
disks=opts.disks,
disk_template=opts.disk_template,
"<instance>", "Activate an instance's disks"),
'deactivate-disks': (
DeactivateDisks, ARGS_ONE_INSTANCE,
- [SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT],
- "<instance>", "Deactivate an instance's disks"),
+ [FORCE_OPT, SUBMIT_OPT, DRY_RUN_OPT, PRIORITY_OPT],
+ "[-f] <instance>", "Deactivate an instance's disks"),
'recreate-disks': (
RecreateDisks, ARGS_ONE_INSTANCE,
[SUBMIT_OPT, DISKIDX_OPT, DRY_RUN_OPT, PRIORITY_OPT],