diff --git a/DELTA/README.md b/DELTA/README.md
new file mode 100644
index 0000000..8a7cc5d
--- /dev/null
+++ b/DELTA/README.md
@@ -0,0 +1,15 @@
+The scripts in this directory automates DELTA security tests against ONOS.
+
+run-DELTA.sh automates DELTA tests (All-In-One Single Machine mode). It installs DELTA and all dependencies; brings up VMs and configures the network; triggers tests using a python script (run-DELTA.py); cleans up the environment after tests are done.
+Usage of run-DELTA.sh:
+-h        show help message
+-d        initialize DELTA repo, build and configure DELTA
+-v        destroy and reinstall vagrant VMs
+-o <name> specify name of ONOS nightly build file
+-p <path> specify path of DELTA
+
+run-DELTA.py uses pexpect to talk to DELTA manager and triggers all CONTROL_PLANE_OF and ADVANCED test cases. It also reads the DELTA log and prints the results for each test case. run-DELTA.py can take one argument for specifying DELTA directory.
+
+Note: run-DELTA.sh and run-DELTA.py should be put into the same folder.
+
+For more information of DELTA, please go to https://github.com/OpenNetworkingFoundation/delta
diff --git a/DELTA/run-DELTA.py b/DELTA/run-DELTA.py
new file mode 100755
index 0000000..1bfd7a3
--- /dev/null
+++ b/DELTA/run-DELTA.py
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+'''
+This script uses pexpect to talk to DELTA manager and triggers all CONTROL_PLANE_OF and
+ADVANCED test cases. It also reads the DELTA log and prints the results for each case
+'''
+
+import sys
+import pexpect
+import time
+import datetime
+
+DELTA_DIR = '/home/sdn/DELTA'
+DELTA_LOG = 'delta.log'
+RESULT_FILE = 'summary.txt'
+LOG_CHECK_INTERVAL = 10
+# TODO: get attack codes from DELTA CLI
+CODES = ['2.1.010','2.1.020','2.1.030','2.1.040','2.1.050','2.1.060','2.1.070','2.1.071','2.1.072','2.1.073','2.1.080','3.1.010','3.1.020','3.1.030','3.1.040','3.1.050','3.1.060','3.1.070','3.1.080','3.1.090','3.1.100','3.1.110','3.1.120','3.1.130','3.1.140','3.1.150','3.1.160','3.1.170','3.1.180','3.1.190','3.1.200']
+CODE_TO_SKIP = ['3.1.090','3.1.160']
+# Timeout for each test case
+TIMEOUT = 1800
+
+def triggerTest( handle, code ):
+    testAvailable = True
+    print datetime.datetime.now(), "Starting test", code
+    # TODO: expect Exceptions thrown by DELTA
+    i = handle.expect( ['Command>', pexpect.EOF, pexpect.TIMEOUT], 60 )
+    if i != 0:
+        print "pexpect EOF or TIMEOUT, exiting..."
+        return -1
+    time.sleep(0.5)
+
+    handle.sendline( 'k' )
+    i = handle.expect( ['Select the attack code>', pexpect.EOF, pexpect.TIMEOUT], 60 )
+    if i != 0:
+        print "pexpect EOF or TIMEOUT, exiting..."
+        return -1
+    time.sleep(0.5)
+
+    handle.sendline( code )
+    i = handle.expect( ['not available', 'Press ENTER key to continue..', pexpect.EOF, pexpect.TIMEOUT], 60 )
+    if i == 0:
+        testAvailable = False
+    elif i == 1:
+        testAvailable = True
+    else:
+        print "pexpect EOF or TIMEOUT, exiting..."
+        return -1
+    time.sleep(0.5)
+
+    handle.sendline( '' )
+    if not testAvailable:
+        print "Test", code, "is not available"
+        return 0
+
+    return 1
+
+def waitForTest( code ):
+    startTime = time.time()
+    while True:
+        if time.time() - startTime > TIMEOUT:
+            print "Test timeout, exiting..."
+            return -1
+        time.sleep( LOG_CHECK_INTERVAL )
+        log = open( DELTA_LOG ).read()
+        log = log.split( code )
+        if len( log ) == 1:
+            pass
+        elif "done" in log[-1]:
+            try:
+                testName = log[1].split( ' - ' )[1]
+            except IndexError:
+                print "Error getting test name"
+                testName = "Unknown Test Name"
+            result = "UNKNOWN"
+            if "FAIL" in log[-1]:
+                result = "FAIL"
+            elif "PASS" in log[-1]:
+                result = "PASS"
+            print datetime.datetime.now(), "Test result:", result, "Time taken:", time.time() - startTime, "seconds"
+            resultFile = open( RESULT_FILE, 'a' )
+            resultFile.write( code + " " + testName + ": " + result + "\n" )
+            resultFile.close()
+            return 1
+        else:
+            pass
+
+def runTests():
+    resultFile = open( RESULT_FILE, 'w' )
+    resultFile.write( "Test started on " + str(datetime.datetime.now())+"\n" )
+    resultFile.close()
+    handle=pexpect.spawn( 'java -jar ' + DELTA_DIR + '/manager/target/delta-manager-1.0-SNAPSHOT-jar-with-dependencies.jar ' + DELTA_DIR + '/tools/config/manager.cfg' )
+    for code in CODES:
+        # Skip some broken cases
+        if code in CODE_TO_SKIP:
+            continue
+        triggerResult = triggerTest( handle, code )
+        # pexpect failures
+        if triggerResult == -1:
+            return
+        # Test not available
+        elif triggerResult == 0:
+            continue
+        testResult = waitForTest( code )
+        # Test timed out
+        if testResult == -1:
+            break
+    # Exit DELTA
+    print "All tests done, exiting DELTA"
+    i = handle.expect( ['Command>', pexpect.EOF, pexpect.TIMEOUT], 60 )
+    handle.sendline( 'q' )
+
+if __name__ == '__main__':
+    if len( sys.argv ) >= 2:
+        DELTA_DIR = sys.argv[1]
+    print 'DELTA directory is', DELTA_DIR
+    runTests()
diff --git a/DELTA/run-DELTA.sh b/DELTA/run-DELTA.sh
new file mode 100755
index 0000000..c1f3aab
--- /dev/null
+++ b/DELTA/run-DELTA.sh
@@ -0,0 +1,157 @@
+#!/bin/bash
+# This script automates DELTA tests (All-In-One Single Machine mode). It
+# installs DELTA and all dependencies; brings up VMs and configures the
+# network; triggers tests using a python script (run-DELTA.py); cleans
+# up the environment after tests are done.
+# Note: run-DELTA.py and this script should be put in the same folder
+
+set -e
+
+DELTA_PATH=/home/sdn
+
+# Install DELTA and dependencies
+function init_delta() {
+    echo "*** Initialize DELTA ***"
+    if [ ! -d "$DELTA_DIR" ]
+    then
+        echo "Downloading DELTA..."
+        (cd $DELTA_PATH && git clone https://github.com/OpenNetworkingFoundation/DELTA.git)
+        cd $DELTA_DIR
+        echo "Installing DELTA dependencies..."
+        ./tools/dev/delta-setup/delta-setup-devenv-ubuntu
+        echo "Building DELTA..."
+        source ./tools/dev/delta-setup/bash_profile
+        mvn clean install
+        echo "Installing virtualbox and vagrant..."
+        ./tools/dev/delta-setup/delta-setup-vms-ubuntu
+        # TODO: change ./tools/config/manager.cfg
+        cd -
+    fi
+}
+
+# Bring up VMs and config network
+function setup_vm() {
+    echo "*** Setting up VMs ***"
+    echo "Bringing up VMs..."
+    cd $DELTA_DIR"/tools/dev/vagrant/"
+    vagrant up >/dev/null 2>&1
+    echo "Checking if all VMs are up..."
+    vagrant status | grep controller | grep running
+    vagrant status | grep channel | grep running
+    vagrant status | grep mininet | grep running
+    echo "Setting up NAT network..."
+    VBoxManage natnetwork add --netname NatNetwork --network 10.0.2.0/24 --enable --dhcp on
+    VBoxManage controlvm $(VBoxManage list vms | grep mininet | awk '{print $1}' | sed 's/"//g') nic1 natnetwork NatNetwork
+    VBoxManage controlvm $(VBoxManage list vms | grep mininet | awk '{print $1}' | sed 's/"//g') nicpromisc1 allow-all
+    source ../delta-setup/bash_profile
+    if [[ $INIT_VM -eq 1 ]]
+    then
+        INIT_VM=0
+        echo "Setting up passwordless login..."
+        for vm in $DELTA_APP $DELTA_CHANNEL $DELTA_HOST
+        do
+            IFS=@ read name ip <<< $vm
+            ssh-keygen -f "$HOME/.ssh/known_hosts" -R $ip
+            cat ~/.ssh/id_rsa.pub | sshpass -p "vagrant" ssh -o StrictHostKeyChecking=no $vm 'cat >> .ssh/authorized_keys'
+        done
+        echo "Setting up DELTA_APP VM..."
+        ssh $DELTA_APP "sudo echo 'export JAVA_HOME=/usr/lib/jvm/java-8-oracle' | sudo tee --append /etc/environment;\
+                        sudo echo 'export ONOS_APPS=drivers,openflow,proxyarp,mobility,fwd' | sudo tee --append /etc/environment"
+        echo "Copying files to VMs..."
+        ../onos-setup/onos-1.6.0-scp
+        ../delta-setup/delta-agents-scp
+    fi
+    echo "Setting up ONOS..."
+    ssh $DELTA_APP "echo 'Downloading ONOS nightly build...';\
+                    set -e;\
+                    wget -c http://downloads.onosproject.org/nightly/$NIGHTLY_FILE_NAME.tar.gz >/dev/null 2>&1;\
+                    tar xzf $NIGHTLY_FILE_NAME.tar.gz;\
+                    rm $NIGHTLY_FILE_NAME.tar.gz;\
+                    if [ -d onos ]; then rm -r onos; fi;\
+                    mv onos-*-SNAPSHOT onos;\
+                    cp delta-agent-app-onos-1.6-1.0-SNAPSHOT.jar onos/apache-karaf-*/deploy/"
+    cd -
+}
+
+# Run DELTA tests
+function run_test() {
+    echo "*** Run tests ***"
+    cd $DELTA_DIR
+    source ./tools/dev/delta-setup/bash_profile
+    cd -
+    ./run-DELTA.py $DELTA_DIR
+}
+
+# Clean up
+function teardown_vm() {
+    echo "*** Tearing down VMs ***"
+    echo "Killing DELTA..."
+    sudo kill -9 $(ps -ef | grep delta-manager | grep -v grep | awk '{print $2}')
+    echo "Deleting NAT network..."
+    VBoxManage controlvm $(VBoxManage list vms | grep mininet | awk '{print $1}' | sed 's/"//g') nic1 nat || echo "nic1 of mininet VM not reset"
+    VBoxManage natnetwork remove --netname NatNetwork || echo "NAT network not removed"
+    echo "Bringing down VMs..."
+    cd $DELTA_DIR"/tools/dev/vagrant/"
+    if [[ $INIT_VM -eq 1 ]]
+    then
+        vagrant destroy -f
+        echo "Checking if all VMs are gone..."
+        vagrant status | grep controller | grep "not created"
+        vagrant status | grep channel | grep "not created"
+        vagrant status | grep mininet | grep "not created"
+    else
+        vagrant halt
+        echo "Checking if all VMs are down..."
+        vagrant status | grep controller | grep poweroff
+        vagrant status | grep channel | grep poweroff
+        vagrant status | grep mininet | grep poweroff
+    fi
+    cd -
+}
+
+INIT_DELTA=0
+INIT_VM=0
+NIGHTLY_FILE_NAME="onos-1.10.0.20170223-NIGHTLY"
+
+while getopts "hdvo:p:" opt; do
+    case ${opt} in
+        h )
+            echo "Usage:"
+            echo "-h        show this help message"
+            echo "-d        initialize DELTA repo, build and configure DELTA"
+            echo "-v        destroy and reinstall vagrant VMs"
+            echo "-o <name> specify name of ONOS nightly build file"
+            echo "-p <path> specify path of DELTA"
+            exit 0
+        ;;
+        d ) INIT_DELTA=1
+        ;;
+        v ) INIT_VM=1
+        ;;
+        o ) NIGHTLY_FILE_NAME=$OPTARG
+        ;;
+        p ) DELTA_PATH=$OPTARG
+        ;;
+        \? ) echo "Invalid option: -$OPTARG"
+            exit 1
+            ;;
+    esac
+done
+
+DELTA_DIR=$DELTA_PATH"/DELTA"
+
+teardown_vm
+
+if [[ $INIT_DELTA -eq 1 ]]
+then
+    init_delta
+fi
+
+setup_vm
+
+run_test
+
+teardown_vm
+
+echo "Done"
+exit 0
diff --git a/TestON/bin/copy-key-to-cells.sh b/TestON/bin/copy-key-to-cells.sh
new file mode 100755
index 0000000..d6555eb
--- /dev/null
+++ b/TestON/bin/copy-key-to-cells.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# ------------------------------------------------------------------------
+# This script is a workaround for the key collision issue when loging into
+# onos cli from both test-station and onos cells with identical user names.
+# It copies both private and public keys of localhost (test-station) to
+# all remote hosts specified in your cell.
+# It also backs up the original keys of the remote hosts before
+# overwriting them.
+# Setting up passwordless login is recommended before running the script.
+# ------------------------------------------------------------------------
+
+ADDRESSES=()
+# Check if OC1 to OC7 exist
+for i in $(seq 1 7); do
+    if [ -n "$OC$i" ]; then
+        TEMP=OC$i
+        ADDRESSES+=(${!TEMP})
+    fi
+done
+
+# Check if OCN exists
+[ -n "$OCN" ] && ADDRESSES+=($OCN)
+
+# Copy keys to remote hosts
+for address in "${ADDRESSES[@]}"; do
+    echo "Backing up remote keys on" $address
+    ssh sdn@$address "cd ~/.ssh; \
+    cp id_rsa id_rsa.old; \
+    cp id_rsa.pub id_rsa.pub.old; "
+
+    echo "Copying keys to" $address
+    scp ~/.ssh/id_rsa sdn@$address:~/.ssh/
+    scp ~/.ssh/id_rsa.pub sdn@$address:~/.ssh/
+done
diff --git a/TestON/drivers/common/api/controller/onosrestdriver.py b/TestON/drivers/common/api/controller/onosrestdriver.py
index 15e1e88..d5c1114 100755
--- a/TestON/drivers/common/api/controller/onosrestdriver.py
+++ b/TestON/drivers/common/api/controller/onosrestdriver.py
@@ -474,6 +474,7 @@
                         ethSrc="",
                         ethDst="",
                         bandwidth="",
+                        protected=False,
                         lambdaAlloc=False,
                         ipProto="",
                         ipSrc="",
@@ -543,6 +544,9 @@
                                              "types": [ "OPTICAL" ],
                                              "inclusive": "false" } ] }
 
+            # if protected:
+            #     intentJson['constraints'].append( { "type": "Protection", "types": ["Protection"], "inclusive": "true" } )
+
             if ethType == "IPV4":
                 intentJson[ 'selector' ][ 'criteria' ].append( {
                                                          "type":"ETH_TYPE",
@@ -1333,6 +1337,7 @@
                  udpSrc="",
                  mpls="",
                  priority=100,
+                 groupId="",
                  ip="DEFAULT",
                  port="DEFAULT",
                  debug=False ):
@@ -1371,6 +1376,12 @@
                            "selector": {"criteria":[]}}
             if appId:
                 flowJson[ "appId" ] = appId
