search for: guestfs_add_domain_libvirturi

Displaying 4 results from an estimated 4 matches for "guestfs_add_domain_libvirturi".

2012 Oct 13
2
Proposed libguestfs API for implementing libvirt virConnectOpenAuth
...quot;, NULL }; g = guestfs_create (); guestfs_set_libvirt_supported_credentials (g, creds); guestfs_set_event_callback (g, do_auth, GUESTFS_EVENT_LIBVIRT_AUTH, 0, NULL); // An example of a function that would open a libvirt connection: guestfs_add_domain (g, "dom", GUESTFS_ADD_DOMAIN_LIBVIRTURI, "qemu:///system", -1); } ---------------------------------------------------------------------- By the way, some of the virt tools can open multiple connections to libvirt, and it is architecturally hard to change this: https://www.redhat.com/archives/libguestfs/2012-October/msg0...
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
.../* Set up the event handler. */ + eh = guestfs_set_event_callback (g, auth_callback, + GUESTFS_EVENT_LIBVIRT_AUTH, 0, NULL); + if (eh == -1) + exit (EXIT_FAILURE); + + /* Add the named domain. */ + r = guestfs_add_domain (g, dom, + GUESTFS_ADD_DOMAIN_LIBVIRTURI, uri, + -1); + if (r == -1) + exit (EXIT_FAILURE); + + /* Launch and do some simple inspection. */ + r = guestfs_launch (g); + if (r == -1) + exit (EXIT_FAILURE); + + filesystems = guestfs_list_filesystems (g); + + for (i = 0; filesystems[i] != NULL; i += 2) { +...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...create (); if (!g) - exit (EXIT_FAILURE); + error (EXIT_FAILURE, errno, "guestfs_create"); r = guestfs_set_libvirt_supported_credentials (g, (char **) creds); if (r == -1) @@ -123,13 +118,11 @@ do_test (const char *prog, const char *libvirt_uri, GUESTFS_ADD_DOMAIN_LIBVIRTURI, libvirt_uri, GUESTFS_ADD_DOMAIN_READONLY, 1, -1); - if (r != expected) { - fprintf (stderr, - "%s: test failed: u=%s p=%s: got %d expected %d\n", - prog, auth_data->username, auth_data->password ? : &...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be