diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-06-16 11:10:27 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2016-06-16 11:27:53 +0200 |
commit | 948ce7168efa7c1fca5f1f6390f94191d709590b (patch) | |
tree | 7c15342571f191c06e1453b06f5304ee262cc35b | |
parent | 821c4c96edaeca300146137067533f86d6e0b065 (diff) |
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
-rw-r--r-- | 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) |