Merge "os-vif-util: set vif_name for vhostuser ovs os-vif port"
This commit is contained in:
@@ -284,8 +284,10 @@ def _nova_to_osvif_vif_vhostuser(vif):
|
||||
if vif['details'].get(model.VIF_DETAILS_VHOSTUSER_OVS_PLUG, False):
|
||||
profile = objects.vif.VIFPortProfileOpenVSwitch(
|
||||
interface_id=vif.get('ovs_interfaceid') or vif['id'])
|
||||
vif_name = ('vhu' + vif['id'])[:model.NIC_NAME_LEN]
|
||||
obj = _get_vif_instance(vif, objects.vif.VIFVHostUser,
|
||||
port_profile=profile, plugin="ovs")
|
||||
port_profile=profile, plugin="ovs",
|
||||
vif_name=vif_name)
|
||||
if vif["network"]["bridge"] is not None:
|
||||
obj.bridge_name = vif["network"]["bridge"]
|
||||
obj.mode = vif['details'].get(
|
||||
|
@@ -572,6 +572,7 @@ class OSVIFUtilTestCase(test.NoDBTestCase):
|
||||
plugin="ovs",
|
||||
port_profile=osv_objects.vif.VIFPortProfileOpenVSwitch(
|
||||
interface_id="dc065497-3c8d-4f44-8fb4-e1d33c16a536"),
|
||||
vif_name="vhudc065497-3c",
|
||||
path='/fake/socket',
|
||||
mode='client',
|
||||
has_traffic_filtering=True,
|
||||
|
Reference in New Issue
Block a user