Blob Blame History Raw
From afa84a03c2584a971b54bd3a69ecb4429d517630 Mon Sep 17 00:00:00 2001
From: Christophe Fergeau <cfergeau@redhat.com>
Date: Mon, 22 Sep 2014 14:15:00 +0200
Subject: [PATCH] ovirt: Allow to remove CD images

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.

(cherry picked from commit 9803f9cb420368e38117c5789777a6eeda5efbbd)
---
 src/ovirt-foreign-menu.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/ovirt-foreign-menu.c b/src/ovirt-foreign-menu.c
index 6fc9577..c813fed 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,