Simple parallel test - Write, then read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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