Use ovs-vsctl iface-to-br to look up the bridge associated with the given VIF.

This avoids assuming that vifX.Y is attached to xenbrY, which is untrue in
the general case.

Change-Id: Ie3398b4a2231e0483acae272be71cb09a1744872
This commit is contained in:
Ewan Mellor 2011-09-24 23:37:07 -07:00
parent bca7dd3e1d
commit 16e3f2effc

View File

@ -51,7 +51,8 @@ def main(command, vif_raw, net_type):
vif_name, dom_id, vif_index = vif_raw.split('-')
vif = "%s%s.%s" % (vif_name, dom_id, vif_index)
bridge = "xenbr%s" % vif_index
bridge = execute_get_output('/usr/bin/ovs-vsctl', 'iface-to-br', vif)
xsls = execute_get_output('/usr/bin/xenstore-ls',
'/local/domain/%s/vm-data/networking' % dom_id)