+
+            if groupId:
+                flowJson[ 'treatment' ][ 'instructions' ].append( {
+                                                        "type":"GROUP",
+                                                        "groupId":groupId } )
+
             if egressPort:
                 flowJson[ 'treatment' ][ 'instructions' ].append( {
                                                         "type":"OUTPUT",
@@ -1985,3 +1996,180 @@
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
+
+    def addGroup( self, deviceId, groupType, bucketList, appCookie, groupId, ip="DEFAULT", port="DEFAULT", debug=False ):
+        """
+        Description:
+            Creates a single Group for the specified device.
+        Required:
+            * deviceId: id of the device
+            * type: Type of the Group
+            * bucketList: Buckets to be added to the group
+            * appCookie: Cookie for the Group
+            * groupId: Id of the Group
+        Returns:
+            Returns main.TRUE for successful requests; Returns main.FALSE
+            if error on requests;
+            Returns None for exceptions
+        Note:
+            The ip and port option are for the requests input's ip and port
+            of the ONOS node
+        """
+        try:
+            groupJson = { "type": groupType,
+                          "appCookie": appCookie,
+                          "groupId": groupId,
+                          "buckets": bucketList
+                        }
+            return self.sendGroup( deviceId=deviceId, groupJson=groupJson, ip="DEFAULT", port="DEFAULT", debug=False )
+
+        except ( AttributeError, TypeError ):
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def sendGroup( self, deviceId, groupJson, ip="DEFAULT", port="DEFAULT", debug=False ):
+        """
+        Description:
+            Sends a single group to the specified device.
+        Required:
+            * deviceId: id of the device
+            * groupJson: the group in json
+        Returns:
+            Returns main.TRUE for successful requests; Returns main.FALSE
+            if error on requests;
+            Returns None for exceptions
+        NOTE:
+            The ip and port option are for the requests input's ip and port
+            of the ONOS node
+        """
+        try:
+            if debug: main.log.debug( "Adding group: " + self.pprint( groupJson ) )
+            output = None
+            if ip == "DEFAULT":
+                main.log.warn( "No ip given, reverting to ip from topo file" )
+                ip = self.ip_address
+            if port == "DEFAULT":
+                main.log.warn( "No port given, reverting to port " +
+                               "from topo file" )
+                port = self.port
+            url = "/groups/" + deviceId
+            response = self.send( method="POST",
+                                  url=url, ip = ip, port = port,
+                                  data=json.dumps( groupJson ) )
+            if response:
+                if "201" in str( response[ 0 ] ):
+                    main.log.info( self.name + ": Successfully POST group " +
+                                   "in device: " + str( deviceId ) )
+                    return main.TRUE
+                else:
+                    main.log.error( "Error with REST request, response was: " +
+                                    str( response ) )
+                    return main.FALSE
+        except NotImplementedError as e:
+            raise e  # Inform the caller
+        except ( AttributeError, TypeError ):
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def getGroups( self, deviceId=None, appCookie=None, ip="DEFAULT", port="DEFAULT" ):
+        """
+        Description:
+            Get all the groups or get a specific group by giving the
+            deviceId and appCookie
+        Optional:
+            * deviceId: id of the Device
+            * appCookie: Cookie of the Group
+        Returns:
+            Returns Groups for successful requests; Returns main.FALSE
+            if error on requests;
+            Returns None for exceptions
+        NOTE:
+            The ip and port option are for the requests input's ip and port
+            of the ONOS node
+        """
+        try:
+            output = None
+            if ip == "DEFAULT":
+                main.log.warn( "No ip given, reverting to ip from topo file" )
+                ip = self.ip_address
+            if port == "DEFAULT":
+                main.log.warn( "No port given, reverting to port " +
+                               "from topo file" )
+                port = self.port
+            url = "/groups"
+            if deviceId:
+                url += "/" + deviceId
+                if appCookie:
+                   url += "/" + appCookie
+            response = self.send( url=url, ip = ip, port = port )
+            if response:
+                if 200 <= response[ 0 ] <= 299:
+                    output = response[ 1 ]
+                    groupsJson = json.loads( output ).get( 'groups' )
+                    assert groupsJson is not None, "Error parsing json object"
+                    groups = json.dumps( groupsJson )
+                    return groups
+                else:
+                    main.log.error( "Error with REST request, response was: " +
+                                    str( response ) )
+                    return main.FALSE
+        except ( AttributeError, AssertionError, TypeError ):
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def removeGroup( self, deviceId, appCookie,
+                       ip="DEFAULT", port="DEFAULT" ):
+        """
+        Description:
+            Removes specific device group
+        Required:
+            * deviceId: id of the Device
+            * appCookie: Cookie of the Group
+        Returns:
+            Returns main.TRUE for successful requests; Returns main.FALSE
+            if error on requests;
+            Returns None for exceptions
+        NOTE:
+            The ip and port option are for the requests input's ip and port
+            of the ONOS node
+
+        """
+        try:
+            output = None
+            if ip == "DEFAULT":
+                main.log.warn( "No ip given, reverting to ip from topo file" )
+                ip = self.ip_address
+            if port == "DEFAULT":
+                main.log.warn( "No port given, reverting to port " +
+                               "from topo file" )
+                port = self.port
+            query = "/" + str( deviceId ) + "/" + str( appCookie )
+            response = self.send( method="DELETE",
+                                  url="/groups" + query, ip = ip, port = port )
+            if response:
+                if 200 <= response[ 0 ] <= 299:
+                    return main.TRUE
+                else:
+                    main.log.error( "Error with REST request, response was: " +
+                                    str( response ) )
+                    return main.FALSE
+        except ( AttributeError, TypeError ):
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
diff --git a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
index bcdbf33..49ceea8 100644
--- a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
@@ -130,7 +130,7 @@
             main.lastResult = main.TRUE
             return main.TRUE
         else:
-            main.log.error(
+            main.log.info(
                 self.name +
                 ": PACKET LOST, HOST IS NOT REACHABLE" )
             main.lastResult = main.FALSE
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 2d61501..90f79a9 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -587,11 +587,10 @@
                 main.log.info( self.name + ": no packets lost, host is reachable" )
                 return main.TRUE
             else:
-                main.log.error(
+                main.log.warn(
                     self.name +
                     ": PACKET LOST, HOST IS NOT REACHABLE" )
                 return main.FALSE
-
         except pexpect.EOF:
             main.log.error( self.name + ": EOF exception found" )
             main.log.error( self.name + ":     " + self.handle.before )
@@ -636,7 +635,7 @@
                 main.log.info( self.name + ": no packets lost, host is reachable" )
                 return main.TRUE
             else:
-                main.log.error(
+                main.log.info(
                     self.name +
                     ": PACKET LOST, HOST IS NOT REACHABLE" )
                 return main.FALSE
@@ -1603,7 +1602,7 @@
             main.log.info( self.name + ": Ping between two hosts SUCCESSFUL" )
             return main.TRUE
         else:
-            main.log.error( self.name + ": PACKET LOST, HOSTS NOT REACHABLE" )
+            main.log.info( self.name + ": PACKET LOST, HOSTS NOT REACHABLE" )
             return main.FALSE
 
     def link( self, **linkargs ):
diff --git a/TestON/drivers/common/cli/emulator/remotemininetdriver.py b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
index f4adb81..8788af0 100644
--- a/TestON/drivers/common/cli/emulator/remotemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
@@ -318,7 +318,7 @@
             main.lastResult = main.TRUE
             return main.TRUE
         else:
-            main.log.error(
+            main.log.info(
                 self.name +
                 ": PACKET LOST, HOST IS NOT REACHABLE" )
             main.lastResult = main.FALSE
@@ -345,7 +345,7 @@
                 main.lastResult = main.TRUE
                 return main.TRUE
             else:
-                main.log.error( "PACKET LOST, HOST IS NOT REACHABLE" )
+                main.log.info( "PACKET LOST, HOST IS NOT REACHABLE" )
                 main.lastResult = main.FALSE
                 return main.FALSE
         except pexpect.EOF:
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index b9d90ef..4052db2 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -249,14 +249,15 @@
         """
         self.onosIp = ONOSIp
         try:
+            # Check if we are already in the cli
             self.handle.sendline( "" )
             x = self.handle.expect( [
                 "\$", "onos>" ], commandlineTimeout)
-
             if x == 1:
                 main.log.info( "ONOS cli is already running" )
                 return main.TRUE
 
+            # Not in CLI so login
             if waitForStart:
                 # Wait for onos start ( -w ) and enter onos cli
                 startCliCommand = "onos -w "
@@ -396,7 +397,7 @@
             main.cleanup()
             main.exit()
 
-    def log( self, cmdStr, level="",noExit=False):
+    def log( self, cmdStr, level="", noExit=False ):
         """
             log  the commands in the onos CLI.
             returns main.TRUE on success
@@ -404,6 +405,7 @@
             if noExit is True, TestON will not exit, but clean up
             Available level: DEBUG, TRACE, INFO, WARN, ERROR
             Level defaults to INFO
+            if cmdStr has spaces then put quotes in the passed string
         """
         try:
             lvlStr = ""
@@ -1285,6 +1287,7 @@
             ethDst="",
             bandwidth="",
             lambdaAlloc=False,
+            protected=False,
             ipProto="",
             ipSrc="",
             ipDst="",
@@ -1351,6 +1354,8 @@
                 cmd += " --setVlan " + str( setVlan )
             if encap:
                 cmd += " --encapsulation " + str( encap )
+            if protected:
+                cmd += " --protect "
 
             # Check whether the user appended the port
             # or provided it as an input
@@ -2660,18 +2665,13 @@
         """
         try:
             # Obtain output of intents function
-            intentsStr = self.intents(jsonFormat=False)
+            intentsStr = self.intents(jsonFormat=True)
+            # Convert to a dictionary
+            intents = json.loads( intentsStr )
             intentIdList = []
-
-            # Parse the intents output for ID's
-            intentsList = [ s.strip() for s in intentsStr.splitlines() ]
-            for intents in intentsList:
-                match = re.search('id=0x([\da-f]+),', intents)
-                if match:
-                    tmpId = match.group()[3:-1]
-                    intentIdList.append( tmpId )
+            for intent in intents:
+                intentIdList.append( intent[ 'id' ] )
             return intentIdList
-
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
             return None
@@ -3373,7 +3373,7 @@
             main.cleanup()
             main.exit()
 
-    def partitions( self, jsonFormat=True ):
+    def partitions( self, candidates=False, jsonFormat=True ):
         """
         Returns the output of the raft partitions command for ONOS.
         """
@@ -3390,6 +3390,8 @@
         # },
         try:
             cmdStr = "onos:partitions"
+            if candidates:
+                cmdStr += " -c"
             if jsonFormat:
                 cmdStr += " -j"
             output = self.sendline( cmdStr )
@@ -4134,7 +4136,7 @@
             containsCheck = None
             # Patterns to match
             setPattern = "\[(.*)\]"
-            pattern = "Items in set " + setName + ":\n" + setPattern
+            pattern = "Items in set " + setName + ":\r\n" + setPattern
             containsTrue = "Set " + setName + " contains the value " + values
             containsFalse = "Set " + setName + " did not contain the value " +\
                             values
@@ -4170,11 +4172,11 @@
                 match = re.search( pattern, output )
             else:  # if given values
                 if length == 1:  # Contains output
-                    patternTrue = pattern + "\n" + containsTrue
-                    patternFalse = pattern + "\n" + containsFalse
+                    patternTrue = pattern + "\r\n" + containsTrue
+                    patternFalse = pattern + "\r\n" + containsFalse
                 else:  # ContainsAll output
-                    patternTrue = pattern + "\n" + containsAllTrue
-                    patternFalse = pattern + "\n" + containsAllFalse
+                    patternTrue = pattern + "\r\n" + containsAllTrue
+                    patternFalse = pattern + "\r\n" + containsAllFalse
                 matchTrue = re.search( patternTrue, output )
                 matchFalse = re.search( patternFalse, output )
                 if matchTrue:
@@ -4236,7 +4238,7 @@
             setName = str( setName ).strip()
             # Patterns to match
             setPattern = "\[(.*)\]"
-            pattern = "There are (\d+) items in set " + setName + ":\n" +\
+            pattern = "There are (\d+) items in set " + setName + ":\r\n" +\
                           setPattern
             cmdStr = "set-test-get -s "
             cmdStr += setName
@@ -4735,7 +4737,7 @@
             return main.TRUE
         except AssertionError:
             main.log.exception( "" )
-            return None
+            return main.FALSE
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
             return main.FALSE
@@ -4819,7 +4821,7 @@
             return main.TRUE
         except AssertionError:
             main.log.exception( "" )
-            return None
+            return main.FALSE
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
             return main.FALSE
@@ -4855,7 +4857,7 @@
             return main.TRUE
         except AssertionError:
             main.log.exception( "" )
-            return None
+            return main.FALSE
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
             return main.FALSE
@@ -4869,20 +4871,22 @@
             main.cleanup()
             main.exit()
 
-    def portstate(self, dpid='of:0000000000000102', port='2', state='enable'):
+    def portstate( self, dpid, port, state ):
         '''
         Description:
              Changes the state of port in an OF switch by means of the
              PORTSTATUS OF messages.
         params:
-            dpid - (string) Datapath ID of the device
-            port - (string) target port in the device
-            state - (string) target state (enable or disabled)
+            dpid - (string) Datapath ID of the device. Ex: 'of:0000000000000102'
+            port - (string) target port in the device. Ex: '2'
+            state - (string) target state (enable or disable)
         returns:
             main.TRUE if no exceptions were thrown and no Errors are
             present in the resoponse. Otherwise, returns main.FALSE
         '''
         try:
+            state = state.lower()
+            assert state == 'enable' or state == 'disable', "Unknown state"
             cmd =  "portstate {} {} {}".format( dpid, port, state )
             response = self.sendline( cmd, showResponse=True )
             assert response is not None, "Error in sendline"
@@ -4893,7 +4897,7 @@
             return main.TRUE
         except AssertionError:
             main.log.exception( "" )
-            return None
+            return main.FALSE
         except TypeError:
             main.log.exception( self.name + ": Object not as expected" )
             return main.FALSE
@@ -5044,30 +5048,54 @@
             return None
         return respDic
 
-    def logSearch( self, searchTerm, mode='all' ):
+    def logSearch( self, mode='all', searchTerm='', startLine='', logNum=1 ):
         """
         Searches the latest ONOS log file for the given search term and
         return a list that contains all the lines that have the search term.
 
         Arguments:
-            searchTerm - A string to grep for in the ONOS log.
+            searchTerm:
+                The string to grep from the ONOS log.
+            startLine:
+                The term that decides which line is the start to search the searchTerm in
+                the karaf log. For now, startTerm only works in 'first' mode.
+            logNum:
+                In some extreme cases, one karaf log is not big enough to contain all the
+                information.Because of this, search mutiply logs is necessary to capture
+                the right result. logNum is the number of karaf logs that we need to search
+                the searchTerm.
             mode:
                 all: return all the strings that contain the search term
                 last: return the last string that contains the search term
                 first: return the first string that contains the search term
-                num: return the number that the searchTerm appears in the log
+                num: return the number of times that the searchTerm appears in the log
+                total: return how many lines in karaf log
         """
         try:
             assert type( searchTerm ) is str
-            cmd = "cat /opt/onos/log/karaf.log | grep \'" + searchTerm + "\'"
+            #Build the log paths string
+            logPath = '/opt/onos/log/karaf.log.'
+            logPaths = '/opt/onos/log/karaf.log'
+            for i in range( 1, logNum ):
+                logPaths = logPath + str( i ) + " " + logPaths
+            cmd = "cat " + logPaths
+            if mode == 'all':
+                cmd = cmd + " | grep \'" + searchTerm + "\'"
             if mode == 'last':
-                cmd = cmd + " | tail -n 1"
+                cmd = cmd + " | grep \'" + searchTerm + "\'" + " | tail -n 1"
             if mode == 'first':
-                cmd = cmd + " | head -n 1"
+                if startLine != '':
+                    # 100000000 is just a extreme large number to make sure this function can grep all the lines after startLine
+                    cmd = cmd + " | grep -A 100000000 \'" + startLine + "\' | grep \'" + searchTerm + "\'" + "| head -n 1"
+                else:
+                    cmd = cmd + " | grep \'" + searchTerm + "\'" + " | head -n 1"
             if mode == 'num':
-                cmd = "cat /opt/onos/log/karaf.log | grep -c \'" + searchTerm + "\'"
+                cmd = cmd + " | grep -c \'" + searchTerm + "\'"
                 num = self.sendline( cmd )
                 return num
+            if mode == 'total':
+                totalLines = self.sendline( "cat /opt/onos/log/karaf.log | wc -l" )
+                return int(totalLines)
             before = self.sendline( cmd )
             before = before.splitlines()
             # make sure the returned list only contains the search term
@@ -5090,3 +5118,385 @@
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
+
+    def vplsShow( self, jsonFormat=True ):
+        """
+        Description: Returns result of onos:vpls show, which should list the
+                     configured VPLS networks and the assigned interfaces.
+        Optional:
+            * jsonFormat: enable json formatting of output
+        Returns:
+            The output of the command or None on error.
+        """
+        try:
+            cmdStr = "vpls show"
+            if jsonFormat:
+                raise NotImplementedError
+                cmdStr += " -j"
+            handle = self.sendline( cmdStr )
+            assert handle is not None, "Error in sendline"
+            assert "Command not found:" not in handle, handle
+            return handle
+        except AssertionError:
+            main.log.exception( "" )
+            return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except NotImplementedError:
+            main.log.exception( self.name + ": Json output not supported")
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def parseVplsShow( self ):
+        """
+        Parse the cli output of 'vpls show' into json output. This is required
+        as there is currently no json output available.
+        """
+        try:
+            output = []
+            raw = self.vplsShow( jsonFormat=False )
+            namePat = "VPLS name: (?P<name>\w+)"
+            interfacesPat = "Associated interfaces: \[(?P<interfaces>.*)\]"
+            encapPat = "Encapsulation: (?P<encap>\w+)"
+            pattern = "\s+".join( [ namePat, interfacesPat, encapPat ] )
+            mIter = re.finditer( pattern, raw )
+            for match in mIter:
+                item = {}
+                item[ 'name' ] = match.group( 'name' )
+                ifaces = match.group( 'interfaces' ).split( ', ')
+                if ifaces == [ "" ]:
+                    ifaces = []
+                item[ 'interfaces' ] = ifaces
+                encap = match.group( 'encap' )
+                if encap != 'NONE':
+                    item[ 'encapsulation' ] = encap.lower()
+                output.append( item )
+            return output
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsList( self, jsonFormat=True ):
+        """
+        Description: Returns result of onos:vpls list, which should list the
+                     configured VPLS networks.
+        Optional:
+            * jsonFormat: enable json formatting of output
+        """
+        try:
+            cmdStr = "vpls list"
+            if jsonFormat:
+                raise NotImplementedError
+                cmdStr += " -j"
+            handle = self.sendline( cmdStr )
+            assert handle is not None, "Error in sendline"
+            assert "Command not found:" not in handle, handle
+            return handle
+        except AssertionError:
+            main.log.exception( "" )
+            return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except NotImplementedError:
+            main.log.exception( self.name + ": Json output not supported")
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsCreate( self, network ):
+        """
+        CLI command to create a new VPLS network.
+        Required arguments:
+            network - String name of the network to create.
+        returns:
+            main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            network = str( network )
+            cmdStr = "vpls create "
+            cmdStr += network
+            output = self.sendline( cmdStr )
+            assert output is not None, "Error in sendline"
+            assert "Command not found:" not in output, output
+            assert "Error executing command" not in output, output
+            assert "VPLS already exists:" not in output, output
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsDelete( self, network ):
+        """
+        CLI command to delete a VPLS network.
+        Required arguments:
+            network - Name of the network to delete.
+        returns:
+            main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            network = str( network )
+            cmdStr = "vpls delete "
+            cmdStr += network
+            output = self.sendline( cmdStr )
+            assert output is not None, "Error in sendline"
+            assert "Command not found:" not in output, output
+            assert "Error executing command" not in output, output
+            assert " not found" not in output, output
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsAddIface( self, network, iface ):
+        """
+        CLI command to add an interface to a VPLS network.
+        Required arguments:
+            network - Name of the network to add the interface to.
+            iface - The ONOS name for an interface.
+        returns:
+            main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            network = str( network )
+            iface = str( iface )
+            cmdStr = "vpls add-if "
+            cmdStr += network + " " + iface
+            output = self.sendline( cmdStr )
+            assert output is not None, "Error in sendline"
+            assert "Command not found:" not in output, output
+            assert "Error executing command" not in output, output
+            assert "already associated to network" not in output, output
+            assert "Interface cannot be added." not in output, output
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsRemIface( self, network, iface ):
+        """
+        CLI command to remove an interface from a VPLS network.
+        Required arguments:
+            network - Name of the network to remove the interface from.
+            iface - Name of the interface to remove.
+        returns:
+            main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            iface = str( iface )
+            cmdStr = "vpls rem-if "
+            cmdStr += network + " " + iface
+            output = self.sendline( cmdStr )
+            assert output is not None, "Error in sendline"
+            assert "Command not found:" not in output, output
+            assert "Error executing command" not in output, output
+            assert "is not configured" not in output, output
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsClean( self ):
+        """
+        Description: Clears the VPLS app configuration.
+        Returns: main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            cmdStr = "vpls clean"
+            handle = self.sendline( cmdStr )
+            assert handle is not None, "Error in sendline"
+            assert "Command not found:" not in handle, handle
+            return handle
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def vplsSetEncap( self, network, encapType ):
+        """
+        CLI command to add an interface to a VPLS network.
+        Required arguments:
+            network - Name of the network to create.
+            encapType - Type of encapsulation.
+        returns:
+            main.TRUE on success and main.FALSE on failure
+        """
+        try:
+            network = str( network )
+            encapType = str( encapType ).upper()
+            assert encapType in [ "MPLS", "VLAN", "NONE" ], "Incorrect type"
+            cmdStr = "vpls set-encap "
+            cmdStr += network + " " + encapType
+            output = self.sendline( cmdStr )
+            assert output is not None, "Error in sendline"
+            assert "Command not found:" not in output, output
+            assert "Error executing command" not in output, output
+            assert "already associated to network" not in output, output
+            assert "Encapsulation type " not in output, output
+            return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return main.FALSE
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def interfaces( self, jsonFormat=True ):
+        """
+        Description: Returns result of interfaces command.
+        Optional:
+            * jsonFormat: enable json formatting of output
+        Returns:
+            The output of the command or None on error.
+        """
+        try:
+            cmdStr = "interfaces"
+            if jsonFormat:
+                #raise NotImplementedError
+                cmdStr += " -j"
+            handle = self.sendline( cmdStr )
+            assert handle is not None, "Error in sendline"
+            assert "Command not found:" not in handle, handle
+            return handle
+        except AssertionError:
+            main.log.exception( "" )
+            return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except NotImplementedError:
+            main.log.exception( self.name + ": Json output not supported")
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def getTimeStampFromLog( self, mode, searchTerm, splitTerm_before, splitTerm_after, startLine='', logNum=1 ):
+        '''
+        Get the timestamp of searchTerm from karaf log.
+
+        Arguments:
+            splitTerm_before and splitTerm_after:
+
+                The terms that split the string that contains the timeStamp of
+                searchTerm. For example, if that string is "xxxxxxxcreationTime =
+                1419510501xxxxxx", then the splitTerm_before is "CreationTime = "
+                and the splitTerm_after is "x"
+
+            others:
+
+                plz look at the "logsearch" Function in onosclidriver.py
+
+
+        '''
+        if logNum < 0:
+            main.log.error("Get wrong log number ")
+            return main.ERROR
+        lines = self.logSearch( mode=mode, searchTerm=searchTerm, startLine=startLine, logNum=logNum )
+        if len(lines) == 0:
+            main.log.warn( "Captured timestamp string is empty" )
+            return main.ERROR
+        lines = lines[ 0 ]
+        try:
+            assert type(lines) is str
+            # get the target value
+            line = lines.split( splitTerm_before )
+            key = line[ 1 ].split( splitTerm_after )
+            return int( key[ 0 ] )
+        except IndexError:
+            main.log.warn( "Index Error!" )
+            return main.ERROR
+        except AssertionError:
+            main.log.warn( "Search Term Not Found " )
+            return main.ERROR
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 644b9f7..9c9e70d 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -727,7 +727,7 @@
             main.exit()
 
     def createCellFile( self, benchIp, fileName, mnIpAddrs,
-                        appString, onosIpAddrs, onosUser="sdn", useSSH=False ):
+                        appString, onosIpAddrs, onosUser="sdn", useSSH=True ):
         """
         Creates a cell file based on arguments
         Required:
@@ -745,44 +745,43 @@
         NOTE: Assumes cells are located at:
             ~/<self.home>/tools/test/cells/
         """
-        # Variable initialization
-        cellDirectory = self.home + "/tools/test/cells/"
-        # We want to create the cell file in the dependencies directory
-        # of TestON first, then copy over to ONOS bench
-        tempDirectory = "/tmp/"
-        # Create the cell file in the directory for writing ( w+ )
-        cellFile = open( tempDirectory + fileName, 'w+' )
-        if isinstance( onosIpAddrs, types.StringType ):
-            onosIpAddrs = [ onosIpAddrs ]
-
-        # App string is hardcoded environment variables
-        # That you may wish to use by default on startup.
-        # Note that you  may not want certain apps listed
-        # on here.
-        appString = "export ONOS_APPS=" + appString
-        onosGroup = "export ONOS_GROUP=" + onosUser
-        onosUser = "export ONOS_USER=" + onosUser
-        # FIXME: unset ONOS_USE_SSH when not using SSH?
-        if useSSH:
-            onosUseSSH = "export ONOS_USE_SSH=true"
-        mnString = "export OCN="
-        if mnIpAddrs == "":
-            mnString = ""
-        onosString = "export OC"
-        tempCount = 1
-
-        # Create ONOSNIC ip address prefix
-        tempOnosIp = str( onosIpAddrs[ 0 ] )
-        tempList = []
-        tempList = tempOnosIp.split( "." )
-        # Omit last element of list to format for NIC
-        tempList = tempList[ :-1 ]
-        # Structure the nic string ip
-        nicAddr = ".".join( tempList ) + ".*"
-        self.nicAddr = nicAddr
-        onosNicString = "export ONOS_NIC=" + nicAddr
-
         try:
+            # Variable initialization
+            cellDirectory = self.home + "/tools/test/cells/"
+            # We want to create the cell file in the dependencies directory
+            # of TestON first, then copy over to ONOS bench
+            tempDirectory = "/tmp/"
+            # Create the cell file in the directory for writing ( w+ )
+            cellFile = open( tempDirectory + fileName, 'w+' )
+            if isinstance( onosIpAddrs, types.StringType ):
+                onosIpAddrs = [ onosIpAddrs ]
+
+            # App string is hardcoded environment variables
+            # That you may wish to use by default on startup.
+            # Note that you  may not want certain apps listed
+            # on here.
+            appString = "export ONOS_APPS=" + appString
+            onosGroup = "export ONOS_GROUP=" + onosUser
+            onosUser = "export ONOS_USER=" + onosUser
+            if useSSH:
+                onosUseSSH = "export ONOS_USE_SSH=true"
+            mnString = "export OCN="
+            if mnIpAddrs == "":
+                mnString = ""
+            onosString = "export OC"
+            tempCount = 1
+
+            # Create ONOSNIC ip address prefix
+            tempOnosIp = str( onosIpAddrs[ 0 ] )
+            tempList = []
+            tempList = tempOnosIp.split( "." )
+            # Omit last element of list to format for NIC
+            tempList = tempList[ :-1 ]
+            # Structure the nic string ip
+            nicAddr = ".".join( tempList ) + ".*"
+            self.nicAddr = nicAddr
+            onosNicString = "export ONOS_NIC=" + nicAddr
+
             # Start writing to file
             cellFile.write( onosNicString + "\n" )
 
@@ -2124,7 +2123,36 @@
 
         return sorted( self.onosIps.values() )
 
-    def logReport( self, nodeIp, searchTerms, outputMode="s" ):
+    def listLog( self, nodeIp ):
+        """
+            Get a list of all the karaf log names
+        """
+        try:
+            cmd = "onos-ssh " + nodeIp + " ls -tr /opt/onos/log"
+            self.handle.sendline( cmd )
+            self.handle.expect( ":~" )
+            before = self.handle.before.splitlines()
+            logNames = []
+            for word in before:
+                if 'karaf.log' in word:
+                    logNames.append( word )
+            return logNames
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except pexpect.TIMEOUT:
+            main.log.error( self.name + ": TIMEOUT exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def logReport( self, nodeIp, searchTerms, outputMode="s", startStr=None, endStr=None ):
         """
         Searches the latest ONOS log file for the given search terms and
         prints the total occurances of each term. Returns to combined total of
@@ -2141,6 +2169,10 @@
                            number of occurances of each term. Defaults to 's',
                            which prints the simple output of just the number
                            of occurances for each term.
+            * startStr - the start string to be given to stream editor command
+                         as the start point for extraction of data
+            * endStr -  the end string to be given to stream editor command as
+                        the end point for extraction of data
         """
         try:
             main.log.info( " Log Report for {} ".format( nodeIp ).center( 70, '=' ) )
@@ -2154,7 +2186,14 @@
             for termIndex in range( numTerms ):
                 term = searchTerms[termIndex]
                 logLines.append( [term] )
-                cmd = "onos-ssh " + nodeIp + " cat /opt/onos/log/karaf.log | grep " + term
+                if startStr and endStr:
+                    cmd = "onos-ssh {} \"sed -n '/{}/,/{}/p' /opt/onos/log/karaf.log | grep {}\"".format( nodeIp,
+                                                                                                          startStr,
+                                                                                                          endStr,
+                                                                                                          term )
+                else:
+                    cmd = "onos-ssh {} cat /opt/onos/log/karaf.log | grep {}".format( nodeIp,
+                                                                                      term )
                 self.handle.sendline( cmd )
                 self.handle.expect( ":~" )
                 before = self.handle.before.splitlines()
@@ -2379,7 +2418,7 @@
         except Exception:
             main.log.exception( "Uncaught exception" )
 
-    def startBasicONOS( self, nodeList, opSleep=60, onosStartupSleep=60 ):
+    def startBasicONOS( self, nodeList, opSleep=60, onosStartupSleep=30 ):
         '''
         Start onos cluster with defined nodes, but only with drivers app
         '''
@@ -2398,9 +2437,17 @@
         main.log.info( self.name + ": Creating ONOS package" )
         packageResult = self.buckBuild( timeout=opSleep )
 
+        main.log.info( self.name + ": Uninstalling ONOS" )
+        for nd in nodeList:
+            self.onosUninstall( nodeIp=nd )
+
         main.log.info( self.name + ": Installing ONOS package" )
         for nd in nodeList:
-                    self.onosInstall( node=nd )
+            self.onosInstall( node=nd )
+
+        main.log.info( self.name + ": Set up ONOS secure SSH" )
+        for nd in nodeList:
+            self.onosSecureSSH( node=nd )
 
         main.log.info( self.name + ": Starting ONOS service" )
         time.sleep( onosStartupSleep )
diff --git a/TestON/requirements.txt b/TestON/requirements.txt
index 86c8741..28f7503 100644
--- a/TestON/requirements.txt
+++ b/TestON/requirements.txt
@@ -11,3 +11,4 @@
 pylint==1.1.0
 requests==2.2.1
 scapy==2.3.1
+ipaddress==1.0.16
diff --git a/TestON/tests/CHO/CHOtest/CHOtest.py b/TestON/tests/CHO/CHOtest/CHOtest.py
index 411035d..41f1693 100644
--- a/TestON/tests/CHO/CHOtest/CHOtest.py
+++ b/TestON/tests/CHO/CHOtest/CHOtest.py
@@ -134,16 +134,6 @@
                                      onfail="Test step FAIL" )
             installResult = ( installResult and i_result )
 
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.onosIPs[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus( node=main.onosIPs[i] )
-            utilities.assert_equals( expect=main.TRUE, actual=onos_status,
-                                     onpass="Test step PASS",
-                                     onfail="Test step FAIL" )
-            statusResult = ( statusResult and onos_status )
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -152,6 +142,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( 5 )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index ec64601..78bed55 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -147,16 +147,6 @@
                                      onfail="Test step FAIL" )
             installResult = ( installResult and iResult )
 
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.onosIPs[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus( node=main.onosIPs[i] )
-            utilities.assert_equals( expect=main.TRUE, actual=onos_status,
-                                     onpass="Test step PASS",
-                                     onfail="Test step FAIL" )
-            statusResult = ( statusResult and onos_status )
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -165,6 +155,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( 5 )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         startCliResult  = main.TRUE
diff --git a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 282e623..9d049fc 100755
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -41,6 +41,7 @@
         """
 
         import os
+
         main.log.info( "ONOS Single node start " +
                          "Scapy Tool - initialization" )
         main.case( "Setting up test environment" )
@@ -128,30 +129,30 @@
 
         main.step( "Installing ONOS package" )
         onosInstallResult = main.ONOSbench.onosInstall(
-                options="-f", node=main.nodes[0].ip_address )
+                options="-f", node=main.nodes[ 0 ].ip_address )
         utilities.assert_equals( expect=main.TRUE, actual=onosInstallResult,
                                  onpass="ONOS install successful",
                                  onfail="ONOS install failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[ 0 ].ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                     onpass="Test step PASS",
+                                     onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         print main.nodes[0].ip_address
         for i in range( 2 ):
-            onos1Isup = main.ONOSbench.isup( main.nodes[0].ip_address )
+            onos1Isup = main.ONOSbench.isup( main.nodes[ 0 ].ip_address )
             if onos1Isup:
                 break
         utilities.assert_equals( expect=main.TRUE, actual=onos1Isup,
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
-        print main.nodes[0].ip_address
-        cliResults = main.ONOScli1.startOnosCli( main.nodes[0].ip_address )
+        print main.nodes[ 0 ].ip_address
+        cliResults = main.ONOScli1.startOnosCli( main.nodes[ 0 ].ip_address )
         utilities.assert_equals( expect=main.TRUE, actual=cliResults,
                                  onpass="ONOS cli startup successful",
                                  onfail="ONOS cli startup failed" )
@@ -160,8 +161,8 @@
         appCheck = main.ONOScli1.appToIDCheck()
 
         if appCheck !=main.TRUE:
-            main.log.warn( main.CLIs[0].apps() )
-            main.log.warn( main.CLIs[0].appIDs() )
+            main.log.warn( main.CLIs[ 0 ].apps() )
+            main.log.warn( main.CLIs[ 0 ].appIDs() )
             utilities.assert_equals( expect=main.TRUE, actual=appCheck,
                                  onpass="App Ids seem to be correct",
                                  onfail="Something is wrong with app Ids" )
@@ -170,10 +171,6 @@
             main.cleanup()
             main.exit()
 
-
-
-
-
     def CASE2( self, main ):
         """
         Discovery the topology using BGPLS
@@ -183,6 +180,7 @@
         import time
 
         main.case( "Testcase 2 : Discovery the Network Topology using BGPLS" )
+        main.ONOScli1.log( "\"testcase2 start\"" )
 
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
@@ -218,7 +216,7 @@
         bgplsConfig.Comments()
 
         bgplsConfig.Comments()
-        main.log.info( "Sending BGPLS information " )
+        main.log.info( "Sending BGPLS information" )
         bgplsConfig.Comments()
 
 
@@ -249,24 +247,30 @@
         bgplsConfig.Comments()
 
         print (bgpls_post)
-        main.ONOSrest.user_name = "karaf"
-        main.ONOSrest.pwd = "karaf"
+        main.ONOSrest.user_name = "onos"
+        main.ONOSrest.pwd = "rocks"
         Poststatus, result = main.ONOSrest.send( '/network/configuration/', method="POST", data=bgpls_post)
         main.step( "Configure BGP through RESTCONF" )
 
-        utilities.assert_equals(
-                expect='200',
-                actual=Poststatus,
-                onpass="Post Port Success",
-                onfail="Post Port Failed " + str( Poststatus ) + "," + str( result ) )
+        utilities.assert_equals( expect='200',
+                                 actual=Poststatus,
+                                 onpass="Post Port Success",
+                                 onfail="Post Port Failed " + str( Poststatus ) + "," + str( result ) )
 
 
         bgplsConfig.Comments()
-        main.log.info( "Check Network devices are Updated in ONOS " )
+        main.step( "Check Network devices are Updated in ONOS " )
         bgplsConfig.Comments()
         time.sleep(15)
-
         response = main.ONOScli1.devices()
+        responseCheck = main.FALSE
+        if response:
+            responseCheck = main.TRUE
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=responseCheck,
+                                 onpass="Network Devices update in ONOS successful",
+                                 onfail="Network Devices update in ONOS failed" )
+
         main.step( "Check the nodes are discovered" )
         if response.find( Ne_id[1][0]) and response.find(Ne_id[1][1]) and response.find(Ne_id[1][2]) != -1:
             stepResult = main.TRUE
@@ -276,8 +280,17 @@
                                  actual=stepResult,
                                  onpass="Node " + str( Ne_id[1][0]) + ( Ne_id[1][1]) + ( Ne_id[1][2]) + "  sucess",
                                  onfail="Node " + str( Ne_id[1][0]) + ( Ne_id[1][1]) + ( Ne_id[1][2]) + " failed" )
+        main.ONOScli1.log( "\"testcase2 end\"" )
 
-
+        main.step( "Check for Errors or Exception in testcase2" )
+        startStr = "testcase2 start"
+        endStr = "testcase2 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase2",
+                                 onfail="Exception or Error occured in testcase2" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -285,9 +298,6 @@
         main.Scapy1.handle.sendline( "\x03" )
         time.sleep( 90 ) #This Sleep time gives time for the socket to close.
 
-
-
-
     def CASE3( self, main ):
         """
         Addition of new Node to existing topology
@@ -297,6 +307,7 @@
         import time
 
         main.case( "Testcase 3: Addition of New Node to existing topology" )
+        main.ONOScli1.log( "\"testcase3 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -360,11 +371,17 @@
         bgplsConfig.Comments()
 
         bgplsConfig.Comments()
-        main.log.info( "Check Network devices are Updated in ONOS " )
+        main.step( "Check Network devices are Updated in ONOS" )
         bgplsConfig.Comments()
         time.sleep(120)
-
         response = main.ONOScli1.devices()
+        responseCheck = main.FALSE
+        if response:
+            responseCheck = main.TRUE
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=responseCheck,
+                                 onpass="Network Devices update in ONOS successful",
+                                 onfail="Network Devices update in ONOS failed" )
         main.step( "Check Newly added Node is getting updated" )
 
         if response.find( Ne_id[1][3]) != -1:
@@ -375,13 +392,23 @@
                                  actual=stepResult,
                                  onpass="Node " + str( Ne_id[ 1 ][ 3 ] ) + " update  sucess",
                                  onfail="Node " + str( Ne_id[ 1 ][ 3 ] ) + " update failed" )
+        main.ONOScli1.log( "\"testcase3 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase3" )
+        startStr = "testcase3 start"
+        endStr = "testcase3 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase3",
+                                 onfail="Exception or Error occured in testcase3" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
         main.Scapy1.handle.sendline( "\x03" )
         time.sleep( 90 ) #This Sleep time gives time for the socket to close.
 
-
     def CASE4( self, main ):
         """
         Verification of Links in existing topology
@@ -390,6 +417,7 @@
         import time
         import os
         main.case( "Testcase 4: Verification of Links thats is discovered" )
+        main.ONOScli1.log( "\"testcase4 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -436,7 +464,7 @@
                                  onpass="Install onos-app-bgp successful",
                                  onfail="Install onos-app-bgp failed" )
         bgplsConfig.Comments()
-        main.log.info( "Checking the Link Discovery Status" )
+        main.step( "Checking the Link Discovery Status" )
         bgplsConfig.Comments()
         time.sleep( 120 )   # Time taken to discovery the links
         response = main.ONOScli1.links()
@@ -445,10 +473,20 @@
 
         if check_link == True:
             reply_Check_Link = main.TRUE
-        utilities.assert_equals( expect= main.TRUE,
-                                     actual=reply_Check_Link ,
-                                     onpass="Link  Discovery Success.",
-                                     onfail="Link  Discovery Failed." )
+        utilities.assert_equals( expect= main.TRUE, actual=reply_Check_Link,
+                                 onpass="Link Discovery Success.",
+                                 onfail="Link Discovery Failed." )
+        main.ONOScli1.log( "\"testcase4 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase4 " )
+        startStr = "testcase4 start"
+        endStr = "testcase4 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect= 0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase4",
+                                 onfail="Exception or Error occured in testcase4" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -463,6 +501,8 @@
         import time
         import os
         main.case( "Testcase 5: Deletion of Link in existing topology" )
+
+        main.ONOScli1.log( "\"testcase5 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -494,7 +534,7 @@
 
         main.Scapy1.handle.sendline( "sudo python  OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py" )
         bgplsConfig.Comments()
-        main.log.info( "Enable BGPlS plugin in ONOS" )
+        main.log.info( "Enable BGPlS plugin in ONOS " )
         bgplsConfig.Comments()
 
         main.step( "UnInstall onos-app-bgp" )
@@ -509,7 +549,7 @@
                                  onpass="Install onos-app-bgp successful",
                                  onfail="Install onos-app-bgp failed" )
         bgplsConfig.Comments()
-        main.log.info( "Checking whether the links is deleted" )
+        main.step( "Checking whether the links is deleted" )
         bgplsConfig.Comments()
         time.sleep( 120 )  # Time taken to discovery the links
         response = main.ONOScli1.links()
@@ -517,10 +557,20 @@
         check_link = bgplsConfig.checkLinks( linksResp )
         if check_link == False:
             reply_Check_Link = main.TRUE
-        utilities.assert_equals( expect= main.TRUE,
-                                     actual=reply_Check_Link ,
-                                     onpass="Link  is Deleted Successfully.",
-                                     onfail="Link  is Deletion Failed." )
+        utilities.assert_equals( expect= main.TRUE, actual=reply_Check_Link,
+                                 onpass="Link is Deleted Successfully.",
+                                 onfail="Link is Deletion Failed." )
+        main.ONOScli1.log( "\"testcase5 end\"" )
+
+        main.step( "Check for Errors or Exception in testcase5" )
+        startStr = "testcase5 start"
+        endStr = "testcase5 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase5",
+                                 onfail="Exception or Error occured in testcase5" )
         bgplsConfig.Comments()
         main.log.info( "Kill Scapy process" )
         bgplsConfig.Comments()
@@ -535,7 +585,8 @@
         import re
         import time
 
-        main.case( "TestCase 5: UnInstalling of app" )
+        main.case( "TestCase 6: UnInstalling of app" )
+        main.ONOScli1.log( "\"testcase6 start\"" )
         try:
             from tests.FUNC.FUNCbgpls.dependencies.Nbdata import BgpLs
         except ImportError:
@@ -575,7 +626,7 @@
         cellResult = main.ONOSbench.setCell( cellName )
 
         bgplsConfig.Comments()
-        main.log.info( "Logging into ONOS CLI " )
+        main.step( "Logging into ONOS CLI " )
         bgplsConfig.Comments()
 
         cliResults = main.ONOScli1.startOnosCli( main.nodes[0].ip_address )
@@ -592,9 +643,20 @@
                                  onpass="Uninstall  onos-app-bgp successful",
                                  onfail="Uninstall  onos-app-bgp failed" )
 
-        main.log.info( "Check for Errors or Exception End of the Script" )
-        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address, ["ERROR",\
-                                            "EXCEPT"] )
-        utilities.assert_equals( expect= 0, actual=errorLog,
+        main.ONOScli1.log( "\"testcase6 end\"" )
+        main.step( "Check for Errors or Exception in testcase6" )
+        startStr = "testcase6 start"
+        endStr = "testcase6 end"
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"], "s",
+                                             startStr, endStr )
+        utilities.assert_equals( expect=0, actual=errorLog,
+                                 onpass="No Exception or Error occured in testcase6",
+                                 onfail="Exception or Error occured in testcase6" )
+
+        main.step( "Check for Errors or Exception End of the Script" )
+        errorLog = main.ONOSbench.logReport( main.nodes[0].ip_address,
+                                             ["ERROR","EXCEPT"] )
+        utilities.assert_equals( expect=0, actual=errorLog,
                                  onpass="No Exception or Error occured",
                                  onfail="Exception or Error occured" )
diff --git a/TestON/tests/FUNC/FUNCflow/FUNCflow.py b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
index 1acc76a..df64bb4 100644
--- a/TestON/tests/FUNC/FUNCflow/FUNCflow.py
+++ b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
@@ -175,6 +175,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -200,14 +208,6 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params
new file mode 100644
index 0000000..585eca3
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params
@@ -0,0 +1,66 @@
+
+<PARAMS>
+    # CASE - Description
+    # 1    - Variable initialization and optional pull and build ONOS package
+    # 2    - install ONOS
+    # 3    - Start mininet and verify topology
+    # 4    - Testing Scapy
+    # 5    - Testing GROUP with type "ALL"
+    # 6    - Deleting the Group and Flow
+    # 7    - Testing GROUP with type "INDIRECT"
+    # 8    - Deleting the group and flow
+    # 100  - Check logs for Errors and Warnings
+    <testcases>1,2,3,5,6,7,8,100</testcases>
+
+    <SCALE>
+        <max>1</max>
+    </SCALE>
+
+    <DEBUG>on</DEBUG>
+
+    <DEPENDENCY>
+        <path>/tests/FUNC/FUNCgroup/dependencies/</path>
+        <wrapper1>startUp</wrapper1>
+        <wrapper2>topo</wrapper2>
+        <topology>topo-group.py</topology>
+        <bucket>group-bucket</bucket>
+    </DEPENDENCY>
+
+    <ENV>
+        <cellName>productionCell</cellName>
+        <cellApps>drivers,openflow</cellApps>
+    </ENV>
+
+    <GIT>
+        <pull>False</pull>
+        <branch>master</branch>
+    </GIT>
+
+    <CTRL>
+        <port>6653</port>
+    </CTRL>
+
+    <TEST>
+     <swDPID>of:0000000000000001</swDPID>
+     <waitTime>200</waitTime>
+     <appCookie>0x1234abcd</appCookie>
+     <type1>ALL</type1>
+     <type2>INDIRECT</type2>
+     <groupId>1</groupId>
+     <priority>38000</priority>
+     <ingressPort>1</ingressPort>
+     <egressPort1>2</egressPort1>
+     <egressPort2>3</egressPort2>
+     <egressPort3>4</egressPort3>
+    </TEST>
+
+    <SLEEP>
+        <startup>15</startup>
+        <startMN>5</startMN>
+        <addFlow>10</addFlow>
+        <delFlow>10</delFlow>
+        <addGroup>10</addGroup>
+        <delGroup>10</delGroup>
+    </SLEEP>
+
+</PARAMS>
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py
new file mode 100644
index 0000000..4eb2fb8
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py
@@ -0,0 +1,748 @@
+class FUNCgroup:
+
+    def __init__( self ):
+        self.default = ''
+
+    def CASE1( self, main ):
+        import os
+        import imp
+
+        """
+        - Construct tests variables
+        - GIT ( optional )
+            - Checkout ONOS master branch
+            - Pull latest ONOS code
+        - Building ONOS ( optional )
+            - Install ONOS package
+            - Build ONOS package
+        """
+        main.case( "Constructing test variables and building ONOS package" )
+        main.step( "Constructing test variables" )
+
+        # Test variables
+        main.testOnDirectory = os.path.dirname( os.getcwd ( ) )
+        main.cellName = main.params[ 'ENV' ][ 'cellName' ]
+        main.apps = main.params[ 'ENV' ][ 'cellApps' ]
+        gitBranch = main.params[ 'GIT' ][ 'branch' ]
+        gitPull = main.params[ 'GIT' ][ 'pull' ]
+        main.ONOSport = main.params[ 'CTRL' ][ 'port' ]
+        main.dependencyPath = main.testOnDirectory + \
+                              main.params[ 'DEPENDENCY' ][ 'path' ]
+        wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
+        wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
+        main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
+        bucket = main.params[ 'DEPENDENCY' ][ 'bucket' ]
+        main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
+        main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
+        main.startMNSleep = int( main.params[ 'SLEEP' ][ 'startMN' ] )
+        main.addFlowSleep = int( main.params[ 'SLEEP' ][ 'addFlow' ] )
+        main.delFlowSleep = int( main.params[ 'SLEEP' ][ 'delFlow' ] )
+        main.addGroupSleep = int( main.params[ 'SLEEP' ][ 'addGroup' ] )
+        main.delGroupSleep = int( main.params[ 'SLEEP' ][ 'delGroup' ] )
+        main.debug = main.params[ 'DEBUG' ]
+        main.swDPID = main.params[ 'TEST' ][ 'swDPID' ]
+        egressPort1 = main.params[ 'TEST' ][ 'egressPort1' ]
+        egressPort2 = main.params[ 'TEST' ][ 'egressPort2' ]
+        egressPort3 = main.params[ 'TEST' ][ 'egressPort3' ]
+        ingressPort = main.params[ 'TEST' ][ 'ingressPort' ]
+        appCookie = main.params[ 'TEST' ][ 'appCookie' ]
+        type1 = main.params[ 'TEST' ][ 'type1' ]
+        type2 = main.params[ 'TEST' ][ 'type2' ]
+        groupId = main.params[ 'TEST' ][ 'groupId' ]
+        priority = main.params[ 'TEST' ][ 'priority' ]
+        deviceId = main.params[ 'TEST' ][ 'swDPID' ]
+
+        main.cellData = { } # for creating cell file
+        main.CLIs = [ ]
+        main.ONOSip = [ ]
+
+        main.debug = True if "on" in main.debug else False
+
+        main.ONOSip = main.ONOSbench.getOnosIps( )
+
+        # Assigning ONOS cli handles to a list
+        for i in range( 1,  main.maxNodes + 1 ):
+            main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+
+        # -- INIT SECTION, ONLY RUNS ONCE -- #
+        main.startUp = imp.load_source( wrapperFile1,
+                                        main.dependencyPath +
+                                        wrapperFile1 +
+                                        ".py" )
+
+        main.topo = imp.load_source( wrapperFile2,
+                                     main.dependencyPath +
+                                     wrapperFile2 +
+                                     ".py" )
+
+        main.buckets = imp.load_source( bucket,
+                                        main.dependencyPath +
+                                        bucket +
+                                        ".py" )
+
+        copyResult = main.ONOSbench.scp( main.Mininet1,
+                                         main.dependencyPath + main.topology,
+                                         main.Mininet1.home + '/custom/',
+                                         direction="to" )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=copyResult,
+                                 onpass="Successfully copy " + "test variables ",
+                                 onfail="Failed to copy test variables" )
+
+        if main.CLIs:
+            stepResult = main.TRUE
+        else:
+            main.log.error( "Did not properly created list of ONOS CLI handle" )
+            stepResult = main.FALSE
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully construct " + "test variables ",
+                                 onfail="Failed to construct test variables" )
+
+        if gitPull == 'True':
+            main.step( "Building ONOS in " + gitBranch + " branch" )
+            onosBuildResult = main.startUp.onosBuild( main, gitBranch )
+            stepResult = onosBuildResult
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=stepResult,
+                                     onpass="Successfully compiled " + "latest ONOS",
+                                     onfail="Failed to compile " + "latest ONOS" )
+        else:
+            main.log.warn( "Did not pull new code so skipping mvn " +
+                           "clean install" )
+
+    def CASE2( self, main ):
+        """
+        - Set up cell
+            - Create cell file
+            - Set cell file
+            - Verify cell file
+        - Kill ONOS process
+        - Uninstall ONOS cluster
+        - Verify ONOS start up
+        - Install ONOS cluster
+        - Connect to cli
+        """
+        import time
+
+        main.numCtrls = int( main.maxNodes )
+
+        main.case( "Starting up " + str( main.numCtrls ) +
+                   " node(s) ONOS cluster" )
+
+        #kill off all onos processes
+        main.log.info( "Safety check, killing all ONOS processes" +
+                       " before initiating environment setup" )
+
+        for i in range( main.maxNodes ):
+            main.ONOSbench.onosDie( main.ONOSip[ i ] )
+
+        main.log.info( "NODE COUNT = " + str( main.numCtrls ) )
+
+        tempOnosIp = [ ]
+        for i in range( main.numCtrls ):
+            tempOnosIp.append( main.ONOSip[ i ] )
+
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address,
+                                       "temp",
+                                       main.Mininet1.ip_address,
+                                       main.apps,
+                                       tempOnosIp )
+
+        main.step( "Apply cell to environment" )
+        cellResult = main.ONOSbench.setCell( "temp" )
+        verifyResult = main.ONOSbench.verifyCell( )
+        stepResult = cellResult and verifyResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully applied cell to " + "environment",
+                                 onfail="Failed to apply cell to environment " )
+
+        main.step( "Creating ONOS package" )
+        packageResult = main.ONOSbench.buckBuild()
+        stepResult = packageResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully created ONOS package",
+                                 onfail="Failed to create ONOS package" )
+
+        time.sleep( main.startUpSleep )
+        main.step( "Uninstalling ONOS package" )
+        onosUninstallResult = main.TRUE
+        for ip in main.ONOSip:
+            onosUninstallResult = onosUninstallResult and \
+                    main.ONOSbench.onosUninstall( nodeIp=ip )
+        stepResult = onosUninstallResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully uninstalled ONOS package",
+                                 onfail="Failed to uninstall ONOS package" )
+        time.sleep( main.startUpSleep )
+        main.step( "Installing ONOS package" )
+        onosInstallResult = main.TRUE
+        for i in range( main.numCtrls ):
+            onosInstallResult = onosInstallResult and \
+                    main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
+        stepResult = onosInstallResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully installed ONOS package",
+                                 onfail="Failed to install ONOS package" )
+
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
+        main.step( "Start ONOS cli" )
+        cliResult = main.TRUE
+        for i in range( main.numCtrls ):
+            cliResult = cliResult and \
+                        main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
+        stepResult = cliResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully start ONOS cli",
+                                 onfail="Failed to start ONOS cli" )
+
+    def CASE3( self, main ):
+        '''
+            Start Mininet
+        '''
+        import json
+
+        main.case( "Setup mininet and compare ONOS topology view to Mininet topology" )
+        main.caseExplanation = "Start mininet with custom topology and compare topology " +\
+                "elements between Mininet and ONOS"
+
+        main.step( "Setup Mininet Topology" )
+        topology = main.Mininet1.home + '/custom/' + main.topology
+        stepResult = main.Mininet1.startNet( topoFile = topology )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
+
+        main.step( "Assign switch to controller" )
+        stepResult = main.Mininet1.assignSwController( "s1", main.ONOSip[0] )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully assigned switch to controller",
+                                 onfail="Failed to assign switch to controller" )
+
+        time.sleep( main.startMNSleep )
+
+        main.step( "Comparing MN topology to ONOS topology" )
+        main.log.info( "Gathering topology information" )
+        devices = main.topo.getAllDevices( main )
+        hosts = main.topo.getAllHosts( main )
+        ports = main.topo.getAllPorts( main )
+        links = main.topo.getAllLinks( main )
+
+        mnSwitches = main.Mininet1.getSwitches( )
+        mnLinks = main.Mininet1.getLinks( )
+        mnHosts = main.Mininet1.getHosts( )
+
+        for controller in range( main.numCtrls ):
+            controllerStr = str( controller + 1 )
+            if devices[ controller ] and ports[ controller ] and\
+                "Error" not in devices[ controller ] and\
+                "Error" not in ports[ controller ]:
+
+                currentDevicesResult = main.Mininet1.compareSwitches(
+                        mnSwitches,
+                        json.loads( devices[ controller ] ),
+                        json.loads( ports[ controller ] ) )
+            else:
+                currentDevicesResult = main.FALSE
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=currentDevicesResult,
+                                     onpass="ONOS" + controllerStr +
+                                            " Switches view is correct",
+                                     onfail="ONOS" + controllerStr +
+                                            " Switches view is incorrect" )
+            if links[ controller ] and "Error" not in links[ controller ]:
+                currentLinksResult = main.Mininet1.compareLinks(
+                        mnSwitches, mnLinks,
+                        json.loads( links[ controller ] ) )
+            else:
+                currentLinksResult = main.FALSE
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=currentLinksResult,
+                                     onpass="ONOS" + controllerStr +
+                                            " links view is correct",
+                                     onfail="ONOS" + controllerStr +
+                                            " links view is incorrect" )
+
+            if hosts[ controller ] or "Error" not in hosts[ controller ]:
+                currentHostsResult = main.Mininet1.compareHosts(
+                        mnHosts,
+                        json.loads( hosts[ controller ] ) )
+            else:
+                currentHostsResult = main.FALSE
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=currentHostsResult,
+                                     onpass="ONOS" + controllerStr +
+                                            " hosts exist in Mininet",
+                                     onfail="ONOS" + controllerStr +
+                                            " hosts don't match Mininet")
+
+
+    def CASE4( self, main ):
+        '''
+        Testing scapy
+        '''
+        main.case( "Testing scapy" )
+        main.step( "Creating Host1 component" )
+        main.Scapy.createHostComponent( "h1" )
+        main.Scapy.createHostComponent( "h2" )
+        hosts = [ main.h1, main.h2 ]
+        for host in hosts:
+            host.startHostCli( )
+            host.startScapy( )
+            host.updateSelf( )
+            main.log.debug( host.name )
+            main.log.debug( host.hostIp )
+            main.log.debug( host.hostMac )
+
+        main.step( "Sending/Receiving Test packet - Filter doesn't match" )
+        main.log.info( "Starting Filter..." )
+        main.h2.startFilter( )
+        main.log.info( "Building Ether frame..." )
+        main.h1.buildEther( dst=main.h2.hostMac )
+        main.log.info( "Sending Packet..." )
+        main.h1.sendPacket( )
+        main.log.info( "Checking Filter..." )
+        finished = main.h2.checkFilter( )
+        main.log.debug( finished )
+        i = ""
+        if finished:
+            a = main.h2.readPackets( )
+            for i in a.splitlines( ):
+                main.log.info( i )
+        else:
+            kill = main.h2.killFilter( )
+            main.log.debug( kill )
+            main.h2.handle.sendline( "" )
+            main.h2.handle.expect( main.h2.scapyPrompt )
+            main.log.debug( main.h2.handle.before )
+        utilities.assert_equals( expect=True,
+                                 actual="dst=00:00:00:00:00:02 src=00:00:00:00:00:01" in i,
+                                 onpass="Pass",
+                                 onfail="Fail" )
+
+        main.step( "Sending/Receiving Test packet - Filter matches" )
+        main.h2.startFilter( )
+        main.h1.buildEther( dst=main.h2.hostMac )
+        main.h1.buildIP( dst=main.h2.hostIp )
+        main.h1.sendPacket( )
+        finished = main.h2.checkFilter( )
+        i = ""
+        if finished:
+            a = main.h2.readPackets( )
+            for i in a.splitlines( ):
+                main.log.info( i )
+        else:
+            kill = main.h2.killFilter( )
+            main.log.debug( kill )
+            main.h2.handle.sendline( "" )
+            main.h2.handle.expect( main.h2.scapyPrompt )
+            main.log.debug( main.h2.handle.before )
+        utilities.assert_equals( expect=True,
+                                 actual="dst=00:00:00:00:00:02 src=00:00:00:00:00:01" in i,
+                                 onpass="Pass",
+                                 onfail="Fail" )
+
+
+
+        main.step( "Clean up host components" )
+        for host in hosts:
+            host.stopScapy( )
+        main.Mininet1.removeHostComponent( "h1" )
+        main.Mininet1.removeHostComponent( "h2" )
+
+    def CASE5( self, main ):
+        '''
+           Adding Group of type "ALL" using Rest api
+        '''
+        import json
+        import time
+        isAdded = main.FALSE
+        main.case( "Verify Group of type All are successfully Added" )
+        main.caseExplanation = " Install a Group of type ALL " +\
+                               " Verify the Group is Added " +\
+                               " Add a flow using the group " +\
+                               " Send a packet that verifies the action bucket of the group"
+
+        main.step( "Add Group using Rest api" )
+        bucketList = []
+        bucket = main.buckets.addBucket( main, egressPort = egressPort1 )
+        bucketList.append( bucket )
+        bucket = main.buckets.addBucket( main, egressPort = egressPort2 )
+        bucketList.append( bucket )
+        bucket = main.buckets.addBucket( main, egressPort = egressPort3 )
+        bucketList.append( bucket )
+        response = main.ONOSrest.addGroup( deviceId = deviceId,
+                                           groupType = type1,
+                                           bucketList = bucketList,
+                                           appCookie = appCookie,
+                                           groupId = groupId )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=response,
+                                 onpass="Successfully added Groups of type ALL",
+                                 onfail="Failed to add Groups of type ALL" )
+
+        # Giving ONOS time to add the group
+        time.sleep( main.addGroupSleep )
+
+        main.step( "Check groups are in ADDED state" )
+
+        response = main.ONOSrest.getGroups( deviceId = deviceId,
+                                            appCookie = appCookie )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["state"] == "ADDED" :
+                isAdded = main.TRUE
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=isAdded,
+                                 onpass="All Group is in Added State",
+                                 onfail="All Group is not in Added State" )
+
+        '''
+           Adding flow using rest api
+        '''
+        isAdded = main.FALSE
+
+        main.step( "Adding flow with Group using rest api" )
+        response = main.ONOSrest.addFlow( deviceId = deviceId,
+                                          priority = priority,
+                                          ingressPort = ingressPort,
+                                          groupId = groupId )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=response,
+                                 onpass="Successfully Added Flows",
+                                 onfail="Failed to Add flows" )
+
+        # Giving ONOS time to add the flow
+        time.sleep( main.addFlowSleep )
+
+        response = main.ONOSrest.getFlows( deviceId = deviceId )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["priority"] == int( priority ) and item["state"] == "ADDED" :
+                isAdded = main.TRUE
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=isAdded,
+                                 onpass="Flow is in Added State",
+                                 onfail="Flow is not in Added State" )
+
+        '''
+        Sends a packet using  scapy
+        '''
+        main.step( "Testing Group by sending packet using  Scapy" )
+        main.log.info( "Creating host components" )
+        main.Scapy.createHostComponent( "h1" )
+        main.Scapy.createHostComponent( "h2" )
+        main.Scapy.createHostComponent( "h3" )
+        main.Scapy.createHostComponent( "h4" )
+
+        hosts = [main.h1, main.h2, main.h3, main.h4]
+        for host in hosts:
+            host.startHostCli( )
+            host.startScapy( )
+            host.updateSelf( )
+        main.log.info( "Constructing Packet" )
+        main.h1.buildEther( dst=main.h1.hostMac )
+        main.h1.buildIP( dst=main.h1.hostIp )
+        main.log.info( "Start Filter on host2,host3,host4" )
+        main.h2.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) )
+        main.h3.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) )
+        main.h4.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) )
+        main.log.info( "sending packet to Host" )
+        main.h1.sendPacket( )
+        main.log.info( "Checking filter for our packet" )
+        stepResultH2 = main.h2.checkFilter( )
+        stepResultH3 = main.h3.checkFilter( )
+        stepResultH4 = main.h4.checkFilter( )
+
+        if stepResultH2:
+            main.log.info( "Packet : %s" % main.h2.readPackets( ) )
+        else:
+            main.h2.killFilter( )
+
+        if stepResultH3:
+            main.log.info( "Packet : %s" % main.h3.readPackets( ) )
+        else:
+            main.h2.killFilter( )
+
+        if stepResultH4:
+            main.log.info( "Packet : %s" % main.h4.readPackets( ) )
+        else:
+            main.h4.killFilter( )
+
+        if stepResultH2 and stepResultH3 and stepResultH4 :
+            main.log.info( "Success!!!Packet sent to port 1 is received at port 2,3 and 4" )
+            stepResult = main.TRUE
+        else:
+            main.log.info( "Failure!!!Packet sent to port 1 is not received at port 2,3 and 4" )
+            stepResult = main.FALSE
+
+        main.log.info( "Clean up host components" )
+        for host in hosts:
+            host.stopScapy( )
+        main.Mininet1.removeHostComponent( "h1" )
+        main.Mininet1.removeHostComponent( "h2" )
+        main.Mininet1.removeHostComponent( "h3" )
+        main.Mininet1.removeHostComponent( "h4" )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Packet sent to port 1 is received at port 2,3,4 ",
+                                 onfail="Packet sent to port 1 is not received at port 2,3,4 " )
+
+    def CASE6( self, main ):
+        '''
+         Deleting the Group and Flow
+        '''
+        import json
+        import time
+        respFlowId = 1
+
+        main.case( "Delete the Group and Flow added through Rest api " )
+        main.step( "Deleting Group and Flows" )
+
+        #Get Flow ID
+        response = main.ONOSrest.getFlows( deviceId = deviceId )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["priority"] == int( priority ) :
+                respFlowId = item["id"]
+
+        main.step( "Deleting the created flow by deviceId and flowId" )
+        flowResponse = main.ONOSrest.removeFlow( deviceId = deviceId,
+                                          flowId = respFlowId )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=flowResponse,
+                                 onpass="Deleting flow is successful!!!",
+                                 onfail="Deleting flow is failure!!!" )
+
+        # Giving ONOS time to delete the flow
+        time.sleep( main.delFlowSleep )
+
+        main.step( "Deleting the created group by deviceId and appCookie" )
+        groupResponse = main.ONOSrest.removeGroup( deviceId = deviceId,
+                                                   appCookie = appCookie )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=groupResponse,
+                                 onpass="Deleting Group is successful!!!",
+                                 onfail="Deleting Group is failure!!!" )
+
+        # Giving ONOS time to delete the group
+        time.sleep( main.delGroupSleep )
+
+    def CASE7( self, main ):
+        '''
+           Adding Group of type "INDIRECT" using Rest api.
+        '''
+        import json
+        import time
+        isAdded = main.FALSE
+
+        main.case( "Verify Group of type INDIRECT are successfully Added" )
+        main.caseExplanation = " Install a Group of type INDIRECT " +\
+                               " Verify the Group is Added " +\
+                               " Add a flow using the group " +\
+                               " Send a packet that verifies the action bucket of the group"
+
+        main.step( "Add Group using Rest api" )
+        bucketList = []
+        bucket = main.buckets.addBucket( main, egressPort = egressPort1 )
+        bucketList.append( bucket )
+        response = main.ONOSrest.addGroup( deviceId = deviceId,
+                                           groupType = type2,
+                                           bucketList = bucketList,
+                                           appCookie = appCookie,
+                                           groupId = groupId )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=response,
+                                 onpass="Successfully added Groups of type INDIRECT",
+                                 onfail="Failed to add Groups of type INDIRECT" )
+
+        # Giving ONOS time to add the group
+        time.sleep( main.addGroupSleep )
+
+        main.step( "Check groups are in ADDED state" )
+
+        response = main.ONOSrest.getGroups( deviceId = deviceId,
+                                            appCookie = appCookie )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["state"] == "ADDED" :
+                isAdded = main.TRUE
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=isAdded,
+                                 onpass="INDIRECT Group is in Added State",
+                                 onfail="INDIRECT Group is not in Added State" )
+
+        '''
+           Adding flows using rest api
+        '''
+        isAdded = main.FALSE
+
+        main.step( "Adding flow with Group using rest api" )
+        response = main.ONOSrest.addFlow( deviceId = deviceId,
+                                          priority = priority,
+                                          ingressPort = ingressPort,
+                                          groupId = groupId )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=response,
+                                 onpass="Successfully Added Flows",
+                                 onfail="Failed to Add flows" )
+
+        # Giving ONOS time to add the flow
+        time.sleep( main.addFlowSleep )
+
+        response = main.ONOSrest.getFlows( deviceId = deviceId )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["priority"] == int( priority ) and item["state"] == "ADDED" :
+                isAdded = main.TRUE
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=isAdded,
+                                 onpass="Flow is in Added State",
+                                 onfail="Flow is not in Added State" )
+
+        '''
+        Sends a packet using scapy
+        '''
+        main.step( "Testing Group by sending packet using  Scapy" )
+        main.log.info( "Creating host components" )
+        main.Scapy.createHostComponent( "h1" )
+        main.Scapy.createHostComponent( "h2" )
+
+        hosts = [main.h1, main.h2]
+        for host in hosts:
+            host.startHostCli( )
+            host.startScapy( )
+            host.updateSelf( )
+        main.log.info( "Constructing Packet" )
+        main.h1.buildEther( dst=main.h1.hostMac )
+        main.h1.buildIP( dst=main.h1.hostIp )
+        main.log.info( "Start Filter on host2" )
+        main.h2.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) )
+        main.log.info( "sending packet to Host" )
+        main.h1.sendPacket( )
+        main.log.info( "Checking filter for our packet" )
+        stepResultH2 = main.h2.checkFilter( )
+
+        if stepResultH2:
+            main.log.info( "Packet : %s" % main.h2.readPackets( ) )
+        else:
+            main.h2.killFilter( )
+
+        main.log.info( "Clean up host components" )
+        for host in hosts:
+            host.stopScapy( )
+        main.Mininet1.removeHostComponent( "h1" )
+        main.Mininet1.removeHostComponent( "h2" )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResultH2,
+                                 onpass="Packet sent to port 1 is received at port 2 successfully!!!",
+                                 onfail="Failure!!!Packet sent to port 1 is not received at port 2" )
+
+    def CASE8( self, main ):
+        '''
+         Deleting the Group and Flow
+        '''
+        import json
+        import time
+        respFlowId = 1
+
+        main.case( "Delete the Group and Flow added through Rest api " )
+        main.step( "Deleting Group and Flows" )
+
+        #Getting Flow ID
+        response = main.ONOSrest.getFlows( deviceId = deviceId )
+        responsejson = json.loads( response )
+        for item in responsejson :
+            if item["priority"] == int( priority ) :
+                respFlowId = item["id"]
+
+        main.step( "Deleting the created flow by deviceId and flowId" )
+        flowResponse = main.ONOSrest.removeFlow( deviceId = deviceId,
+                                          flowId = respFlowId )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=flowResponse,
+                                 onpass="Deleting flow is successful!!!",
+                                 onfail="Deleting flow is failure!!!" )
+
+        # Giving ONOS time to delete the flow
+        time.sleep( main.delFlowSleep )
+
+        groupResponse = main.ONOSrest.removeGroup( deviceId = deviceId,
+                                          appCookie = appCookie )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=groupResponse,
+                                 onpass="Deleting Group is successful!!!",
+                                 onfail="Deleting Group is failure!!!" )
+
+        # Giving ONOS time to delete the group
+        time.sleep( main.delGroupSleep )
+
+    def CASE100( self, main ):
+        '''
+            Report errors/warnings/exceptions
+        '''
+        main.log.info( "Error report: \n" )
+        main.ONOSbench.logReport( main.ONOSip[ 0 ],
+                                  [ "INFO",
+                                    "FOLLOWER",
+                                    "WARN",
+                                    "flow",
+                                    "group",
+                                    "ERROR",
+                                    "Except" ],
+                                  "s" )
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo
new file mode 100644
index 0000000..50e5d63
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo
@@ -0,0 +1,54 @@
+<TOPOLOGY>
+    <COMPONENT>
+
+        <ONOSbench>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS>
+                <nodes>3</nodes>
+            </COMPONENTS>
+        </ONOSbench>
+
+        <ONOScli1>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOScli1>
+
+        <Mininet1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetCliDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </Mininet1>
+
+        <ONOSrest>
+            <host>OC1</host>
+            <port>8181</port>
+            <user>onos</user>
+            <password>rocks</password>
+            <type>OnosRestDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOSrest>
+
+        <Scapy>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>ScapyCliDriver</type>
+            <connect_order>7</connect_order>
+        </Scapy>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/FUNC/FUNCgroup/README b/TestON/tests/FUNC/FUNCgroup/README
new file mode 100644
index 0000000..ac903d7
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/README
@@ -0,0 +1,43 @@
+FUNCgroup test suite
+
+Summary:
+
+        The purpose of this test suite is to test the Group Subsystem.
+        As part of this test, we are testing the functionality of the Group Subsystem.
+        Install a group of type ‘ALL’ whose bucket will have treatments of type ‘OUTPUT’ to port 2,3, and 4 respectively.
+        Install a flow which will have selector criteria IN_PORT as port 1 and Instructions as type ‘Group’ with the Group Id already created.
+        Verify when port 1 receives any packet, it should follow the actions which are mentioned in the Group and send the packet to port 2, 3 and 4.
+
+Topology:
+        The topology consists of one switch with four hosts connected to it.
+
+Required:
+        Ths test requires Mininet topology file topo-group.py located in the dependencies folder.
+        You will also need to install the Python module, Scapy.
+
+Test Description:
+    # CASE - Description
+    # 1    - Variable initialization and optional pull and build ONOS package
+    # 2    - install ONOS
+    # 3    - Start mininet and verify topology
+    # 4    - Testing Scapy
+    # 5    - Testing GROUP with type "ALL"
+             # 5.1 - Adds a Group with type ‘ALL’ and whose bucket will have treatments as type ‘OUTPUT’
+                     to port 2, 3,  4 respectively and verify if the Group was added correctly.
+             # 5.2 - Adds a flow with selector criteria as IN_PORT 1 and Instructions as type ‘Group’
+                     with GroupId already created and tests if the flow was added correctly.
+             # 5.3 - Sends a packet using SCAPY to port 1 of the device and check whether the
+                     same packet was received at port 2, 3, and 4 of the device.
+    # 6    - Deleting the Group and Flow
+    # 7    - Testing GROUP with type "INDIRECT"
+             # 7.1 - Adds a Group with type ‘INDIRECT’ and whose bucket will have treatments
+                     as type ‘OUTPUT’ to port 2 respectively and verify  if the Group was added correctly
+             # 7.2 - Adds a flow with selector criteria as IN_PORT 1 and Instructions as  type ‘Group’
+                     with GroupId already created and tests if the flow was added correctly.
+             # 7.3 - Sends a packet using SCAPY to port 1 of the device and check whether
+                     the same packet was received at port 2 of the device.
+    # 8    - Deleting the group and flow
+
+
+Scapy install:
+    sudo apt-get install Scapy
diff --git a/TestON/tests/FUNC/FUNCgroup/__init__.py b/TestON/tests/FUNC/FUNCgroup/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/__init__.py
diff --git a/TestON/tests/FUNC/FUNCgroup/dependencies/group-bucket.py b/TestON/tests/FUNC/FUNCgroup/dependencies/group-bucket.py
new file mode 100644
index 0000000..290a26a
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/dependencies/group-bucket.py
@@ -0,0 +1,31 @@
+def addBucket( main , egressPort = "" ):
+       """
+       Description:
+            Create a single bucket which can be added to a Group.
+       Optional:
+            * egressPort: port of egress device
+       Returns:
+            * Returns a Bucket
+            * Returns None in case of error
+       Note:
+            The ip and port option are for the requests input's ip and port
+            of the ONOS node.
+       """
+       try:
+
+           bucket = {
+                        "treatment":{ "instructions":[] }
+                    }
+           if egressPort:
+               bucket[ 'treatment' ][ 'instructions' ].append( {
+                                                        "type":"OUTPUT",
+                                                        "port":egressPort } )
+           return bucket
+
+       except ( AttributeError, TypeError ):
+           main.log.exception( self.name + ": Object not as expected" )
+           return None
+       except Exception:
+           main.log.exception( self.name + ": Uncaught exception!" )
+           main.cleanup()
+           main.exit()
diff --git a/TestON/tests/FUNC/FUNCgroup/dependencies/startUp.py b/TestON/tests/FUNC/FUNCgroup/dependencies/startUp.py
new file mode 100644
index 0000000..bf2a2b6
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/dependencies/startUp.py
@@ -0,0 +1,38 @@
+"""
+    This wrapper function is use for starting up onos instance
+"""
+
+import time
+import os
+import json
+
+def onosBuild( main, gitBranch ):
+    """
+        This includes pulling ONOS and building it using maven install
+    """
+
+    buildResult = main.FALSE
+
+    # Git checkout a branch of ONOS
+    checkOutResult = main.ONOSbench.gitCheckout( gitBranch )
+    # Does the git pull on the branch that was checked out
+    if not checkOutResult:
+        main.log.warn( "Failed to checked out " + gitBranch +
+                                           " branch")
+    else:
+        main.log.info( "Successfully checked out " + gitBranch +
+                                           " branch")
+    gitPullResult = main.ONOSbench.gitPull()
+    if gitPullResult == main.ERROR:
+        main.log.error( "Error pulling git branch" )
+    else:
+        main.log.info( "Successfully pulled " + gitBranch + " branch" )
+
+    # Maven clean install
+    buildResult = main.ONOSbench.cleanInstall()
+
+    return buildResult
+
+
+
+
diff --git a/TestON/tests/FUNC/FUNCgroup/dependencies/topo-group.py b/TestON/tests/FUNC/FUNCgroup/dependencies/topo-group.py
new file mode 100644
index 0000000..14e28e5
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/dependencies/topo-group.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+"""
+Custom topology for Mininet
+"""
+from mininet.topo import Topo
+from mininet.net import Mininet
+from mininet.node import Host, RemoteController
+from mininet.node import Node
+from mininet.node import CPULimitedHost
+from mininet.link import TCLink
+from mininet.cli import CLI
+from mininet.log import setLogLevel
+from mininet.util import dumpNodeConnections
+from mininet.node import ( UserSwitch, OVSSwitch, IVSSwitch )
+
+class MyTopo( Topo ):
+
+    def __init__( self, **opts ):
+        # Initialize topology
+        Topo.__init__( self, **opts)
+
+        # IPv4 hosts
+        host1=self.addHost( 'h1', ip='10.0.0.1/24' )
+        host2=self.addHost( 'h2', ip='10.0.0.2/24' )
+        host3=self.addHost( 'h3', ip='10.0.0.3/24' )
+        host4=self.addHost( 'h4', ip='10.0.0.4/24' )
+
+        s1 = self.addSwitch( 's1' )
+
+        self.addLink(s1, host1)
+        self.addLink(s1, host2)
+        self.addLink(s1, host3)
+        self.addLink(s1, host4)
+
+        topos = { 'mytopo': ( lambda: MyTopo() ) }
+
+def setupNetwork():
+    "Create network"
+    topo = MyTopo()
+    network = Mininet(topo=topo, autoSetMacs=True, autoStaticArp=True, controller=None)
+    network.start()
+    CLI( network )
+    network.stop()
+
+if __name__ == '__main__':
+    setLogLevel('info')
+    #setLogLevel('debug')
+    setupNetwork()
diff --git a/TestON/tests/FUNC/FUNCgroup/dependencies/topo.py b/TestON/tests/FUNC/FUNCgroup/dependencies/topo.py
new file mode 100644
index 0000000..b44e3fc
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/dependencies/topo.py
@@ -0,0 +1,100 @@
+"""
+    These functions can be used for topology comparisons
+"""
+
+import time
+import os
+import json
+
+def getAllDevices( main ):
+    """
+        Return a list containing the devices output from each ONOS node
+    """
+    devices = []
+    threads = []
+    for i in range( main.numCtrls ):
+        t = main.Thread( target=main.CLIs[i].devices,
+                         name="devices-" + str( i ),
+                         args=[ ] )
+        threads.append( t )
+        t.start()
+
+    for t in threads:
+        t.join()
+        devices.append( t.result )
+    return devices
+
+def getAllHosts( main ):
+    """
+        Return a list containing the hosts output from each ONOS node
+    """
+    hosts = []
+    ipResult = main.TRUE
+    threads = []
+    for i in range( main.numCtrls ):
+        t = main.Thread( target=main.CLIs[i].hosts,
+                         name="hosts-" + str( i ),
+                         args=[ ] )
+        threads.append( t )
+        t.start()
+
+    for t in threads:
+        t.join()
+        hosts.append( t.result )
+    return hosts
+
+def getAllPorts( main ):
+    """
+        Return a list containing the ports output from each ONOS node
+    """
+    ports = []
+    threads = []
+    for i in range( main.numCtrls ):
+        t = main.Thread( target=main.CLIs[i].ports,
+                         name="ports-" + str( i ),
+                         args=[ ] )
+        threads.append( t )
+        t.start()
+
+    for t in threads:
+        t.join()
+        ports.append( t.result )
+    return ports
+
+def getAllLinks( main ):
+    """
+        Return a list containing the links output from each ONOS node
+    """
+    links = []
+    threads = []
+    for i in range( main.numCtrls ):
+        t = main.Thread( target=main.CLIs[i].links,
+                         name="links-" + str( i ),
+                         args=[ ] )
+        threads.append( t )
+        t.start()
+
+    for t in threads:
+        t.join()
+        links.append( t.result )
+    return links
+
+def getAllClusters( main ):
+    """
+        Return a list containing the clusters output from each ONOS node
+    """
+    clusters = []
+    threads = []
+    for i in range( main.numCtrls ):
+        t = main.Thread( target=main.CLIs[i].clusters,
+                         name="clusters-" + str( i ),
+                         args=[ ] )
+        threads.append( t )
+        t.start()
+
+    for t in threads:
+        t.join()
+        clusters.append( t.result )
+    return clusters
+
+
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index 1371453..6297464 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -205,6 +205,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -229,14 +237,6 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
@@ -1119,6 +1119,42 @@
                                  actual=testResult,
                                  onpass=main.assertReturnString,
                                  onfail=main.assertReturnString )
+
+        main.step("Protected: Add point intents between h1 and h9")
+        main.assertReturnString = "Assertion Result for protected point intent\n"
+        senders = [
+            {"name": "h1", "device": "of:0000000000000005/1", "mac": "00:00:00:00:00:01"}
+        ]
+        recipients = [
+            {"name": "h9", "device": "of:0000000000000006/1", "mac": "00:00:00:00:00:09"}
+        ]
+        testResult = main.FALSE
+        installResult = main.intentFunction.installPointIntent(
+            main,
+            name="Protected",
+            senders=senders,
+            recipients=recipients,
+            protected=True )
+
+        if installResult:
+            testResult = main.intentFunction.testPointIntent(
+                main,
+                name="Protected",
+                intentId=installResult,
+                senders=senders,
+                recipients=recipients,
+                sw1="s5",
+                sw2="s2",
+                protected=True,
+                expectedLink=18 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=testResult,
+                                 onpass=main.assertReturnString,
+                                 onfail=main.assertReturnString )
+
         main.step( "IPV4_2: Add point intents between h1 and h9" )
         main.assertReturnString = "Assertion Result for IPV4 no mac address point intents\n"
         senders = [
diff --git a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
index 1760324..d8a0e36 100755
--- a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
@@ -309,6 +309,7 @@
                         ethType="",
                         bandwidth="",
                         lambdaAlloc=False,
+                        protected=False,
                         ipProto="",
                         ipSrc="",
                         ipDst="",
@@ -397,6 +398,7 @@
                                             ethDst=dstMac,
                                             bandwidth=bandwidth,
                                             lambdaAlloc=lambdaAlloc,
+                                            protected=protected,
                                             ipProto=ipProto,
                                             ipSrc=ipSrc,
                                             ipDst=ipDst,
@@ -423,6 +425,7 @@
                 main.assertReturnString += 'Encapsulation intents check Passed\n'
             else:
                 main.assertReturnString += 'Encapsulation intents check failed\n'
+
         if flowDuration( main ):
             main.assertReturnString += 'Flow duration check Passed\n'
             return intentId
@@ -972,6 +975,7 @@
                      ethType="",
                      bandwidth="",
                      lambdaAlloc=False,
+                     protected=False,
                      ipProto="",
                      ipAddresses="",
                      tcp="",
@@ -1109,6 +1113,21 @@
             main.assertReturnString += 'Link Down Failed\n'
             testResult = main.FALSE
 
+        if protected:
+            # Check Connection
+            if utilities.retry(f=scapyCheckConnection, retValue=main.FALSE,
+                               args=(main, senderNames, recipientNames, vlanId, useTCP) ):
+                main.assertReturnString += 'Link down Scapy Packet Received Passed\n'
+            else:
+                main.assertReturnString += 'Link down Scapy Packet Recieved Failed\n'
+                testResult = main.FALSE
+
+            if ProtectedIntentCheck( main ):
+                main.assertReturnString += 'Protected Intent Check Passed\n'
+            else:
+                main.assertReturnString += 'Protected Intent Check Failed\n'
+                testResult = main.FALSE
+
         # Check intent state
         if utilities.retry( f=checkIntentState, retValue=main.FALSE, args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
             main.assertReturnString += 'Link Down Intent State Passed\n'
@@ -1996,4 +2015,11 @@
     if pop == totalflows and push == totalflows:
         return main.TRUE
     else:
-        return main.FALSE
\ No newline at end of file
+        return main.FALSE
+
+def ProtectedIntentCheck( main ):
+    import json
+    intent = main.CLIs[ 0 ].intents( jsonFormat=False )
+    if "Protection" in intent:
+        return main.TRUE
+    return main.FALSE
\ No newline at end of file
diff --git a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index dc8df66..71bf286 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -230,6 +230,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -259,14 +267,6 @@
         # supported by the Rest API remove this when Leader Checking is supported
         # by the REST API
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
@@ -1173,6 +1173,39 @@
                                  onpass=main.assertReturnString,
                                  onfail=main.assertReturnString )
 
+        # main.step( "Protected: Add point intents between h1 and h9" )
+        # main.assertReturnString = "Assertion Result for protected point intent\n"
+        # senders = [
+        #     { "name": "h1", "device": "of:0000000000000005/1", "mac": "00:00:00:00:00:01" }
+        # ]
+        # recipients = [
+        #     { "name": "h9", "device": "of:0000000000000006/1", "mac": "00:00:00:00:00:09" }
+        # ]
+        # testResult = main.FALSE
+        # installResult = main.intentFunction.installPointIntent(
+        #     main,
+        #     name="Protected",
+        #     senders=senders,
+        #     recipients=recipients,
+        #     protected=True )
+        # 
+        # if installResult:
+        #     testResult = main.intentFunction.testPointIntent(
+        #         main,
+        #         name="Protected",
+        #         intentId=installResult,
+        #         senders=senders,
+        #         recipients=recipients,
+        #         sw1="s5",
+        #         sw2="s2",
+        #         protected=True,
+        #         expectedLink=18 )
+        #
+        # utilities.assert_equals( expect=main.TRUE,
+        #                          actual=testResult,
+        #                          onpass=main.assertReturnString,
+        #                          onfail=main.assertReturnString )
+
         main.step( "IPV4_2: Add point intents between h1 and h9" )
         main.assertReturnString = "Assertion Result for IPV4 no mac address point intents\n"
         senders = [
diff --git a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
index 088d38d..8fa65f2 100755
--- a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
@@ -305,6 +305,7 @@
                         ethType="",
                         bandwidth="",
                         lambdaAlloc=False,
+                        protected=False,
                         ipProto="",
                         ipSrc="",
                         ipDst="",
@@ -394,6 +395,7 @@
                                             ethDst=dstMac,
                                             bandwidth=bandwidth,
                                             lambdaAlloc=lambdaAlloc,
+                                            protected=protected,
                                             ipProto=ipProto,
                                             ipSrc=ipSrc,
                                             ipDst=ipDst,
@@ -436,6 +438,7 @@
                      ethType="",
                      bandwidth="",
                      lambdaAlloc=False,
+                     protected=False,
                      ipProto="",
                      ipAddresses="",
                      tcp="",
@@ -575,6 +578,21 @@
             main.assertReturnString += 'Link Down Failed\n'
             testResult = main.FALSE
 
+        if protected:
+            # Check Connection
+            if utilities.retry(f=scapyCheckConnection, retValue=main.FALSE,
+                               args=(main, senderNames, recipientNames, vlanId, useTCP)):
+                main.assertReturnString += 'Link down Scapy Packet Received Passed\n'
+            else:
+                main.assertReturnString += 'Link down Scapy Packet Recieved Failed\n'
+                testResult = main.FALSE
+
+            if ProtectedIntentCheck(main):
+                main.assertReturnString += 'Protected Intent Check Passed\n'
+            else:
+                main.assertReturnString += 'Protected Intent Check Failed\n'
+                testResult = main.FALSE
+
         # Check intent state
         if utilities.retry( f=checkIntentState, retValue=main.FALSE, args=( main, intentId ), sleep=main.checkIntentSleep ):
             main.assertReturnString += 'Link Down Intent State Passed\n'
@@ -1731,3 +1749,11 @@
     else:
         return main.FALSE
     return main.TRUE
+
+def ProtectedIntentCheck( main ):
+    intent = main.RESTs[ 0 ].intents()
+    main.log.debug(intent)
+    main.stop()
+    if "Protection" in intent:
+        return main.TRUE
+    return main.FALSE
diff --git a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
index 8694a0d..d13762e 100755
--- a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
+++ b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
@@ -196,6 +196,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -222,14 +230,6 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
@@ -258,7 +258,7 @@
 
         main.step( "setup the ipv6NeighbourDiscovery" )
         cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.incubator.net.neighbour.impl.NeighbourResolutionManager", "ndpEnabled", "true" )
-        cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true" )
+        cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "useIpv6ND", "true" )
         cfgResult = cfgResult1 and cfgResult2
         utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
                                 onpass="ipv6NeighborDiscovery cfg is set to true",
diff --git a/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py b/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
index edca254..863d406 100755
--- a/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
+++ b/TestON/tests/FUNC/FUNCipv6Intent/dependencies/FUNCIpv6IntentFunction.py
@@ -1794,7 +1794,7 @@
     getDataResult = main.TRUE
     main.log.info( "Activating reactive forwarding app " )
     activateResult = main.CLIs[ 0 ].activateApp( "org.onosproject.fwd" )
-    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true")
+    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "useIpv6ND", "true")
     main.CLIs[ 0 ].setCfg( "org.onosproject.incubator.net.neighbour.impl.NeighbourResolutionManager", "ndpEnabled", "true" )
     main.CLIs[ 0 ].setCfg( "org.onosproject.fwd.ReactiveForwarding", "ipv6Forwarding", "true")
     main.CLIs[ 0 ].setCfg( "org.onosproject.fwd.ReactiveForwarding", "matchIpv6Address", "true")
diff --git a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
index 8b145ab..7154a28 100644
--- a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
@@ -214,6 +214,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -243,14 +251,6 @@
         # supported by the Rest API remove this when Leader Checking is supported
         # by the REST API
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
index a97b2eb..27ead3e 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconf.py
@@ -58,7 +58,7 @@
     main.cfgJson = '{ "devices":{ "netconf:'+ main.configDeviceIp + ":" +\
                     main.configDevicePort + '":' + '{ "basic":{ "driver":"'+\
                     main.configDriver + '" } } }, "apps": { "' +\
-                    main.configApps + '":{ "devices":[ { "name":' +\
+                    main.configApps + '":{ "devices":[ { "username":' +\
                     main.configName + ', "password":' + main.configPass +\
                     ', "ip":"' + main.configDeviceIp + '", "port":' +\
                     main.configPort + '} ] } } }'
diff --git a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
index fc5a231..a0079e4 100644
--- a/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
+++ b/TestON/tests/FUNC/FUNCnetconf/dependencies/netconfConfig.json
@@ -4,7 +4,7 @@
             "devices": [
                 {
                     "ip": "10.128.50.10",
-                    "name": "sdn",
+                    "username": "sdn",
                     "password": "rocks",
                     "port": 830
                 }
diff --git a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
index c85d39e..08c0aaa 100644
--- a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
+++ b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
@@ -185,6 +185,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -209,14 +217,6 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
index 5ff2606..3563efb 100644
--- a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
+++ b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
@@ -130,6 +130,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.nodes[ i ].ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step("Starting ONOS service")
         stopResult = main.TRUE
@@ -152,14 +160,6 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.ONOScli1.startOnosCli( main.nodes[ 0 ].ip_address )
         utilities.assert_equals( expect=main.TRUE, actual=cliResults,
diff --git a/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py b/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
index 9545a4e..81eb698 100644
--- a/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
+++ b/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
@@ -144,6 +144,12 @@
                                 onfail="ONOS install failed" )
         time.sleep( main.startUpSleep )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
 
         for i in range( 2 ):
@@ -155,12 +161,6 @@
                      onfail="ONOS startup failed" )
         time.sleep( main.startUpSleep )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
 
         print main.nodes[0].ip_address
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
index fba0007..1112aa8 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
@@ -208,6 +208,14 @@
                                  onpass="ONOS install successful",
                                  onfail="ONOS install failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -222,14 +230,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -292,10 +292,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index 6f53489..f7aec3b 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -233,6 +233,14 @@
             main.cleanup()
             main.exit()
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -247,14 +255,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -317,10 +317,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index a579cff..336f0f1 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -180,6 +180,8 @@
         handle = main.ONOSbench.handle
         handle.sendline( "sed -i -e 's/^respawn$/#respawn/g' tools/package/init/onos.conf" )
         handle.expect( "\$" )  # $ from the command
+        handle.sendline( "sed -i -e 's/^Restart=always/Restart=no/g' tools/package/init/onos.service" )
+        handle.expect( "\$" )  # $ from the command
         handle.expect( "\$" )  # $ from the prompt
 
         # GRAPHS
@@ -240,6 +242,14 @@
             main.cleanup()
             main.exit()
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -254,14 +264,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -292,6 +294,7 @@
 
         main.step( "Clean up ONOS service changes" )
         handle.sendline( "git checkout -- tools/package/init/onos.conf" )
+        handle.sendline( "git checkout -- tools/package/init/onos.service" )
         handle.expect( "\$" )
 
         main.step( "Checking ONOS nodes" )
@@ -328,10 +331,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAsanity/HAsanity.py b/TestON/tests/HA/HAsanity/HAsanity.py
index feb69bf..32b7e14 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.py
+++ b/TestON/tests/HA/HAsanity/HAsanity.py
@@ -209,6 +209,14 @@
                                  onpass="ONOS install successful",
                                  onfail="ONOS install failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -223,14 +231,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -293,10 +293,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAscaling/HAscaling.py b/TestON/tests/HA/HAscaling/HAscaling.py
index 2bc1d13..112306a 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.py
+++ b/TestON/tests/HA/HAscaling/HAscaling.py
@@ -273,6 +273,15 @@
                             path,
                             direction="to" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( main.numCtrls ):
+            node = main.nodes[i]
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -288,14 +297,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -1898,6 +1899,7 @@
             onosIsupResult = main.TRUE
             for i in main.activeNodes:
                 node = main.nodes[i]
+                main.ONOSbench.onosSecureSSH( node=node.ip_address )
                 started = main.ONOSbench.isup( node.ip_address )
                 if not started:
                     main.log.error( node.name + " didn't start!" )
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index 702b09e..4d8eedc 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -198,6 +198,14 @@
                                  onpass="ONOS install successful",
                                  onfail="ONOS install failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -212,14 +220,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -282,10 +282,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.py b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
index ddf9b2a..b6a74e5 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
@@ -233,6 +233,14 @@
             main.cleanup()
             main.exit()
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -247,14 +255,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -317,10 +317,10 @@
             for app in apps:
                 state = main.CLIs[ 0 ].appStatus( app )
                 if state == "ACTIVE":
-                    activateResult = activeResult and True
+                    activateResult = activateResult and True
                 else:
                     main.log.error( "{} is in {} state".format( app, state ) )
-                    activeResult = False
+                    activateResult = False
             utilities.assert_equals( expect=True,
                                      actual=activateResult,
                                      onpass="Successfully activated apps",
diff --git a/TestON/tests/HA/HAswapNodes/HAswapNodes.py b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
index 60dff34..1be977a 100644
--- a/TestON/tests/HA/HAswapNodes/HAswapNodes.py
+++ b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
@@ -267,6 +267,15 @@
                             path,
                             direction="to" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( main.numCtrls ):
+            node = main.nodes[i]
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onosIsupResult = main.TRUE
@@ -282,14 +291,6 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for node in main.nodes:
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
@@ -1886,6 +1887,7 @@
             onosIsupResult = main.TRUE
             for i in main.activeNodes:
                 node = main.nodes[i]
+                main.ONOSbench.onosSecureSSH( node=node.ip_address )
                 started = main.ONOSbench.isup( node.ip_address )
                 if not started:
                     main.log.error( node.name + " didn't start!" )
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
index ef2a46a..f35fb67 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
@@ -32,7 +32,7 @@
     </CASE0>
 
     <CASE1>
-        <NodeList>OC1,OC2,OC3</NodeList>
+        <NodeList>OC1</NodeList>
         <SleepTimers>
             <onosStartup>60</onosStartup>
             <onosCfg>5</onosCfg>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
index 3ad2f30..ce01cdd 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
@@ -68,33 +68,23 @@
         main.onosCfgSleep = float( main.params['CASE1']['SleepTimers']['onosCfg'] )
         main.mnStartupSleep = float( main.params['CASE1']['SleepTimers']['mnStartup'] )
         main.mnCfgSleep = float( main.params['CASE1']['SleepTimers']['mnCfg'] )
+        main.numCtrls = int( main.params['CASE10']['numNodes'] )
+        main.AllONOSip = main.ONOSbench.getOnosIps()
+        main.ONOSip = []
+        for i in range( main.numCtrls ):
+            main.ONOSip.append( main.AllONOSip[i] )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=main.TRUE,
                                  onpass="Successfully construct " +
                                         "test variables ",
                                  onfail="Failed to construct test variables" )
 
-
-
-        main.step( "Uninstall all onos nodes in the env.")
-        stepResult = main.TRUE
-        for node in main.nodeList:
-            nodeResult = main.ONOSbench.onosUninstall( nodeIp = "$" + node )
-            stepResult = stepResult & nodeResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="Successfully uninstall onos on all nodes in env.",
-                                 onfail="Failed to uninstall onos on all nodes in env!" )
-        if not stepResult:
-            main.log.error( "Failure to clean test env. Exiting test..." )
-            main.exit()
-
     def CASE2( self, main ):
         '''
             Report errors/warnings/exceptions
         '''
         main.log.info("Error report: \n" )
-        main.ONOSbench.logReport( main.ONOScli1.ip_address,
+        main.ONOSbench.logReport( main.ONOSip[0],
                                   [ "INFO",
                                     "FOLLOWER",
                                     "WARN",
@@ -113,16 +103,9 @@
 
         import time
 
-        numNodes = int( main.params['CASE10']['numNodes'] )
-        main.case( "Start up " + str( numNodes ) + "-node onos cluster.")
-
+        main.case( "Start up " + str( main.numCtrls ) + "-node onos cluster.")
         main.step( "Start ONOS cluster with basic (drivers) app.")
-        onosClusterIPs = []
-        for n in range( 1, numNodes + 1 ):
-            handle = "main.ONOScli" + str( n )
-            onosClusterIPs.append( eval( handle ).ip_address )
-
-        stepResult = main.ONOSbench.startBasicONOS(nodeList = onosClusterIPs, opSleep = 200 )
+        stepResult = main.ONOSbench.startBasicONOS( nodeList=main.ONOSip, opSleep=200 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
                                  onpass="Successfully started basic ONOS cluster ",
@@ -130,9 +113,9 @@
 
         main.step( "Establishing Handles on ONOS CLIs.")
         cliResult = main.TRUE
-        for n in range( 1, numNodes + 1 ):
+        for n in range( 1, main.numCtrls + 1 ):
             handle = "main.ONOScli" + str( n )
-            cliResult = cliResult & ( eval( handle ).startCellCli() )
+            cliResult = cliResult & ( eval( handle ).startOnosCli( main.ONOSip[ n-1 ] ) )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=cliResult,
                                  onpass="Successfully started onos cli's ",
@@ -196,10 +179,9 @@
 
         main.step( "Assign switches to controllers.")
         assignResult = main.TRUE
-        onosNodes = [ main.ONOScli1.ip_address ]
         for i in range(1, 8):
             assignResult = assignResult & main.Mininet1.assignSwController( sw="s" + str( i ),
-                                                         ip=onosNodes,
+                                                         ip=main.ONOSip,
                                                          port='6653' )
         time.sleep(main.mnCfgSleep)
         utilities.assert_equals( expect=main.TRUE,
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo
index 4fee9ff..cda1ed6 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo
@@ -17,7 +17,7 @@
         </ONOSbench>
 
         <ONOScli1>
-            <host>OC1</host>
+            <host>localhost</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosCliDriver</type>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
index 90bfb14..3673622 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
@@ -68,33 +68,23 @@
         main.onosCfgSleep = float( main.params['CASE1']['SleepTimers']['onosCfg'] )
         main.mnStartupSleep = float( main.params['CASE1']['SleepTimers']['mnStartup'] )
         main.mnCfgSleep = float( main.params['CASE1']['SleepTimers']['mnCfg'] )
+        main.numCtrls = int( main.params['CASE10']['numNodes'] )
+        main.AllONOSip = main.ONOSbench.getOnosIps()
+        main.ONOSip = []
+        for i in range( main.numCtrls ):
+            main.ONOSip.append( main.AllONOSip[i] )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=main.TRUE,
                                  onpass="Successfully construct " +
                                         "test variables ",
                                  onfail="Failed to construct test variables" )
 
-
-
-        main.step( "Uninstall all onos nodes in the env.")
-        stepResult = main.TRUE
-        for node in main.nodeList:
-            nodeResult = main.ONOSbench.onosUninstall( nodeIp = "$" + node )
-            stepResult = stepResult & nodeResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="Successfully uninstall onos on all nodes in env.",
-                                 onfail="Failed to uninstall onos on all nodes in env!" )
-        if not stepResult:
-            main.log.error( "Failure to clean test env. Exiting test..." )
-            main.exit()
-
     def CASE2( self, main ):
         '''
             Report errors/warnings/exceptions
         '''
         main.log.info("Error report: \n" )
-        main.ONOSbench.logReport( main.ONOScli1.ip_address,
+        main.ONOSbench.logReport( main.ONOSip[0],
                                   [ "INFO",
                                     "FOLLOWER",
                                     "WARN",
@@ -113,16 +103,9 @@
 
         import time
 
-        numNodes = int( main.params['CASE10']['numNodes'] )
-        main.case( "Start up " + str( numNodes ) + "-node onos cluster.")
-
+        main.case( "Start up " + str( main.numCtrls ) + "-node onos cluster.")
         main.step( "Start ONOS cluster with basic (drivers) app.")
-        onosClusterIPs = []
-        for n in range( 1, numNodes + 1 ):
-            handle = "main.ONOScli" + str( n )
-            onosClusterIPs.append( eval( handle ).ip_address )
-
-        stepResult = main.ONOSbench.startBasicONOS(nodeList = onosClusterIPs, opSleep = 200 )
+        stepResult = main.ONOSbench.startBasicONOS( nodeList=main.ONOSip, opSleep=200 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
                                  onpass="Successfully started basic ONOS cluster ",
@@ -130,9 +113,9 @@
 
         main.step( "Establishing Handles on ONOS CLIs.")
         cliResult = main.TRUE
-        for n in range( 1, numNodes + 1 ):
+        for n in range( 1, main.numCtrls + 1 ):
             handle = "main.ONOScli" + str( n )
-            cliResult = cliResult & ( eval( handle ).startCellCli() )
+            cliResult = cliResult & ( eval( handle ).startOnosCli( main.ONOSip[ n-1 ] ) )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=cliResult,
                                  onpass="Successfully started onos cli's ",
@@ -196,10 +179,9 @@
 
         main.step( "Assign switches to controllers.")
         assignResult = main.TRUE
-        onosNodes = [ main.ONOScli1.ip_address, main.ONOScli2.ip_address, main.ONOScli3.ip_address ]
         for i in range(1, 8):
             assignResult = assignResult & main.Mininet1.assignSwController( sw="s" + str( i ),
-                                                         ip=onosNodes,
+                                                         ip=main.ONOSip,
                                                          port='6653' )
         time.sleep(main.mnCfgSleep)
         utilities.assert_equals( expect=main.TRUE,
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo
index c01bb0a..367633b 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo
@@ -17,7 +17,7 @@
         </ONOSbench>
 
         <ONOScli1>
-            <host>OC1</host>
+            <host>localhost</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosCliDriver</type>
@@ -27,7 +27,7 @@
         </ONOScli1>
 
         <ONOScli2>
-            <host>OC2</host>
+            <host>localhost</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosCliDriver</type>
@@ -37,7 +37,7 @@
         </ONOScli2>
 
          <ONOScli3>
-            <host>OC3</host>
+            <host>localhost</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosCliDriver</type>
diff --git a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
index 936bf3d..fee655b 100644
--- a/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
+++ b/TestON/tests/SCPF/SCPFcbench/SCPFcbench.py
@@ -80,7 +80,8 @@
         main.step("Safety check, killing all ONOS processes")
         main.step("before initiating environment setup")
         for node in range(1, maxNodes + 1):
-            main.ONOSbench.onosDie(ONOSIp[node])
+            main.ONOSbench.onosStop(ONOSIp[node])
+            main.ONOSbench.onosKill(ONOSIp[node])
 
         #Uninstall everywhere
         main.step( "Cleaning Enviornment..." )
diff --git a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
index 50ca811..559f30f 100644
--- a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
+++ b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
@@ -88,7 +88,8 @@
         main.step("Safety check, killing all ONOS processes")
         main.step("before initiating environment setup")
         for node in range(1, main.maxNodes + 1):
-            main.ONOSbench.onosDie(ONOSIp[node])
+            main.ONOSbench.onosStop(ONOSIp[node])
+            main.ONOSbench.onosKill(ONOSIp[node])
 
         #Uninstall everywhere
         main.step( "Cleaning Enviornment..." )
@@ -120,6 +121,9 @@
             main.ONOSbench.onosInstall( ONOSIp[node])
 
         for node in range(1, clusterCount + 1):
+            secureSshResult = main.ONOSbench.onosSecureSSH( ONOSIp[node] )
+
+        for node in range(1, clusterCount + 1):
             for i in range( 2 ):
                 isup = main.ONOSbench.isup( ONOSIp[node] )
                 if isup:
@@ -129,7 +133,6 @@
                 main.log.report( "ONOS " + str(node) + " didn't start!" )
 
         for node in range(1, clusterCount + 1):
-            secureSshResult = main.ONOSbench.onosSecureSSH( ONOSIp[node] )
             exec "a = main.ONOS%scli.startOnosCli" %str(node)
             a(ONOSIp[node])
 
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
index 42159b4..12b93e6 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
@@ -116,7 +116,8 @@
                        " before initiating environment setup" )
 
         for i in range( main.numCtrls ):
-            main.ONOSbench.onosDie( main.ONOSip[ i ] )
+            main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            main.ONOSbench.onosKill( main.ONOSip[ i ] )
 
         main.log.info( "NODE COUNT = %s" % main.numCtrls)
 
@@ -167,16 +168,6 @@
                                      onpass="Test step PASS",
                                      onfail="Test step FAIL" )
             installResult = installResult and i_result
-        time.sleep( main.startUpSleep )
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.ONOSip[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus( node=main.ONOSip[i] )
-            utilities.assert_equals( expect=main.TRUE, actual=onos_status,
-                                     onpass="Test step PASS",
-                                     onfail="Test step FAIL" )
-            statusResult = ( statusResult and onos_status )
 
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
@@ -186,6 +177,31 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
index cf4c6ac..620982d 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
@@ -64,6 +64,7 @@
         <duration>400</duration>
         <log_interval>20</log_interval>
         <numKeys>40000</numKeys>
+        <numKeysFlowObj>4000</numKeysFlowObj>
         <cyclePeriod>1000</cyclePeriod>
         <neighbors>0,a</neighbors>           #a == all nodes (-1)
         <flowRuleBUEnabled>true</flowRuleBUEnabled>
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
index 42c3522..75c0aa1 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
@@ -74,15 +74,16 @@
         main.testDuration = main.params[ 'TEST' ][ 'duration' ]
         main.logInterval = main.params[ 'TEST' ][ 'log_interval' ]
         main.debug = main.params[ 'debugMode' ]
-        main.numKeys = main.params[ 'TEST' ][ 'numKeys' ]
         main.timeout = int(main.params['SLEEP']['timeout'])
         main.cyclePeriod = main.params[ 'TEST' ][ 'cyclePeriod' ]
         if main.flowObj == "True":
             main.flowObj = True
             main.dbFileName = main.params['DATABASE']['dbFlowObj']
+            main.numKeys = main.params[ 'TEST' ][ 'numKeysFlowObj' ]
         else:
             main.flowObj = False
             main.dbFileName = main.params['DATABASE']['dbName']
+            main.numKeys = main.params[ 'TEST' ][ 'numKeys' ]
         # Create DataBase file
         main.log.info( "Create Database file " + main.dbFileName )
         resultsDB = open( main.dbFileName, "w+" )
@@ -120,7 +121,8 @@
                       " before initiating environment setup")
 
         for i in range( main.numCtrls ):
-            main.ONOSbench.onosDie( main.ONOSip[i] )
+            main.ONOSbench.onosStop( main.ONOSip[i] )
+            main.ONOSbench.onosKill( main.ONOSip[i] )
 
         main.log.info( "NODE COUNT = %s" % main.numCtrls )
         main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
@@ -166,17 +168,6 @@
                                     onfail="Test step FAIL")
             installResult = installResult and i_result
 
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.ONOSip[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus(node=main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            statusResult = (statusResult and onos_status)
-        time.sleep(2)
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -185,6 +176,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS cli using thread" )
         startCliResult = main.TRUE
         pool = []
diff --git a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
index 1c04fd1..c6b1f34 100644
--- a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
+++ b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
@@ -118,7 +118,8 @@
                       " before initiating environment setup")
 
         for i in range(main.numCtrls):
-            main.ONOSbench.onosDie(main.ONOSip[i])
+            main.ONOSbench.onosStop(main.ONOSip[i])
+            main.ONOSbench.onosKill(main.ONOSip[i])
 
         main.log.info("NODE COUNT = %s" % main.numCtrls)
         main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
@@ -164,16 +165,6 @@
                                     onfail="Test step FAIL")
             installResult = installResult and i_result
 
-        main.step("Verify ONOS nodes UP status")
-        statusResult = main.TRUE
-        for i in range(int(main.numCtrls)):
-            main.log.info("ONOS Node " + main.ONOSip[i] + " status:")
-            onos_status = main.ONOSbench.onosStatus(node=main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            statusResult = (statusResult and onos_status)
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -182,6 +173,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         time.sleep(2)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
index 19d9806..c3c0ff6 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
@@ -10,6 +10,16 @@
         <cellApps>drivers,null,intentperf,metrics</cellApps>
     </ENV>
 
+    <DEPENDENCY>
+        <FILE1>intentRerouteLatFuncs</FILE1>
+        <PATH>/tests/SCPF/SCPFintentRerouteLat/dependencies/</PATH>
+    </DEPENDENCY>
+
+    <SEARCHTERM>
+        <TopologyTime>TopologyManager</TopologyTime>
+        <InstallTime>INSTALLED</InstallTime>
+    </SEARCHTERM>
+
     <TEST>
         <skipCleanInstall>yes</skipCleanInstall>
         <warmUp>5</warmUp>
@@ -30,6 +40,7 @@
             <port>0000000000000003/2</port>>
         </end2>
     </TEST>
+
     <DATABASE>
         <dbName>/tmp/IntentRerouteLatDB</dbName>
         <dbFlowObj>/tmp/IntentRerouteLatDBWithFlowObj</dbFlowObj>
@@ -41,15 +52,15 @@
     </GIT>
 
     <ATTEMPTS>
-        <verify>3</verify>
+        <verify>5</verify>
+        <maxInvalidRun>10</maxInvalidRun>
     </ATTEMPTS>
 
     <SLEEP>
-        <startup>10</startup>
+        <startup>5</startup>
         <setmaster>5</setmaster>
         <install>10</install>
-        <verify>3</verify>
-        <reroute>3</reroute>
+        <verify>5</verify>
         # timeout for pexpect
         <timeout>300</timeout>
     </SLEEP>
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index e861f0c..ac0a673 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -14,11 +14,14 @@
     - The unit of the latency result is milliseconds
 """
 
+
 class SCPFintentRerouteLat:
     def __init__(self):
         self.default = ''
 
     def CASE0( self, main ):
+        import imp
+        import os
         '''
         - GIT
         - BUILDING ONOS
@@ -40,7 +43,8 @@
                                     actual=stepResult,
                                     onpass="Successfully checkout onos branch.",
                                     onfail="Failed to checkout onos branch. Exiting test...")
-            if not stepResult: main.exit()
+            if not stepResult:
+                main.exit()
 
             main.step("Git Pull on ONOS branch:" + gitBranch)
             stepResult = main.ONOSbench.gitPull()
@@ -56,11 +60,12 @@
                                     actual=stepResult,
                                     onpass="Successfully build onos.",
                                     onfail="Failed to build onos. Exiting test...")
-            if not stepResult: main.exit()
+            if not stepResult:
+                main.exit()
 
         else:
             main.log.warn("Skipped pulling onos and Skipped building ONOS")
-
+        main.onosIp = main.ONOSbench.getOnosIps()
         main.apps = main.params['ENV']['cellApps']
         main.BENCHUser = main.params['BENCH']['user']
         main.BENCHIp = main.params['BENCH']['ip1']
@@ -75,6 +80,7 @@
         main.verifySleep = int(main.params['SLEEP']['verify'])
         main.setMasterSleep = int(main.params['SLEEP']['setmaster'])
         main.verifyAttempts = int(main.params['ATTEMPTS']['verify'])
+        main.maxInvalidRun = int(main.params['ATTEMPTS']['maxInvalidRun'])
         main.sampleSize = int(main.params['TEST']['sampleSize'])
         main.warmUp = int(main.params['TEST']['warmUp'])
         main.ingress = main.params['TEST']['ingress']
@@ -84,7 +90,7 @@
         main.deviceCount = int(main.params['TEST']['deviceCount'])
         main.end1 = main.params['TEST']['end1']
         main.end2 = main.params['TEST']['end2']
-
+        main.searchTerm = main.params['SEARCHTERM']
         if main.flowObj == "True":
             main.flowObj = True
             main.dbFileName = main.params['DATABASE']['dbFlowObj']
@@ -100,6 +106,11 @@
         main.log.info("Create Database file " + main.dbFileName)
         resultsDB = open(main.dbFileName, "w+")
         resultsDB.close()
+        file1 = main.params[ "DEPENDENCY" ][ "FILE1" ]
+        main.dependencyPath = os.path.dirname( os.getcwd() ) + main.params[ "DEPENDENCY" ][ "PATH" ]
+        main.intentRerouteLatFuncs = imp.load_source(file1, main.dependencyPath + file1 + ".py")
+
+        main.record = 0
 
     def CASE1( self, main ):
         '''
@@ -133,7 +144,8 @@
                       " before initiating environment setup")
 
         for i in range(main.numCtrls):
-            main.ONOSbench.onosDie(main.ONOSip[i])
+            main.ONOSbench.onosStop(main.ONOSip[i])
+            main.ONOSbench.onosKill(main.ONOSip[i])
 
         main.log.info("NODE COUNT = %s" % main.numCtrls)
         main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
@@ -179,25 +191,39 @@
                                     onfail="Test step FAIL")
             installResult = installResult and i_result
 
-        main.step("Verify ONOS nodes UP status")
-        statusResult = main.TRUE
-        for i in range(int(main.numCtrls)):
-            main.log.info("ONOS Node " + main.ONOSip[i] + " status:")
-            onos_status = main.ONOSbench.onosStatus(node=main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            statusResult = (statusResult and onos_status)
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
             secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+            utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                    onpass="Test step PASS",
+                                    onfail="Test step FAIL" )
+
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE, actual=stepResult,
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
-        time.sleep(2)
+        time.sleep(main.startUpSleep)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
@@ -226,10 +252,13 @@
         if main.flowObj:
             main.CLIs[0].setCfg("org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator",
                                 "useFlowObjectives", value="true")
-        time.sleep(main.startUpSleep)
-
+        time.sleep( main.startUpSleep )
+        for i in range( int( main.numCtrls ) ):
+            main.CLIs[i].logSet( "DEBUG", "org.onosproject.metrics.topology" )
+            main.CLIs[i].logSet( "DEBUG", "org.onosproject.metrics.intent" )
         # Balance Master
         main.CLIs[0].balanceMasters()
+        time.sleep( main.setMasterSleep )
         if len(main.ONOSip) > 1:
             main.CLIs[0].deviceRole(main.end1[ 'name' ], main.ONOSip[0])
             main.CLIs[0].deviceRole(main.end2[ 'name' ], main.ONOSip[0])
@@ -245,26 +274,33 @@
         ts = time.time()
         print(main.intentsList)
         for batchSize in main.intentsList:
+            main.batchSize = batchSize
             main.log.report("Intent Batch size: " + str(batchSize) + "\n      ")
             main.LatencyList = []
-            validRun = 0
-            invalidRun = 0
-            while validRun <= main.warmUp + main.sampleSize and invalidRun <= 20:
-                if validRun >= main.warmUp:
+            main.LatencyListTopoToFirstInstalled = []
+            main.LatencyListFirstInstalledToLastInstalled = []
+            main.validRun = 0
+            main.invalidRun = 0
+            # initial a variables to record the term of startLine in karaf logs of each node
+            main.totalLines = []
+            for i in range( main.numCtrls ):
+                main.totalLines.append( '' )
+            while main.validRun <= main.warmUp + main.sampleSize and main.invalidRun <= main.maxInvalidRun:
+                if main.validRun >= main.warmUp:
                     main.log.info("================================================")
-                    main.log.info("Starting test iteration: {} ".format(validRun - main.warmUp))
-                    main.log.info("Total iteration: {}".format(validRun + invalidRun))
+                    main.log.info("Starting test iteration: {} ".format( main.validRun - main.warmUp))
+                    main.log.info("Total iteration: {}".format( main.validRun + main.invalidRun))
                     main.log.info("================================================")
                 else:
                     main.log.info("====================Warm Up=====================")
 
                 # push intents
-                main.CLIs[0].pushTestIntents(main.ingress, main.egress, batchSize,
+                main.CLIs[0].pushTestIntents(main.ingress, main.egress, main.batchSize,
                                              offset=1, options="-i", timeout=main.timeout)
 
                 # check links and flows
                 k = 0
-                verify = main.FALSE
+                main.verify = main.FALSE
                 linkCheck = 0
                 flowsCheck = 0
                 while k <= main.verifyAttempts:
@@ -274,128 +310,74 @@
                     flowsCheck = summary.get("flows")
                     if linkCheck == main.deviceCount * 2 and flowsCheck == batchSize * (main.deviceCount - 1 ):
                         main.log.info("links: {}, flows: {} ".format(linkCheck, flowsCheck))
-                        verify = main.TRUE
+                        main.verify = main.TRUE
                         break
                     k += 1
-                if not verify:
-                    main.log.warn("Links or flows number are not match!")
+                if not main.verify:
+                    main.log.warn("Links or flows number not as expected")
                     main.log.warn("links: {}, flows: {} ".format(linkCheck, flowsCheck))
                     # bring back topology
-                    main.CLIs[0].removeAllIntents(purge=True, sync=True, timeout=main.timeout)
-                    time.sleep(1)
-                    main.CLIs[0].purgeWithdrawnIntents()
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
-                    if validRun >= main.warmUp:
-                        invalidRun += 1
+                    main.intentRerouteLatFuncs.bringBackTopology( main )
+                    if main.validRun >= main.warmUp:
+                        main.invalidRun += 1
                         continue
                     else:
-                        validRun += 1
+                        main.validRun += 1
                         continue
-
                 # Bring link down
                 main.CLIs[0].link( main.end1[ 'port' ], main.end2[ 'port' ], "down",
                                   timeout=main.timeout, showResponse=False)
-                verify = main.FALSE
+                main.verify = main.FALSE
                 k = 0
-                topoManagerLog = ""
                 while k <= main.verifyAttempts:
                     time.sleep(main.verifySleep)
                     summary = json.loads(main.CLIs[0].summary(timeout=main.timeout))
                     linkCheck = summary.get("links")
                     flowsCheck = summary.get("flows")
-                    if linkCheck == (main.deviceCount - 1) * 2:
+                    if linkCheck == (main.deviceCount - 1) * 2 and flowsCheck == batchSize * main.deviceCount:
                         main.log.info("links: {}, flows: {} ".format(linkCheck, flowsCheck))
-                        verify = main.TRUE
+                        main.verify = main.TRUE
                         break
                     k += 1
-                if not verify:
-                    main.log.warn("Links number are not match in TopologyManager log!")
-                    main.log.warn(topoManagerLog)
+                if not main.verify:
+                    main.log.warn("Links or flows number not as expected")
+                    main.log.warn("links: {}, flows: {} ".format(linkCheck, flowsCheck))
                     # bring back topology
-                    main.CLIs[0].removeAllIntents(purge=True, sync=True, timeout=main.timeout)
-                    time.sleep(1)
-                    main.CLIs[0].purgeWithdrawnIntents()
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
-                    if validRun >= main.warmUp:
-                        invalidRun += 1
+                    main.intentRerouteLatFuncs.bringBackTopology( main )
+                    if main.validRun >= main.warmUp:
+                        main.invalidRun += 1
                         continue
                     else:
-                        validRun += 1
+                        main.validRun += 1
                         continue
-
-                try:
-                    # expect twice to clean the pexpect buffer
-                    main.ONOSbench.handle.sendline("")
-                    main.ONOSbench.handle.expect("\$")
-                    main.ONOSbench.handle.expect("\$")
-                    # send line by using bench, can't use driver because pexpect buffer problem
-                    cmd = "onos-ssh $OC1 cat /opt/onos/log/karaf.log | grep TopologyManager| tail -1"
-                    main.ONOSbench.handle.sendline(cmd)
-                    time.sleep(1)
-                    main.ONOSbench.handle.expect(":~")
-                    topoManagerLog = main.ONOSbench.handle.before
-                    topoManagerLogTemp = topoManagerLog.splitlines()
-                    # To make sure we get correct topology log
-                    for lines in topoManagerLogTemp:
-                        if "creationTime" in lines:
-                            topoManagerLog = lines
-                    main.log.info("Topology Manager log:")
-                    print(topoManagerLog)
-                    cutTimestamp = float(topoManagerLog.split("creationTime=")[1].split(",")[0])
-                except:
-                    main.log.error("Topology Log is not correct!")
-                    print(topoManagerLog)
-                    # bring back topology
-                    verify = main.FALSE
-                    main.CLIs[0].removeAllIntents(purge=True, sync=True, timeout=main.timeout)
-                    time.sleep(1)
-                    main.CLIs[0].purgeWithdrawnIntents()
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
-                    if validRun >= main.warmUp:
-                        invalidRun += 1
+                # record the link romving time as the startLine
+                for i in range( main.numCtrls ):
+                    logNum = main.intentRerouteLatFuncs.checkLog( main, i )
+                    main.totalLines[i] = str(main.CLIs[ i ].getTimeStampFromLog( "last", "LINK_REMOVED", "time = ", " ", logNum=logNum ))
+                    main.log.info("Node " + str( i+1 ) + ": the start timestamp is " + main.totalLines[i] + " this iteration" )
+                #Calculate values
+                lastTopologyToFirstInstalled, firstInstalledToLastInstalled, totalTime = main.intentRerouteLatFuncs.getValues( main )
+                if totalTime == -1:
+                    if main.validRun >= main.warmUp:
+                        main.invalidRun += 1
                     else:
-                        validRun += 1
-                    # If we got wrong Topology log, we should skip this iteration, and continue for next one
+                        main.validRun += 1
                     continue
-
-                installedTemp = []
-                time.sleep(1)
-                for cli in main.CLIs:
-                    tempJson = json.loads(cli.intentsEventsMetrics())
-                    Installedtime = tempJson.get('intentInstalledTimestamp').get('value')
-                    installedTemp.append(float(Installedtime))
-                for i in range(0, len(installedTemp)):
-                    main.log.info("ONOS Node {} Installed Time stemp: {}".format((i + 1), installedTemp[i]))
-                maxInstallTime = float(max(installedTemp))
-                if validRun >= main.warmUp and verify:
-                    main.log.info("Installed time stemp: {0:f}".format(maxInstallTime))
-                    main.log.info("CutTimestamp: {0:f}".format(cutTimestamp))
-                    # Both timeStemps are milliseconds
-                    main.log.info("Latency: {0:f}".format(float(maxInstallTime - cutTimestamp)))
-                    main.LatencyList.append(float(maxInstallTime - cutTimestamp))
-                # We get valid latency, validRun + 1
-                validRun += 1
+                else:
+                    main.log.info("Get valid latency")
+                    main.validRun += 1
 
                 # Verify Summary after we bring up link, and withdrawn intents
                 main.CLIs[0].link( main.end1[ 'port' ], main.end2[ 'port' ], "up",
                                   timeout=main.timeout)
                 k = 0
-                verify = main.FALSE
+                main.verify = main.FALSE
                 linkCheck = 0
                 flowsCheck = 0
                 while k <= main.verifyAttempts:
                     time.sleep(main.verifySleep)
-                    main.CLIs[0].removeAllIntents(purge=True, sync=True, timeout=main.timeout)
-                    time.sleep(1)
+                    main.CLIs[0].pushTestIntents(main.ingress, main.egress, batchSize,
+                                                 offset=1, options="-w", timeout=main.timeout)
                     main.CLIs[0].purgeWithdrawnIntents()
                     summary = json.loads(main.CLIs[0].summary())
                     linkCheck = summary.get("links")
@@ -403,31 +385,41 @@
                     intentCheck = summary.get("intents")
                     if linkCheck == main.deviceCount * 2 and flowsCheck == 0 and intentCheck == 0:
                         main.log.info("links: {}, flows: {}, intents: {} ".format(linkCheck, flowsCheck, intentCheck))
-                        verify = main.TRUE
+                        main.verify = main.TRUE
                         break
                     k += 1
-                if not verify:
-                    main.log.error("links, flows, or intents are not correct!")
+                if not main.verify:
+                    main.log.error("links, flows or intents number not as expected")
                     main.log.info("links: {}, flows: {}, intents: {} ".format(linkCheck, flowsCheck, intentCheck))
                     # bring back topology
-                    main.log.info("Bring back topology...")
-                    main.CLIs[0].removeAllIntents(purge=True, sync=True, timeout=main.timeout)
-                    time.sleep(1)
-                    main.CLIs[0].purgeWithdrawnIntents()
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
+                    main.intentRerouteLatFuncs.bringBackTopology( main )
                     continue
+                #main.log.info("total negative results num: " + str( main.record ) )
 
             aveLatency = 0
+            aveLatencyTopoToFirstInstalled = 0
+            aveLatencyFirstInstalledToLastInstalled = 0
+
             stdLatency = 0
-            aveLatency = numpy.average(main.LatencyList)
-            stdLatency = numpy.std(main.LatencyList)
-            main.log.report("Scale: " + str(main.numCtrls) + "  \tIntent batch: " + str(batchSize))
-            main.log.report("Latency average:................" + str(aveLatency))
-            main.log.report("Latency standard deviation:....." + str(stdLatency))
-            main.log.report("________________________________________________________")
+            stdLatencyTopoToFirstInstalled = 0
+            stdLatencyFirstInstalledToLastInstalled = 0
+
+            aveLatency = numpy.average( main.LatencyList )
+            aveLatencyTopoToFirstInstalled = numpy.average( main.LatencyListTopoToFirstInstalled )
+            aveLatencyFirstInstalledToLastInstalled = numpy.average( main.LatencyListFirstInstalledToLastInstalled )
+
+            stdLatency = numpy.std( main.LatencyList )
+            stdLatencyTopoToFirstInstalled = numpy.std( main.LatencyListTopoToFirstInstalled )
+            stdLatencyFirstInstalledToLastInstalled = numpy.std( main.LatencyListFirstInstalledToLastInstalled )
+
+            main.log.report( "Scale: " + str( main.numCtrls ) + "  \tIntent batch: " + str( batchSize ) )
+            main.log.report( "Total Latency average:................" + str( aveLatency ) )
+            main.log.report( "Latency standard deviation:..........." + str( stdLatency ) )
+            main.log.report( "Last Topology to first installed Latency average:................." + str( aveLatencyTopoToFirstInstalled ) )
+            main.log.report( "Last Topology to first installed Latency standard deviation:......" + str( stdLatencyTopoToFirstInstalled ) )
+            main.log.report( "First installed to last installed Latency average:................" + str( aveLatencyFirstInstalledToLastInstalled ) )
+            main.log.report( "First installed to last installed Latency standard deviation:....." + str( stdLatencyFirstInstalledToLastInstalled ) )
+            main.log.report( "________________________________________________________" )
 
             if not (numpy.isnan(aveLatency) or numpy.isnan(stdLatency)):
                 # check if got NaN for result
@@ -436,6 +428,10 @@
                 resultsDB.write(str(main.numCtrls) + ",")
                 resultsDB.write(str(batchSize) + ",")
                 resultsDB.write(str(aveLatency) + ",")
-                resultsDB.write(str(stdLatency) + "\n")
+                resultsDB.write(str(stdLatency) + ",")
+                resultsDB.write(str(aveLatencyTopoToFirstInstalled) + ",")
+                resultsDB.write(str(stdLatencyTopoToFirstInstalled) + ",")
+                resultsDB.write(str(aveLatencyFirstInstalledToLastInstalled) + ",")
+                resultsDB.write(str(stdLatencyFirstInstalledToLastInstalled) + "\n")
                 resultsDB.close()
         del main.scale[0]
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/dependencies/intentRerouteLatFuncs.py b/TestON/tests/SCPF/SCPFintentRerouteLat/dependencies/intentRerouteLatFuncs.py
new file mode 100644
index 0000000..24cf32b
--- /dev/null
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/dependencies/intentRerouteLatFuncs.py
@@ -0,0 +1,109 @@
+'''
+The functions for intentRerouteLat
+
+'''
+import numpy
+import time
+
+def _init_( self ):
+    self.default = ''
+
+def checkLog( main, nodeId ):
+    try:
+        logNames = main.ONOSbench.listLog( main.onosIp[ nodeId ] )
+        assert logNames is not None
+        if len( logNames ) >= 2:
+            return 2
+        return 1
+    except AssertionError:
+        main.log.error("There is no karaf log")
+        return -1
+
+def bringBackTopology( main ):
+    main.log.info( "Bring back topology " )
+    main.CLIs[ 0 ].pushTestIntents(main.ingress, main.egress, main.batchSize,
+                                 offset=1, options="-w", timeout=main.timeout)
+    main.CLIs[ 0 ].purgeWithdrawnIntents()
+    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
+    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.nil.NullProviders", "enabled", value="false")
+    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
+    main.CLIs[ 0 ].setCfg( "org.onosproject.provider.nil.NullProviders", "enabled", value="true")
+    main.CLIs[ 0 ].balanceMasters()
+    time.sleep( main.setMasterSleep )
+    if len( main.ONOSip ) > 1:
+        main.CLIs[ 0 ].deviceRole(main.end1[ 'name' ], main.ONOSip[ 0 ])
+        main.CLIs[ 0 ].deviceRole(main.end2[ 'name' ], main.ONOSip[ 0 ])
+    time.sleep( main.setMasterSleep )
+
+def getValues( main ):
+    '''
+    Calculated the wanted values for intentRerouteTest
+
+    1. Get the first "last topology timestamp" from karaf.log in different node
+    2. Get the first "first intent installed timestamp" from  karaf log in different node
+    3. Get the last "last intent installed timestamp" from karaf log in different node
+
+    Return:
+        last_topology_to_first_installed: The time from the last topology to the first intent installed
+        first_installed_to_last_installed: Time time from the first topology to the last intent installed
+        totalTime: The time from the last topology to the last intent installed
+
+    '''
+    lastTopologyTimestamp = compareTimestamp( main, main.searchTerm[ "TopologyTime" ], "creationTime=", ",",  'last',func='min' )
+    firstIntentInstalledTimestamp = compareTimestamp( main, main.searchTerm[ "InstallTime" ], "time = ", " ",  'first',func='min' )
+    lastIntentInstalledTimestamp = compareTimestamp( main, main.searchTerm[ "InstallTime" ], "time = ", " ",  'last',func='max' )
+
+    if lastTopologyTimestamp == -1 or firstIntentInstalledTimestamp == -1 or lastIntentInstalledTimestamp == -1:
+        main.log.warn( "Can't get timestamp from karaf log! " )
+        bringBackTopology( main )
+        return -1, -1, -1
+
+    #calculate values
+    lastTopologyToFirstInstalled = firstIntentInstalledTimestamp - lastTopologyTimestamp
+    if lastTopologyToFirstInstalled < 0:
+        main.record = main.record + 1
+
+    firstInstalledToLastInstalled = lastIntentInstalledTimestamp - firstIntentInstalledTimestamp
+    totalTime = lastIntentInstalledTimestamp - lastTopologyTimestamp
+
+    if main.validRun >= main.warmUp and main.verify:
+        main.log.info( "Last topology time stamp: {0:f}".format( lastTopologyTimestamp ))
+        main.log.info( "First installed time stamp: {0:f}".format( firstIntentInstalledTimestamp ))
+        main.log.info( "Last installed time stamp: {0:f}".format( lastIntentInstalledTimestamp ))
+        main.log.info( "Last topology to first installed latency:{0:f}".format( lastTopologyToFirstInstalled ))
+        main.log.info( "First installed to last installed latency:{0:f}".format( firstInstalledToLastInstalled ))
+        main.log.info( "Overall latency:{0:f}".format( totalTime ))
+        main.LatencyList.append( totalTime )
+        main.LatencyListTopoToFirstInstalled.append( lastTopologyToFirstInstalled )
+        main.LatencyListFirstInstalledToLastInstalled.append( firstInstalledToLastInstalled )
+    return lastTopologyToFirstInstalled, firstInstalledToLastInstalled, totalTime
+
+def compareTimestamp( main, compareTerm, splitTerm_before, splitTerm_after, mode, func='max' ):
+    '''
+    Compare all the timestamps of compareTerm from different node.
+
+    func:
+        max: Compare which one is the biggest and retun it
+        min: Compare which one is the smallest and return it
+
+    return:
+        This function will return the biggest or smallest timestamps of the compareTerm.
+
+    '''
+    compareTermList = []
+    for i in range( main.numCtrls ):
+        timestamp = main.CLIs[ i ].getTimeStampFromLog( mode, compareTerm, splitTerm_before, splitTerm_after, startLine=main.totalLines[ i ], logNum=checkLog( main, i ) )
+        compareTermList.append( timestamp )
+    main.log.info("-----------------------------------------------")
+    for i in range( main.numCtrls ):
+        main.log.info( "ONOS Node {} {} {} time stamp: {}".format((i+1), mode, compareTerm, compareTermList[ i ]))
+    x = min( compareTermList )
+    main.log.info("-----------------------------------------------")
+    if x == -1:
+        main.log.warn( "Can't compare timestamps" )
+        return -1
+    else:
+        if func == 'max':
+            return max( compareTermList )
+        if func == 'min':
+            return min( compareTermList )
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
index 59dc3a1..b29ca81 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
@@ -122,7 +122,8 @@
                       " before initiating environment setup")
 
         for i in range( main.numCtrls ):
-            main.ONOSbench.onosDie( main.ONOSip[i] )
+            main.ONOSbench.onosStop( main.ONOSip[i] )
+            main.ONOSbench.onosKill( main.ONOSip[i] )
 
         main.log.info( "NODE COUNT = %s" % main.numCtrls )
         main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
@@ -168,17 +169,6 @@
                                     onfail="Test step FAIL")
             installResult = installResult and i_result
 
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.ONOSip[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus( node=main.ONOSip[i] )
-            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            statusResult = statusResult and onos_status
-        time.sleep(2)
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -187,6 +177,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step( " Start ONOS cli using thread " )
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
index 1a1e38f..3304d27 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
@@ -167,7 +167,8 @@
                        " before initiating environment setup" )
 
         for i in range( main.numCtrls ):
-            main.ONOSbench.onosDie( main.ONOSip[ i ] )
+            main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            main.ONOSbench.onosKill( main.ONOSip[ i ] )
 
         tempOnosIp = []
         for i in range( main.numCtrls ):
@@ -219,6 +220,14 @@
                                  onpass="Successfully installed ONOS package",
                                  onfail="Failed to install ONOS package" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep( main.startUpSleep )
         main.step( "Starting ONOS service" )
         stopResult = main.TRUE
@@ -245,14 +254,6 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
-        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
-                                 onpass="Test step PASS",
-                                 onfail="Test step FAIL" )
-
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         main.activeNodes = []
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
index 254956c..f7a8782 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
@@ -56,14 +56,14 @@
 
     '''
     try:
-        termInfo = main.CLIs[ index ].logSearch( term, mode=Mode)
+        termInfo = main.CLIs[ index ].logSearch( mode=Mode, searchTerm=term )
         termTime = getTimestampFromString( main, termInfo[ 0 ] )
         roleRequestTime = getRoleRequestTimeFromTshark( main )
         if termTime == -1 or roleRequestTime == -1:
             main.writeData = -1
             main.log.error( "Can't compare the difference with role request time" )
             return -1
-	# Only concern about the absolute value of difference.
+        # Only concern about the absolute value of difference.
         return abs( roleRequestTime - termTime )
     except IndexError:
         main.log.error( "Catch the wrong information of search term " )
@@ -87,8 +87,8 @@
 
     '''
     try:
-        termInfo1 = main.CLIs[ index ].logSearch( term1, mode=mode1 )
-        termInfo2 = main.CLIs[ index ].logSearch( term2, mode=mode2 )
+        termInfo1 = main.CLIs[ index ].logSearch( mode=mode1, searchTerm=term1 )
+        termInfo2 = main.CLIs[ index ].logSearch( mode=mode2, searchTerm=term2 )
         if funcMode == 'TD':
             startTime = getTimestampFromString( main, termInfo1[0] )
             endTime = getTimestampFromString ( main, termInfo2[0] )
@@ -449,6 +449,16 @@
         restartResult = main.FALSE
         main.log.error( main.topoName + ": Failed to install ONOS cluster" )
 
+    main.log.info( main.topoName + ": set up ONOS secure SSH" )
+    secureSshResult = []
+    for i in range( int( main.numCtrls ) ):
+        secureSshResult.append( main.onosSecureSSH( node=main.ONOSip[i] ) )
+    if all( result == main.TRUE for result in secureSshResult ):
+        main.log.info( main.topoName + ": Successfully set up ONOS secure SSH" )
+    else:
+        main.log.error( main.topoName + ": Failed to set up ONOS secure SSH" )
+        restartResult = main.FALSE
+
     for i in range( main.numCtrls ):
         onosIsUpResult.append( main.ONOSbench.isup( main.ONOSip[ i ] ) )
 
@@ -473,16 +483,6 @@
         else:
             main.log.error( main.topoName + ": Failed to start ONOS cluster" )
 
-    main.log.info( main.topoName + ": set up ONOS secure SSH" )
-    secureSshResult = []
-    for i in range( int( main.numCtrls ) ):
-        secureSshResult.append( main.onosSecureSSH( node=main.ONOSip[i] ) )
-    if all( result == main.TRUE for result in secureSshResult ):
-        main.log.info( main.topoName + ": Successfully set up ONOS secure SSH" )
-    else:
-        main.log.error( main.topoName + ": Failed to set up ONOS secure SSH" )
-        restartResult = main.FALSE
-
     main.log.info( main.topoName + ": Starting ONOS CLI" )
     cliResult = []
     for i in range( main.numCtrls ):
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
index a7a7bc5..f82d684 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
@@ -140,7 +140,8 @@
                        " before initiating environment setup" )
 
         for i in range( main.numCtrls ):
-            main.ONOSbench.onosDie( main.ONOSip[ i ] )
+            main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            main.ONOSbench.onosKill( main.ONOSip[ i ] )
 
         main.log.info( "NODE COUNT = %s" % main.numCtrls)
 
@@ -192,16 +193,6 @@
                                      onfail="Test step FAIL" )
             installResult = installResult and i_result
 
