Re: [PATCH 1/2] driver: Include source parameter to virDomainGetHostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/24/19 10:33 PM, Julio Faracco wrote:
Thanks for your explanation, Peter!

I will focus on LXC side then...


You may still implement the API for other drivers too. The way we addressed this problem in the past is to create new API and have the old one call the new one. That's why we have "virSomething WithFlags()" APIs - because simply when introducing virSomething() API we did not think of adding flags. But if you then look how virSomething is implemented at driver level (say qemu driver) then you will see virSomething() is a very thin wrapper that calls virSomethingWithFlags(..., 0);.


For instance virDomainCreate() and virDomainCreateWithFlags() and qemuDomainCreate() and qemuDomainCreateWithFlags().

So you will need to add a new API and then have the old call the new one with sensible @source. Since the sensible value can differ among drivers I guess we can have VIR_DOMAIN_HOSTNAME_SRC_DEFAULT which would mean "hypervisor driver default as in the most sensible source chosen automatically by driver".


Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux