summaryrefslogtreecommitdiff
path: root/govirt/ovirt-vm-xml.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-01-20 10:42:57 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-01-22 16:54:19 +0100
commite2f4e6ae0975b24d4d4cb521ff1a2948e91af0e3 (patch)
tree325786deeddd72a7719542bf6089a9e63166b6e1 /govirt/ovirt-vm-xml.c
parent2ca872bd88efcfa7a55fedb6116f6bbec618d896 (diff)
Add OvirtVmDisplay::proxy-url
Recent oVirt versions advertise which proxy URL should be used (if any) to connect to a VM. This commit exposes this information in libgovirt so that library users can make use of it.
Diffstat (limited to 'govirt/ovirt-vm-xml.c')
-rw-r--r--govirt/ovirt-vm-xml.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/govirt/ovirt-vm-xml.c b/govirt/ovirt-vm-xml.c
index 7790887..22d50af 100644
--- a/govirt/ovirt-vm-xml.c
+++ b/govirt/ovirt-vm-xml.c
@@ -44,6 +44,7 @@ static gboolean vm_set_display_from_xml(OvirtVm *vm,
const char *certificate_key = g_intern_string("certificate");
const char *smartcard_key = g_intern_string("smartcard_enabled");
const char *allow_override_key = g_intern_string("allow_override");
+ const char *proxy_key = g_intern_string("proxy");
if (root == NULL) {
return FALSE;
@@ -120,6 +121,11 @@ static gboolean vm_set_display_from_xml(OvirtVm *vm,
}
}
+ node = g_hash_table_lookup(root->children, proxy_key);
+ if (node != NULL) {
+ g_object_set(G_OBJECT(display), "proxy-url", node->content, NULL);
+ }
+
/* FIXME: this overrides the ticket/expiry which may
* already be set
*/