virt-v2v/0012-output-handle-Standard...

36 lines
1.3 KiB
Diff

From c7e1f50197f6f3961c9650cc36ba885981bab149 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Fri, 12 Nov 2021 13:54:37 +0100
Subject: [PATCH] output: handle Standard_VGA in the JSON format
The JSON output mode was added in commit fba6a498d472 ("v2v: add -o json
output mode", 2019-04-01). The format that it uses is by convention (aka
"ad-hoc"); not governed by any public specification. Map the Standard_VGA
value of "guestcaps.gcaps_video" to the "vga" string, as this is (a)
straightforward and (b) consistent with the OpenStack and libvirt device
model names.
Cc: Fabian Deutsch <fdeutsch@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1961107
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
output/create_json.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/output/create_json.ml b/output/create_json.ml
index 3cadf6b43378..ac044630a0c6 100644
--- a/output/create_json.ml
+++ b/output/create_json.ml
@@ -203,7 +203,7 @@ let create_json_metadata source inspect
| RTL8139 -> "rtl8139" in
let video =
match guestcaps.gcaps_video with
- | Standard_VGA -> assert false
+ | Standard_VGA -> "vga"
| QXL -> "qxl"
| Cirrus -> "cirrus" in
let machine =
--
2.19.1.3.g30247aa5d201