nothing
"""
-
op = opcodes.OpQueryExports(nodes=opts.nodes)
exports = SubmitOpCode(op)
for node in exports:
1 in case of error, 0 otherwise
"""
-
instance = args[0]
op = opcodes.OpCreateInstance(instance_name=instance, mem_size=opts.mem,
disk_size=opts.size, swap_size=opts.swap,
disk_template=opts.disk_template,
- mode=constants.INSTANCE_IMPORT, pnode=opts.node,
- snode=opts.snode, vcpus=opts.vcpus,
+ mode=constants.INSTANCE_IMPORT,
+ pnode=opts.node, snode=opts.snode,
+ vcpus=opts.vcpus,
ip=opts.ip, bridge=opts.bridge, start=False,
src_node=opts.src_node, src_path=opts.src_dir,
wait_for_sync=opts.wait_for_sync)
# options used in more than one cmd
node_opt = make_option("-n", "--node", dest="node", help="Target node",
metavar="<node>")
-force_opt = make_option("-f", "--force", dest="force", action="store_true",
- default=False, help="Force the operation")
# this is defined separately due to readability only
import_opts = [
metavar="<dir>"),
]
-
commands = {
'list': (PrintExportList, ARGS_NONE,
[DEBUG_OPT,
],
"", "Lists instance exports available in the ganeti cluster"),
'export': (ExportInstance, ARGS_ONE,
- [node_opt, DEBUG_OPT, force_opt,
+ [node_opt, DEBUG_OPT, FORCE_OPT,
make_option("","--noshutdown", dest="shutdown",
action="store_false", default=True,
help="Don't shutdown the instance (unsafe)"), ],
}
if __name__ == '__main__':
- retcode = GenericMain(commands)
- sys.exit(retcode)
+ sys.exit(GenericMain(commands))