-        main.step( "Verify ONOS nodes UP status" )
-        statusResult = main.TRUE
-        for i in range( int( main.numCtrls ) ):
-            main.log.info( "ONOS Node " + main.ONOSip[i] + " status:" )
-            onos_status = main.ONOSbench.onosStatus( node=main.ONOSip[i] )
-            utilities.assert_equals( expect=main.TRUE, actual=onos_status,
-                                     onpass="Test step PASS",
-                                     onfail="Test step FAIL" )
-            statusResult = ( statusResult and onos_status )
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -210,6 +201,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index 3fef087..e62951a 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -125,7 +125,8 @@
                       " before initiating environment setup")
 
         for i in range(main.numCtrls):
-            main.ONOSbench.onosDie(main.ONOSip[i])
+            main.ONOSbench.onosStop(main.ONOSip[i])
+            main.ONOSbench.onosKill(main.ONOSip[i])
 
         main.log.info("NODE COUNT = %s" % main.numCtrls)
         main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
@@ -171,16 +172,6 @@
                                     onfail="Test step FAIL")
             installResult = installResult and i_result
 
-        main.step("Verify ONOS nodes UP status")
-        statusResult = main.TRUE
-        for i in range(int(main.numCtrls)):
-            main.log.info("ONOS Node " + main.ONOSip[i] + " status:")
-            onos_status = main.ONOSbench.onosStatus(node=main.ONOSip[i])
-            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
-                                    onpass="Test step PASS",
-                                    onfail="Test step FAIL")
-            statusResult = (statusResult and onos_status)
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.TRUE
         for i in range( int( main.numCtrls ) ):
