aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/vagrant
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/vagrant')
-rw-r--r--resources/tools/vagrant/Vagrantfile13
1 files changed, 9 insertions, 4 deletions
diff --git a/resources/tools/vagrant/Vagrantfile b/resources/tools/vagrant/Vagrantfile
index f73ca5b76f..46e214693d 100644
--- a/resources/tools/vagrant/Vagrantfile
+++ b/resources/tools/vagrant/Vagrantfile
@@ -63,6 +63,11 @@ def add_dut(config, name, mgmt_ip, net1, net2)
end
+net_prefix = ''
+if ENV.key?('VPP_VAGRANT_NET_PREFIX')
+ net_prefix = ENV['VPP_VAGRANT_NET_PREFIX'] + '_'
+end
+
Vagrant.configure(2) do |config|
config.vm.box_check_update = false
config.vm.define "tg" do |tg|
@@ -84,9 +89,9 @@ Vagrant.configure(2) do |config|
tg.vm.provision "shell", inline: $install_prereqs
tg.vm.network "private_network", ip: '192.168.255.100/24'
tg.vm.network "private_network", type: "dhcp", auto_config: false,
- virtualbox__intnet: "tg_dut1"
+ virtualbox__intnet: net_prefix + "tg_dut1"
tg.vm.network "private_network", type: "dhcp", auto_config: false,
- virtualbox__intnet: "tg_dut2"
+ virtualbox__intnet: net_prefix + "tg_dut2"
tg.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
@@ -95,7 +100,7 @@ Vagrant.configure(2) do |config|
end
- add_dut(config, "dut1", "192.168.255.101/24", "tg_dut1", "dut1_dut2")
- add_dut(config, "dut2", "192.168.255.102/24", "tg_dut2", "dut1_dut2")
+ add_dut(config, "dut1", "192.168.255.101/24", net_prefix + "tg_dut1", net_prefix + "dut1_dut2")
+ add_dut(config, "dut2", "192.168.255.102/24", net_prefix + "tg_dut2", net_prefix + "dut1_dut2")
end