add 1-node template, rename 3-node template

Change-Id: I6c49e3a33dcbf1f4857700b0231e2daded166b48
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/README b/TestON/tests/SAMP/SAMPstartTemplate/README
deleted file mode 100644
index 359943e..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Summary:
-        This is a Sample test suite that demonstrates starting up ONOS
-        and scalling to multiple instances. It also has extra
-        functionalilty that allows the tester to bypass the ONOS
-        package and install case (case 2) to save time.
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.params b/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.params
deleted file mode 100755
index 9120c6a..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.params
+++ /dev/null
@@ -1,34 +0,0 @@
-<PARAMS>
-
-    <testcases>1,2,2,2</testcases>
-
-    <SCALE>
-        <size>1,2,3</size>
-        <max>3</max>
-    </SCALE>
-
-    <DEPENDENCY>
-        <path>/tests/SAMPstartTemplate/dependencies/</path>
-        <wrapper1>startUp</wrapper1>
-        <topology>newFuncTopo.py</topology>
-    </DEPENDENCY>
-
-    <ENV>
-        <cellName>productionCell</cellName>
-        <cellApps>drivers,openflow,proxyarp,mobility</cellApps>
-    </ENV>
-
-    <GIT>
-        <pull>False</pull>
-        <branch>master</branch>
-    </GIT>
-
-    <CTRL>
-        <port>6653</port>
-    </CTRL>
-
-    <SLEEP>
-        <startup>15</startup>
-    </SLEEP>
-
-</PARAMS>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.py b/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.py
deleted file mode 100644
index b6184da..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.py
+++ /dev/null
@@ -1,251 +0,0 @@
-
-# This is a sample template that starts up ONOS cluster, this template
-# is used as a starting script for creating functionality and performance test
-
-class SAMPstartTemplate:
-
-    def __init__( self ):
-        self.default = ''
-
-    def CASE1( self, main ):
-        import time
-        import os
-        import imp
-        import re
-
-        """
-        - 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" )
-        stepResult = main.FALSE
-
-        # Test variables
-        main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
-        main.cellName = main.params[ 'ENV' ][ 'cellName' ]
-        main.apps = main.params[ 'ENV' ][ 'cellApps' ]
-        gitBranch = main.params[ 'GIT' ][ 'branch' ]
-        main.dependencyPath = main.testOnDirectory + \
-                              main.params[ 'DEPENDENCY' ][ 'path' ]
-        main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
-        main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
-        main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
-        main.ONOSport = main.params[ 'CTRL' ][ 'port' ]
-        wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
-        main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
-        gitPull = main.params[ 'GIT' ][ 'pull' ]
-        main.cellData = {} # for creating cell file
-        main.CLIs = []
-        main.ONOSip = []
-
-        main.ONOSip = main.ONOSbench.getOnosIps()
-        print main.ONOSip
-
-        # 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" )
-
-        copyResult1 = main.ONOSbench.scp( main.Mininet1,
-                                          main.dependencyPath +
-                                          main.topology,
-                                          main.Mininet1.home,
-                                          direction="to" )
-        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
-        """
-
-        # main.scale[ 0 ] determines the current number of ONOS controller
-        main.numCtrls = int( main.scale[ 0 ] )
-
-        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 ] )
-
-        print "NODE COUNT = ", 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.onosPackage()
-        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 i in range( main.numCtrls ):
-            onosUninstallResult = onosUninstallResult and \
-                    main.ONOSbench.onosUninstall( nodeIp=main.ONOSip[ i ] )
-        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( "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" )
-
-        # Remove the first element in main.scale list
-        main.scale.remove( main.scale[ 0 ] )
-
-    def CASE9( self, main ):
-        '''
-            Report errors/warnings/exceptions
-        '''
-        main.log.info("Error report: \n" )
-        main.ONOSbench.logReport( main.ONOSip[ 0 ],
-                                  [ "INFO",
-                                    "FOLLOWER",
-                                    "WARN",
-                                    "flow",
-                                    "ERROR",
-                                    "Except" ],
-                                  "s" )
-
-    def CASE11( self, main ):
-        """
-            Start mininet
-        """
-        main.log.report( "Start Mininet topology" )
-        main.log.case( "Start Mininet topology" )
-
-        main.step( "Starting Mininet Topology" )
-        topoResult = main.Mininet1.startNet( topoFile=main.dependencyPath + main.topology )
-        stepResult = topoResult
-        utilities.assert_equals( expect=main.TRUE,
-                                 actual=stepResult,
-                                 onpass="Successfully loaded topology",
-                                 onfail="Failed to load topology" )
-        # Exit if topology did not load properly
-        if not topoResult:
-            main.cleanup()
-            main.exit()
-
-    def CASE12( self, main ):
-        """
-            Test random ONOS command
-        """
-
-        main.CLIs[ 0 ].startOnosCli( main.ONOSip[ 0 ] )
-        print main.CLIs[ 0 ].leaders()
-
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/dependencies/newFuncTopo.py b/TestON/tests/SAMP/SAMPstartTemplate/dependencies/newFuncTopo.py
deleted file mode 100755
index 7fe68c1..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate/dependencies/newFuncTopo.py
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/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 VLANHost( Host ):
-    def config( self, vlan=100, **params ):
-        r = super( Host, self ).config( **params )
-        intf = self.defaultIntf()
-        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 IPv6Host( Host ):
-    def config( self, v6Addr='1000:1/64', **params ):
-        r = super( Host, self ).config( **params )
-        intf = self.defaultIntf()
-        self.cmd( 'ifconfig %s inet 0' % intf )
-        self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
-        return r
-
-class dualStackHost( Host ):
-    def config( self, v6Addr='2000:1/64', **params ):
-        r = super( Host, self ).config( **params )
-        intf = self.defaultIntf()
-        self.cmd( 'ip -6 addr add %s dev %s' % ( v6Addr, intf ) )
-        return r
-
-class MyTopo( Topo ):
-
-    def __init__( self ):
-        # Initialize topology
-        Topo.__init__( self )
-
-        # Switch S5 Hosts
-        host1=self.addHost( 'h1', ip='10.1.0.2/24' )
-        host2=self.addHost( 'h2', cls=IPv6Host, v6Addr='1000::2/64' )
-        host3=self.addHost( 'h3', ip='10.1.0.3/24', cls=dualStackHost, v6Addr='2000::2/64' )
-        #VLAN hosts
-        host4=self.addHost( 'h4', ip='100.1.0.2/24', cls=VLANHost, vlan=100 )
-        host5=self.addHost( 'h5', ip='200.1.0.2/24', cls=VLANHost, vlan=200 )
-        #VPN-1 and VPN-2 Hosts
-        host6=self.addHost( 'h6', ip='11.1.0.2/24' )
-        host7=self.addHost( 'h7', ip='12.1.0.2/24' )
-        #Multicast Sender
-        host8=self.addHost( 'h8', ip='10.1.0.4/24' )
-
-        # Switch S6 Hosts
-        host9=self.addHost( 'h9', ip='10.1.0.5/24' )
-        host10=self.addHost( 'h10', cls=IPv6Host, v6Addr='1000::3/64' )
-        host11=self.addHost( 'h11', ip='10.1.0.6/24', cls=dualStackHost, v6Addr='2000::3/64' )
-        #VLAN hosts
-        host12=self.addHost( 'h12', ip='100.1.0.3/24', cls=VLANHost, vlan=100 )
-        host13=self.addHost( 'h13', ip='200.1.0.3/24', cls=VLANHost, vlan=200 )
-        #VPN-1 and VPN-2 Hosts
-        host14=self.addHost( 'h14', ip='11.1.0.3/24' )
-        host15=self.addHost( 'h15', ip='12.1.0.3/24' )
-        #Multicast Receiver
-        host16=self.addHost( 'h16', ip='10.1.0.7/24' )
-
-        # Switch S7 Hosts
-        host17=self.addHost( 'h17', ip='10.1.0.8/24' )
-        host18=self.addHost( 'h18', cls=IPv6Host, v6Addr='1000::4/64' )
-        host19=self.addHost( 'h19', ip='10.1.0.9/24', cls=dualStackHost, v6Addr='2000::4/64' )
-        #VLAN hosts
-        host20=self.addHost( 'h20', ip='100.1.0.4/24', cls=VLANHost, vlan=100 )
-        host21=self.addHost( 'h21', ip='200.1.0.4/24', cls=VLANHost, vlan=200 )
-        #VPN-1 and VPN-2 Hosts
-        host22=self.addHost( 'h22', ip='11.1.0.4/24' )
-        host23=self.addHost( 'h23', ip='12.1.0.4/24' )
-        #Multicast Receiver
-        host24=self.addHost( 'h24', ip='10.1.0.10/24' )
-
-        s1 = self.addSwitch( 's1' )
-        s2 = self.addSwitch( 's2' )
-        s3 = self.addSwitch( 's3' )
-        s4 = self.addSwitch( 's4' )
-        s5 = self.addSwitch( 's5' )
-        s6 = self.addSwitch( 's6' )
-        s7 = self.addSwitch( 's7' )
-
-        self.addLink(s5,host1)
-        self.addLink(s5,host2)
-        self.addLink(s5,host3)
-        self.addLink(s5,host4)
-        self.addLink(s5,host5)
-        self.addLink(s5,host6)
-        self.addLink(s5,host7)
-        self.addLink(s5,host8)
-
-        self.addLink(s6,host9)
-        self.addLink(s6,host10)
-        self.addLink(s6,host11)
-        self.addLink(s6,host12)
-        self.addLink(s6,host13)
-        self.addLink(s6,host14)
-        self.addLink(s6,host15)
-        self.addLink(s6,host16)
-
-        self.addLink(s7,host17)
-        self.addLink(s7,host18)
-        self.addLink(s7,host19)
-        self.addLink(s7,host20)
-        self.addLink(s7,host21)
-        self.addLink(s7,host22)
-        self.addLink(s7,host23)
-        self.addLink(s7,host24)
-
-        self.addLink(s1,s2)
-        self.addLink(s1,s3)
-        self.addLink(s1,s4)
-        self.addLink(s1,s5)
-
-        self.addLink(s2,s3)
-        self.addLink(s2,s5)
-        self.addLink(s2,s6)
-
-        self.addLink(s3,s4)
-        self.addLink(s3,s6)
-
-        self.addLink(s4,s7)
-        topos = { 'mytopo': ( lambda: MyTopo() ) }
-
-# HERE THE CODE DEFINITION OF THE TOPOLOGY ENDS
-
-def setupNetwork():
-    "Create network"
-    topo = MyTopo()
-    network = Mininet(topo=topo, autoSetMacs=True, controller=None)
-    network.start()
-    CLI( network )
-    network.stop()
-
-if __name__ == '__main__':
-    setLogLevel('info')
-    #setLogLevel('debug')
-    setupNetwork()
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/dependencies/startUp.py b/TestON/tests/SAMP/SAMPstartTemplate/dependencies/startUp.py
deleted file mode 100644
index bf2a2b6..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate/dependencies/startUp.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-    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/SAMP/SAMPstartTemplate2/__init__.py b/TestON/tests/SAMP/SAMPstartTemplate2/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/TestON/tests/SAMP/SAMPstartTemplate2/__init__.py
+++ /dev/null
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/Dependency/newFuncTopo.py b/TestON/tests/SAMP/SAMPstartTemplate2_1node/Dependency/newFuncTopo.py
similarity index 100%
rename from TestON/tests/SAMP/SAMPstartTemplate2/Dependency/newFuncTopo.py
rename to TestON/tests/SAMP/SAMPstartTemplate2_1node/Dependency/newFuncTopo.py
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/README b/TestON/tests/SAMP/SAMPstartTemplate2_1node/README
similarity index 100%
rename from TestON/tests/SAMP/SAMPstartTemplate2/README
rename to TestON/tests/SAMP/SAMPstartTemplate2_1node/README
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.params b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.params
new file mode 100755
index 0000000..5274518
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.params
@@ -0,0 +1,64 @@
+<PARAMS>
+    <!--
+        CASE0: pull onos code - this case should be skipped on Jenkins-driven prod test
+    -->
+    <!--
+        CASE1: setup and clean test env
+    -->
+    <!--
+        CASE2: get onos warnings, errors from log
+    -->
+    <!--
+        CASE10: start a 1-node ONOS
+    -->
+    <!--
+        CASE11: Start Mininet and assign controllers
+    -->
+    <!--
+        CASE12: Sample case of using onos cli
+    -->
+    <!--
+        CASE22: Sample case of using onos rest
+    -->
+
+    <testcases>0,1,10,11,12,22,2</testcases>
+
+    <CASE0>
+        <gitPull>False</gitPull> # False or True
+        <gitBranch>master</gitBranch>
+    </CASE0>
+
+    <CASE1>
+        <NodeList>OC1,OC2,OC3</NodeList>
+        <SleepTimers>
+            <onosStartup>60</onosStartup>
+            <onosCfg>5</onosCfg>
+            <mnStartup>15</mnStartup>
+            <mnCfg>10</mnCfg>
+        </SleepTimers>
+    </CASE1>
+
+    <CASE10>
+        <numNodes>1</numNodes>
+        <Apps>
+            org.onosproject.openflow,org.onosproject.fwd
+        </Apps>
+        <ONOS_Configuration>
+        <org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
+            <useFlowObjectives>true</useFlowObjectives>
+        </org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator>
+        </ONOS_Configuration>
+    </CASE10>
+
+    <CASE11>
+        <path>~/OnosSystemTest/TestON/tests/SAMP/SAMPstartTemplate2/Dependency/</path>
+        <topo>newFuncTopo.py</topo>
+    </CASE11>
+
+    <CASE12>
+    </CASE12>
+
+    <CASE22>
+    </CASE22>
+
+</PARAMS>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.py
similarity index 96%
copy from TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py
copy to TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.py
index ce057f4..befa623 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.py
@@ -2,7 +2,7 @@
 # This is a sample template that starts up ONOS cluster, this template
 # can be use as a base script for ONOS System Testing.
 
