From d83d17e9dbfb24496a0841fc2aed436181ca0341 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 13 Oct 2012 12:57:12 +0100 Subject: New APIs: Model libvirt authentication events through the API. This commit models libvirt authentication events through the API, adding one new event (GUESTFS_EVENT_LIBVIRT_AUTH) and several new APIs: guestfs_set_libvirt_supported_credentials guestfs_get_libvirt_requested_credentials guestfs_get_libvirt_requested_credential_prompt guestfs_get_libvirt_requested_credential_challenge guestfs_get_libvirt_requested_credential_defresult guestfs_set_libvirt_requested_credential See the documentation and example which shows how to use the new API. This commit also changes existing calls to virConnectOpen* within the library so that the new API is used. Also included is an example (but not a test, because it's hard to see how to automatically test the libvirt API). --- src/launch-libvirt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/launch-libvirt.c') diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index aac5d291..a18e4d52 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -157,8 +157,7 @@ launch_libvirt (guestfs_h *g, const char *libvirt_uri) guestfs___print_timestamped_message (g, "connect to libvirt"); /* Connect to libvirt, get capabilities. */ - /* XXX Support libvirt authentication in the future. */ - conn = virConnectOpen (libvirt_uri); + conn = guestfs___open_libvirt_connection (g, libvirt_uri, 0); if (!conn) { libvirt_error (g, _("could not connect to libvirt (URI = %s)"), libvirt_uri ? : "NULL"); -- cgit