@return: the desired exit code
"""
+ ignore_remove_failures = opts.ignore_remove_failures
+
op = opcodes.OpExportInstance(instance_name=args[0],
target_node=opts.node,
shutdown=opts.shutdown,
- shutdown_timeout=opts.shutdown_timeout)
+ shutdown_timeout=opts.shutdown_timeout,
+ remove_instance=opts.remove_instance,
+ ignore_remove_failures=ignore_remove_failures)
fin_resu, dlist = SubmitOpCode(op, opts=opts)
if not isinstance(dlist, list):
rcode = 1
return rcode
+
def ImportInstance(opts, args):
"""Add an instance to the cluster.
NONAMECHECK_OPT,
NONICS_OPT,
NWSYNC_OPT,
+ OSPARAMS_OPT,
OS_SIZE_OPT,
SRC_DIR_OPT,
SRC_NODE_OPT,
SUBMIT_OPT,
]
+
commands = {
'list': (
PrintExportList, ARGS_NONE,
"", "Lists instance exports available in the ganeti cluster"),
'export': (
ExportInstance, ARGS_ONE_INSTANCE,
- [FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT],
+ [FORCE_OPT, SINGLE_NODE_OPT, NOSHUTDOWN_OPT, SHUTDOWN_TIMEOUT_OPT,
+ REMOVE_INSTANCE_OPT, IGNORE_REMOVE_FAILURES_OPT],
"-n <target_node> [opts...] <name>",
"Exports an instance to an image"),
'import': (