Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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