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