neutron/vagrant/ovn/provisioning/providers.rb
Brian Haley 88a6c92dc7 [OVN] Merge networking-ovn vagrant into neutron
Move networking-ovn/vagrant into neutron/tools/ovn_vagrant
Also added two sample local.conf files for a DB-only and
VTEP nodes.

Co-Authored-By: zhangyanxian <zhangyanxianmail@163.com>
Co-Authored-By: chen-li <shchenli@cn.ibm.com>
Co-Authored-By: Russell Bryant <rbryant@redhat.com>
Co-Authored-By: Kyle Mestery <mestery@mestery.com
Co-Authored-By: Miguel Angel Ajo <majopela@redhat.com>
Co-Authored-By: Richard Theis <rtheis@us.ibm.com>
Co-Authored-By: JUNJIE NAN <nanjj@cn.ibm.com>
Co-Authored-By: Flavio Fernandes <flavio@flaviof.com>
Co-Authored-By: John Kasperski <jckasper@us.ibm.com>
Co-Authored-By: Matthew Kassawara <mkassawara@gmail.com>
Co-Authored-By: venkatamahesh <venkatamaheshkotha@gmail.com>
Co-Authored-By: Tong Li <litong01@us.ibm.com>
Co-Authored-By: venkata anil <anilvenkata@redhat.com>
Co-Authored-By: Vu Cong Tuan <tuanvc@vn.fujitsu.com>
Co-Authored-By: RYAN D. MOATS <rmoats@us.ibm.com>

Change-Id: I12966d5548a60b46edd5c84ee0035eb11671fd8c
Partially-Implements: blueprint neutron-ovn-merge
2020-02-18 17:26:15 -05:00

43 lines
1.2 KiB
Ruby

def provider_box(provider)
distro = ENV.fetch('DISTRO', 'ubuntu')
boxes = YAML.load_file('../provisioning/boxes.yml')[distro]
# we can always override the box via the VAGRANT_OVN_VM_BOX
# environment variable
return ENV.fetch('VAGRANT_OVN_VM_BOX', boxes[provider])
end
def configure_providers(vm, config)
vm.provider 'virtualbox' do |vb, cfg|
cfg.vm.box = provider_box('virtualbox')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.customize [
'modifyvm', :id,
'--nicpromisc3', "allow-all"
]
vb.customize [
"guestproperty", "set", :id,
"/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000
]
end
vm.provider 'parallels' do |vb, cfg|
cfg.vm.box = provider_box('parallels')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.customize ['set', :id, '--nested-virt', 'on']
end
vm.provider 'libvirt' do |vb, cfg|
cfg.vm.box = provider_box('libvirt')
vb.memory = config['memory']
vb.cpus = config['cpus']
vb.nested = true
vb.graphics_type = 'spice'
vb.video_type = 'qxl'
vb.suspend_mode = 'managedsave'
end
end