From: Julio Faracco <jcfaracco(a)gmail.com>
The first patch add a new parameter into virDomainGetHostname to specify
which source an user would like to fetch hostname. QEMU supports agent
and lease from dnsmasq. Drivers that are not supporting any of these,
are included into default section of switch-case structure. So, they are
not affected by missing source argument.
The second patch, introduce this missing command for LXC. LXC could
retrieve hostname from 'lxc.uts.name' setting. But an user can change it
during container execution. It could be get from lease information.
Julio Faracco (2):
driver: Include source parameter to virDomainGetHostname
lxc: Introduce lxcDomainGetHostname
include/libvirt/libvirt-domain.h | 10 +++++
src/driver-hypervisor.h | 1 +
src/libvirt-domain.c | 7 +++-
src/lxc/lxc_driver.c | 71 ++++++++++++++++++++++++++++++++
src/openvz/openvz_driver.c | 30 ++++++++++----
src/qemu/qemu_driver.c | 67 +++++++++++++++++++++++++-----
src/remote/remote_protocol.x | 1 +
src/remote_protocol-structs | 1 +
src/test/test_driver.c | 1 +
tools/virsh-domain.c | 25 ++++++++++-
10 files changed, 191 insertions(+), 23 deletions(-)
--
2.20.1