Commit Graph

4 Commits

Author SHA1 Message Date
Lu lei
c12230a57c Fix using filter() to meet python2,3
As mentioned in link[1], if we need filter() on python3,
Raplace filter(lambda obj: test(obj), data) with:
[obj for obj in data if test(obj)].

[1] https://wiki.openstack.org/wiki/Python3
TrivialFix.

Change-Id: Ic1ea289c89fad16bc7aa1db42faa9a6b686086d2
2016-08-29 18:44:44 +08:00
Michal Rostecki
9895e98d17 Use MAC address for looking for DHCP leases for Vagrant
Change-Id: If87e83f7a50c0341f4b1238310eb1469eea0f767
Closes-Bug: 1570739
2016-06-21 04:58:27 +00:00
Éric Lemoine
9544166c4b Fix issue in newest_dhcp_lease.py
This fixes a bug in newest_dhcp_lease.py where the get_mac_address
function currently searches for a "bridge" interface instead of
searching for the interface whose source network is
"vagrant-private-dhcp".

Change-Id: Iea0b25f893b959b5e319b117e7a1c4c63a00dd23
Closes-Bug: #1548742
2016-02-26 15:48:51 +01:00
Martin André
e715856f52 Fetching IP addresses for vagrant-hostmanager from libvirt
To fetch the IP address from the interface other than eth0 for
vagrant-hostmanager plugin, it must be fetched from the DHCP
leases from libvirt network. The previously used one-liner,
which was using virsh with awk, returns multiple addresses
when VM was destroyed before expiration of its DHCP lease.

This script solved this problem by getting only the newest
DHCP lease and gives a possibility to destroy Vagrant
environment and set up again without worrying about hosts
resolving.

Co-Authored-By: Michal Rostecki <mrostecki@mirantis.com>
Partially-Implements: blueprint vagrant
Related-Id: Ic469b46f4d02d873c27114cbd268b86521eef32b
Related-Id: I81f07b7e4a202af68fd3cf9fdb308c3734c40a83

Change-Id: I408415e95483c1b8988d0f67c654212de63bece2
2016-02-09 14:25:22 +09:00