]> git.ipfire.org Git - thirdparty/libvirt.git/commit
net-dhcp-leases: Add virsh support
authorNehal J Wani <nehaljw.kkd1@gmail.com>
Mon, 23 Jun 2014 21:01:52 +0000 (02:31 +0530)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 24 Jun 2014 11:26:31 +0000 (12:26 +0100)
commit59cac9a91885c885a358547a1304645266e3b1b7
tree7e68ee0f4f3ce9b6155e235a61a3c378ea7634ba
parentba5139821adeef360a3adc89990e946417dc91ae
net-dhcp-leases: Add virsh support

Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh.

The new feature supports the follwing methods:

1. Retrieve leases info for a given virtual network

2. Retrieve leases info for given network interface

tools/virsh-domain-monitor.c
   * Introduce new command : net-dhcp-leases
     Example Usage: net-dhcp-leases <network> [mac]

   virsh # net-dhcp-leases --network default6
   Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
   -------------------------------------------------------------------------------------------------------------------
   2014-06-16 03:40:14  52:54:00:85:90:e2  ipv4      192.168.150.231/24        fedora20-test   01:52:54:00:85:90:e2
   2014-06-16 03:40:17  52:54:00:85:90:e2  ipv6      2001:db8:ca2:2:1::c0/64   fedora20-test   00:04:b1:d8:86:42:e1:6a:aa:cf:d5:86:94:23:6f:94:04:cd
   2014-06-16 03:34:42  52:54:00:e8:73:eb  ipv4      192.168.150.181/24        ubuntu14-vm     -
   2014-06-16 03:34:46  52:54:00:e8:73:eb  ipv6      2001:db8:ca2:2:1::5b/64   -               00:01:00:01:1b:30:c6:aa:52:54:00:e8:73:eb

tools/virsh.pod
   * Document new command

src/internal.h
   * Introduce new macro: EMPTYSTR
src/internal.h
tools/virsh-network.c
tools/virsh.pod