aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-26 18:53:46 +0000
committerGerrit Code Review <review@openstack.org>2016-02-26 18:53:46 +0000
commit35830a65ef04f14a85cba50517c958674930a692 (patch)
tree117fa2f37edfdbd7b726e36540bdce5153e72afd /dev
parent95cf542f8d5a28ae726b6864d61672982c645510 (diff)
parent9544166c4b5ca9dde783af7045dbfc717300a063 (diff)
downloadkolla-35830a65ef04f14a85cba50517c958674930a692.tar.gz
kolla-35830a65ef04f14a85cba50517c958674930a692.zip
Merge "Fix issue in newest_dhcp_lease.py"
Diffstat (limited to 'dev')
-rw-r--r--dev/vagrant/newest_dhcp_lease.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/dev/vagrant/newest_dhcp_lease.py b/dev/vagrant/newest_dhcp_lease.py
index 1ade75bc4..64a8e53da 100644
--- a/dev/vagrant/newest_dhcp_lease.py
+++ b/dev/vagrant/newest_dhcp_lease.py
@@ -36,7 +36,7 @@ import xml.etree.ElementTree as etree
import libvirt
-class NoBridgeInterfaceException(Exception):
+class NoPrivateDHCPInterfaceException(Exception):
pass
@@ -80,14 +80,14 @@ def get_mac_address(conn, domain_name):
interfaces = devices.iterfind('interface')
for interface in interfaces:
- interface_type = interface.get('type')
- if interface_type != 'bridge':
+ source = interface.find('source')
+ if source is None or source.get('network') != 'vagrant-private-dhcp':
continue
mac_element = interface.find('mac')
mac_address = mac_element.get('address')
return mac_address
- raise NoBridgeInterfaceException()
+ raise NoPrivateDHCPInterfaceException()
@libvirt_conn