[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [virt-viewer 2/4] ovirt: Honour oVirt command line options



libgovirt 0.3.0 and newer can be passed from the commandline a CA
certificate to use during SSL communications. This commit adds support
for this option to remote-viewer.
---
 src/remote-viewer-main.c | 6 ++++++
 src/remote-viewer.c      | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c
index a773288..505074e 100644
--- a/src/remote-viewer-main.c
+++ b/src/remote-viewer-main.c
@@ -36,6 +36,9 @@
 #ifdef HAVE_SPICE_GTK
 #include <spice-option.h>
 #endif
+#ifdef HAVE_OVIRT
+#include <govirt/ovirt-options.h>
+#endif
 
 #include "remote-viewer.h"
 #include "virt-viewer-app.h"
@@ -118,6 +121,9 @@ main(int argc, char **argv)
 #ifdef HAVE_SPICE_GTK
     g_option_context_add_group (context, spice_get_option_group ());
 #endif
+#ifdef HAVE_OVIRT
+    g_option_context_add_group (context, ovirt_get_option_group ());
+#endif
     g_option_context_parse (context, &argc, &argv, &error);
     if (error) {
         char *base_name;
diff --git a/src/remote-viewer.c b/src/remote-viewer.c
index 79b270a..caed39f 100644
--- a/src/remote-viewer.c
+++ b/src/remote-viewer.c
@@ -744,6 +744,7 @@ create_ovirt_session(VirtViewerApp *app, const char *uri)
     proxy = ovirt_proxy_new(rest_uri);
     if (proxy == NULL)
         goto error;
+    ovirt_set_proxy_options(proxy);
     g_signal_connect(G_OBJECT(proxy), "authenticate",
                      G_CALLBACK(authenticate_cb), app);
 
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]