summaryrefslogtreecommitdiffstats
path: root/src/remote-viewer.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-04-17 21:00:28 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-08-18 13:20:42 +0200
commit6ab5444c81a8f6a15012a55283e2737406fb08b1 (patch)
tree29ccb218b2e5c11e3a7ce18c02791adbb33f440c /src/remote-viewer.c
parenteb4a7e4a840e4fb71eb499d4288eb4092f038e2d (diff)
downloadvirt-viewer-6ab5444c81a8f6a15012a55283e2737406fb08b1.tar.gz
virt-viewer-6ab5444c81a8f6a15012a55283e2737406fb08b1.tar.xz
virt-viewer-6ab5444c81a8f6a15012a55283e2737406fb08b1.zip
Create foreign menu from .vv file information
When the .vv file has an [ovirt] section, we should try to create a foreign menu out of it. This will allow remote-viewer to offer a menu to change the currenty inserted cdrom. Contrary to the ovirt:// case when we already have fetched an OvirtAPI and OvirtVm instance in order to get the SPICE/VNC connection details, when working from a .vv file, we'll need to get them from the REST API. Authentication should happen through the JSESSIONID cookie, if that fails we want to give up on using the foreign menu, so we don't need to set up authentication callbacks.
Diffstat (limited to 'src/remote-viewer.c')
-rw-r--r--src/remote-viewer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index 9539b93..1e1a575 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -1171,6 +1171,15 @@ retry_dialog:
}
virt_viewer_session_set_file(virt_viewer_app_get_session(app), vvfile);
+#ifdef HAVE_OVIRT
+ if (vvfile != NULL) {
+ OvirtForeignMenu *ovirt_menu;
+ ovirt_menu = ovirt_foreign_menu_new_from_file(vvfile);
+ if (ovirt_menu != NULL) {
+ virt_viewer_app_set_ovirt_foreign_menu(app, ovirt_menu);
+ }
+ }
+#endif
if (!virt_viewer_app_initial_connect(app, &error)) {
const gchar *msg = error ? error->message :