-class SAMPstartTemplate2:
+class SAMPstartTemplate2_1node:
 
     def __init__( self ):
         self.default = ''
@@ -197,7 +197,7 @@
 
         main.step( "Assign switches to controllers.")
         assignResult = main.TRUE
-        onosNodes = [ main.ONOScli1.ip_address, main.ONOScli2.ip_address, main.ONOScli3.ip_address ]
+        onosNodes = [ main.ONOScli1.ip_address ]
         for i in range(1, 8):
             assignResult = assignResult & main.Mininet1.assignSwController( sw="s" + str( i ),
                                                          ip=onosNodes,
@@ -216,7 +216,7 @@
 
         main.log.case( "Test some onos commands through CLI. ")
         main.log.debug( main.ONOScli1.sendline("summary") )
-        main.log.debug( main.ONOScli3.sendline("devices") )
+        main.log.debug( main.ONOScli1.sendline("devices") )
 
     def CASE22( self, main ):
         """
@@ -225,4 +225,4 @@
 
         main.case( " Sample tests using ONOS REST API handles. ")
         main.log.debug( main.ONOSrest1.send("/devices") )
-        main.log.debug( main.ONOSrest2.apps() )
\ No newline at end of file
+        main.log.debug( main.ONOSrest1.apps() )
\ No newline at end of file
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.topo b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.topo
similarity index 64%
rename from TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.topo
rename to TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.topo
index 068bfdd..a804d4a 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate/SAMPstartTemplate.topo
+++ b/TestON/tests/SAMP/SAMPstartTemplate2_1node/SAMPstartTemplate2_1node.topo
@@ -1,6 +1,10 @@
 <TOPOLOGY>
     <COMPONENT>
-
+    <!--
+        This is a list of all components and their handles in the test setup.
+        Even with some handles not used in test cases, we want to define
+        all onos cells here, for cases to set up onos cluster.
+    -->
         <ONOSbench>
             <host>localhost</host>
             <user>sdn</user>
@@ -8,11 +12,12 @@
             <type>OnosDriver</type>
             <connect_order>1</connect_order>
             <COMPONENTS>
+                <home></home> #defines where onos home is
             </COMPONENTS>
         </ONOSbench>
 
         <ONOScli1>
-            <host>localhost</host>
+            <host>OC1</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>OnosCliDriver</type>
@@ -21,28 +26,8 @@
             </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>
-
         <Mininet1>
-            <host>OCN</host>
+            <host>localhost</host>
             <user>sdn</user>
             <password>rocks</password>
             <type>MininetCliDriver</type>
@@ -52,5 +37,16 @@
             </COMPONENTS>
         </Mininet1>
 
+        <ONOSrest1>
+            <host>OC1</host>
+            <port>8181</port>
+            <user>onos</user>
+            <password>rocks</password>
+            <type>OnosRestDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOSrest1>
+
     </COMPONENT>
 </TOPOLOGY>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/__init__.py b/TestON/tests/SAMP/SAMPstartTemplate2_1node/__init__.py
similarity index 100%
rename from TestON/tests/SAMP/SAMPstartTemplate/__init__.py
rename to TestON/tests/SAMP/SAMPstartTemplate2_1node/__init__.py
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/Dependency/newFuncTopo.py b/TestON/tests/SAMP/SAMPstartTemplate2_3node/Dependency/newFuncTopo.py
similarity index 100%
copy from TestON/tests/SAMP/SAMPstartTemplate2/Dependency/newFuncTopo.py
copy to TestON/tests/SAMP/SAMPstartTemplate2_3node/Dependency/newFuncTopo.py
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/README b/TestON/tests/SAMP/SAMPstartTemplate2_3node/README
similarity index 100%
copy from TestON/tests/SAMP/SAMPstartTemplate2/README
copy to TestON/tests/SAMP/SAMPstartTemplate2_3node/README
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.params b/TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.params
similarity index 100%
rename from TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.params
rename to TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.params
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py b/TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.py
similarity index 98%
rename from TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py
rename to TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.py
index ce057f4..49b72b5 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.py
@@ -2,7 +2,7 @@
 # This is a sample template that starts up ONOS cluster, this template
 # can be use as a base script for ONOS System Testing.
 
-class SAMPstartTemplate2:
+class SAMPstartTemplate2_3node:
 
     def __init__( self ):
         self.default = ''
@@ -225,4 +225,4 @@
 
         main.case( " Sample tests using ONOS REST API handles. ")
         main.log.debug( main.ONOSrest1.send("/devices") )
-        main.log.debug( main.ONOSrest2.apps() )
\ No newline at end of file
+        main.log.debug( main.ONOSrest2.apps() )
diff --git a/TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.topo b/TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.topo
similarity index 100%
rename from TestON/tests/SAMP/SAMPstartTemplate2/SAMPstartTemplate2.topo
rename to TestON/tests/SAMP/SAMPstartTemplate2_3node/SAMPstartTemplate2_3node.topo
diff --git a/TestON/tests/SAMP/SAMPstartTemplate/__init__.py b/TestON/tests/SAMP/SAMPstartTemplate2_3node/__init__.py
similarity index 100%
copy from TestON/tests/SAMP/SAMPstartTemplate/__init__.py
copy to TestON/tests/SAMP/SAMPstartTemplate2_3node/__init__.py