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:
parent
bca7dd3e1d
commit
16e3f2effc
@ -51,7 +51,8 @@ def main(command, vif_raw, net_type):
|
|||||||
|
|
||||||
vif_name, dom_id, vif_index = vif_raw.split('-')
|
vif_name, dom_id, vif_index = vif_raw.split('-')
|
||||||
vif = "%s%s.%s" % (vif_name, dom_id, vif_index)
|
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',
|
xsls = execute_get_output('/usr/bin/xenstore-ls',
|
||||||
'/local/domain/%s/vm-data/networking' % dom_id)
|
'/local/domain/%s/vm-data/networking' % dom_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user