Test: Skip docker/onos installation in prerequisites if run with --cord option.

Change-Id: I2e51496db58662ed3c3a0e89b67361ec1c04f192
diff --git a/src/test/setup/prerequisites.sh b/src/test/setup/prerequisites.sh
index 13298e3..183d763 100755
--- a/src/test/setup/prerequisites.sh
+++ b/src/test/setup/prerequisites.sh
@@ -1,26 +1,33 @@
 #!/usr/bin/env bash
 apt-get update
-apt-get -y install apt-transport-https ca-certificates
-apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
-if [ ! -f /etc/apt/sources.list.d/docker.list ]; then
-    echo deb https://apt.dockerproject.org/repo ubuntu-trusty main |  tee /etc/apt/sources.list.d/docker.list
+on_cord=0
+if [ "$1" = "--cord" ]; then
+    echo "Skipping installation of Docker and ONOS"
+    on_cord=1
 fi
-apt-get update
-apt-get purge lxc-docker || true
-apt-get -y install linux-image-extra-$(uname -r)
-apt-get -y install apparmor
-echo "Installing Docker"
-apt-get -y install docker-engine
-service docker start
-echo "Verifying Docker installation"
-docker run --rm hello-world || exit 127
-docker rmi hello-world
-echo "Pulling ONOS latest and 1.5"
-docker pull onosproject/onos:latest || exit 127
-docker pull onosproject/onos:1.5 || exit 127
+if [ $on_cord -eq 0 ]; then
+    apt-get -y install apt-transport-https ca-certificates
+    apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+    if [ ! -f /etc/apt/sources.list.d/docker.list ]; then
+        echo deb https://apt.dockerproject.org/repo ubuntu-trusty main |  tee /etc/apt/sources.list.d/docker.list
+    fi
+    apt-get update
+    apt-get purge lxc-docker || true
+    apt-get -y install linux-image-extra-$(uname -r)
+    apt-get -y install apparmor
+    echo "Installing Docker"
+    apt-get -y install docker-engine
+    service docker start
+    echo "Verifying Docker installation"
+    docker run --rm hello-world || exit 127
+    docker rmi hello-world
+    echo "Pulling ONOS latest and 1.5"
+    docker pull onosproject/onos:latest || exit 127
+    docker pull onosproject/onos:1.5 || exit 127
+    apt-get -y install openvswitch-common openvswitch-switch
+fi
 apt-get -y install wget git python python-dev python-pip python-setuptools python-scapy python-pexpect tcpdump arping
 easy_install nose
-apt-get -y install openvswitch-common openvswitch-switch
 pip install -U scapy
 pip install monotonic
 pip install configObj
@@ -33,7 +40,7 @@
 pip install scapy-ssl_tls
 ( cd /tmp && git clone https://github.com/jpetazzo/pipework.git && cp -v pipework/pipework /usr/bin && rm -rf pipework )
 ## Special mode to pull cord-tester repo in case prereqs was installed by hand instead of repo
-if [ "$1" = "-test" ]; then
+if [ "$1" = "--test" ]; then
     rm -rf cord-tester
-    git clone https://github.cyanoptics.com/cgaonker/cord-tester.git
+    git clone https://github.com/opencord/cord-tester.git
 fi