jex = JobExecutor(verbose=multi_on, opts=opts)
for instance_name in inames:
- op = opcodes.OpReinstallInstance(instance_name=instance_name,
+ op = opcodes.OpInstanceReinstall(instance_name=instance_name,
os_type=os_name,
force_variant=opts.force_variant,
osparams=opts.osparams)
if not AskUser(usertext):
return 1
- op = opcodes.OpRemoveInstance(instance_name=instance_name,
+ op = opcodes.OpInstanceRemove(instance_name=instance_name,
ignore_failures=opts.ignore_failures,
shutdown_timeout=opts.shutdown_timeout)
SubmitOrSend(op, opts, cl=cl)
" that '%s' is a FQDN. Continue?" % args[1]):
return 1
- op = opcodes.OpRenameInstance(instance_name=args[0],
+ op = opcodes.OpInstanceRename(instance_name=args[0],
new_name=args[1],
ip_check=opts.ip_check,
name_check=opts.name_check)
@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,