@@ -189,6 +180,30 @@
                                  onpass="Test step PASS",
                                  onfail="Test step FAIL" )
 
+        time.sleep( main.startUpSleep )
+        main.step( "Starting ONOS service" )
+        stopResult = main.TRUE
+        startResult = main.TRUE
+        onosIsUp = main.TRUE
+        for i in range( main.numCtrls ):
+            onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
+        if onosIsUp == main.TRUE:
+            main.log.report( "ONOS instance is up and ready" )
+        else:
+            main.log.report( "ONOS instance may not be up, stop and " +
+                             "start ONOS again " )
+            for i in range( main.numCtrls ):
+                stopResult = stopResult and \
+                        main.ONOSbench.onosStop( main.ONOSip[ i ] )
+            for i in range( main.numCtrls ):
+                startResult = startResult and \
+                        main.ONOSbench.onosStart( main.ONOSip[ i ] )
+        stepResult = onosIsUp and stopResult and startResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="ONOS service is ready",
+                                 onfail="ONOS service did not start properly" )
+
         time.sleep(2)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
diff --git a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
index 41a2fc4..4f46e48 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/dependencies/switchFunc.py
@@ -15,7 +15,7 @@
         searchTerm: the key term of timestamp
 
     '''
-    lines = main.CLIs[ index ].logSearch( searchTerm, mode='last' )
+    lines = main.CLIs[ index ].logSearch( mode='last', searchTerm=searchTerm )
     try:
         assert lines != None
         logString = lines[ len ( lines ) - 1 ]
@@ -195,6 +195,13 @@
             resultFile.close()
         FinAckSeq = processPackage( FinAckText )[ 'Seq' ]
         FinAckOFseq = findSeqBySeqAck( FinAckSeq, resultText )
+        if FinAckOFseq == None:
+            main.log.warn( "Tshark Result was incorrect!" )
+            main.log.warn( resultText )
+            main.wrong[ 'TsharkValueIncorrect' ] += 1
+            main.wrong[ 'totalWrong' ] += 1
+            checkTotalWrongNum()
+            return
         with open( main.tsharkResultPath[ 'down' ][ 'ACK' ], "r" ) as resultFile:
             ACKlines = resultFile.readlines()
             resultFile.close()
diff --git a/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py b/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
index 0873626..1c19c30 100644
--- a/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
+++ b/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
@@ -57,6 +57,9 @@
         onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
                                                            node = ONOS1Ip )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onos1Isup = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
@@ -65,9 +68,6 @@
         if not onos1Isup:
             main.log.report( "ONOS1 didn't start!" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
-
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout = 100, onosStartTimeout = 600 )
 
diff --git a/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py b/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
index 4bfa244..9d6ae4a 100644
--- a/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
+++ b/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
@@ -56,6 +56,9 @@
         onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
                                                            node=ONOS1Ip )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+
         main.step( "Checking if ONOS is up yet" )
         for i in range( 2 ):
             onos1Isup = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
@@ -64,9 +67,6 @@
         if not onos1Isup:
             main.log.report( "ONOS1 didn't start!" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
-
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout=100, onosStartTimeout=600)
 
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 7ef28e6..08eb9c9 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -8,7 +8,7 @@
 
 class Testcaselib:
 
-    useSSH=False
+    useSSH=True
 
     @staticmethod
     def initTest( main ):
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/cord_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/cord_fabric.py
index 6348632..2c91806 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/cord_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/cord_fabric.py
@@ -2,8 +2,9 @@
 
 import os
 import re
+import math
 from optparse import OptionParser
-
+from ipaddress import IPv6Network, IPv4Network
 from mininet.net import Mininet
 from mininet.topo import Topo
 from mininet.node import RemoteController, UserSwitch, Host, OVSBridge
@@ -26,12 +27,77 @@
                        help='number of ONOS Instances, default=0, 0 means localhost, 1 will use OC1 and so on' )
     parser.add_option( '--vlan', dest='vlan', type='int', default=-1,
                        help='vid of cross connect, default=-1, -1 means utilize default value' )
+    parser.add_option( '--ipv6', action="store_true", dest='ipv6',
+                       help='hosts are capable to use also ipv6' )
     (options, args) = parser.parse_args( )
     return options, args
 
 
 opts, args = parseOptions( )
 
+IP6_SUBNET_CLASS = 120
+IP4_SUBNET_CLASS = 24
+
+class LeafAndSpine6( Topo ):
+    """
+    Create Leaf and Spine Topology for IPv4/IPv6 tests.
+    """
+    def __init__( self, spine=2, leaf=2, fanout=2, **opts ):
+        Topo.__init__( self, **opts )
+        spines          = {}
+        leafs           = {}
+        """
+        We calculate the offset from /120 and from /24 in order to have
+        a number of /120 and /24 subnets == leaf
+        """
+        offset          = int(math.ceil(math.sqrt( leaf )))
+        """
+        We calculate the subnets to use and set options
+        """
+        ipv6SubnetClass = unicode('2000::/%s' % (IP6_SUBNET_CLASS - offset))
+        ipv6Subnets     = list(IPv6Network(ipv6SubnetClass).subnets( new_prefix = IP6_SUBNET_CLASS ))
+        ipv4SubnetClass = unicode('10.0.0.0/%s' % (IP4_SUBNET_CLASS - offset))
+        ipv4Subnets     = list(IPv4Network(ipv4SubnetClass).subnets( new_prefix = IP4_SUBNET_CLASS ))
+        linkopts        = dict( bw=100 )
+        """
+        We create the spine switches
+        """
+        for s in range( spine ):
+            spines[ s ] = self.addSwitch( 'spine10%s' % (s + 1),
+                                          dpid="00000000010%s" % (s + 1) )
+        """
+        We create the leaf switches
+        """
+        for ls in range( leaf ):
+            leafs[ ls ] = self.addSwitch( 'leaf%s' % (ls + 1),
+                                          dpid="00000000000%s" % (1 + ls) )
+            ipv6Subnet  = ipv6Subnets[ ls ]
+            ipv6Hosts   = list(ipv6Subnet.hosts())
+            ipv4Subnet  = ipv4Subnets[ ls ]
+            ipv4Hosts   = list(ipv4Subnet.hosts())
+            """
+            We add the hosts
+            """
+            for f in range( fanout ):
+                ipv6 = ipv6Hosts[ f ]
+                ipv6Gateway = ipv6Hosts[ len( ipv6Hosts ) - 1 ]
+                ipv4 = ipv4Hosts[ f ]
+                ipv4Gateway = ipv4Hosts[ len( ipv4Hosts ) - 1 ]
+                host = self.addHost(
+                    name='h%s' % (ls * fanout + f + 1),
+                    cls=Ipv6Host,
+                    ip="%s/%s" %(ipv4, IP4_SUBNET_CLASS),
+                    gateway='%s' % ipv4Gateway,
+                    ipv6="%s/%s" %(ipv6, IP6_SUBNET_CLASS),
+                    ipv6Gateway="%s" % ipv6Gateway
+                    )
+                self.addLink( host, leafs[ ls ], **linkopts )
+            """
+            Connect leaf to all spines
+            """
+            for s in range( spine ):
+                switch = spines[ s ]
+                self.addLink( leafs[ ls ], switch, **linkopts )
 
 class LeafAndSpine( Topo ):
     def __init__( self, spine=2, leaf=2, fanout=2, **opts ):
@@ -92,6 +158,22 @@
         self.cmd( mtu )
         self.cmd( 'ip route add default via %s' % self.gateway )
 
+class Ipv6Host( IpHost ):
+    """
+    Abstraction to model an augmented host with a ipv6
+    functionalities as well
+    """
+    def __init__( self, name, *args, **kwargs ):
+        IpHost.__init__(self, name, *args, **kwargs)
+
+    def config( self, **kwargs ):
+        IpHost.config( self, **kwargs )
+        ipv6Cmd         = 'ifconfig %s-eth0 inet6 add %s' % (self.name, kwargs['ipv6'])
+        ipv6GatewayCmd  = 'ip -6 route add default via %s' % kwargs['ipv6Gateway']
+        ipv6MtuCmd      = 'ifconfig %s-eth0 inet6 mtu 1490' % (self.name)
+        self.cmd( ipv6Cmd )
+        self.cmd( ipv6GatewayCmd )
+        self.cmd( ipv6MtuCmd )
 
 class VLANHost( Host ):
     "Host connected to VLAN interface"
@@ -143,15 +225,34 @@
         link = self.mn.addLink( host, switch )
         host.config(**params)
 
+    def do_pingall6( self, line ):
+        "Ping6 between all hosts."
+        self.mn.pingAll6( line )
+
 def config( opts ):
     spine = opts.spine
     leaf = opts.leaf
     fanout = opts.fanout
     vlan = opts.vlan
+    ipv6 = opts.ipv6
     controllers = [ os.environ[ 'OC%s' % i ] for i in
                     range( 1, opts.onos + 1 ) ] if (opts.onos) else [
         '127.0.0.1' ]
-    topo = LeafAndSpine( spine=spine, leaf=leaf, fanout=fanout, vlan=vlan )
+    if not ipv6:
+        topo = LeafAndSpine(
+            spine=spine,
+            leaf=leaf,
+            fanout=fanout,
+            vlan=vlan,
+            )
+    else:
+        topo = LeafAndSpine6(
+            spine=spine,
+            leaf=leaf,
+            fanout=fanout,
+            vlan=vlan,
+            ipv6=ipv6
+            )
     net = Mininet( topo=topo, link=TCLink, build=False,
                    switch=UserSwitch, controller=None, autoSetMacs=True )
     i = 0
@@ -160,12 +261,12 @@
         i += 1;
     net.build( )
     net.start( )
-    out1 = net.get( 'out1' )
-    out1.cmd( "arp -s 10.0.9.254 10:00:00:00:00:01 -i %s " % (out1.intf()) )
-    CLI(net)
+    if not ipv6:
+        out1 = net.get( 'out1' )
+        out1.cmd( "arp -s 10.0.9.254 10:00:00:00:00:01 -i %s " % (out1.intf()) )
+    ExtendedCLI(net)
     net.stop( )
 
-
 if __name__ == '__main__':
     setLogLevel( 'info' )
     config( opts )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
index 3570fd0..104fe3f 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.params
@@ -4,6 +4,7 @@
 
     #Environment variables
     <ENV>
+        #Cells that you use
         <cellName>sdnip_single</cellName>
         <appString>drivers,openflow,proxyarp</appString>
     </ENV>
@@ -21,14 +22,14 @@
     </DEPENDENCY>
 
     <config>
-        <peerNum> 3 </peerNum>
+        <peerNum> 7 </peerNum>
         <switchNum> 39 </switchNum>
     </config>
 
     <timers>
         <SdnIpSetup>10</SdnIpSetup>
         <TopoDiscovery>60</TopoDiscovery>
-        <PingTestWithRoutes>20</PingTestWithRoutes>
+        <PingTestWithRoutes>30</PingTestWithRoutes>
         <PingTestWithoutRoutes>100</PingTestWithoutRoutes>
         <RouteDelivery>60</RouteDelivery>
         <PathAvailable>20</PathAvailable>
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
index f1ace78..4ca92c7 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
@@ -10,7 +10,6 @@
             Start mininet
         """
         import os
-        import imp
         main.case( "Setup the Mininet testbed" )
         main.dependencyPath = main.testDir + \
                               main.params[ 'DEPENDENCY' ][ 'path' ]
@@ -69,10 +68,8 @@
            onos-install -f
            onos-wait-for-start
         """
-        import json
         import time
         import os
-        from operator import eq
 
         main.case( "Setting up ONOS environment" )
 
@@ -160,13 +157,6 @@
                                  onpass="Install ONOS succeeded",
                                  onfail="Install ONOS failed" )
 
-        main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=onos1UpResult,
-                                 onpass="ONOS is up",
-                                 onfail="ONOS is NOT up" )
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
         utilities.assert_equals( expect=main.TRUE,
@@ -174,6 +164,13 @@
                                  onpass="Set up ONOS secure SSH succeeded",
                                  onfail="Set up ONOS secure SSH failed " )
 
+        main.step( "Checking if ONOS is up yet" )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1UpResult,
+                                 onpass="ONOS is up",
+                                 onfail="ONOS is NOT up" )
+
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout=100, onosStartTimeout=600 )
@@ -200,6 +197,9 @@
             main.exit()
 
     def CASE200( self, main ):
+        import json
+        import time
+
         main.case( "Activate sdn-ip application" )
         main.log.info( "waiting link discovery......" )
         time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
@@ -242,6 +242,8 @@
         '''
         This test case is to load the methods from other Python files.
         '''
+        import imp
+
         main.case( "Loading methods from other Python file" )
         # load the methods from other file
         wrapperFile = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
@@ -253,20 +255,29 @@
 
     def CASE1( self, main ):
         '''
