Changed the logic such that the vagrant-libvirt network is created
regardless of whether test mode is active or not. This network is
required in all cases because the voltha vm is created using Vagrant and
the installer needs to be in the same network.

Change-Id: Id0646d38e68e39bed13f098d73ea3b03dff9f763
diff --git a/install/CreateInstaller.sh b/install/CreateInstaller.sh
index 3f055ec..32571ca 100755
--- a/install/CreateInstaller.sh
+++ b/install/CreateInstaller.sh
@@ -91,29 +91,6 @@
 	echo '"insecure-registries" : ["vinstall'${uId}':5000"]' >> ansible/roles/voltha/templates/daemon.json
 	echo '}' >> ansible/roles/voltha/templates/daemon.json
 
-	# Check to make sure that the vagrant-libvirt network is both defined and started
-	echo -e "${lBlue}Verify tha the ${lCyan}vagrant-libvirt${lBlue} network is defined and started${NC}"
-	virsh net-list | grep "vagrant-libvirt" > /dev/null
-	rtrn=$?
-	if [ $rtrn -eq 1 ]; then
-		# The network isn't running, check if it's defined
-		virsh net-list --all | grep "vagrant-libvirt" > /dev/null
-		rtrn=$?
-		if [ $rtrn -eq 1 ]; then
-			# Not defined either
-			echo -e "${lBlue}Defining the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
-			virsh net-define vagrant-libvirt.xml
-			echo -e "${lBlue}Starting the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
-			virsh net-start vagrant-libvirt
-		else
-			# Defined but not started
-			echo -e "${lBlue}Starting the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
-			virsh net-start vagrant-libvirt
-		fi
-	else
-		echo -e "${lBlue}The ${lCyan}vagrant-libvirt${lBlue} network is ${green} running${NC}"
-	fi
-
 	# Change the installer name
 	iVmName="vInstaller${uId}"
 else
@@ -129,6 +106,29 @@
 	echo '}' >> ansible/roles/voltha/templates/daemon.json
 fi
 
+# Check to make sure that the vagrant-libvirt network is both defined and started
+echo -e "${lBlue}Verify tha the ${lCyan}vagrant-libvirt${lBlue} network is defined and started${NC}"
+virsh net-list | grep "vagrant-libvirt" > /dev/null
+rtrn=$?
+if [ $rtrn -eq 1 ]; then
+	# The network isn't running, check if it's defined
+	virsh net-list --all | grep "vagrant-libvirt" > /dev/null
+	rtrn=$?
+	if [ $rtrn -eq 1 ]; then
+		# Not defined either
+		echo -e "${lBlue}Defining the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
+		virsh net-define vagrant-libvirt.xml
+		echo -e "${lBlue}Starting the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
+		virsh net-start vagrant-libvirt
+	else
+		# Defined but not started
+		echo -e "${lBlue}Starting the ${lCyan}vagrant-libvirt${lBlue} network${NC}"
+		virsh net-start vagrant-libvirt
+	fi
+else
+	echo -e "${lBlue}The ${lCyan}vagrant-libvirt${lBlue} network is ${green} running${NC}"
+fi
+
 
 # Shut down the domain in case it's running.
 echo -e "${lBlue}Shut down the ${lCyan}$iVmName${lBlue} VM if running${NC}"