[libvirt] [PATCH 1/2] driver: Include source parameter to virDomainGetHostname
Julio Faracco
jcfaracco at gmail.com
Sun Nov 24 21:33:29 UTC 2019
Thanks for your explanation, Peter!
I will focus on LXC side then...
Em dom., 24 de nov. de 2019 às 18:34, Peter Krempa
<pkrempa at redhat.com> escreveu:
>
> On Sun, Nov 24, 2019 at 21:24:07 +0100, Peter Krempa wrote:
> > On Sun, Nov 24, 2019 at 17:19:48 -0300, jcfaracco at gmail.com wrote:
> > > From: Julio Faracco <jcfaracco at gmail.com>
> > >
> > > There is a lots of possibilities to retrieve hostname information from
> > > domain. Libvirt could use lease information from dnsmasq to get current
> > > hostname too. QEMU supports QEMU-agent but it can use lease source. See
> > > 'domifaddr' as an example.
> > >
> > > This commit still adds lease options for QEMU. It will get the first
> > > hostname available from domain networks.
> > >
> > > Signed-off-by: Julio Faracco <jcfaracco at gmail.com>
> > > ---
> > > include/libvirt/libvirt-domain.h | 10 +++++
> > > src/driver-hypervisor.h | 1 +
> > > src/libvirt-domain.c | 7 +++-
> > > 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 +++++++++++-
> > > 9 files changed, 120 insertions(+), 23 deletions(-)
> > >
> > > diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
> > > index a2f007568c..cc3d6ed0ca 100644
> > > --- a/include/libvirt/libvirt-domain.h
> > > +++ b/include/libvirt/libvirt-domain.h
> > > @@ -1554,6 +1554,7 @@ int virDomainGetMaxVcpus (virDomainPtr domain);
> > > int virDomainGetSecurityLabel (virDomainPtr domain,
> > > virSecurityLabelPtr seclabel);
> > > char * virDomainGetHostname (virDomainPtr domain,
> > > + unsigned int source,
> > > unsigned int flags);
> >
> > Public API must never be changed.
>
> More specifically we must never add or change parameters of existing
> APIs and data types as other applications using libvirt would fail to
> compile after the change.
More information about the libvir-list
mailing list