-        ping test from 3 bgp peers to BGP speaker
+        ping test from 7 bgp peers to BGP speaker
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
 
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ "p64517", "p64518" ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk3" ],
+                                          peers=[ "p64519", "p64520" ],
+                                          expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
         import time
+        from operator import eq
+
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
@@ -304,6 +315,11 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
+        allRoutesExpected.append( "7.0.0.0/24" + "/" + "10.0.7.1" )
+        allRoutesExpected.append( "8.0.0.0/24" + "/" + "10.0.8.1" )
+        allRoutesExpected.append( "9.0.0.0/24" + "/" + "10.0.9.1" )
+        allRoutesExpected.append( "20.0.0.0/24" + "/" + "10.0.20.1" )
+
         getRoutesResult = main.ONOScli.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
@@ -330,7 +346,7 @@
         getIntentsResult = main.ONOScli.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
-        routeIntentsExpectedNum = 3
+        routeIntentsExpectedNum = 7
         if routeIntentsActualNum != routeIntentsExpectedNum:
             time.sleep( int( main.params['timers']['RouteDelivery'] ) )
             getIntentsResult = main.ONOScli.intents( jsonFormat=True )
@@ -364,10 +380,19 @@
         Ping test in data plane for each route
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
+        #No vlan
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
+        #vlan 10
+        main.Functions.pingHostToHost( main,
+                                       hosts=[ "h64519", "h64520" ],
+                                       expectAllSuccess=True )
 
