Commit 0b510f0e authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Tomasz Zawadzki
Browse files

scripts/vagrant: Add network interface for openstack tests

parent 5363eb3c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ provider = (ENV['SPDK_VAGRANT_PROVIDER'] || "virtualbox")
vmcpu = (ENV['SPDK_VAGRANT_VMCPU'] || 2)
vmram = (ENV['SPDK_VAGRANT_VMRAM'] || 4096)
nfs_sync_backend_distros = ['freebsd', 'clearlinux']
openstack_network = (ENV['SPDK_OPENSTACK_NETWORK'] || false)

# generic/freebsd boxes do not work properly with vagrant-proxyconf and
# have issues installing rsync and sshfs for syncing files. NFS is
@@ -307,6 +308,10 @@ Vagrant.configure(2) do |config|
  config.vm.box_check_update = false
  config.vm.synced_folder '.', '/vagrant', disabled: true

  # Add network interface for openstack tests
  if openstack_network
    config.vm.network "private_network", ip: "10.0.2.15"
  end
  # Copy in the .gitconfig if it exists
  copy_gitconfig(config)

+8 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ display_help() {
	echo "  -l                              Use a local copy of spdk, don't try to rsync from the host."
	echo "  -a                              Copy spdk/autorun.sh artifacts from VM to host system."
	echo "  -d                              Deploy a test vm by provisioning all prerequisites for spdk autotest"
	echo "  -o                              Add network interface for openstack tests"
	echo "  --qemu-emulator=<path>          Path to custom QEMU binary. Only works with libvirt provider"
	echo "  --vagrantfiles-dir=<path>       Destination directory to put Vagrantfile into."
	echo "  --package-box                   Install all dependencies for SPDK and create a local vagrant box version."
@@ -72,6 +73,7 @@ SPDK_VAGRANT_VMCPU=4
SPDK_VAGRANT_VMRAM=4096
SPDK_VAGRANT_PROVIDER="virtualbox"
SPDK_QEMU_EMULATOR=""
SPDK_OPENSTACK_NETWORK=0
OPTIND=1
NVME_DISKS_TYPE=""
NVME_DISKS_NAMESPACES=""
@@ -82,7 +84,7 @@ VAGRANT_PASSWORD_AUTH=0
VAGRANT_PACKAGE_BOX=0
VAGRANT_HUGE_MEM=0

while getopts ":b:n:s:x:p:u:vcraldHh-:" opt; do
while getopts ":b:n:s:x:p:u:vcraldoHh-:" opt; do
	case "${opt}" in
		-)
			case "${OPTARG}" in
@@ -128,6 +130,9 @@ while getopts ":b:n:s:x:p:u:vcraldHh-:" opt; do
		d)
			DEPLOY_TEST_VM=1
			;;
		o)
			SPDK_OPENSTACK_NETWORK=1
			;;
		b)
			NVME_FILE+="${OPTARG#*=} "
			;;
@@ -239,6 +244,7 @@ if [ ${VERBOSE} = 1 ]; then
	echo SPDK_VAGRANT_PROVIDER=$SPDK_VAGRANT_PROVIDER
	echo SPDK_VAGRANT_HTTP_PROXY=$SPDK_VAGRANT_HTTP_PROXY
	echo SPDK_QEMU_EMULATOR=$SPDK_QEMU_EMULATOR
	echo SPDK_OPENSTACK_NETWORK=$SPDK_OPENSTACK_NETWORK
	echo VAGRANT_PACKAGE_BOX=$VAGRANT_PACKAGE_BOX
	echo
fi
@@ -247,6 +253,7 @@ export SPDK_VAGRANT_HTTP_PROXY
export SPDK_VAGRANT_VMCPU
export SPDK_VAGRANT_VMRAM
export SPDK_DIR
export SPDK_OPENSTACK_NETWORK
export COPY_SPDK_DIR
export COPY_SPDK_ARTIFACTS
export DEPLOY_TEST_VM