Since commit 255722cbf39a ("v2v: Modular virt-v2v", 2021-09-07), the only
use of the "source.s_video" field has been its logging via
"string_of_source", for the "--print-source" debugging option. Given
that
the source video controller is available in the source domain description
anyway (that's where "source.s_video" is parsed from), simplify the debug
log code by removing "source.s_video".
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Notes:
v1:
- new in v1
lib/types.mli | 1 -
input/input.ml | 2 --
input/parse_domain_from_vmx.ml | 8 --------
input/parse_libvirt_xml.ml | 14 --------------
lib/types.ml | 5 -----
tests/test-v2v-i-ova-formats.expected | 1 -
tests/test-v2v-i-ova-gz.expected | 1 -
tests/test-v2v-i-ova-snapshots.expected | 1 -
tests/test-v2v-i-ova-snapshots.expected2 | 1 -
tests/test-v2v-i-ova-subfolders.expected | 1 -
tests/test-v2v-i-ova-subfolders.expected2 | 1 -
tests/test-v2v-i-ova-tar.expected | 1 -
tests/test-v2v-i-ova-tar.expected2 | 1 -
tests/test-v2v-i-ova-two-disks.expected | 1 -
tests/test-v2v-i-ova-two-disks.expected2 | 1 -
tests/test-v2v-i-vmx-1.expected | 1 -
tests/test-v2v-i-vmx-2.expected | 1 -
tests/test-v2v-i-vmx-3.expected | 1 -
tests/test-v2v-i-vmx-4.expected | 1 -
tests/test-v2v-i-vmx-5.expected | 1 -
tests/test-v2v-print-source.expected | 1 -
21 files changed, 46 deletions(-)
diff --git a/lib/types.mli b/lib/types.mli
index 65efbcc03fec..02913c0cb4a1 100644
--- a/lib/types.mli
+++ b/lib/types.mli
@@ -70,7 +70,6 @@ type source = {
s_features : string list; (** Machine features. *)
s_firmware : source_firmware; (** Firmware (BIOS or EFI). *)
s_display : source_display option; (** Guest display. *)
- s_video : string option; (** Video adapter. *)
s_sound : source_sound option; (** Sound card. *)
s_disks : source_disk list; (** Source disks. *)
s_removables : source_removable list; (** CDROMs etc. *)
diff --git a/input/input.ml b/input/input.ml
index c7ae8c5d96ce..9fbfe1276989 100644
--- a/input/input.ml
+++ b/input/input.ml
@@ -272,7 +272,6 @@ and disk_source cmdline args =
s_display =
Some { s_display_type = Window; s_keymap = None; s_password = None;
s_listen = LNoListen; s_port = None };
- s_video = None;
s_sound = None;
s_disks = s_disks;
s_removables = [];
@@ -596,7 +595,6 @@ and ova_source _ args =
s_features = []; (* XXX *)
s_firmware = firmware;
s_display = None; (* XXX *)
- s_video = None;
s_sound = None;
s_disks = s_disks;
s_removables = removables;
diff --git a/input/parse_domain_from_vmx.ml b/input/parse_domain_from_vmx.ml
index 5d0f3c862c89..1e04cc15fb93 100644
--- a/input/parse_domain_from_vmx.ml
+++ b/input/parse_domain_from_vmx.ml
@@ -401,13 +401,6 @@ let parse_domain_from_vmx vmx_source =
warning (f_"unknown firmware value '%s', assuming BIOS") fw;
BIOS in
- let video =
- if Parse_vmx.namespace_present vmx ["svga"] then
- (* We could also parse svga.vramSize. *)
- Some "vmvga"
- else
- None in
-
let sound =
match Parse_vmx.get_string vmx ["sound"; "virtualDev"] with
| Some "sb16" -> Some { s_sound_model = SB16 }
@@ -434,7 +427,6 @@ let parse_domain_from_vmx vmx_source =
s_features = [];
s_firmware = firmware;
s_display = None;
- s_video = video;
s_sound = sound;
s_disks = List.map fst disks;
s_removables = removables;
diff --git a/input/parse_libvirt_xml.ml b/input/parse_libvirt_xml.ml
index 835649939d22..1e98ce1a8694 100644
--- a/input/parse_libvirt_xml.ml
+++ b/input/parse_libvirt_xml.ml
@@ -183,19 +183,6 @@ let parse_libvirt_xml ?conn xml =
None
) in
- (* Video adapter. *)
- let video =
- let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/video" in
- let nr_nodes = Xml.xpathobj_nr_nodes obj in
- if nr_nodes < 1 then None
- else (
- (* Ignore everything except the first <video> device. *)
- let node = Xml.xpathobj_node obj 0 in
-
- Xml.xpathctx_set_current_context xpathctx node;
- xpath_string "model/@type"
- ) in
-
(* Sound card. *)
let sound =
let obj = Xml.xpath_eval_expression xpathctx "/domain/devices/sound" in
@@ -512,7 +499,6 @@ let parse_libvirt_xml ?conn xml =
s_features = features;
s_firmware = firmware;
s_display = display;
- s_video = video;
s_sound = sound;
s_disks = s_disks;
s_removables = removables;
diff --git a/lib/types.ml b/lib/types.ml
index 9629bab50d4e..894391baecaa 100644
--- a/lib/types.ml
+++ b/lib/types.ml
@@ -36,7 +36,6 @@ type source = {
s_features : string list;
s_firmware : source_firmware;
s_display : source_display option;
- s_video : string option;
s_sound : source_sound option;
s_disks : source_disk list;
s_removables : source_removable list;
@@ -112,7 +111,6 @@ hypervisor type: %s
CPU features: %s
firmware: %s
display: %s
- video: %s
sound: %s
disks:
%s
@@ -136,9 +134,6 @@ NICs:
(match s.s_display with
| None -> ""
| Some display -> string_of_source_display display)
- (match s.s_video with
- | None -> ""
- | Some video -> video)
(match s.s_sound with
| None -> ""
| Some sound -> string_of_source_sound sound)
diff --git a/tests/test-v2v-i-ova-formats.expected
b/tests/test-v2v-i-ova-formats.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-formats.expected
+++ b/tests/test-v2v-i-ova-formats.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-gz.expected b/tests/test-v2v-i-ova-gz.expected
index 9ff6ea59ca70..3e7474591f0e 100644
--- a/tests/test-v2v-i-ova-gz.expected
+++ b/tests/test-v2v-i-ova-gz.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-snapshots.expected
b/tests/test-v2v-i-ova-snapshots.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-snapshots.expected
+++ b/tests/test-v2v-i-ova-snapshots.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-snapshots.expected2
b/tests/test-v2v-i-ova-snapshots.expected2
index 58e98594046f..dd4525ff9c42 100644
--- a/tests/test-v2v-i-ova-snapshots.expected2
+++ b/tests/test-v2v-i-ova-snapshots.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x,
"size": 12288, "file": { "driver": "file",
"filename": "test-snapshots.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-subfolders.expected
b/tests/test-v2v-i-ova-subfolders.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-subfolders.expected
+++ b/tests/test-v2v-i-ova-subfolders.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-subfolders.expected2
b/tests/test-v2v-i-ova-subfolders.expected2
index e0dd1937d6f6..7b6c544fcc04 100644
--- a/tests/test-v2v-i-ova-subfolders.expected2
+++ b/tests/test-v2v-i-ova-subfolders.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x,
"size": 10240, "file": { "driver": "file",
"filename": "test.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-tar.expected b/tests/test-v2v-i-ova-tar.expected
index dcc20fd0095f..f98ac82dba77 100644
--- a/tests/test-v2v-i-ova-tar.expected
+++ b/tests/test-v2v-i-ova-tar.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-tar.expected2 b/tests/test-v2v-i-ova-tar.expected2
index 1fa120b9970d..77bc60cf7d05 100644
--- a/tests/test-v2v-i-ova-tar.expected2
+++ b/tests/test-v2v-i-ova-tar.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x,
"size": 10240, "file": { "driver": "file",
"filename": "test-tar.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-ova-two-disks.expected
b/tests/test-v2v-i-ova-two-disks.expected
index bf03c3e865ad..93a97b16f6f4 100644
--- a/tests/test-v2v-i-ova-two-disks.expected
+++ b/tests/test-v2v-i-ova-two-disks.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-ova-two-disks.expected2
b/tests/test-v2v-i-ova-two-disks.expected2
index 92728ab6a782..7c716ccd87c7 100644
--- a/tests/test-v2v-i-ova-two-disks.expected2
+++ b/tests/test-v2v-i-ova-two-disks.expected2
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
json:{ "file": { "driver": "raw", "offset": x,
"size": 10240, "file": { "driver": "file",
"filename": "test.ova" } } } (vmdk) [scsi]
diff --git a/tests/test-v2v-i-vmx-1.expected b/tests/test-v2v-i-vmx-1.expected
index e614e760e2be..bca99c48c5cb 100644
--- a/tests/test-v2v-i-vmx-1.expected
+++ b/tests/test-v2v-i-vmx-1.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-2.expected b/tests/test-v2v-i-vmx-2.expected
index 4ecc6b63db0e..e56777c8509d 100644
--- a/tests/test-v2v-i-vmx-2.expected
+++ b/tests/test-v2v-i-vmx-2.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-3.expected b/tests/test-v2v-i-vmx-3.expected
index afa549da9945..47e4d25eb53a 100644
--- a/tests/test-v2v-i-vmx-3.expected
+++ b/tests/test-v2v-i-vmx-3.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: uefi
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-4.expected b/tests/test-v2v-i-vmx-4.expected
index 919db78a25ac..dd7312945b69 100644
--- a/tests/test-v2v-i-vmx-4.expected
+++ b/tests/test-v2v-i-vmx-4.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video: vmvga
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-i-vmx-5.expected b/tests/test-v2v-i-vmx-5.expected
index 85a37ca00f74..cfddcda73b9a 100644
--- a/tests/test-v2v-i-vmx-5.expected
+++ b/tests/test-v2v-i-vmx-5.expected
@@ -11,7 +11,6 @@ hypervisor type: vmware
CPU features:
firmware: bios
display:
- video:
sound:
disks:
0 [scsi]
diff --git a/tests/test-v2v-print-source.expected b/tests/test-v2v-print-source.expected
index cfeade1c012d..73473f9df877 100644
--- a/tests/test-v2v-print-source.expected
+++ b/tests/test-v2v-print-source.expected
@@ -9,7 +9,6 @@ hypervisor type: kvm
CPU features: acpi,apic,pae
firmware: unknown
display:
- video: vga
sound:
disks:
0 [virtio-blk]
--
2.19.1.3.g30247aa5d201