+        # vlan 20
+        main.Functions.pingHostToHost( main,
+                                       hosts=[ "h64517", "h64518" ],
+                                       expectAllSuccess=True )
 
     def CASE5( self, main ):
         '''
@@ -375,8 +400,8 @@
         '''
         import time
         main.case( "Bring down links and check routes/intents" )
-        main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring down the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="down" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult1,
@@ -385,15 +410,15 @@
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 ) #We have 7 links between peers and sw. After one link down, 7-1=6.
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring down the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="down" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult2,
@@ -401,15 +426,15 @@
                                 onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 ) #2 links down, 7-2=5.
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring down the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="down" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult3,
@@ -417,8 +442,8 @@
                                 onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 0 )
-            main.Functions.checkM2SintentNum( main, 0 )
+            main.Functions.checkRouteNum( main, 4 ) #3 links downs 7-3=4
+            main.Functions.checkM2SintentNum( main, 4 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
@@ -436,12 +461,13 @@
             onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                                          peers=["p64514", "p64515", "p64516"],
+                                          expectAllSuccess=False )
+
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
-                        expectAllSuccess=False )
+                                       hosts=["h64514", "h64515", "h64516"],
+                                       expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -450,8 +476,8 @@
         '''
         import time
         main.case( "Bring up links and check routes/intents" )
-        main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring up the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="up" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult1,
@@ -459,15 +485,15 @@
                                 onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 ) #one links up, 4+1=5
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring up the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="up" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult2,
@@ -475,15 +501,15 @@
                                 onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring up the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="up" )
         utilities.assertEquals( expect=main.TRUE,
                                 actual=linkResult3,
@@ -491,8 +517,8 @@
                                 onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
@@ -510,11 +536,11 @@
             onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -532,18 +558,18 @@
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
-            main.Functions.checkP2PintentNum( main, 12 )
+            main.Functions.checkRouteNum( main, 6 ) #stop one sw, which bring one link between peer and sw down.
+            main.Functions.checkM2SintentNum( main, 6 )
+            main.Functions.checkP2PintentNum( main, 36 ) #6 intents from sw to speakers x 6 intents to sw x 2 intents between them
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
-        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
-        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
+        result1 = main.Mininet.pingHost( src="h64514", target="h64515" )
+        result2 = main.Mininet.pingHost( src="h64515", target="h64516" )
+        result3 = main.Mininet.pingHost( src="h64514", target="h64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                                                 and ( result3 == main.FALSE )
@@ -556,9 +582,9 @@
             main.exit()
 
         main.step( "Check ping between BGP peers and speakers" )
-        result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
-        result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
-        result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
+        result4 = main.Mininet.pingHost( src="spk1", target="p64514" )
+        result5 = main.Mininet.pingHost( src="spk1", target="p64515" )
+        result6 = main.Mininet.pingHost( src="spk1", target="p64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                                                 and ( result6 == main.TRUE )
@@ -606,9 +632,9 @@
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 42 )
         else:
             main.log.error( "Starting switch failed!" )
             main.cleanup()
@@ -626,11 +652,11 @@
             onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -643,9 +669,9 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow number correctness before stopping sw11" )
-        main.Functions.checkFlowNum( main, "sw11", 13 )
+        main.Functions.checkFlowNum( main, "sw11", 43 )
         main.Functions.checkFlowNum( main, "sw1", 3 )
-        main.Functions.checkFlowNum( main, "sw7", 3 )
+        main.Functions.checkFlowNum( main, "sw7", 34 )
         main.log.debug( main.Mininet.checkFlows( "sw11" ) )
         main.log.debug( main.Mininet.checkFlows( "sw1" ) )
         main.log.debug( main.Mininet.checkFlows( "sw7" ) )
@@ -658,9 +684,9 @@
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 42 )
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
@@ -677,11 +703,11 @@
             onpass="Flow status is correct!",
             onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -694,8 +720,8 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow status before starting sw11" )
-        main.Functions.checkFlowNum( main, "sw1", 11 )
-        main.Functions.checkFlowNum( main, "sw7", 5 )
+        main.Functions.checkFlowNum( main, "sw1", 33 )
+        main.Functions.checkFlowNum( main, "sw7", 28 )
         main.log.debug( main.Mininet.checkFlows( "sw1" ) )
         main.log.debug( main.Mininet.checkFlows( "sw7" ) )
 
@@ -710,9 +736,9 @@
                                 onfail="Connect switch to ONOS failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 42 )
 
             main.log.debug( main.Mininet.checkFlows( "sw11" ) )
             main.log.debug( main.Mininet.checkFlows( "sw1" ) )
@@ -733,9 +759,9 @@
             onpass="Flow status is correct!",
             onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
index 428cbce..e99f4f6 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/Functions.py
@@ -78,8 +78,8 @@
         onfail = "Flow number in " + switch + " is wrong!" )
 
 
-def pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+def pingSpeakerToPeer( main, speakers = [ "spk1" ],
+                       peers = [ "peer64514", "peer64515", "peer64516" ],
                        expectAllSuccess = True ):
     """
     Carry out ping test between each BGP speaker and peer pair
@@ -125,7 +125,8 @@
         main.exit()
 
 
-def pingHostToHost( main, hosts = ["host64514", "host64515", "host64516"],
+def pingHostToHost( main,
+                    hosts = [ "h64514", "h64515", "h64516" ],
                 expectAllSuccess = True ):
     """
     Carry out ping test between each BGP host pair
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
index 754c03c..71907ea 100755
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/USECASE_SdnipI2MN.py
@@ -12,16 +12,11 @@
 """
 
 from mininet.net import Mininet
-from mininet.node import Controller, RemoteController
 from mininet.log import setLogLevel, info
 from mininet.cli import CLI
+from mininet.node import Host, RemoteController
 from mininet.topo import Topo
 from mininet.util import quietRun
-from mininet.moduledeps import pathCheck
-
-import os.path
-import time
-from subprocess import Popen, STDOUT, PIPE
 
 QUAGGA_DIR = '/usr/lib/quagga'
 QUAGGA_RUN_DIR = '/usr/local/var/run/quagga'
@@ -29,6 +24,18 @@
 # onos1IP = '10.254.1.201'
 numSw = 39
 
+class VLANHost( Host ):
+    def config( self, vlan=100, intfName=None, **params ):
+        r = super( Host, self ).config( **params )
+        intf = self.intf( intfName )
+        self.cmd( 'ifconfig %s inet 0' % intf )
+        self.cmd( 'vconfig add %s %d' % ( intf, vlan ) )
+        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params['ip'] ) )
+        newName = '%s.%d' % ( intf, vlan )
+        intf.name = newName
+        self.nameToIntf[ newName ] = intf
+        return r
+
 
 class SDNTopo( Topo ):
     "SDN Topology"
@@ -38,9 +45,14 @@
         Topo.__init__( self, *args, **kwargs )
 
         # BGP peer hosts
-        peer64514 = self.addHost( 'peer64514' )
-        peer64515 = self.addHost( 'peer64515' )
-        peer64516 = self.addHost( 'peer64516' )
+        p64514 = self.addHost( 'p64514' )
+        p64515 = self.addHost( 'p64515' )
+        p64516 = self.addHost( 'p64516' )
+
+        p64517 = self.addHost( 'p64517', cls=VLANHost, vlan=20 )
+        p64518 = self.addHost( 'p64518', cls=VLANHost, vlan=20 )
+        p64519 = self.addHost( 'p64519', cls=VLANHost, vlan=10 )
+        p64520 = self.addHost( 'p64520', cls=VLANHost, vlan=10 )
 
         '''
         sw1 = self.addSwitch( 'SEAT', dpid = '00000000000000a1' )
@@ -131,18 +143,26 @@
 
 
         # BGP speaker hosts
-        speaker1 = self.addHost( 'speaker1' )
-        speaker2 = self.addHost( 'speaker2' )
+        spk1 = self.addHost( 'spk1' )
+        spk2 = self.addHost( 'spk2', cls=VLANHost, vlan=20 )
+        spk3 = self.addHost( 'spk3', cls=VLANHost, vlan=10 )
 
         root = self.addHost( 'root', inNamespace = False , ip = '0' )
 
         # hosts behind each AS
-        host64514 = self.addHost( 'host64514' )
-        host64515 = self.addHost( 'host64515' )
-        host64516 = self.addHost( 'host64516' )
+        h64514 = self.addHost( 'h64514' )
+        h64515 = self.addHost( 'h64515' )
+        h64516 = self.addHost( 'h64516' )
 
-        self.addLink( 'speaker1', sw24 )
-        self.addLink( 'speaker2', sw24 )
+        #VLAN hosts behind each AS
+        h64517 = self.addHost( 'h64517', cls=VLANHost, vlan=20 )
+        h64518 = self.addHost( 'h64518', cls=VLANHost, vlan=20 )
+        h64519 = self.addHost( 'h64519', cls=VLANHost, vlan=10 )
+        h64520 = self.addHost( 'h64520', cls=VLANHost, vlan=10 )
+
+        self.addLink( 'spk1', sw24 )
+        self.addLink( 'spk2', sw24 )
+        self.addLink( 'spk3', sw24 )
 
         # connect all switches
         self.addLink( sw1, sw2 )
@@ -197,26 +217,45 @@
         self.addLink( sw38, sw39 )
 
         # connection between switches and peers
-        self.addLink( peer64514, sw32 )
-        self.addLink( peer64515, sw8 )
-        self.addLink( peer64516, sw28 )
+        self.addLink( p64514, sw32 )
+        self.addLink( p64515, sw8 )
+        self.addLink( p64516, sw28 )
+
+        self.addLink( p64517, sw7 )
+        self.addLink( p64518, sw9 )
+        self.addLink( p64519, sw5 )
+        self.addLink( p64520, sw5 )  # should be sw5
 
         # connection between BGP peer and hosts behind the BGP peer
-        self.addLink( peer64514, host64514 )
-        self.addLink( peer64515, host64515 )
-        self.addLink( peer64516, host64516 )
+        self.addLink( p64514, h64514 )
+        self.addLink( p64515, h64515 )
+        self.addLink( p64516, h64516 )
+
+        self.addLink( p64517, h64517 )
+        self.addLink( p64518, h64518 )
+        self.addLink( p64519, h64519 )
+        self.addLink( p64520, h64520 )
+
 
         # Internal Connection To Hosts
-        self.addLink( swCtl100, peer64514 )
-        self.addLink( swCtl100, peer64515 )
-        self.addLink( swCtl100, peer64516 )
-        self.addLink( swCtl100, speaker1 )
-        self.addLink( swCtl100, speaker2 )
+        self.addLink( swCtl100, p64514 )
+        self.addLink( swCtl100, p64515 )
+        self.addLink( swCtl100, p64516 )
+
+        self.addLink( swCtl100, p64517 )
+        self.addLink( swCtl100, p64518 )
+        self.addLink( swCtl100, p64519 )
+        self.addLink( swCtl100, p64520 )
+
+        self.addLink( swCtl100, spk1 )
+        self.addLink( swCtl100, spk2 )
+        self.addLink( swCtl100, spk3 )
 
 
-
-        # add host64514 to control plane for ping test
-        self.addLink( swCtl100, host64514 )
+        # add h64514 to control plane for ping test
+        self.addLink( swCtl100, h64514 )
+        self.addLink( swCtl100, h64517 )
+        self.addLink( swCtl100, h64519 )
         self.addLink( swCtl100, root )
 
 
@@ -265,7 +304,6 @@
     host.cmd( zebra_cmd )
     host.cmd( quagga_cmd )
 
-
 def stopquagga():
     quietRun( 'sudo pkill -9 -f bgpd' )
     quietRun( 'sudo pkill -9 -f zebra' )
@@ -277,60 +315,118 @@
     net = Mininet( topo = topo, controller = RemoteController )
 
 
-    speaker1, speaker2, peer64514, peer64515, peer64516 = \
-    net.get( 'speaker1', 'speaker2' ,
-             'peer64514', 'peer64515', 'peer64516' )
+    spk1, spk2, spk3, p64514, p64515, p64516, p64517, p64518, p64519, p64520 = \
+    net.get( 'spk1', 'spk2', 'spk3',
+             'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
 
     # Adding addresses to host64513_1 interface connected to sw24
     # for BGP peering
-    speaker1.setMAC( '00:00:00:00:00:01', 'speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.4.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.5.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.6.101/24 dev speaker1-eth0' )
+    spk1.setMAC( '00:00:00:00:00:01', 'spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.4.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.5.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.6.101/24 dev spk1-eth0' )
+    spk1.defaultIntf().setIP( '10.1.4.101/24' )
+    spk1.defaultIntf().setMAC( '00:00:00:00:00:01' )
 
-    speaker1.defaultIntf().setIP( '10.1.4.101/24' )
-    speaker1.defaultIntf().setMAC( '00:00:00:00:00:01' )
+    spk2.setMAC( '00:00:00:00:00:02', 'spk2-eth0.20' )
+    spk2.cmd( 'ip addr add 10.0.7.101/24 dev spk2-eth0.20' )
+    spk2.cmd( 'ip addr add 10.0.8.101/24 dev spk2-eth0.20' )
+    spk2.defaultIntf().setIP( '10.1.7.101/24' )
+    spk2.defaultIntf().setMAC( '00:00:00:00:00:02' )
+
+    spk3.setMAC( '00:00:00:00:00:03', 'spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.9.101/24 dev spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.20.101/24 dev spk3-eth0.10' )
+    spk3.defaultIntf().setIP( '10.1.9.101/24' )
+    spk3.defaultIntf().setMAC( '00:00:00:00:00:03' )
+
+    p64517.config( vlan=20, intfName="p64517-eth1", ip="7.0.0.254" )
+    p64518.config( vlan=20, intfName="p64518-eth1", ip="8.0.0.254" )
+    p64519.config( vlan=10, intfName="p64519-eth1", ip="9.0.0.254" )
+    p64520.config( vlan=10, intfName="p64520-eth1", ip="20.0.0.254" )
 
     # Net has to be start after adding the above link
     net.start()
 
     # setup configuration on the interface connected to switch
-    peer64514.cmd( "ifconfig  peer64514-eth0 10.0.4.1 up" )
-    peer64514.setMAC( '00:00:00:00:00:04', 'peer64514-eth0' )
-    peer64515.cmd( "ifconfig  peer64515-eth0 10.0.5.1 up" )
-    peer64515.setMAC( '00:00:00:00:00:05', 'peer64515-eth0' )
-    peer64516.cmd( "ifconfig  peer64516-eth0 10.0.6.1 up" )
-    peer64516.setMAC( '00:00:00:00:00:06', 'peer64516-eth0' )
+    p64514.cmd( "ifconfig  p64514-eth0 10.0.4.1 up" )
+    p64514.setMAC( '00:00:00:00:00:04', 'p64514-eth0' )
+    p64515.cmd( "ifconfig  p64515-eth0 10.0.5.1 up" )
+    p64515.setMAC( '00:00:00:00:00:05', 'p64515-eth0' )
+    p64516.cmd( "ifconfig  p64516-eth0 10.0.6.1 up" )
+    p64516.setMAC( '00:00:00:00:00:06', 'p64516-eth0' )
+
+    p64517.cmd( "ifconfig  p64517-eth0.20 10.0.7.1 up" )
+    p64517.setMAC( '00:00:00:00:00:07', 'p64517-eth0.20' )
+    p64518.cmd( "ifconfig  p64518-eth0.20 10.0.8.1 up" )
+    p64518.setMAC( '00:00:00:00:00:08', 'p64518-eth0.20' )
+
+    p64519.cmd( "ifconfig  p64519-eth0.10 10.0.9.1 up" )
+    p64519.setMAC( '00:00:00:00:00:09', 'p64519-eth0.10' )
+    p64520.cmd( "ifconfig  p64520-eth0.10 10.0.20.1 up" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth0.10' )
 
     # setup configuration on the interface connected to hosts
-    peer64514.setIP( "4.0.0.254", 8, "peer64514-eth1" )
-    peer64514.setMAC( '00:00:00:00:00:44', 'peer64514-eth1' )
-    peer64515.setIP( "5.0.0.254", 8, "peer64515-eth1" )
-    peer64515.setMAC( '00:00:00:00:00:55', 'peer64515-eth1' )
-    peer64516.setIP( "6.0.0.254", 8, "peer64516-eth1" )
-    peer64516.setMAC( '00:00:00:00:00:66', 'peer64516-eth1' )
+    p64514.setIP( "4.0.0.254", 8, "p64514-eth1" )
+    p64514.setMAC( '00:00:00:00:00:44', 'p64514-eth1' )
+    p64515.setIP( "5.0.0.254", 8, "p64515-eth1" )
+    p64515.setMAC( '00:00:00:00:00:55', 'p64515-eth1' )
+    p64516.setIP( "6.0.0.254", 8, "p64516-eth1" )
+    p64516.setMAC( '00:00:00:00:00:66', 'p64516-eth1' )
+
+    p64517.setIP( "7.0.0.254", 8, "p64517-eth1.20" )
+    p64517.setMAC( '00:00:00:00:00:77', 'p64517-eth1.20' )
+    p64518.setIP( "8.0.0.254", 8, "p64518-eth1.20" )
+    p64518.setMAC( '00:00:00:00:00:88', 'p64518-eth1.20' )
+
+    p64519.setIP( "9.0.0.254", 8, "p64519-eth1.10" )
+    p64519.setMAC( '00:00:00:00:00:99', 'p64519-eth1.10' )
+    p64520.setIP( "20.0.0.254", 8, "p64520-eth1.10" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth1.10' )
+
 
     # enable forwarding on BGP peer hosts
-    peer64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+
+    p64517.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64518.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64519.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64520.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
 
     # config interface for control plane connectivity
-    peer64514.setIP( "192.168.0.4", 24, "peer64514-eth2" )
-    peer64515.setIP( "192.168.0.5", 24, "peer64515-eth2" )
-    peer64516.setIP( "192.168.0.6", 24, "peer64516-eth2" )
+    p64514.setIP( "192.168.0.4", 24, "p64514-eth2" )
+    p64515.setIP( "192.168.0.5", 24, "p64515-eth2" )
+    p64516.setIP( "192.168.0.6", 24, "p64516-eth2" )
+
+    p64517.setIP( "192.168.0.7", 24, "p64517-eth2" )
+    p64518.setIP( "192.168.0.8", 24, "p64518-eth2" )
+    p64519.setIP( "192.168.0.9", 24, "p64519-eth2" )
+    p64520.setIP( "192.168.0.20", 24, "p64520-eth2" )
 
     # Setup hosts in each non-SDN AS
-    host64514, host64515, host64516 = \
-    net.get( 'host64514', 'host64515', 'host64516' )
-    host64514.cmd( 'ifconfig host64514-eth0 4.0.0.1 up' )
-    host64514.cmd( 'ip route add default via 4.0.0.254' )
-    host64514.setIP( '192.168.0.44', 24, 'host64514-eth1' )  # for control plane
-    host64515.cmd( 'ifconfig host64515-eth0 5.0.0.1 up' )
-    host64515.cmd( 'ip route add default via 5.0.0.254' )
-    host64516.cmd( 'ifconfig host64516-eth0 6.0.0.1 up' )
-    host64516.cmd( 'ip route add default via 6.0.0.254' )
+    h64514, h64515, h64516, h64517, h64518, h64519, h64520 = \
+    net.get( 'h64514', 'h64515', 'h64516', 'h64517', 'h64518', 'h64519', 'h64520' )
+    h64514.cmd( 'ifconfig h64514-eth0 4.0.0.1 up' )
+    h64514.cmd( 'ip route add default via 4.0.0.254' )
+    h64514.setIP( '192.168.0.44', 24, 'h64514-eth1' )  # for control plane
+    h64515.cmd( 'ifconfig h64515-eth0 5.0.0.1 up' )
+    h64515.cmd( 'ip route add default via 5.0.0.254' )
+    h64516.cmd( 'ifconfig h64516-eth0 6.0.0.1 up' )
+    h64516.cmd( 'ip route add default via 6.0.0.254' )
 
+    h64517.cmd( 'ifconfig h64517-eth0.20 7.0.0.1 up' )
+    h64517.cmd( 'ip route add default via 7.0.0.254' )
+    h64517.setIP( '192.168.0.77', 24, 'h64517-eth1' )  # for control plane
+    h64518.cmd( 'ifconfig h64518-eth0.20 8.0.0.1 up' )
+    h64518.cmd( 'ip route add default via 8.0.0.254' )
+
+    h64519.cmd( 'ifconfig h64519-eth0.10 9.0.0.1 up' )
+    h64519.cmd( 'ip route add default via 9.0.0.254' )
+    h64519.setIP( '192.168.0.99', 24, 'h64519-eth1' )  # for control plane
+    h64520.cmd( 'ifconfig h64520-eth0.10 20.0.0.1 up' )
+    h64520.cmd( 'ip route add default via 20.0.0.254' )
 
     # set up swCtl100 as a learning
     swCtl100 = net.get( 'swCtl100' )
@@ -343,29 +439,38 @@
         swX = net.get( 'sw%s' % ( i ) )
         swX.cmd( 'ovs-vsctl set-controller sw%s tcp:%s:6653' % ( i, onos1IP ) )
     '''
-    # Start Quagga on border routers
+    # Start Quagga as the external BGP routers
     '''
     for i in range ( 64514, 64516 + 1 ):
         startquagga( 'peer%s' % ( i ), i, 'quagga%s.conf' % ( i ) )
     '''
-    startquagga( peer64514, 64514, 'quagga64514.conf' )
-    startquagga( peer64515, 64515, 'quagga64515.conf' )
-    startquagga( peer64516, 64516, 'quagga64516.conf' )
+    startquagga( p64514, 64514, 'quagga64514.conf' )
+    startquagga( p64515, 64515, 'quagga64515.conf' )
+    startquagga( p64516, 64516, 'quagga64516.conf' )
 
-    # start Quagga in SDN network
-    startquagga( speaker1, 64513, 'quagga-sdn.conf' )
+    startquagga( p64517, 64517, 'quagga64517.conf' )
+    startquagga( p64518, 64518, 'quagga64518.conf' )
+    startquagga( p64519, 64519, 'quagga64519.conf' )
+    startquagga( p64520, 64520, 'quagga64520.conf' )
 
+    # start Quagga as the BGP speaker
+    startquagga( spk1, 64513, 'quagga-sdn.conf' )
+    startquagga( spk2, 64512, 'quagga-sdn2.conf' )
+    startquagga( spk3, 64511, 'quagga-sdn3.conf' )
 
     root = net.get( 'root' )
+
     root.intf( 'root-eth0' ).setIP( '1.1.1.2/24' )
     root.cmd( 'ip addr add 192.168.0.100/24 dev root-eth0' )
 
-    speaker1.intf( 'speaker1-eth1' ).setIP( '1.1.1.1/24' )
-
+    spk1.intf( 'spk1-eth1' ).setIP( '1.1.1.1/24' )
+    spk2.intf( 'spk2-eth1' ).setIP( '1.1.1.3/24' )
+    spk3.intf( 'spk3-eth1' ).setIP( '1.1.1.5/24' )
 
     stopsshd()
 
-    hosts = [ peer64514, peer64515, peer64516, host64514];
+    hosts = [ p64514, p64515, p64516, p64517, p64518, p64519, p64520,
+              h64514, h64517, h64519 ];
     startsshds( hosts )
     #
     '''
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
index b5d8b12..558b2cd 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn.conf
@@ -14,7 +14,6 @@
 router bgp 64513
   bgp router-id 10.0.4.101
   timers bgp 1 3
-  !timers bgp 3 9
   neighbor 10.0.4.1 remote-as 64514
   neighbor 10.0.4.1 ebgp-multihop
   neighbor 10.0.4.1 timers connect 5
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf
new file mode 100644
index 0000000..6eb45d7
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn2.conf
@@ -0,0 +1,37 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.7.101
+  timers bgp 1 2
+  neighbor 10.0.7.1 remote-as 64517
+  neighbor 10.0.7.1 ebgp-multihop
+  neighbor 10.0.7.1 timers connect 5
+  neighbor 10.0.8.1 remote-as 64518
+  neighbor 10.0.8.1 ebgp-multihop
+  neighbor 10.0.8.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn3.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn3.conf
new file mode 100644
index 0000000..9154424
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga-sdn3.conf
@@ -0,0 +1,37 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.9.101
+  timers bgp 1 2
+  neighbor 10.0.9.1 remote-as 64519
+  neighbor 10.0.9.1 ebgp-multihop
+  neighbor 10.0.9.1 timers connect 5
+  neighbor 10.0.20.1 remote-as 64520
+  neighbor 10.0.20.1 ebgp-multihop
+  neighbor 10.0.20.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64517.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64517.conf
new file mode 100644
index 0000000..00e4cf8
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64517.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64517
+  bgp router-id 10.0.7.1
+!  timers bgp 1 3
+ neighbor 10.0.7.101 remote-as 64513
+ network 7.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64518.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64518.conf
new file mode 100644
index 0000000..c156102
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64518.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64518
+  bgp router-id 10.0.8.1
+!  timers bgp 1 3
+ neighbor 10.0.8.101 remote-as 64513
+ network 8.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64519.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64519.conf
new file mode 100644
index 0000000..11f1801
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64519.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64519
+  bgp router-id 10.0.9.1
+!  timers bgp 1 3
+ neighbor 10.0.9.101 remote-as 64513
+ network 9.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64520.conf b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64520.conf
new file mode 100644
index 0000000..5fa469d
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/dependencies/quagga64520.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64520
+  bgp router-id 10.0.20.1
+!  timers bgp 1 3
+ neighbor 10.0.20.101 remote-as 64513
+ network 20.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json b/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
index 303b1bd..bf6fa1a 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/network-cfg.json
@@ -3,6 +3,7 @@
         "of:00000000000000a8/5" : {
             "interfaces" : [
                 {
+                    "name": "sw8-5",
                     "ips"  : [ "10.0.5.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 }
@@ -11,6 +12,7 @@
         "of:0000000000000a32/4" : {
             "interfaces" : [
                 {
+                    "name" : "sw32-4",
                     "ips"  : [ "10.0.4.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 }
@@ -19,10 +21,51 @@
         "of:0000000000000a28/3" : {
             "interfaces" : [
                 {
+                    "name" : "sw28-3",
                     "ips"  : [ "10.0.6.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 }
             ]
+        },
+        "of:00000000000000a5/5" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw5-5",
+                      "ips"  : [ "10.0.20.101/24" ],
+                      "mac"  : "00:00:00:00:00:03",
+                      "vlan" : "10"
+                  }
+              ]
+        },
+        "of:00000000000000a5/4" : {
+            "interfaces" : [
+                {
+                    "name" : "sw5-4",
+                    "ips"  : [ "10.0.9.101/24" ],
+                    "mac"  : "00:00:00:00:00:03",
+                    "vlan" : "10"
+                }
+            ]
+        },
+        "of:00000000000000a7/3" : {
+            "interfaces" : [
+                {
+                    "name" : "sw7-3",
+                    "ips"  : [ "10.0.7.101/24" ],
+                    "mac"  : "00:00:00:00:00:02",
+                    "vlan" : "20"
+                }
+            ]
+        },
+        "of:00000000000000a9/3" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw9-3",
+                      "ips"  : [ "10.0.8.101/24" ],
+                      "mac"  : "00:00:00:00:00:02",
+                      "vlan" : "20"
+                  }
+              ]
         }
     },
     "apps" : {
@@ -30,13 +73,33 @@
             "bgp" : {
                 "bgpSpeakers" : [
                     {
+                        "name": "bgpSpeaker1",
                         "connectPoint" : "of:0000000000000a24/1",
                         "peers" : [
                             "10.0.4.1",
                             "10.0.5.1",
                             "10.0.6.1"
                         ]
+                    },
+                    {
+                        "name": "bgpSpeaker2",
+                        "vlan": "20",
+                        "connectPoint" : "of:0000000000000a24/2",
+                        "peers" : [
+                            "10.0.7.1",
+                            "10.0.8.1"
+                        ]
+                    },
+                    {
+                          "name": "bgpSpeaker3",
+                          "vlan": "10",
+                          "connectPoint" : "of:0000000000000a24/3",
+                          "peers" : [
+                              "10.0.9.1",
+                              "10.0.20.1"
+                          ]
                     }
+
                 ]
             }
         }
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
index 7f93976..0d6014f 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
@@ -23,17 +23,17 @@
     </DEPENDENCY>
 
     <config>
-        <peerNum> 3 </peerNum>
+        <peerNum> 7 </peerNum>
         <switchNum> 39 </switchNum>
-        <peer64514> 10.0.14.1</peer64514>
-        <peer64515> 10.0.15.1</peer64515>
-        <peer64516> 10.0.16.1</peer64516>
+        <p64514> 10.0.14.1</p64514>
+        <p64515> 10.0.15.1</p64515>
+        <p64516> 10.0.16.1</p64516>
     </config>
 
     <timers>
         <SdnIpSetup>10</SdnIpSetup>
-        <TopoDiscovery>10</TopoDiscovery>
-        <PingTestWithRoutes>20</PingTestWithRoutes>
+        <TopoDiscovery>15</TopoDiscovery>
+        <PingTestWithRoutes>30</PingTestWithRoutes>
         <PingTestWithoutRoutes>100</PingTestWithoutRoutes>
         <RouteDelivery>30</RouteDelivery>
         <PathAvailable>20</PathAvailable>
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 87b628f..68ed759 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -69,12 +69,12 @@
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
         ipList = [ ONOS1Ip, ONOS2Ip, ONOS3Ip ]
 
-        global peer64514
-        global peer64515
-        global peer64516
-        peer64514 = main.params['config']['peer64514']
-        peer64515 = main.params['config']['peer64515']
-        peer64516 = main.params['config']['peer64516']
+        global p64514
+        global p64515
+        global p64516
+        p64514 = main.params['config']['p64514']
+        p64515 = main.params['config']['p64515']
+        p64516 = main.params['config']['p64516']
 
         main.step( "Copying config files" )
         src = os.path.dirname( main.testFile ) + "/network-cfg.json"
@@ -140,6 +140,15 @@
                                  onpass="Install ONOS to nodes succeeded",
                                  onfail="Install ONOS to nodes failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS is up yet" )
         onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
         onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout=420 )
@@ -150,15 +159,6 @@
                                  onpass="ONOS nodes are up",
                                  onfail="ONOS nodes are NOT up" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
-        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
-        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=secureSshResult,
-                                 onpass="Set up ONOS secure SSH succeeded",
-                                 onfail="Set up ONOS secure SSH failed " )
-
         main.step( "Checking if ONOS CLI is ready" )
         main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
@@ -262,12 +262,21 @@
         '''
 
         main.case( "Ping between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk3" ],
+                                          peers=[ "p64519", "p64520" ],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk4" ],
+                                          peers=[ "p64517", "p64518" ],
+                                          expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
@@ -309,6 +318,10 @@
         allRoutesExpected.append( "4.0.0.0/24" + "/" + "10.0.4.1" )
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
+        allRoutesExpected.append( "7.0.0.0/24" + "/" + "10.0.7.1" )
+        allRoutesExpected.append( "8.0.0.0/24" + "/" + "10.0.8.1" )
+        allRoutesExpected.append( "9.0.0.0/24" + "/" + "10.0.9.1" )
+        allRoutesExpected.append( "20.0.0.0/24" + "/" + "10.0.20.1" )
 
         getRoutesResult = main.ONOScli1.routes( jsonFormat=True )
         allRoutesActual = \
@@ -335,7 +348,7 @@
         getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
-        routeIntentsExpectedNum = 3
+        routeIntentsExpectedNum = 7
         if routeIntentsActualNum != routeIntentsExpectedNum:
             time.sleep( int( main.params['timers']['RouteDelivery'] ) )
             getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
@@ -368,9 +381,14 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
-
+        main.Functions.pingHostToHost(main,
+                                      hosts=["h64517", "h64518"],
+                                      expectAllSuccess=True)
+        main.Functions.pingHostToHost(main,
+                                      hosts=["h64519", "h64520"],
+                                      expectAllSuccess=True)
 
     def CASE5( self, main ):
         '''
@@ -378,8 +396,8 @@
         '''
         import time
         main.case( "Bring down links and check routes/intents" )
-        main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring down the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult1,
@@ -388,15 +406,15 @@
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring down the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult2,
@@ -404,15 +422,15 @@
                                  onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 )
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring down the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="down" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult3,
@@ -420,8 +438,8 @@
                                  onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 0 )
-            main.Functions.checkM2SintentNum( main, 0 )
+            main.Functions.checkRouteNum( main, 4 )
+            main.Functions.checkM2SintentNum( main, 4 )
         else:
             main.log.error( "Bring down link failed!" )
             main.cleanup()
@@ -438,11 +456,11 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=False )
 
     def CASE6( self, main ):
@@ -451,8 +469,8 @@
         '''
         import time
         main.case( "Bring up links and check routes/intents" )
-        main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+        main.step( "Bring up the link between sw32 and p64514" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="p64514",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult1,
@@ -460,15 +478,15 @@
                                  onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 1 )
-            main.Functions.checkM2SintentNum( main, 1 )
+            main.Functions.checkRouteNum( main, 5 )
+            main.Functions.checkM2SintentNum( main, 5 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+        main.step( "Bring up the link between sw8 and p64515" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="p64515",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult2,
@@ -476,15 +494,15 @@
                                  onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
-        main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+        main.step( "Bring up the link between sw28 and p64516" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="p64516",
                                          OPTION="up" )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=linkResult3,
@@ -492,8 +510,8 @@
                                  onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
         else:
             main.log.error( "Bring up link failed!" )
             main.cleanup()
@@ -510,11 +528,11 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
     def CASE7( self, main ):
@@ -531,18 +549,18 @@
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 2 )
-            main.Functions.checkM2SintentNum( main, 2 )
-            main.Functions.checkP2PintentNum( main, 12 * 2 )
+            main.Functions.checkRouteNum( main, 6 )
+            main.Functions.checkM2SintentNum( main, 6 )
+            main.Functions.checkP2PintentNum( main, 48 ) #14 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
-        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
-        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
+        result1 = main.Mininet.pingHost( src="h64514", target="h64515" )
+        result2 = main.Mininet.pingHost( src="h64515", target="h64516" )
+        result3 = main.Mininet.pingHost( src="h64514", target="h64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                       and ( result3 == main.FALSE )
@@ -554,10 +572,10 @@
             main.cleanup()
             main.exit()
 
-        main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
-        result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
-        result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
+        main.step( "Check ping between BGP peers and spk1" )
+        result4 = main.Mininet.pingHost( src="spk1", target="p64514" )
+        result5 = main.Mininet.pingHost( src="spk1", target="p64515" )
+        result6 = main.Mininet.pingHost( src="spk1", target="p64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
@@ -569,11 +587,11 @@
             main.cleanup()
             main.exit()
 
-        main.step( "Check ping between BGP peers and speaker2" )
+        main.step( "Check ping between BGP peers and spk2" )
         # TODO
-        result7 = main.Mininet.pingHost( src="speaker2", target=peer64514 )
-        result8 = main.Mininet.pingHost( src="speaker2", target=peer64515 )
-        result9 = main.Mininet.pingHost( src="speaker2", target=peer64516 )
+        result7 = main.Mininet.pingHost( src="spk2", target=p64514 )
+        result8 = main.Mininet.pingHost( src="spk2", target=p64515 )
+        result9 = main.Mininet.pingHost( src="spk2", target=p64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
@@ -617,9 +635,9 @@
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 ) # 18*2
         else:
             main.log.error( "Starting switch failed!" )
             main.cleanup()
@@ -636,15 +654,17 @@
                                  onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=["p64514", "p64515", "p64516"],
+                                          expectAllSuccess=True )
+
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
+
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
     def CASE9( self, main ):
         '''
@@ -655,9 +675,9 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow number correctness before stopping sw11" )
-        main.Functions.checkFlowNum( main, "sw11", 19 )
-        main.Functions.checkFlowNum( main, "sw1", 3 )
-        main.Functions.checkFlowNum( main, "sw7", 3 )
+        main.Functions.checkFlowNum( main, "sw11", 49 )
+        main.Functions.checkFlowNum( main, "sw1", 7 )
+        main.Functions.checkFlowNum( main, "sw7", 34 )
         main.log.info( main.Mininet.checkFlows( "sw11" ) )
         main.log.info( main.Mininet.checkFlows( "sw1" ) )
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
@@ -670,9 +690,9 @@
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 ) #18 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanup()
@@ -688,14 +708,14 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -708,8 +728,8 @@
         check route number, P2P intent number, M2S intent number, ping test" )
 
         main.log.info( "Check the flow status before starting sw11" )
-        main.Functions.checkFlowNum( main, "sw1", 17 )
-        main.Functions.checkFlowNum( main, "sw7", 5 )
+        main.Functions.checkFlowNum( main, "sw1", 36 )
+        main.Functions.checkFlowNum( main, "sw7", 30 )
         main.log.info( main.Mininet.checkFlows( "sw1" ) )
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
@@ -724,9 +744,9 @@
                                  onfail="Connect switch to ONOS failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 )
 
             main.log.debug( main.Mininet.checkFlows( "sw11" ) )
             main.log.debug( main.Mininet.checkFlows( "sw1" ) )
@@ -746,25 +766,25 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
     def CASE11(self, main):
         import time
-        main.case( "Kill speaker1, check:\
+        main.case( "Kill spk1, check:\
         route number, P2P intent number, M2S intent number, ping test" )
-        main.log.info( "Check network status before killing speaker1" )
-        main.Functions.checkRouteNum( main, 3 )
-        main.Functions.checkM2SintentNum( main, 3 )
-        main.Functions.checkP2PintentNum( main, 18 * 2 )
+        main.log.info( "Check network status before killing spk1" )
+        main.Functions.checkRouteNum( main, 7 )
+        main.Functions.checkM2SintentNum( main, 7 )
+        main.Functions.checkP2PintentNum( main, 30 * 2 )
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
                                      main.FALSE,
@@ -775,25 +795,25 @@
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
-        main.step( "Kill speaker1" )
+        main.step( "Kill spk1" )
         command1 = "ps -e | grep bgp -c"
         result1 = main.Mininet.node( "root", command1 )
 
         # The total BGP daemon number in this test environment is 5.
         if "5" in result1:
-            main.log.debug( "Before kill speaker1, 5 BGP daemons - correct" )
+            main.log.debug( "Before kill spk1, 5 BGP daemons - correct" )
         else:
-            main.log.warn( "Before kill speaker1, number of BGP daemons is wrong" )
+            main.log.warn( "Before kill spk1, number of BGP daemons is wrong" )
             main.log.info( result1 )
 
         command2 = "sudo kill -9 `ps -ef | grep quagga-sdn.conf | grep -v grep | awk '{print $2}'`"
@@ -803,17 +823,17 @@
 
         utilities.assert_equals( expect=True,
                                  actual=( "4" in result3 ),
-                                 onpass="Kill speaker1 succeeded",
-                                 onfail="Kill speaker1 failed" )
+                                 onpass="Kill spk1 succeeded",
+                                 onfail="Kill spk1 failed" )
         if ( "4" not in result3 ) :
             main.log.info( result3 )
             main.cleanup()
             main.exit()
 
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-        main.Functions.checkRouteNum( main, 3 )
-        main.Functions.checkM2SintentNum( main, 3 )
-        main.Functions.checkP2PintentNum( main, 18 * 2 )
+        main.Functions.checkRouteNum( main, 7 )
+        main.Functions.checkM2SintentNum( main, 7 )
+        main.Functions.checkP2PintentNum( main, 30 * 2 )
 
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -826,15 +846,15 @@
                                  onfail="Flow status is wrong!" )
 
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=False )
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
 
 
@@ -871,9 +891,9 @@
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
         if leaderIP == ONOS1Ip:
-            main.Functions.checkRouteNum( main, 3, ONOScli="ONOScli2" )
-            main.Functions.checkM2SintentNum( main, 3, ONOScli="ONOScli2" )
-            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli="ONOScli2" )
+            main.Functions.checkRouteNum( main, 7, ONOScli="ONOScli2" )
+            main.Functions.checkM2SintentNum( main, 7, ONOScli="ONOScli2" )
+            main.Functions.checkP2PintentNum( main, 30 * 2, ONOScli="ONOScli2" )
 
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -885,9 +905,9 @@
                                      onpass="Flow status is correct!",
                                      onfail="Flow status is wrong!" )
         else:
-            main.Functions.checkRouteNum( main, 3 )
-            main.Functions.checkM2SintentNum( main, 3 )
-            main.Functions.checkP2PintentNum( main, 18 * 2 )
+            main.Functions.checkRouteNum( main, 7 )
+            main.Functions.checkM2SintentNum( main, 7 )
+            main.Functions.checkP2PintentNum( main, 30 * 2 )
 
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
@@ -899,12 +919,12 @@
                                      onpass="Flow status is correct!",
                                      onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
-                       peers=["peer64514", "peer64515", "peer64516"],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
+                       peers=["p64514", "p64515", "p64516"],
                        expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
-                       peers=[peer64514, peer64515, peer64516],
+        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+                       peers=[p64514, p64515, p64516],
                        expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["host64514", "host64515", "host64516"],
+                        hosts=["h64514", "h64515", "h64516"],
                         expectAllSuccess=True )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
index 5f78896..f2c0714 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
@@ -91,8 +91,8 @@
         onfail = "Flow number in " + switch + " is wrong!" )
 
 
-def pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
+def pingSpeakerToPeer( main, speakers = ["spk1"],
+                       peers = ["p64514", "p64515", "p64516"],
                        expectAllSuccess = True ):
     """
     Carry out ping test between each BGP speaker and peer pair
@@ -138,7 +138,7 @@
         main.exit()
 
 
-def pingHostToHost( main, hosts = ["host64514", "host64515", "host64516"],
+def pingHostToHost( main, hosts = ["h64514", "h64515", "h64516"],
                 expectAllSuccess = True ):
     """
     Carry out ping test between each BGP host pair
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
index 264746c..9b192e2 100755
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
@@ -15,6 +15,7 @@
 from mininet.node import Controller, RemoteController
 from mininet.log import setLogLevel, info
 from mininet.cli import CLI
+from mininet.node import Host, RemoteController
 from mininet.topo import Topo
 from mininet.util import quietRun
 from mininet.moduledeps import pathCheck
@@ -29,6 +30,18 @@
 numSw = 39
 
 # net = Mininet( controller = RemoteController )
+class VLANHost( Host ):
+    def config( self, vlan=100, intfName=None, **params ):
+        r = super( Host, self ).config( **params )
+        intf = self.intf( intfName )
+        self.cmd( 'ifconfig %s inet 0' % intf )
+        self.cmd( 'vconfig add %s %d' % ( intf, vlan ) )
+        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params['ip'] ) )
+        newName = '%s.%d' % ( intf, vlan )
+        intf.name = newName
+        self.nameToIntf[ newName ] = intf
+        return r
+
 
 class SDNTopo( Topo ):
     "SDN Topology"
@@ -38,9 +51,14 @@
         Topo.__init__( self, *args, **kwargs )
 
         # BGP peer hosts
-        peer64514 = self.addHost( 'peer64514' )
-        peer64515 = self.addHost( 'peer64515' )
-        peer64516 = self.addHost( 'peer64516' )
+        p64514 = self.addHost( 'p64514' )
+        p64515 = self.addHost( 'p64515' )
+        p64516 = self.addHost( 'p64516' )
+
+        p64517 = self.addHost( 'p64517', cls=VLANHost, vlan=20 )
+        p64518 = self.addHost( 'p64518', cls=VLANHost, vlan=20 )
+        p64519 = self.addHost( 'p64519', cls=VLANHost, vlan=10 )
+        p64520 = self.addHost( 'p64520', cls=VLANHost, vlan=10 )
 
         '''
         sw1 = self.addSwitch( 'SEAT', dpid = '00000000000000a1' )
@@ -131,18 +149,27 @@
 
 
         # BGP speaker hosts
-        speaker1 = self.addHost( 'speaker1' )
-        speaker2 = self.addHost( 'speaker2' )
-
+        spk1 = self.addHost( 'spk1' )
+        spk2 = self.addHost( 'spk2' )
+        spk3 = self.addHost( 'spk3', cls=VLANHost, vlan=10 )
+        spk4 = self.addHost( 'spk4', cls=VLANHost, vlan=20 )
         root = self.addHost( 'root', inNamespace = False , ip = '0' )
 
         # hosts behind each AS
-        host64514 = self.addHost( 'host64514' )
-        host64515 = self.addHost( 'host64515' )
-        host64516 = self.addHost( 'host64516' )
+        h64514 = self.addHost( 'h64514' )
+        h64515 = self.addHost( 'h64515' )
+        h64516 = self.addHost( 'h64516' )
 
-        self.addLink( 'speaker1', sw24 )
-        self.addLink( 'speaker2', sw24 )
+        # VLAN hosts behind each AS
+        h64517 = self.addHost( 'h64517', cls=VLANHost, vlan=20 )
+        h64518 = self.addHost( 'h64518', cls=VLANHost, vlan=20 )
+        h64519 = self.addHost( 'h64519', cls=VLANHost, vlan=10 )
+        h64520 = self.addHost( 'h64520', cls=VLANHost, vlan=10 )
+
+        self.addLink( 'spk1', sw24 )
+        self.addLink( 'spk2', sw24 )
+        self.addLink( 'spk3', sw24 )
+        self.addLink( 'spk4', sw24 )
 
         # connect all switches
         self.addLink( sw1, sw2 )
@@ -197,25 +224,45 @@
         self.addLink( sw38, sw39 )
 
         # connection between switches and peers
-        self.addLink( peer64514, sw32 )
-        self.addLink( peer64515, sw8 )
-        self.addLink( peer64516, sw28 )
+        self.addLink( p64514, sw32 )
+        self.addLink( p64515, sw8 )
+        self.addLink( p64516, sw28 )
+
+        self.addLink( p64517, sw7 )
+        self.addLink( p64518, sw9 )
+        self.addLink( p64519, sw5 )
+        self.addLink( p64520, sw5 )
 
         # connection between BGP peer and hosts behind the BGP peer
-        self.addLink( peer64514, host64514 )
-        self.addLink( peer64515, host64515 )
-        self.addLink( peer64516, host64516 )
+        self.addLink( p64514, h64514 )
+        self.addLink( p64515, h64515 )
+        self.addLink( p64516, h64516 )
+
+        self.addLink( p64517, h64517 )
+        self.addLink( p64518, h64518 )
+        self.addLink( p64519, h64519 )
+        self.addLink( p64520, h64520 )
 
         # Internal Connection To Hosts
-        self.addLink( swCtl100, peer64514 )
-        self.addLink( swCtl100, peer64515 )
-        self.addLink( swCtl100, peer64516 )
-        self.addLink( swCtl100, speaker1 )
-        self.addLink( swCtl100, speaker2 )
+        self.addLink( swCtl100, p64514 )
+        self.addLink( swCtl100, p64515 )
+        self.addLink( swCtl100, p64516 )
 
+        self.addLink( swCtl100, p64517 )
+        self.addLink( swCtl100, p64518 )
+        self.addLink( swCtl100, p64519 )
+        self.addLink( swCtl100, p64520 )
 
-        # add host64514 to control plane for ping test
-        self.addLink( swCtl100, host64514 )
+        self.addLink( swCtl100, spk1 )
+        self.addLink( swCtl100, spk2 )
+        self.addLink( swCtl100, spk3 )
+        self.addLink( swCtl100, spk4 )
+
+        # add h64514 to control plane for ping test
+        self.addLink( swCtl100, h64514 )
+        self.addLink( swCtl100, h64517 )
+        self.addLink( swCtl100, h64519 )
+
         self.addLink( swCtl100, root )
         self.addLink( swCtl100, root )
         self.addLink( swCtl100, root )
@@ -286,70 +333,129 @@
     net = Mininet( topo = topo, controller = RemoteController )
 
 
-    speaker1, speaker2, peer64514, peer64515, peer64516 = \
-    net.get( 'speaker1', 'speaker2' ,
-             'peer64514', 'peer64515', 'peer64516' )
+    spk1, spk2, spk3, spk4, p64514, p64515, p64516, p64517, p64518, p64519, p64520 = \
+    net.get( 'spk1', 'spk2', 'spk3', 'spk4',
+             'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
 
     # Adding addresses to speakers' interface connected to sw24
     # for BGP peering
-    speaker1.setMAC( '00:00:00:00:00:01', 'speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.4.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.5.101/24 dev speaker1-eth0' )
-    speaker1.cmd( 'ip addr add 10.0.6.101/24 dev speaker1-eth0' )
+    spk1.setMAC( '00:00:00:00:00:01', 'spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.4.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.5.101/24 dev spk1-eth0' )
+    spk1.cmd( 'ip addr add 10.0.6.101/24 dev spk1-eth0' )
 
-    speaker1.defaultIntf().setIP( '10.0.4.101/24' )
-    speaker1.defaultIntf().setMAC( '00:00:00:00:00:01' )
+    spk1.defaultIntf().setIP( '10.0.4.101/24' )
+    spk1.defaultIntf().setMAC( '00:00:00:00:00:01' )
 
-    speaker2.setMAC( '00:00:00:00:00:02', 'speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.14.101/24 dev speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.15.101/24 dev speaker2-eth0' )
-    speaker2.cmd( 'ip addr add 10.0.16.101/24 dev speaker2-eth0' )
+    spk2.setMAC( '00:00:00:00:00:02', 'spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.14.101/24 dev spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.15.101/24 dev spk2-eth0' )
+    spk2.cmd( 'ip addr add 10.0.16.101/24 dev spk2-eth0' )
 
-    speaker2.defaultIntf().setIP( '10.0.14.101/24' )
-    speaker2.defaultIntf().setMAC( '00:00:00:00:00:02' )
+    spk2.defaultIntf().setIP( '10.0.14.101/24' )
+    spk2.defaultIntf().setMAC( '00:00:00:00:00:02' )
+
+    spk3.setMAC( '00:00:00:00:00:03', 'spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.9.101/24 dev spk3-eth0.10' )
+    spk3.cmd( 'ip addr add 10.0.20.101/24 dev spk3-eth0.10' )
+    spk3.defaultIntf().setIP( '10.1.9.101/24' )
+    spk3.defaultIntf().setMAC( '00:00:00:00:00:03' )
+
+    spk4.setMAC( '00:00:00:00:00:04', 'spk4-eth0.20' )
+    spk4.cmd( 'ip addr add 10.0.7.101/24 dev spk4-eth0.20' )
+    spk4.cmd( 'ip addr add 10.0.8.101/24 dev spk4-eth0.20' )
+    spk4.defaultIntf().setIP( '10.1.7.101/24' )
+    spk4.defaultIntf().setMAC( '00:00:00:00:00:04' )
+
+    p64517.config( vlan=20, intfName="p64517-eth1", ip="7.0.0.254" )
+    p64518.config( vlan=20, intfName="p64518-eth1", ip="8.0.0.254" )
+    p64519.config( vlan=10, intfName="p64519-eth1", ip="9.0.0.254" )
+    p64520.config( vlan=10, intfName="p64520-eth1", ip="20.0.0.254" )
 
     # Net has to be start after adding the above link
     net.start()
 
     # setup configuration on the interface connected to switch
-    peer64514.cmd( "ifconfig  peer64514-eth0 10.0.4.1 up" )
-    peer64514.cmd( "ip addr add 10.0.14.1/24 dev peer64514-eth0" )
-    peer64514.setMAC( '00:00:00:00:00:04', 'peer64514-eth0' )
-    peer64515.cmd( "ifconfig  peer64515-eth0 10.0.5.1 up" )
-    peer64515.cmd( "ip addr add 10.0.15.1/24 dev peer64515-eth0" )
-    peer64515.setMAC( '00:00:00:00:00:05', 'peer64515-eth0' )
-    peer64516.cmd( "ifconfig  peer64516-eth0 10.0.6.1 up" )
-    peer64516.cmd( "ip addr add 10.0.16.1/24 dev peer64516-eth0" )
-    peer64516.setMAC( '00:00:00:00:00:06', 'peer64516-eth0' )
+    p64514.cmd( "ifconfig p64514-eth0 10.0.4.1 up" )
+    p64514.cmd( "ip addr add 10.0.14.1/24 dev p64514-eth0" )
+    p64514.setMAC( '00:00:00:00:00:14', 'p64514-eth0' ) # do not repeat spk4's MAC addr
+    p64515.cmd( "ifconfig p64515-eth0 10.0.5.1 up" )
+    p64515.cmd( "ip addr add 10.0.15.1/24 dev p64515-eth0" )
+    p64515.setMAC( '00:00:00:00:00:05', 'p64515-eth0' )
+    p64516.cmd( "ifconfig p64516-eth0 10.0.6.1 up" )
+    p64516.cmd( "ip addr add 10.0.16.1/24 dev p64516-eth0" )
+    p64516.setMAC( '00:00:00:00:00:06', 'p64516-eth0' )
+
+    p64517.cmd( "ifconfig p64517-eth0.20 10.0.7.1 up" )
+    p64517.setMAC( '00:00:00:00:00:07', 'p64517-eth0.20' )
+    p64518.cmd( "ifconfig p64518-eth0.20 10.0.8.1 up" )
+    p64518.setMAC( '00:00:00:00:00:08', 'p64518-eth0.20' )
+
+    p64519.cmd( "ifconfig p64519-eth0.10 10.0.9.1 up" )
+    p64519.setMAC( '00:00:00:00:00:09', 'p64519-eth0.10' )
+    p64520.cmd( "ifconfig p64520-eth0.10 10.0.20.1 up" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth0.10' )
 
     # setup configuration on the interface connected to hosts
-    peer64514.setIP( "4.0.0.254", 8, "peer64514-eth1" )
-    peer64514.setMAC( '00:00:00:00:00:44', 'peer64514-eth1' )
-    peer64515.setIP( "5.0.0.254", 8, "peer64515-eth1" )
-    peer64515.setMAC( '00:00:00:00:00:55', 'peer64515-eth1' )
-    peer64516.setIP( "6.0.0.254", 8, "peer64516-eth1" )
-    peer64516.setMAC( '00:00:00:00:00:66', 'peer64516-eth1' )
+    p64514.setIP( "4.0.0.254", 8, "p64514-eth1" )
+    p64514.setMAC( '00:00:00:00:00:44', 'p64514-eth1' )
+    p64515.setIP( "5.0.0.254", 8, "p64515-eth1" )
+    p64515.setMAC( '00:00:00:00:00:55', 'p64515-eth1' )
+    p64516.setIP( "6.0.0.254", 8, "p64516-eth1" )
+    p64516.setMAC( '00:00:00:00:00:66', 'p64516-eth1' )
+
+    p64517.setIP( "7.0.0.254", 8, "p64517-eth1.20" )
+    p64517.setMAC( '00:00:00:00:00:77', 'p64517-eth1.20' )
+    p64518.setIP( "8.0.0.254", 8, "p64518-eth1.20" )
+    p64518.setMAC( '00:00:00:00:00:88', 'p64518-eth1.20' )
+
+    p64519.setIP( "9.0.0.254", 8, "p64519-eth1.10" )
+    p64519.setMAC( '00:00:00:00:00:99', 'p64519-eth1.10' )
+    p64520.setIP( "20.0.0.254", 8, "p64520-eth1.10" )
+    p64520.setMAC( '00:00:00:00:00:20', 'p64520-eth1.10' )
 
     # enable forwarding on BGP peer hosts
-    peer64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
-    peer64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64514.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64515.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64516.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+
+    p64517.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64518.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64519.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
+    p64520.cmd( 'sysctl net.ipv4.conf.all.forwarding=1' )
 
     # config interface for control plane connectivity
-    peer64514.setIP( "192.168.0.4", 24, "peer64514-eth2" )
-    peer64515.setIP( "192.168.0.5", 24, "peer64515-eth2" )
-    peer64516.setIP( "192.168.0.6", 24, "peer64516-eth2" )
+    p64514.setIP( "192.168.0.4", 24, "p64514-eth2" )
+    p64515.setIP( "192.168.0.5", 24, "p64515-eth2" )
+    p64516.setIP( "192.168.0.6", 24, "p64516-eth2" )
+
+    p64517.setIP( "192.168.0.7", 24, "p64517-eth2" )
+    p64518.setIP( "192.168.0.8", 24, "p64518-eth2" )
+    p64519.setIP( "192.168.0.9", 24, "p64519-eth2" )
+    p64520.setIP( "192.168.0.20", 24, "p64520-eth2" )
 
     # Setup hosts in each non-SDN AS
-    host64514, host64515, host64516 = \
-    net.get( 'host64514', 'host64515', 'host64516' )
-    host64514.cmd( 'ifconfig host64514-eth0 4.0.0.1 up' )
-    host64514.cmd( 'ip route add default via 4.0.0.254' )
-    host64514.setIP( '192.168.0.44', 24, 'host64514-eth1' )  # for control plane
-    host64515.cmd( 'ifconfig host64515-eth0 5.0.0.1 up' )
-    host64515.cmd( 'ip route add default via 5.0.0.254' )
-    host64516.cmd( 'ifconfig host64516-eth0 6.0.0.1 up' )
-    host64516.cmd( 'ip route add default via 6.0.0.254' )
+    h64514, h64515, h64516, h64517, h64518, h64519, h64520 = \
+    net.get( 'h64514', 'h64515', 'h64516', 'h64517', 'h64518', 'h64519', 'h64520' )
+    h64514.cmd( 'ifconfig h64514-eth0 4.0.0.1 up' )
+    h64514.cmd( 'ip route add default via 4.0.0.254' )
+    h64514.setIP( '192.168.0.44', 24, 'h64514-eth1' )  # for control plane
+    h64515.cmd( 'ifconfig h64515-eth0 5.0.0.1 up' )
+    h64515.cmd( 'ip route add default via 5.0.0.254' )
+    h64516.cmd( 'ifconfig h64516-eth0 6.0.0.1 up' )
+    h64516.cmd( 'ip route add default via 6.0.0.254' )
+
+    h64517.cmd( 'ifconfig h64517-eth0.20 7.0.0.1 up' )
+    h64517.cmd( 'ip route add default via 7.0.0.254' )
+    h64517.setIP( '192.168.0.77', 24, 'h64517-eth1' )  # for control plane
+    h64518.cmd( 'ifconfig h64518-eth0.20 8.0.0.1 up' )
+    h64518.cmd( 'ip route add default via 8.0.0.254' )
+
+    h64519.cmd( 'ifconfig h64519-eth0.10 9.0.0.1 up' )
+    h64519.cmd( 'ip route add default via 9.0.0.254' )
+    h64519.setIP( '192.168.0.99', 24, 'h64519-eth1' )  # for control plane
+    h64520.cmd( 'ifconfig h64520-eth0.10 20.0.0.1 up' )
+    h64520.cmd( 'ip route add default via 20.0.0.254' )
 
 
     # set up swCtl100 as a learning
@@ -368,14 +474,20 @@
     '''
 
     # Start Quagga on border routers
-    startquagga( peer64514, 64514, 'quagga64514.conf' )
-    startquagga( peer64515, 64515, 'quagga64515.conf' )
-    startquagga( peer64516, 64516, 'quagga64516.conf' )
+    startquagga( p64514, 64514, 'quagga64514.conf' )
+    startquagga( p64515, 64515, 'quagga64515.conf' )
+    startquagga( p64516, 64516, 'quagga64516.conf' )
+
+    startquagga( p64517, 64517, 'quagga64517.conf' )
+    startquagga( p64518, 64518, 'quagga64518.conf' )
+    startquagga( p64519, 64519, 'quagga64519.conf' )
+    startquagga( p64520, 64520, 'quagga64520.conf' )
 
     # start Quagga in SDN network
-    startquagga( speaker1, 64513, 'quagga-sdn.conf' )
-    startquagga( speaker2, 64512, 'quagga-sdn-speaker2.conf' )
-
+    startquagga( spk1, 64513, 'quagga-sdn.conf' )
+    startquagga( spk2, 64512, 'quagga-sdn-speaker2.conf' )
+    startquagga( spk3, 64511, 'quagga-sdn3.conf' )
+    startquagga( spk4, 64510, 'quagga-sdn4.conf' )
 
     root = net.get( 'root' )
     root.intf( 'root-eth0' ).setIP( '1.1.1.2/24' )
@@ -387,13 +499,16 @@
     root.intf( 'root-eth2' ).setIP( '1.1.1.6/24' )
     root.cmd( 'ip addr add 192.168.0.102/24 dev root-eth2' )
 
-    speaker1.intf( 'speaker1-eth1' ).setIP( '1.1.1.1/24' )
-    speaker2.intf( 'speaker2-eth1' ).setIP( '1.1.1.3/24' )
+    spk1.intf( 'spk1-eth1' ).setIP( '1.1.1.1/24' )
+    spk2.intf( 'spk2-eth1' ).setIP( '1.1.1.3/24' )
+    spk3.intf( 'spk3-eth1' ).setIP( '1.1.1.5/24' )
+    spk4.intf( 'spk4-eth1' ).setIP( '1.1.1.7/24' )
 
 
     stopsshd()
 
-    hosts = [ peer64514, peer64515, peer64516, host64514];
+    hosts = [ p64514, p64515, p64516, p64517, p64518, p64519, p64520,
+              h64514, h64517, h64519 ];
     startsshds( hosts )
 
 
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf
new file mode 100644
index 0000000..7e78260
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn3.conf
@@ -0,0 +1,45 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.9.101
+  timers bgp 1 2
+  neighbor 10.0.9.1 remote-as 64519
+  neighbor 10.0.9.1 ebgp-multihop
+  neighbor 10.0.9.1 timers connect 5
+  neighbor 10.0.20.1 remote-as 64520
+  neighbor 10.0.20.1 ebgp-multihop
+  neighbor 10.0.20.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+  neighbor 1.1.1.4 remote-as 64513
+  neighbor 1.1.1.4 port 2000
+  neighbor 1.1.1.4 timers connect 5
+
+  neighbor 1.1.1.6 remote-as 64513
+  neighbor 1.1.1.6 port 2000
+  neighbor 1.1.1.6 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf
new file mode 100644
index 0000000..7454ab3
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga-sdn4.conf
@@ -0,0 +1,45 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+!
+router bgp 64513
+  bgp router-id 10.0.7.101
+  timers bgp 1 2
+  neighbor 10.0.7.1 remote-as 64517
+  neighbor 10.0.7.1 ebgp-multihop
+  neighbor 10.0.7.1 timers connect 5
+  neighbor 10.0.8.1 remote-as 64518
+  neighbor 10.0.8.1 ebgp-multihop
+  neighbor 10.0.8.1 timers connect 5
+
+  neighbor 1.1.1.2 remote-as 64513
+  neighbor 1.1.1.2 port 2000
+  neighbor 1.1.1.2 timers connect 5
+
+  neighbor 1.1.1.4 remote-as 64513
+  neighbor 1.1.1.4 port 2000
+  neighbor 1.1.1.4 timers connect 5
+
+  neighbor 1.1.1.6 remote-as 64513
+  neighbor 1.1.1.6 port 2000
+  neighbor 1.1.1.6 timers connect 5
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf
new file mode 100644
index 0000000..00e4cf8
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64517.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64517
+  bgp router-id 10.0.7.1
+!  timers bgp 1 3
+ neighbor 10.0.7.101 remote-as 64513
+ network 7.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf
new file mode 100644
index 0000000..c156102
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64518.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64518
+  bgp router-id 10.0.8.1
+!  timers bgp 1 3
+ neighbor 10.0.8.101 remote-as 64513
+ network 8.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf
new file mode 100644
index 0000000..11f1801
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64519.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64519
+  bgp router-id 10.0.9.1
+!  timers bgp 1 3
+ neighbor 10.0.9.101 remote-as 64513
+ network 9.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf
new file mode 100644
index 0000000..5fa469d
--- /dev/null
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/quagga64520.conf
@@ -0,0 +1,28 @@
+! -*- bgp -*-
+!
+! BGPd sample configuratin file
+!
+! $Id: bgpd.conf.sample,v 1.1 2002/12/13 20:15:29 paul Exp $
+!
+hostname bgpd
+password hello
+!enable password please-set-at-here
+!
+!bgp mulitple-instance
+!
+router bgp 64520
+  bgp router-id 10.0.20.1
+!  timers bgp 1 3
+ neighbor 10.0.20.101 remote-as 64513
+ network 20.0.0.0/24
+
+!
+! access-list all permit any
+!
+!route-map set-nexthop permit 10
+! match ip address all
+! set ip next-hop 10.0.0.1
+!
+!log file /usr/local/var/log/quagga/bgpd.log
+!
+log stdout
\ No newline at end of file
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
index 602a72f..5efd5a7 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/network-cfg.json
@@ -3,10 +3,12 @@
         "of:00000000000000a8/5" : {
             "interfaces" : [
                 {
+                    "name": "sw8-5-1",
                     "ips"  : [ "10.0.5.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw8-5-2",
                     "ips"  : [ "10.0.15.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
@@ -15,10 +17,12 @@
         "of:0000000000000a32/4" : {
             "interfaces" : [
                 {
+                    "name": "sw32-4-1",
                     "ips"  : [ "10.0.4.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw32-4-2",
                     "ips"  : [ "10.0.14.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
@@ -27,14 +31,56 @@
         "of:0000000000000a28/3" : {
             "interfaces" : [
                 {
+                    "name": "sw28-3-1",
                     "ips"  : [ "10.0.6.101/24" ],
                     "mac"  : "00:00:00:00:00:01"
                 },
                 {
+                    "name": "sw28-3-2",
                     "ips"  : [ "10.0.16.101/24" ],
                     "mac"  : "00:00:00:00:00:02"
                 }
             ]
+        },
+        "of:00000000000000a5/5" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw5-5",
+                      "ips"  : [ "10.0.20.101/24" ],
+                      "mac"  : "00:00:00:00:00:03",
+                      "vlan" : "10"
+                  }
+              ]
+        },
+        "of:00000000000000a5/4" : {
+            "interfaces" : [
+                {
+                    "name" : "sw5-4",
+                    "ips"  : [ "10.0.9.101/24" ],
+                    "mac"  : "00:00:00:00:00:03",
+                    "vlan" : "10"
+                }
+            ]
+        },
+        "of:00000000000000a7/3" : {
+            "interfaces" : [
+                {
+                    "name" : "sw7-3",
+                    "ips"  : [ "10.0.7.101/24" ],
+                    "mac"  : "00:00:00:00:00:04",
+                    "vlan" : "20"
+                }
+            ]
+        },
+        "of:00000000000000a9/3" : {
+              "interfaces" : [
+                  {
+                      "name" : "sw9-3",
+                      "ips"  : [ "10.0.8.101/24" ],
+                      "mac"  : "00:00:00:00:00:04",
+                      "vlan" : "20"
+                  }
+              ]
         }
     },
     "apps" : {
@@ -42,7 +88,7 @@
             "bgp" : {
                 "bgpSpeakers" : [
                     {
-                        "name" : "speaker1",
+                        "name" : "bgpSpeaker1",
                         "connectPoint" : "of:0000000000000a24/1",
                         "peers" : [
                             "10.0.4.1",
@@ -51,13 +97,31 @@
                         ]
                     },
                     {
-                        "name" : "speaker2",
+                        "name" : "bgpSpeaker2",
                         "connectPoint" : "of:0000000000000a24/2",
                         "peers" : [
                             "10.0.14.1",
                             "10.0.15.1",
                             "10.0.16.1"
                         ]
+                    },
+                    {
+                          "name": "bgpSpeaker3",
+                          "vlan": "10",
+                          "connectPoint" : "of:0000000000000a24/3",
+                          "peers" : [
+                              "10.0.9.1",
+                              "10.0.20.1"
+                          ]
+                    },
+                    {
+                        "name": "bgpSpeaker4",
+                        "vlan": "20",
+                        "connectPoint" : "of:0000000000000a24/4",
+                        "peers" : [
+                            "10.0.7.1",
+                            "10.0.8.1"
+                        ]
                     }
                 ]
             }
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
index 8458b9a..d7c44c9 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
@@ -145,6 +145,15 @@
                                  onpass="Install ONOS to nodes succeeded",
                                  onfail="Install ONOS to nodes failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS is up yet" )
         onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
         onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout=420 )
@@ -155,15 +164,6 @@
                                  onpass="ONOS nodes are up",
                                  onfail="ONOS nodes are NOT up" )
 
-        main.step( "Set up ONOS secure SSH" )
-        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
-        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
-        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=secureSshResult,
-                                 onpass="Set up ONOS secure SSH succeeded",
-                                 onfail="Set up ONOS secure SSH failed " )
-
         main.step( "Checking if ONOS CLI is ready" )
         main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py b/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
index ab57821..3601489 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
@@ -146,13 +146,6 @@
                                  onpass="Install ONOS succeeded",
                                  onfail="Install ONOS failed" )
 
-        main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=onos1UpResult,
-                                 onpass="ONOS is up",
-                                 onfail="ONOS is NOT up" )
-
         main.step( "Set up ONOS secure SSH" )
         secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
         utilities.assert_equals( expect=main.TRUE,
@@ -160,6 +153,13 @@
                                  onpass="Set up ONOS secure SSH succeeded",
                                  onfail="Set up ONOS secure SSH failed " )
 
+        main.step( "Checking if ONOS is up yet" )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1UpResult,
+                                 onpass="ONOS is up",
+                                 onfail="ONOS is NOT up" )
+
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli1.startOnosCli( ONOS1Ip,
                                                commandlineTimeout=100,
diff --git a/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.params b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.params
new file mode 100755
index 0000000..9d9bab2
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.params
@@ -0,0 +1,32 @@
+<PARAMS>
+
+    <testcases>1,2,3</testcases>
+
+    <num_controllers>3</num_controllers>
+
+    <DEPENDENCY>
+        <wrapper1>startUp</wrapper1>
+        <topology>~/onos/tools/test/topos/vpls.json</topology>
+    </DEPENDENCY>
+
+    <ENV>
+        <cellName>vpls</cellName>
+        <cellApps>drivers,openflow,vpls</cellApps>
+        <cellUser>sdn</cellUser>
+    </ENV>
+
+    <CTRL>
+        <port>6653</port>
+    </CTRL>
+
+    <vpls>
+        <name>org.onosproject.vpls</name>
+        <hosts>6</hosts>
+    </vpls>
+
+    <SLEEP>
+        <startup>10</startup>
+        <netcfg>10</netcfg>
+    </SLEEP>
+
+</PARAMS>
diff --git a/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.py b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.py
new file mode 100755
index 0000000..07ae3b2
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.py
@@ -0,0 +1,370 @@
+# CASE1: Startup
+# CASE2: Load vpls topology and configurations from demo script
+# CASE3: Test CLI commands
+
+class VPLSBasic:
+    def __init__( self ):
+        self.default = ''
+
+    def CASE1( self, main ):
+        """
+        CASE1 is to compile ONOS and push it to the test machines
+
+        Startup sequence:
+        cell <name>
+        onos-verify-cell
+        NOTE: temporary - onos-remove-raft-logs
+        onos-uninstall
+        start mininet
+        git pull
+        mvn clean install
+        onos-package
+        onos-install -f
+        onos-wait-for-start
+        start cli sessions
+        start tcpdump
+        """
+        import imp
+        import time
+        import json
+        main.case( "Setting up test environment" )
+        main.caseExplanation = "Setup the test environment including " +\
+                                "installing ONOS, starting Mininet and ONOS" +\
+                                "cli sessions."
+
+        # load some variables from the params file
+        cellName = main.params[ 'ENV' ][ 'cellName' ]
+
+        main.numCtrls = int( main.params[ 'num_controllers' ] )
+
+        ofPort = main.params[ 'CTRL' ][ 'port' ]
+
+        main.CLIs = []
+        main.RESTs = []
+        main.nodes = []
+        ipList = []
+        for i in range( 1, main.numCtrls + 1 ):
+            try:
+                main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
+                main.RESTs.append( getattr( main, 'ONOSrest' + str( i ) ) )
+                main.nodes.append( getattr( main, 'ONOS' + str( i ) ) )
+                ipList.append( main.nodes[ -1 ].ip_address )
+            except AttributeError:
+                break
+
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'cellApps' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet1.ip_address,
+                                       cellAppString, ipList )
+        main.step( "Applying cell variable to environment" )
+        cellResult = main.ONOSbench.setCell( cellName )
+        verifyResult = main.ONOSbench.verifyCell()
+
+        main.log.info( "Uninstalling ONOS" )
+        for node in main.nodes:
+            main.ONOSbench.onosUninstall( node.ip_address )
+
+        # Make sure ONOS is DEAD
+        main.log.info( "Killing any ONOS processes" )
+        killResults = main.TRUE
+        for node in main.nodes:
+            killed = main.ONOSbench.onosKill( node.ip_address )
+            killResults = killResults and killed
+
+        cleanInstallResult = main.TRUE
+
+        main.step( "Starting Mininet" )
+        # scp topo file to mininet
+        # TODO: move to params?
+        topoName = "vpls"
+        topoFile = "vpls.py"
+        filePath = main.ONOSbench.home + "/tools/test/topos/"
+        main.ONOSbench.scp( main.Mininet1,
+                            filePath + topoFile,
+                            main.Mininet1.home,
+                            direction="to" )
+        topo = " --custom " + main.Mininet1.home + topoFile + " --topo " + topoName
+        args = " --switch ovs,protocols=OpenFlow13 --controller=remote"
+        for node in main.nodes:
+            args += ",ip=" + node.ip_address
+        mnCmd = "sudo mn" + topo + args
+        mnResult = main.Mininet1.startNet( mnCmd=mnCmd )
+        utilities.assert_equals( expect=main.TRUE, actual=mnResult,
+                                 onpass="Mininet Started",
+                                 onfail="Error starting Mininet" )
+
+        main.ONOSbench.getVersion( report=True )
+
+        main.step( "Creating ONOS package" )
+        packageResult = main.ONOSbench.buckBuild()
+        utilities.assert_equals( expect=main.TRUE, actual=packageResult,
+                                 onpass="ONOS package successful",
+                                 onfail="ONOS package failed" )
+
+        main.step( "Installing ONOS package" )
+        onosInstallResult = main.TRUE
+        for node in main.nodes:
+            tmpResult = main.ONOSbench.onosInstall( options="-f",
+                                                    node=node.ip_address )
+            onosInstallResult = onosInstallResult and tmpResult
+        utilities.assert_equals( expect=main.TRUE, actual=onosInstallResult,
+                                 onpass="ONOS install successful",
+                                 onfail="ONOS install failed" )
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
+        main.step( "Checking if ONOS is up yet" )
+        for i in range( 2 ):
+            onosIsupResult = main.TRUE
+            for node in main.nodes:
+                started = main.ONOSbench.isup( node.ip_address )
+                if not started:
+                    main.log.error( node.name + " hasn't started" )
+                onosIsupResult = onosIsupResult and started
+            if onosIsupResult == main.TRUE:
+                break
+        utilities.assert_equals( expect=main.TRUE, actual=onosIsupResult,
+                                 onpass="ONOS startup successful",
+                                 onfail="ONOS startup failed" )
+
+        main.step( "Starting ONOS CLI sessions" )
+        cliResults = main.TRUE
+        threads = []
+        for i in range( main.numCtrls ):
+            t = main.Thread( target=main.CLIs[i].startOnosCli,
+                             name="startOnosCli-" + str( i ),
+                             args=[main.nodes[i].ip_address] )
+            threads.append( t )
+            t.start()
+
+        for t in threads:
+            t.join()
+            cliResults = cliResults and t.result
+        utilities.assert_equals( expect=main.TRUE, actual=cliResults,
+                                 onpass="ONOS cli startup successful",
+                                 onfail="ONOS cli startup failed" )
+
+        main.activeNodes = [ i for i in range( 0, len( main.CLIs ) ) ]
+
+        main.step( "Activate apps defined in the params file" )
+        # get data from the params
+        apps = main.params.get( 'apps' )
+        if apps:
+            apps = apps.split(',')
+            main.log.warn( apps )
+            activateResult = True
+            for app in apps:
+                main.CLIs[ 0 ].app( app, "Activate" )
+            # TODO: check this worked
+            time.sleep( SLEEP )  # wait for apps to activate
+            for app in apps:
+                state = main.CLIs[ 0 ].appStatus( app )
+                if state == "ACTIVE":
+                    activateResult = activateResult and True
+                else:
+                    main.log.error( "{} is in {} state".format( app, state ) )
+                    activateResult = False
+            utilities.assert_equals( expect=True,
+                                     actual=activateResult,
+                                     onpass="Successfully activated apps",
+                                     onfail="Failed to activate apps" )
+        else:
+            main.log.warn( "No apps were specified to be loaded after startup" )
+
+        main.step( "Set ONOS configurations" )
+        config = main.params.get( 'ONOS_Configuration' )
+        if config:
+            main.log.debug( config )
+            checkResult = main.TRUE
+            for component in config:
+                for setting in config[component]:
+                    value = config[component][setting]
+                    check = main.CLIs[ 0 ].setCfg( component, setting, value )
+                    main.log.info( "Value was changed? {}".format( main.TRUE == check ) )
+                    checkResult = check and checkResult
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=checkResult,
+                                     onpass="Successfully set config",
+                                     onfail="Failed to set config" )
+        else:
+            main.log.warn( "No configurations were specified to be changed after startup" )
+
+        main.step( "App Ids check" )
+        appCheck = main.TRUE
+        threads = []
+        for i in main.activeNodes:
+            t = main.Thread( target=main.CLIs[i].appToIDCheck,
+                             name="appToIDCheck-" + str( i ),
+                             args=[] )
+            threads.append( t )
+            t.start()
+
+        for t in threads:
+            t.join()
+            appCheck = appCheck and t.result
+        if appCheck != main.TRUE:
+            main.log.warn( main.CLIs[0].apps() )
+            main.log.warn( main.CLIs[0].appIDs() )
+        utilities.assert_equals( expect=main.TRUE, actual=appCheck,
+                                 onpass="App Ids seem to be correct",
+                                 onfail="Something is wrong with app Ids" )
+
+    def CASE2( self, main ):
+        """
+        Load and test vpls configurations from json configuration file
+        """
+        import os.path
+        from tests.USECASE.VPLS.dependencies import vpls
+
+        pprint = main.ONOSrest1.pprint
+        hosts = int( main.params['vpls']['hosts'] )
+        SLEEP = int( main.params['SLEEP']['netcfg'] )
+
+        main.step( "Discover hosts using pings" )
+        for i in range( 1, hosts + 1 ):
+            src = "h" + str( i )
+            for j in range( 1, hosts + 1 ):
+                if j == i:
+                    continue
+                dst = "h" + str( j )
+            pingResult = main.Mininet1.pingHost( SRC=src, TARGET=dst )
+
+        main.step( "Load VPLS configurations" )
+        # TODO: load from params
+        fileName = main.params['DEPENDENCY']['topology']
+        app = main.params['vpls']['name']
+        # TODO make this a function?
+        main.ONOSbench.handle.sendline( "onos-netcfg $OC1 " + fileName )
+        # Time for netcfg to load data
+        time.sleep( SLEEP )
+        # 'Master' copy of test configuration
+        try:
+            with open( os.path.expanduser( fileName ) ) as dataFile:
+                originalCfg = json.load( dataFile )
+                main.vplsConfig = originalCfg['apps'].get( app ).get( 'vpls' ).get( 'vplsList')
+        except Exception as e:
+            main.log.error( "Error loading config file: {}".format( e ) )
+        if main.vplsConfig:
+            result = True
+        else:
+            result = False
+        utilities.assert_equals( expect=True,
+                                 actual=result,
+                                 onpass="Loaded vpls configuration",
+                                 onfail="Failed to load vpls configuration" )
+
+        main.step( "Check interface configurations" )
+        result = False
+        getPorts = main.ONOSrest1.getNetCfg( subjectClass="ports" )
+        onosCfg = pprint( getPorts )
+        sentCfg = pprint( originalCfg.get( "ports" ) )
+
+        if onosCfg == sentCfg:
+            main.log.info( "ONOS interfaces NetCfg matches what was sent" )
+            result = True
+        else:
+            main.log.error( "ONOS interfaces NetCfg doesn't match what was sent" )
+            main.log.debug( "ONOS config: {}".format( onosCfg ) )
+            main.log.debug( "Sent config: {}".format( sentCfg ) )
+        utilities.assert_equals( expect=True,
+                                 actual=result,
+                                 onpass="Net Cfg added for interfaces",
+                                 onfail="Net Cfg not added for interfaces" )
+
+        # Run a bunch of checks to verify functionality based on configs
+        vpls.verify( main )
+
+    def CASE3( self, main ):
+        """
+        Test VPLS cli commands
+        High level steps:
+            remove interface from a network
+            Clean configs
+            create vpls network
+            add interfaces to a network
+            add encap
+            change encap
+            remove encap
+            list?
+        """
+        from tests.USECASE.VPLS.dependencies import vpls
+        SLEEP = int( main.params['SLEEP']['netcfg'] )
+        pprint = main.ONOSrest1.pprint
+
+        main.step( "Remove an interface from a vpls network" )
+        main.CLIs[0].vplsRemIface( 'VPLS1', 'h1' )
+        time.sleep( SLEEP )
+        #update master config json
+        for network in main.vplsConfig:
+            if network.get( 'name' ) == 'VPLS1':
+                ifaces = network.get( 'interfaces' )
+                ifaces.remove('h1')
+        vpls.verify( main )
+
+        main.step( "Clean all vpls configurations" )
+        main.CLIs[0].vplsClean()
+        time.sleep( SLEEP )
+        main.vplsConfig = []
+        vpls.verify( main )
+
+        main.step( "Create a new vpls network" )
+        name = "Network1"
+        main.CLIs[0].vplsCreate( name )
+        time.sleep( SLEEP )
+        network1 = { 'name': name, 'interfaces': [], 'encapsulation': 'NONE' }
+        main.vplsConfig.append( network1 )
+        vpls.verify( main )
+
+        main.step( "Add interfaces to the network" )
+        main.CLIs[0].vplsAddIface( name, "h1" )
+        main.CLIs[0].vplsAddIface( name, "h5" )
+        main.CLIs[0].vplsAddIface( name, "h4" )
+        time.sleep( SLEEP )
+        for network in main.vplsConfig:
+            if network.get( 'name' ) == name:
+                ifaces = network.get( 'interfaces' )
+                ifaces.append( 'h1' )
+                ifaces.append( 'h4' )
+                ifaces.append( 'h5' )
+                network[ 'interfaces' ] = ifaces
+        vpls.verify( main )
+
+        main.step( "Add MPLS encapsulation to a vpls network" )
+        encapType = "MPLS"
+        main.CLIs[0].vplsSetEncap( name, encapType )
+        for network in main.vplsConfig:
+            if network.get( 'name' ) == name:
+                network['encapsulation'] = encapType
+        time.sleep( SLEEP )
+        vpls.verify( main )
+
+        main.step( "Change an encapsulation type" )
+        encapType = "VLAN"
+        main.CLIs[0].vplsSetEncap( name, encapType )
+        for network in main.vplsConfig:
+            if network.get( 'name' ) == name:
+                network['encapsulation'] = encapType
+        time.sleep( SLEEP )
+        vpls.verify( main )
+
+        main.step( "Remove encapsulation" )
+        encapType = "NONE"
+        main.CLIs[0].vplsSetEncap( name, encapType )
+        for network in main.vplsConfig:
+            if network.get( 'name' ) == name:
+                network['encapsulation'] = encapType
+        time.sleep( SLEEP )
+        vpls.verify( main )
+
+        main.step( "Clean all vpls configurations" )
+        main.CLIs[0].vplsClean()
+        time.sleep( SLEEP )
+        main.vplsConfig = []
+        vpls.verify( main )
diff --git a/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.topo b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.topo
new file mode 100755
index 0000000..e9a1f8e
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/VPLSBasic/VPLSBasic.topo
@@ -0,0 +1,115 @@
+<TOPOLOGY>
+    <COMPONENT>
+
+        <ONOSbench>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS>
+                <nodes>1</nodes>
+            </COMPONENTS>
+        </ONOSbench>
+
+        <ONOScli1>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOScli1>
+
+        <ONOScli2>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOScli2>
+
+        <ONOScli3>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOScli3>
+
+        <ONOS1>
+            <host>OC1</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1>
+
+        <ONOS2>
+            <host>OC2</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS2>
+
+        <ONOS3>
+            <host>OC3</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>11</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS3>
+
+        <ONOSrest1>
+            <host>OC1</host>
+            <port>8181</port>
+            <user>onos</user>
+            <password>rocks</password>
+            <type>OnosRestDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOSrest1>
+
+        <ONOSrest2>
+            <host>OC2</host>
+            <port>8181</port>
+            <user>onos</user>
+            <password>rocks</password>
+            <type>OnosRestDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOSrest2>
+
+        <ONOSrest3>
+            <host>OC3</host>
+            <port>8181</port>
+            <user>onos</user>
+            <password>rocks</password>
+            <type>OnosRestDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOSrest3>
+
+
+        <Mininet1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetCliDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS>
+                <home>~/mininet/custom/</home>
+            </COMPONENTS>
+        </Mininet1>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/VPLS/VPLSBasic/__init__.py b/TestON/tests/USECASE/VPLS/VPLSBasic/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/VPLSBasic/__init__.py
diff --git a/TestON/tests/USECASE/VPLS/VPLSBasic/dependencies/__init__.py b/TestON/tests/USECASE/VPLS/VPLSBasic/dependencies/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/VPLSBasic/dependencies/__init__.py
diff --git a/TestON/tests/USECASE/VPLS/__init__.py b/TestON/tests/USECASE/VPLS/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/__init__.py
diff --git a/TestON/tests/USECASE/VPLS/dependencies/__init__.py b/TestON/tests/USECASE/VPLS/dependencies/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/dependencies/__init__.py
diff --git a/TestON/tests/USECASE/VPLS/dependencies/vpls.py b/TestON/tests/USECASE/VPLS/dependencies/vpls.py
new file mode 100644
index 0000000..8dfdd46
--- /dev/null
+++ b/TestON/tests/USECASE/VPLS/dependencies/vpls.py
@@ -0,0 +1,144 @@
+"""
+Functions for the vpls tests
+"""
+import time
+import json
+
+def sanitizeConfig( config ):
+    """
+    Take a python json object for vpls config and normalize it.
+    Things it does:
+        Converts all strings to the same format
+        Make sure each network has an encapsulation key:value
+        Makes sure encapsulation type is all uppercase
+        Make sure an empty list of interfaces is formated consistently
+        Sorts the list of interfaces
+    """
+    # Convert to same string formats
+    config = json.loads( json.dumps( config ) )
+    for network in config:
+        encap = network.get( 'encapsulation', None )
+        if encap is None:
+            encap = "NONE"
+        network[ 'encapsulation' ] = encap.upper()
+        ifaces = network.get( 'interfaces' )
+        if ifaces == ['']:
+            ifaces = []
+        else:
+            ifaces = sorted( ifaces )
+            network['interfaces'] = ifaces
+    return config
+
+def verify( main ):
+    """
+    Runs some tests to verify the vpls configurations.
+        - Compare sent vpls network configuration to what is stored in each:
+            - ONOS network configuration
+            - ONOS VPLS application configuration
+        - Ping between each pair of hosts to check connectivity
+
+    NOTE: This requires the expected/sent network config json for the vpls
+          application be stored in main.vplsConfig
+    """
+    # Variables
+    app = main.params['vpls']['name']
+    pprint = main.ONOSrest1.pprint
+    SLEEP = int( main.params['SLEEP']['netcfg'] )
+
+    main.step( "Check network configurations for vpls application" )
+    clusterResult = True
+    for node in main.RESTs:
+        result = False
+        getVPLS = node.getNetCfg( subjectClass="apps",
+                                  subjectKey=app )
+        onosCfg = json.loads( getVPLS ).get( 'vpls' ).get( 'vplsList' )
+        onosCfg = pprint( sanitizeConfig( onosCfg ) )
+        sentCfg = pprint( sanitizeConfig( main.vplsConfig ) )
+        result = onosCfg == sentCfg
+        if result:
+            main.log.info( "ONOS NetCfg matches what was sent" )
+        else:
+            clusterResult = False
+            main.log.error( "ONOS NetCfg doesn't match what was sent" )
+            main.log.debug( "ONOS config: {}".format( onosCfg ) )
+            main.log.debug( "Sent config: {}".format( sentCfg ) )
+    utilities.assert_equals( expect=True,
+                             actual=clusterResult,
+                             onpass="Net Cfg added for vpls",
+                             onfail="Net Cfg not added for vpls" )
+
+    main.step( "Check vpls app configurations" )
+    clusterResult = True
+    for node in main.CLIs:
+        result = False
+        #TODO Read from vpls show and match to pushed json
+        vpls = node.parseVplsShow()
+        parsedVpls = pprint( sanitizeConfig( vpls ) )
+        sentVpls = pprint( sanitizeConfig( main.vplsConfig ) )
+        result = parsedVpls == sentVpls
+        if result:
+            main.log.info( "VPLS config matches sent NetCfg" )
+        else:
+            clusterResult = False
+            main.log.error( "VPLS config doesn't match sent NetCfg" )
+            main.log.debug( "ONOS config: {}".format( parsedVpls ) )
+            main.log.debug( "Sent config: {}".format( sentVpls ) )
+    utilities.assert_equals( expect=True,
+                             actual=clusterResult,
+                             onpass="VPLS successfully configured",
+                             onfail="VPLS not configured correctly" )
+
+    # FIXME This doesn't work, some will be withdrawn if interfaces are removed
+    # TODO: if encapsulation is set, look for that
+    # TODO: can we look at the intent keys?
+    """
+    main.step( "Check intent states" )
+    # Print the intent states
+    intents = main.CLIs[0].intents()
+    count = 0
+    while count <= 5:
+        installedCheck = True
+        try:
+            for intent in json.loads( intents ):
+                state = intent.get( 'state', None )
+                if "INSTALLED" not in state:
+                    installedCheck = False
+        except ( ValueError, TypeError ):
+            main.log.exception( "Error parsing intents" )
+        if installedCheck:
+            break
+        count += 1
+    utilities.assert_equals( expect=True,
+                             actual=installedCheck ,
+                             onpass="All Intents in installed state",
+                             onfail="Not all Intents in installed state" )
+    """
+
+    main.step( "Check connectivity" )
+    connectivityCheck = True
+    hosts = int( main.params['vpls']['hosts'] )
+    networks = []
+    for network in main.vplsConfig:
+        nodes = network.get( 'interfaces', None )
+        if nodes:
+            networks.append( nodes )
+    for i in range( 1, hosts + 1 ):
+        src = "h" + str( i )
+        for j in range( 1, hosts + 1 ):
+            if j == i:
+                continue
+            dst = "h" + str( j )
+            pingResult = main.Mininet1.pingHost( SRC=src, TARGET=dst )
+            expected = main.FALSE
+            for network in networks:
+                if src in network and dst in network:
+                    expected = main.TRUE
+                    break
+            if pingResult != expected:
+                connectivityCheck = False
+                main.log.error( "%s <-> %s: %s; Expected: %s" %
+                               ( src, dst, pingResult, expected ) )
+    utilities.assert_equals( expect=True,
+                             actual=connectivityCheck,
+                             onpass="Connectivity is as expected",
+                             onfail="Connectivity is not as expected" )
