Skip to content

Instantly share code, notes, and snippets.

@salv-orlando
Created June 13, 2013 22:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save salv-orlando/5778033 to your computer and use it in GitHub Desktop.
Simple parallel test - Write, then read
do
# WRITE
(quantum net-create net-$k
quantum subnet-create net-$k 10.0.$k.0/24 --name sub-$k
for (( j=0; j<$2; j++ ))
do
(quantum port-create net-$k --name port-$k-$j)&
done)&
done
# READ
for (( z=0; z<$3; z++))
do
(quantum net-list
if [ "$?" != "0" ]
then
echo ERROR NET_LIST
fi
quantum port-list
if [ "$?" != "0" ]
then
echo ERROR NET_PORT
fi)&
done
wait
echo "ALL IS DONE NOW"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment