]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow for URI aliases when connecting to libvirt
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 13 Oct 2011 10:49:45 +0000 (11:49 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 19 Oct 2011 08:14:34 +0000 (09:14 +0100)
commit777ffbd0e2f921c0f71dad4d8839b1fdc3be5f3d
tree138441c4c1a16aa15ca1908f83866be3bd03fbde
parent02e92dc47085427b5ba243aec207c2d6f3d3bbdc
Allow for URI aliases when connecting to libvirt

This adds support for a libvirt client configuration file
either /etc/libvirt/libvirt.conf for privileged clients,
or $HOME/.libvirt/libvirt.conf for unprivileged clients.

It allows one parameter

 uri_aliases = [
   "hail=qemu+ssh://root@hail.cloud.example.com/system",
   "sleet=qemu+ssh://root@sleet.cloud.example.com/system",
 ]

Any call to virConnectOpen with a non-NULL URI will first
attempt to match against the uri_aliases list. An application
can disable this by using VIR_CONNECT_NO_ALIASES

* docs/uri.html.in: Document URI aliases
* include/libvirt/libvirt.h.in: Add VIR_CONNECT_NO_ALIASES
* libvirt.spec.in, mingw32-libvirt.spec.in: Add /etc/libvirt/libvirt.conf
* src/Makefile.am: Install default config file
* src/libvirt.c: Add support for URI aliases
* src/remote/remote_driver.c: Don't try to handle URIs
  with no scheme and which clearly are not paths
* src/util/conf.c: Don't raise error on virConfFree(NULL)
* src/xen/xen_driver.c: Don't raise error on URIs
  with no scheme
docs/uri.html.in
include/libvirt/libvirt.h.in
libvirt.spec.in
mingw32-libvirt.spec.in
src/Makefile.am
src/libvirt.c
src/libvirt.conf [new file with mode: 0644]
src/remote/remote_driver.c
src/util/conf.c
src/xen/xen_driver.c