* Support negative-valued action parameters by converting them in the Python helper code into a positive value whose bit pattern is the 2's complement representation of the negative value. * Update versions of protobuf and grpc installed, install p4testgen Update protobuf from v3.6.1 to v3.18.1 Update grpc from v1.17.2 to v1.43.2 Both of those versions have been long tested in the p4-guide repo install scripts. Update BMv2, PI, p4c, and ptf to latest versions as of 2023-Jun-24 Enable compilation of p4testgen * Change method to install ptf I found that the former way that I am replacing did not seem to install it correctly. * Make clean.sh remove sources for protobuf and grpc Saves disk space for the image. protobuf and grpc source code is easily obtainable from public sources if the user wishes.
56 lines
2.5 KiB
Ruby
56 lines
2.5 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure(2) do |config|
|
|
config.vm.box = "bento/ubuntu-20.04"
|
|
|
|
config.vm.synced_folder '.', '/vagrant', disabled: true
|
|
config.vm.hostname = "p4"
|
|
config.vm.provision "file", source: "p4-logo.png", destination: "/home/vagrant/p4-logo.png"
|
|
config.vm.provision "file", source: "p4_16-mode.el", destination: "/home/vagrant/p4_16-mode.el"
|
|
config.vm.provision "file", source: "p4.vim", destination: "/home/vagrant/p4.vim"
|
|
|
|
config.vm.define "dev", autostart: false do |dev|
|
|
dev.vm.provider "virtualbox" do |v|
|
|
v.name = "P4 Tutorial Development" + Time.now.strftime(" %Y-%m-%d")
|
|
end
|
|
dev.vm.provision "file", source: "py3localpath.py", destination: "/home/vagrant/py3localpath.py"
|
|
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/py3localpath.py"
|
|
dev.vm.provision "file", source: "patches/behavioral-model-use-correct-libssl-pkg.patch", destination: "/home/vagrant/patches/behavioral-model-use-correct-libssl-pkg.patch"
|
|
dev.vm.provision "file", source: "patches/mininet-patch-for-2023-jun.patch", destination: "/home/vagrant/patches/mininet-patch-for-2023-jun.patch"
|
|
dev.vm.provision "file", source: "clean.sh", destination: "/home/vagrant/clean.sh"
|
|
dev.vm.provision "shell", inline: "chmod 755 /home/vagrant/clean.sh"
|
|
dev.vm.provision "shell", path: "root-dev-bootstrap.sh"
|
|
dev.vm.provision "shell", path: "root-common-bootstrap.sh"
|
|
dev.vm.provision "shell", privileged: false, path: "user-dev-bootstrap.sh"
|
|
dev.vm.provision "shell", privileged: false, path: "user-common-bootstrap.sh"
|
|
end
|
|
|
|
config.vm.define "release", primary: true do |release|
|
|
release.vm.provider "virtualbox" do |v|
|
|
v.name = "P4 Tutorial Release" + Time.now.strftime(" %Y-%m-%d")
|
|
end
|
|
release.vm.provision "file", source: "patches/mininet-patch-for-2023-jun.patch", destination: "/home/vagrant/patches/mininet-patch-for-2023-jun.patch"
|
|
release.vm.provision "shell", path: "root-release-bootstrap.sh"
|
|
release.vm.provision "shell", path: "root-common-bootstrap.sh"
|
|
release.vm.provision "shell", privileged: false, path: "user-common-bootstrap.sh"
|
|
end
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
vb.gui = true
|
|
vb.memory = 2048
|
|
vb.cpus = 2
|
|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
|
vb.customize [
|
|
"storageattach", :id,
|
|
"--storagectl", "IDE Controller",
|
|
"--port", "0",
|
|
"--device", "0",
|
|
"--type", "dvddrive",
|
|
"--medium", "emptydrive"
|
|
]
|
|
vb.customize ["modifyvm", :id, "--vram", "32"]
|
|
end
|
|
|
|
end
|