Commit e1d2aa39 authored by Alexander Schreiber's avatar Alexander Schreiber
Browse files

merge r1569 from branches/ganeti/ganeti-1.2

Implement more options for gnt-backup import

Reviewed-by: ultrotter
parent 3fb1e1c5
......@@ -28,6 +28,8 @@ from ganeti import opcodes
from ganeti import constants
_VALUE_TRUE = "true"
def PrintExportList(opts, args):
"""Prints a list of all the exported system images.
......@@ -101,7 +103,16 @@ def ImportInstance(opts, args):
wait_for_sync=opts.wait_for_sync, mac="auto",
file_storage_dir=opts.file_storage_dir,
file_driver=opts.file_driver,
iallocator=opts.iallocator)
iallocator=opts.iallocator,
auto_balance=auto_balance,
hvm_boot_order=opts.hvm_boot_order,
hvm_acpi=opts.hvm_acpi,
hvm_nic_type=opts.hvm_nic_type,
hvm_disk_type=opts.hvm_disk_type,
hvm_pae=opts.hvm_pae,
hvm_cdrom_image_path=opts.hvm_cdrom_image_path,
vnc_bind_address=opts.vnc_bind_address)
SubmitOpCode(op)
return 0
......@@ -167,6 +178,34 @@ import_opts = [
metavar="<DIR>"),
make_option("--file-driver", dest="file_driver", help="Driver to use"
" for image files", default="loop", metavar="<DRIVER>"),
make_option("--hvm-boot-order", dest="hvm_boot_order",
help="Boot device order for HVM (one or more of [acdn])",
default=None, type="string", metavar="<BOOTORDER>"),
make_option("--hvm-acpi", dest="hvm_acpi",
help="ACPI support for HVM (true|false)",
metavar="<BOOL>", choices=["true", "false"]),
make_option("--hvm-nic-type", dest="hvm_nic_type",
help="Type of virtual NIC for HVM "
"(rtl8139,ne2k_pci,ne2k_isa,paravirtual)",
metavar="NICTYPE", choices=[constants.HT_HVM_NIC_RTL8139,
constants.HT_HVM_NIC_NE2K_PCI,
constants.HT_HVM_NIC_NE2K_ISA,
constants.HT_HVM_DEV_PARAVIRTUAL],
default=constants.HT_HVM_NIC_RTL8139),
make_option("--hvm-disk-type", dest="hvm_disk_type",
help="Type of virtual disks for HVM (ioemu,paravirtual)",
metavar="DISKTYPE", choices=[constants.HT_HVM_DEV_IOEMU,
constants.HT_HVM_DEV_PARAVIRTUAL],
default=constants.HT_HVM_DEV_IOEMU,),
make_option("--hvm-pae", dest="hvm_pae",
help="PAE support for HVM (true|false)",
metavar="<BOOL>", choices=["true", "false"]),
make_option("--hvm-cdrom-image-path", dest="hvm_cdrom_image_path",
help="CDROM image path for HVM (absolute path or None)",
default=None, type="string", metavar="<CDROMIMAGE>"),
make_option("--vnc-bind-address", dest="vnc_bind_address",
help="bind address for VNC (IP address)",
default=None, type="string", metavar="<VNCADDRESS>"),
]
commands = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment