[libgovirt] Force use of v3 REST API
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] Force use of v3 REST API
- Date: Thu, 16 Jun 2016 09:51:50 +0000 (UTC)
commit 948ce7168efa7c1fca5f1f6390f94191d709590b
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Jun 16 11:10:27 2016 +0200
Force use of v3 REST API
oVirt 4.0 introduced a slightly incompatible REST API, see
https://github.com/oVirt/ovirt-engine/tree/master/backend/manager/modules/restapi
A short term fix is to send a "Version: 3" header with each request,
which this commit does. This might stop working with oVirt 4.1 though.
Longer term fix is tracked in
https://bugzilla.gnome.org/show_bug.cgi?id=767724
govirt/ovirt-proxy.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c
index 08e42d2..efe3284 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -902,6 +902,7 @@ static void ovirt_proxy_constructed(GObject *gobject)
g_object_set(OVIRT_PROXY(gobject), "ssl-strict", FALSE, NULL);
}
ovirt_proxy_add_header(OVIRT_PROXY(gobject), "Prefer", "persistent-auth");
+ ovirt_proxy_add_header(OVIRT_PROXY(gobject), "Version", "3");
/* Chain up to the parent class */
if (G_OBJECT_CLASS(ovirt_proxy_parent_class)->constructed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]