From 4b5b3c2e667f719cf9dcbd7c0b5b4ba05e2e5def Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Wed, 23 Nov 2016 21:10:41 +0000 Subject: [PATCH] add host to vif.py set_config_* functions - This change extends the function signture of the vif.py set_config_* functions to optionally accepth the host object. - This is required to support host specifc features that depend on the vif type chosen e.g. vhost-user and multiqueue Change-Id: I9b116f64864863ade32a99fcda9051b60ff7fbde --- nova/virt/libvirt/vif.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py index 059d212a57..3422a8ecd7 100644 --- a/nova/virt/libvirt/vif.py +++ b/nova/virt/libvirt/vif.py @@ -429,7 +429,7 @@ class LibvirtGenericVIFDriver(object): designer.set_vif_bandwidth_config(conf, inst_type) return conf - def _set_config_VIFBridge(self, instance, vif, conf): + def _set_config_VIFBridge(self, instance, vif, conf, host=None): conf.net_type = "bridge" conf.source_dev = vif.bridge_name conf.target_dev = vif.vif_name @@ -439,7 +439,7 @@ class LibvirtGenericVIFDriver(object): name = "nova-instance-" + instance.name + "-" + mac_id conf.filtername = name - def _set_config_VIFOpenVSwitch(self, instance, vif, conf): + def _set_config_VIFOpenVSwitch(self, instance, vif, conf, host=None): conf.net_type = "bridge" conf.source_dev = vif.bridge_name conf.target_dev = vif.vif_name @@ -486,7 +486,7 @@ class LibvirtGenericVIFDriver(object): raise exception.NovaException( _("Unsupported VIF type %(obj)s func %(func)s") % {'obj': vif.obj_name(), 'func': viffunc}) - func(instance, vif, conf) + func(instance, vif, conf, host) designer.set_vif_bandwidth_config(conf, inst_type) -- 2.39.5