-read_config() {
- opnfvrel=`grep release: deploy.yaml | cut -d ":" -f2`
- openstack=`grep openstack: deploy.yaml | cut -d ":" -f2`
- opnfvtype=`grep type: deploy.yaml | cut -d ":" -f2`
- opnfvlab=`grep lab: deploy.yaml | cut -d ":" -f2`
- opnfvsdn=`grep sdn: deploy.yaml | cut -d ":" -f2`
-}
+# An array with all the arguments
+arguments=($options)
+
+# Loop index
+index=0
+
+for argument in $options
+ do
+ # Incrementing index
+ index=`expr $index + 1`
+
+ # The conditions
+ case $argument in
+ -h|--help )
+ usage;
+ ;;
+ -s|--sdn )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvsdn=${arguments[index]}
+ fi;
+ ;;
+ -t|--type )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvtype=${arguments[index]}
+ fi;
+ ;;
+ -o|--openstack )
+ if ([ "arguments[index]" != "" ]); then
+ openstack=${arguments[index]}
+ fi;
+ ;;
+
+ -l|--lab )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvlab=${arguments[index]}
+ fi;
+ ;;
+
+ -r|--release )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvrel=${arguments[index]}
+ fi;
+ ;;
+
+ -f|--feature )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvfeature=${arguments[index]}
+ fi;
+ ;;
+
+ -d|--distro )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvdistro=${arguments[index]}
+ fi;
+ ;;
+
+ -a|--arch )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvarch=${arguments[index]}
+ fi;
+ ;;
+
+ -m|--model )
+ if ([ "arguments[index]" != "" ]); then
+ opnfvmodel=${arguments[index]}
+ fi;
+ ;;
+
+ -i|--virtinstall )
+ if ([ "arguments[index]" != "" ]); then
+ virtinstall=${arguments[index]}
+ fi;
+ ;;
+ --maasinstall )
+ if ([ "arguments[index]" != "" ]); then
+ maasinstall=${arguments[index]}
+ fi;
+ ;;
+ --labfile )
+ if ([ "arguments[index]" != "" ]); then
+ labfile=${arguments[index]}
+ fi;
+ ;;
+ esac
+ done