On 06/27/14 10:57, Daniel P. Berrange wrote:
On Fri, Jun 27, 2014 at 10:42:33AM +0200, Peter Krempa wrote:
> From: Nehal J Wani <nehaljw.kkd1(a)gmail.com>
>
> This API returns a list of DHCP leases for all network interfaces
> connected to the given virtual network or limited output just for one
> interface if mac is specified.
>
> Example Output:
> [{'iface': 'virbr3', 'ipaddr': '192.168.150.181',
'hostname': 'ubuntu14',
> 'expirytime': 1403737495L, 'prefix': 24, 'clientid':
None,
> 'mac': '52:54:00:e8:73:eb', 'iaid': None, 'type':
0},
> {'iface': 'virbr3', 'ipaddr':
'2001:db8:ca2:2:1::bd', 'hostname': 'fedora20-test',
> 'expirytime': 1403738587L, 'prefix': 64, 'clientid':
'00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd',
> 'mac': '52:54:00:5b:40:98', 'iaid': '5980312',
'type': 1}]
>
> Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
> ---
> examples/README | 1 +
> examples/dhcpleases.py | 53 +++++++++++++++++++++++++++++
> generator.py | 4 +++
> libvirt-override-api.xml | 7 ++++
> libvirt-override.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++
> sanitytest.py | 6 ++++
> 6 files changed, 159 insertions(+)
> create mode 100755 examples/dhcpleases.py
ACK looks like a reasonable mapping to python.
Pushed; Thanks.
Peter