[for 1.2.6] Redundancy of virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC

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

 



Hi,

when reviewing the patch to add python bindings for the said APIs it
occurred to me that the two APIs are so close in their prototypes and
way of functioning that we could actually merge them into one.

Both of those return a list of lease structures and the only difference
is the presence of the @mac argument.

We could unify those two APIs into one with the following signature:

int
virNetworkGetDHCPLeases(virNetworkPtr network,
                        const char *mac,
                        virNetworkDHCPLeasePtr **leases,
                        unsigned int flags)

And tweak the semantics of @mac where when the user passes NULL we'd
return the complete unfiltered list.

This would simplify our API and also the python bindings.

If we decide this is a good idea (in time for the release) I'll post
patches to flesh out the redundant parts.

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]