[virt-tools-list] [virt-viewer] ovirt: Allow to remove CD images

Christophe Fergeau cfergeau at redhat.com
Thu Oct 9 15:21:36 UTC 2014


It turns out this is supposed to be done through update requests with a
CD image with an empty name, which is what the current code tries to do.
The only reason it's not working is because of server-side bugs with
oVirt < 3.5
The requirement on libgovirt is raised to 0.3.2 as
a small change is needed as well in libgovirt to allow empty filenames:
https://git.gnome.org/browse/libgovirt/commit/?id=bdb788fcc

Without this change, nothing too bad will happen, but the CD won't be
removed and warnings will be logged in the console.
---
 configure.ac             | 2 +-
 src/ovirt-foreign-menu.c | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 91ce0e7..d0ae79e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ GTK_VNC1_REQUIRED="0.3.8"
 GTK_VNC2_REQUIRED="0.4.0"
 SPICE_GTK_REQUIRED="0.22"
 SPICE_PROTOCOL_REQUIRED="0.10.1"
-GOVIRT_REQUIRED="0.3.1"
+GOVIRT_REQUIRED="0.3.2"
 
 AC_SUBST([GLIB2_REQUIRED])
 AC_SUBST([LIBXML2_REQUIRED])
diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
index bf0e4f7..0de13e5 100644
--- a/src/ovirt-foreign-menu.c
+++ b/src/ovirt-foreign-menu.c
@@ -450,10 +450,6 @@ ovirt_foreign_menu_activate_item_cb(GtkMenuItem *menuitem, gpointer user_data)
         g_debug("Removing current cdrom image");
         iso_name = NULL;
         foreign_menu->priv->next_iso_name = NULL;
-        /* FIXME: No idea how to remove a CDRom from a VM through ovirt REST
-         * API for now, so return early.
-         */
-        return;
     }
     g_object_set(foreign_menu->priv->cdrom,
                  "file", iso_name,
-- 
2.1.0




More information about the virt-tools-list mailing list