--bGR76rFJjkSxVeRa
Content-Type: multipart/mixed; boundary="3O1VwFp74L81IIeR"
Content-Disposition: inline
--3O1VwFp74L81IIeR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hey,
On Sun, Dec 28, 2014 at 02:34:10AM -0600, i iordanov wrote:
Hello,
=20
My apologies for the partial mail sent out, I hit a strange key
combination by mistake :). As I was saying, this bug got closed not
long ago:
Sorry for the late reply, was on holidays for a while, came back just now :)
I looked into the latest code of govirt, and I don't see support
for
SpiceProxy in there. Would you be so kind as to add this feature?
I quickly cooked/compile-tested the attached patch, if you have time to
test it, let me know how it works, otherwise I'll get back to that later
(need to get lot of email under control first ;)
Christophe
--3O1VwFp74L81IIeR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="proxy.patch"
Content-Transfer-Encoding: quoted-printable
diff --git a/govirt/ovirt-vm-display.c b/govirt/ovirt-vm-display.c
index a8a0942..0a8adc6 100644
--- a/govirt/ovirt-vm-display.c
+++ b/govirt/ovirt-vm-display.c
@@ -39,6 +39,7 @@ struct _OvirtVmDisplayPrivate {
char *host_subject;
gboolean smartcard;
gboolean allow_override;
+ char *proxy_url;
};
=20
G_DEFINE_TYPE(OvirtVmDisplay, ovirt_vm_display, G_TYPE_OBJECT);
@@ -55,6 +56,7 @@ enum {
PROP_HOST_SUBJECT,
PROP_SMARTCARD,
PROP_ALLOW_OVERRIDE,
+ PROP_PROXY_URL,
};
=20
static void ovirt_vm_display_get_property(GObject *object,
@@ -95,6 +97,9 @@ static void ovirt_vm_display_get_property(GObject *object,
case PROP_ALLOW_OVERRIDE:
g_value_set_boolean(value, display->priv->allow_override);
break;
+ case PROP_PROXY_URL:
+ g_value_set_string(value, display->priv->proxy_url);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -141,6 +146,9 @@ static void ovirt_vm_display_set_property(GObject *obje=
ct,
case PROP_ALLOW_OVERRIDE:
display->priv->allow_override =3D g_value_get_boolean(value);
break;
+ case PROP_PROXY_URL:
+ g_free(display->priv->proxy_url);
+ display->priv->proxy_url =3D g_value_dup_string(value);
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -153,6 +161,7 @@ static void ovirt_vm_display_finalize(GObject *object)
g_free(display->priv->address);
g_free(display->priv->ticket);
g_free(display->priv->host_subject);
+ g_free(display->priv->proxy_url);
=20
G_OBJECT_CLASS(ovirt_vm_display_parent_class)->finalize(object);
}
@@ -252,6 +261,14 @@ static void ovirt_vm_display_class_init(OvirtVmDisplay=
Class *klass)
FALSE,
G_PARAM_READWRITE |
G_PARAM_STATIC_STR=
INGS));
+ g_object_class_install_property(object_class,
+ PROP_PROXY_URL,
+ g_param_spec_string("proxy-url",
+ "Proxy URL",
+ "URL of the proxy =
to use to access the VM",
+ NULL,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STR=
INGS));
}
=20
static void ovirt_vm_display_init(G_GNUC_UNUSED OvirtVmDisplay *display)
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 =3D g_intern_string("certificate");
const char *smartcard_key =3D g_intern_string("smartcard_enabled");
const char *allow_override_key =3D g_intern_string("allow_override");
+ const char *proxy_key =3D g_intern_string("proxy");
=20
if (root =3D=3D NULL) {
return FALSE;
@@ -120,6 +121,11 @@ static gboolean vm_set_display_from_xml(OvirtVm *vm,
}
}
=20
+ node =3D g_hash_table_lookup(root->children, proxy_key);
+ if (node !=3D NULL) {
+ g_object_set(G_OBJECT(display), "proxy-url", node->content, NULL);
+ }
+
/* FIXME: this overrides the ticket/expiry which may
* already be set
*/
--3O1VwFp74L81IIeR--
--bGR76rFJjkSxVeRa
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUt7rlAAoJEKnYwhQprGyC6TYP/iBtd6mUIczKBuAfzwdt7zHQ
QoD9mVoBIGL8PunS1MjnBvnKOHdgJHl3/uwfHbp7LpnyQhwFnS2BXMB8RulOI6LK
mLa3s9TcO1t3fJ/Eudn1SaxSbZZxKROClec1HqdOyW07h9hV9uJC3XhiLS2qojFD
miAWHD/JZrWDS/Ae2UHL6yIIjB4JtX4Btev22ofhRZY4L2bg2euJ3MzA85zju5Fb
B3niRmp8GgihYIpNtD2huG+N49x3M/YTnG+psLZdGW8j7NUvSL8ienlDf3vpgi+g
D64HUxNMlKVbMXLuj/Umr15PptQe9pAJqr6iVr4sSX5BI214GIjWo6ao3TiA+hHv
zAaSEyvwZxab46ikoxwPoNbyzKurteJGwRcsk1EwUvZaGpAIL245qLtpiNDQvWfJ
5nQ0K0VCMislf7HjJ7B+5iN9C8KowZD+RyUeWTQwitvH04+ZYg0lgQ/JVmvhuH6j
7iP2SGGt398iHEF6Rg8DZPXh+h8jbEMV8ds4kRNTvpcmXJ4btm0v+caq9SNqpL1U
YUHq3PBompzItLmGGFvNjR+ZICImPoRMu+hSvA6T845KV8G36/zC9+2ex5m+ZK4+
KkvVuK3FvXNcZOEV2YaQ4h/d/TVs0xFyhEKWeVS5h5DxX8EtwGKIeyWOSUlTAug3
lik1xY1mvH7l3i3OWtyB
=8TzL
-----END PGP SIGNATURE-----
--bGR76rFJjkSxVeRa--