virt-launcher, converter: Remove unused functions and constants
@@ -57,8 +57,6 @@ import (
type HostDeviceType string
const (
- CPUModeHostPassthrough = "host-passthrough"
- CPUModeHostModel = "host-model"
defaultIOThread = uint(1)
EFICode = "OVMF_CODE.fd"
EFIVars = "OVMF_VARS.fd"
@@ -592,13 +590,6 @@ func Convert_v1_CloudInitSource_To_api_Disk(source v1.VolumeSource, disk *api.Di
return nil
}
-func Convert_v1_IgnitionData_To_api_Disk(disk *api.Disk, c *ConverterContext) error {
- disk.Source.File = fmt.Sprintf("%s/%s", ignition.GetDomainBasePath(c.VirtualMachine.Name, c.VirtualMachine.Namespace), c.VirtualMachine.Annotations[v1.IgnitionAnnotation])
- disk.Type = "file"
- disk.Driver.Type = "raw"
- return nil
-}
-
func Convert_v1_EmptyDiskSource_To_api_Disk(volumeName string, _ *v1.EmptyDiskSource, disk *api.Disk, c *ConverterContext) error {
if disk.Type == "lun" {
return fmt.Errorf("device %s is of type lun. Not compatible with a file based disk", disk.Alias.Name)
@@ -1821,10 +1812,6 @@ func configDNSSearchName(qemuArg *api.Arg) error {
return nil
}
-func SecretToLibvirtSecret(vmi *v1.VirtualMachineInstance, secretName string) string {
- return fmt.Sprintf("%s-%s-%s---", secretName, vmi.Namespace, vmi.Name)
-}
-
func QuantityToByte(quantity resource.Quantity) (api.Memory, error) {
memorySize, int := quantity.AsInt64()
if !int {
