Commit 4dddf578 authored by Jose A. Lopes's avatar Jose A. Lopes

Hs2Py constants: 'hvsParameterTypes' and 'hvsParameters'

Add constants 'hvsParameters' and 'hvsParameterTypes' to the Haskell
to Python constant generation.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent b15d5bd3
......@@ -551,83 +551,8 @@ HV_XEN_CPUID = _constants.HV_XEN_CPUID
HV_VNET_HDR = _constants.HV_VNET_HDR
HV_VIRIDIAN = _constants.HV_VIRIDIAN
HVS_PARAMETER_TYPES = {
HV_KVM_PATH: VTYPE_STRING,
HV_BOOT_ORDER: VTYPE_STRING,
HV_KVM_FLOPPY_IMAGE_PATH: VTYPE_STRING,
HV_CDROM_IMAGE_PATH: VTYPE_STRING,
HV_KVM_CDROM2_IMAGE_PATH: VTYPE_STRING,
HV_NIC_TYPE: VTYPE_STRING,
HV_DISK_TYPE: VTYPE_STRING,
HV_KVM_CDROM_DISK_TYPE: VTYPE_STRING,
HV_VNC_PASSWORD_FILE: VTYPE_STRING,
HV_VNC_BIND_ADDRESS: VTYPE_STRING,
HV_VNC_TLS: VTYPE_BOOL,
HV_VNC_X509: VTYPE_STRING,
HV_VNC_X509_VERIFY: VTYPE_BOOL,
HV_KVM_SPICE_BIND: VTYPE_STRING,
HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
HV_KVM_SPICE_PASSWORD_FILE: VTYPE_STRING,
HV_KVM_SPICE_LOSSLESS_IMG_COMPR: VTYPE_STRING,
HV_KVM_SPICE_JPEG_IMG_COMPR: VTYPE_STRING,
HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: VTYPE_STRING,
HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: VTYPE_STRING,
HV_KVM_SPICE_AUDIO_COMPR: VTYPE_BOOL,
HV_KVM_SPICE_USE_TLS: VTYPE_BOOL,
HV_KVM_SPICE_TLS_CIPHERS: VTYPE_STRING,
HV_KVM_SPICE_USE_VDAGENT: VTYPE_BOOL,
HV_ACPI: VTYPE_BOOL,
HV_PAE: VTYPE_BOOL,
HV_USE_BOOTLOADER: VTYPE_BOOL,
HV_BOOTLOADER_PATH: VTYPE_STRING,
HV_BOOTLOADER_ARGS: VTYPE_STRING,
HV_KERNEL_PATH: VTYPE_STRING,
HV_KERNEL_ARGS: VTYPE_STRING,
HV_INITRD_PATH: VTYPE_STRING,
HV_ROOT_PATH: VTYPE_MAYBE_STRING,
HV_SERIAL_CONSOLE: VTYPE_BOOL,
HV_SERIAL_SPEED: VTYPE_INT,
HV_USB_MOUSE: VTYPE_STRING,
HV_KEYMAP: VTYPE_STRING,
HV_DEVICE_MODEL: VTYPE_STRING,
HV_INIT_SCRIPT: VTYPE_STRING,
HV_MIGRATION_PORT: VTYPE_INT,
HV_MIGRATION_BANDWIDTH: VTYPE_INT,
HV_MIGRATION_DOWNTIME: VTYPE_INT,
HV_MIGRATION_MODE: VTYPE_STRING,
HV_USE_LOCALTIME: VTYPE_BOOL,
HV_DISK_CACHE: VTYPE_STRING,
HV_SECURITY_MODEL: VTYPE_STRING,
HV_SECURITY_DOMAIN: VTYPE_STRING,
HV_KVM_FLAG: VTYPE_STRING,
HV_VHOST_NET: VTYPE_BOOL,
HV_KVM_USE_CHROOT: VTYPE_BOOL,
HV_CPU_MASK: VTYPE_STRING,
HV_MEM_PATH: VTYPE_STRING,
HV_PASSTHROUGH: VTYPE_STRING,
HV_BLOCKDEV_PREFIX: VTYPE_STRING,
HV_REBOOT_BEHAVIOR: VTYPE_STRING,
HV_CPU_TYPE: VTYPE_STRING,
HV_CPU_CAP: VTYPE_INT,
HV_CPU_WEIGHT: VTYPE_INT,
HV_CPU_CORES: VTYPE_INT,
HV_CPU_THREADS: VTYPE_INT,
HV_CPU_SOCKETS: VTYPE_INT,
HV_SOUNDHW: VTYPE_STRING,
HV_USB_DEVICES: VTYPE_STRING,
HV_VGA: VTYPE_STRING,
HV_KVM_EXTRA: VTYPE_STRING,
HV_KVM_MACHINE_VERSION: VTYPE_STRING,
HV_VIF_TYPE: VTYPE_STRING,
HV_VIF_SCRIPT: VTYPE_STRING,
HV_XEN_CMD: VTYPE_STRING,
HV_XEN_CPUID: VTYPE_STRING,
HV_VNET_HDR: VTYPE_BOOL,
HV_VIRIDIAN: VTYPE_BOOL,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
HVS_PARAMETER_TYPES = _constants.HVS_PARAMETER_TYPES
HVS_PARAMETERS = _constants.HVS_PARAMETERS
HVS_PARAMETER_TITLES = _constants.HVS_PARAMETER_TITLES
HV_MIGRATION_COMPLETED = _constants.HV_MIGRATION_COMPLETED
......
......@@ -1653,6 +1653,85 @@ hvsParameterTitles =
(hvPassthrough, "pci_pass"),
(hvVncBindAddress, "VNC_bind_address")]
hvsParameters :: FrozenSet String
hvsParameters = ConstantUtils.mkSet $ Map.keys hvsParameterTypes
hvsParameterTypes :: Map String VType
hvsParameterTypes = Map.fromList
[ (hvAcpi, VTypeBool)
, (hvBlockdevPrefix, VTypeString)
, (hvBootloaderArgs, VTypeString)
, (hvBootloaderPath, VTypeString)
, (hvBootOrder, VTypeString)
, (hvCdromImagePath, VTypeString)
, (hvCpuCap, VTypeInt)
, (hvCpuCores, VTypeInt)
, (hvCpuMask, VTypeString)
, (hvCpuSockets, VTypeInt)
, (hvCpuThreads, VTypeInt)
, (hvCpuType, VTypeString)
, (hvCpuWeight, VTypeInt)
, (hvDeviceModel, VTypeString)
, (hvDiskCache, VTypeString)
, (hvDiskType, VTypeString)
, (hvInitrdPath, VTypeString)
, (hvInitScript, VTypeString)
, (hvKernelArgs, VTypeString)
, (hvKernelPath, VTypeString)
, (hvKeymap, VTypeString)
, (hvKvmCdrom2ImagePath, VTypeString)
, (hvKvmCdromDiskType, VTypeString)
, (hvKvmExtra, VTypeString)
, (hvKvmFlag, VTypeString)
, (hvKvmFloppyImagePath, VTypeString)
, (hvKvmMachineVersion, VTypeString)
, (hvKvmPath, VTypeString)
, (hvKvmSpiceAudioCompr, VTypeBool)
, (hvKvmSpiceBind, VTypeString)
, (hvKvmSpiceIpVersion, VTypeInt)
, (hvKvmSpiceJpegImgCompr, VTypeString)
, (hvKvmSpiceLosslessImgCompr, VTypeString)
, (hvKvmSpicePasswordFile, VTypeString)
, (hvKvmSpiceStreamingVideoDetection, VTypeString)
, (hvKvmSpiceTlsCiphers, VTypeString)
, (hvKvmSpiceUseTls, VTypeBool)
, (hvKvmSpiceUseVdagent, VTypeBool)
, (hvKvmSpiceZlibGlzImgCompr, VTypeString)
, (hvKvmUseChroot, VTypeBool)
, (hvMemPath, VTypeString)
, (hvMigrationBandwidth, VTypeInt)
, (hvMigrationDowntime, VTypeInt)
, (hvMigrationMode, VTypeString)
, (hvMigrationPort, VTypeInt)
, (hvNicType, VTypeString)
, (hvPae, VTypeBool)
, (hvPassthrough, VTypeString)
, (hvRebootBehavior, VTypeString)
, (hvRootPath, VTypeMaybeString)
, (hvSecurityDomain, VTypeString)
, (hvSecurityModel, VTypeString)
, (hvSerialConsole, VTypeBool)
, (hvSerialSpeed, VTypeInt)
, (hvSoundhw, VTypeString)
, (hvUsbDevices, VTypeString)
, (hvUsbMouse, VTypeString)
, (hvUseBootloader, VTypeBool)
, (hvUseLocaltime, VTypeBool)
, (hvVga, VTypeString)
, (hvVhostNet, VTypeBool)
, (hvVifScript, VTypeString)
, (hvVifType, VTypeString)
, (hvViridian, VTypeBool)
, (hvVncBindAddress, VTypeString)
, (hvVncPasswordFile, VTypeString)
, (hvVncTls, VTypeBool)
, (hvVncX509, VTypeString)
, (hvVncX509Verify, VTypeBool)
, (hvVnetHdr, VTypeBool)
, (hvXenCmd, VTypeString)
, (hvXenCpuid, VTypeString)
]
-- * Migration statuses
hvMigrationActive :: String
......
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