script/vagrant: avoid unnecessary strings interpolation

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ie6e306011249fcdaeb96d3dcdf9807f6ec2d9926
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3710
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
Pawel Piatek 2020-08-10 15:29:37 +02:00 committed by Tomasz Zawadzki
parent 9620760bea
commit 0b46c777bd

View File

@ -145,8 +145,8 @@ Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.memory = "#{vmram}"
vb.cpus = "#{vmcpu}"
vb.memory = vmram
vb.cpus = vmcpu
nvme_disk=(ENV['NVME_FILE'] || "nvme_disk.img")
unless File.exist? (nvme_disk)
@ -180,7 +180,7 @@ Vagrant.configure(2) do |config|
end
if not vmemulator.empty?
libvirt.emulator_path = "#{vmemulator}"
libvirt.emulator_path = vmemulator
libvirt.machine_type = "pc"
end
@ -190,10 +190,10 @@ Vagrant.configure(2) do |config|
# Loop to create all emulated disks set
emulated_nvme_types.each_with_index { |disk, index|
if ENV['NVME_FILE']
nvme_disk_id="#{disk}" + "-#{index}"
nvme_disk="#{nvme_file["#{index}".to_i]}"
nvme_disk_id = disk + "-" + index.to_s
nvme_disk = nvme_file[index]
else
nvme_disk="/var/lib/libvirt/images/nvme_disk.img"
nvme_disk = "/var/lib/libvirt/images/nvme_disk.img"
end
unless File.exist? (nvme_disk)
@ -205,10 +205,10 @@ Vagrant.configure(2) do |config|
libvirt.qemuargs :value => "format=raw,file=#{nvme_disk},if=none,id=#{nvme_disk_id}"
libvirt.qemuargs :value => "-device"
nvme_drive = "nvme,drive=#{nvme_disk_id},serial=1234#{index}"
if !nvme_namespaces["#{index}".to_i].nil? && nvme_namespaces["#{index}".to_i] != 1
nvme_drive << ",namespaces=#{nvme_namespaces["#{index}".to_i]}"
if !nvme_namespaces[index].nil? && nvme_namespaces[index] != 1
nvme_drive << ",namespaces=#{nvme_namespaces[index]}"
end
if !nvme_cmbs["#{index}".to_i].nil? && nvme_cmbs["#{index}".to_i] == "true"
if !nvme_cmbs[index].nil? && nvme_cmbs[index] == "true"
# Fix the size of the buffer to 128M
nvme_drive << ",cmb_size_mb=128"
end
@ -228,8 +228,8 @@ Vagrant.configure(2) do |config|
libvirt.driver = "kvm"
libvirt.graphics_type = "vnc"
libvirt.memory = "#{vmram}"
libvirt.cpus = "#{vmcpu}"
libvirt.memory = vmram
libvirt.cpus = vmcpu
libvirt.video_type = "cirrus"
if ENV['VAGRANT_HUGE_MEM'] == "1"
@ -243,7 +243,7 @@ Vagrant.configure(2) do |config|
# rsync the spdk directory if provision hasn't happened yet
# Warning: rsync does not work with freebsd boxes, so this step is disabled
if ENV['COPY_SPDK_DIR'] == "1" && spdk_dir != "none"
config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", files_sync_backend
config.vm.synced_folder spdk_dir, "/home/vagrant/spdk_repo/spdk", files_sync_backend
end
# rsync artifacts from build