From d810be12733e8f42f9910f39119243344730cc52 Mon Sep 17 00:00:00 2001 From: Otto Boehrer Date: Thu, 24 Oct 2024 12:58:21 +0200 Subject: [PATCH] add code from PR #289 --- .../lib/cloud/openstack/stemcell_creator.rb | 2 +- .../spec/unit/stemcell_creator_spec.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb b/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb index d107757a..aaf2c644 100644 --- a/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb +++ b/src/bosh_openstack_cpi/lib/cloud/openstack/stemcell_creator.rb @@ -119,7 +119,7 @@ def self.normalize_image_properties(properties) image_properties = {} image_options = %w[version os_type os_distro architecture auto_disk_config hw_vif_model hw_disk_bus_model hw_scsi_model hw_disk_bus - hypervisor_type vmware_adaptertype vmware_disktype + hw_vif_multiqueue_enabled hypervisor_type vmware_adaptertype vmware_disktype vmware_linked_clone vmware_ostype] image_options.reject { |image_option| properties[property_option_for_image_option(image_option)].nil? }.each do |image_option| image_properties[image_option.to_sym] = properties[property_option_for_image_option(image_option)].to_s diff --git a/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb b/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb index 80662a85..5ea017bf 100644 --- a/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb +++ b/src/bosh_openstack_cpi/spec/unit/stemcell_creator_spec.rb @@ -32,6 +32,16 @@ ) end + it 'supports virtio multiqueue network' do + properties = { + 'hw_vif_multiqueue_enabled' => true, + } + + expect(subject.normalize_image_properties(properties)).to include( + :hw_vif_multiqueue_enabled, + ) + end + it 'maps hypervisor key to hypervisor_type' do properties = { 'hypervisor' => 'kvm',