diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/Dependency/newFuncTopo.py b/TestON/tests/SAMP/SAMPstartTemplate_1node/Dependency/newFuncTopo.py
new file mode 100755
index 0000000..7fe68c1
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/Dependency/newFuncTopo.py
@@ -0,0 +1,152 @@
+#!/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_1node/README b/TestON/tests/SAMP/SAMPstartTemplate_1node/README
new file mode 100644
index 0000000..7df40db
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/README
@@ -0,0 +1,2 @@
+Summary:
+        Sample test case how onos test should start up.
\ No newline at end of file
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
new file mode 100755
index 0000000..ef2a46a
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.params
@@ -0,0 +1,65 @@
+<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
+    -->
+    <!--
+        CASE32: Configure fwd app
+    -->
+
+    <testcases>0,1,10,11,12,22,2,32</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>
+        <topo> mn --topo tree,3,3 </topo>
+    </CASE11>
+    <CASE12>
+    </CASE12>
+    <CASE22>
+    </CASE22>
+    <CASE32>
+    </CASE32>
+</PARAMS>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
new file mode 100644
index 0000000..23bfc09
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.py
@@ -0,0 +1,249 @@
+
+# This is a sample template that starts up ONOS cluster, this template
+# can be use as a base script for ONOS System Testing.
+
+class SAMPstartTemplate_1node:
+
+    def __init__( self ):
+        self.default = ''
+
+
+    def CASE0(self, main):
+        '''
+            Pull specific ONOS branch, then Build ONOS on ONOS Bench.
+            This step is usually skipped. Because in a Jenkins driven automated
+            test env. We want Jenkins jobs to pull&build for flexibility to handle
+            different versions of ONOS.
+        '''
+        gitPull = main.params['CASE0']['gitPull']
+        gitBranch = main.params['CASE0']['gitBranch']
+
+        main.case("Pull onos branch and build onos on Teststation.")
+
+        if gitPull == 'True':
+            main.step( "Git Checkout ONOS branch: " + gitBranch)
+            stepResult = main.ONOSbench.gitCheckout( branch = gitBranch )
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=stepResult,
+                                     onpass="Successfully checkout onos branch.",
+                                     onfail="Failed to checkout onos branch. Exiting test..." )
+            if not stepResult: main.exit()
+
+            main.step( "Git Pull on ONOS branch:" + gitBranch)
+            stepResult = main.ONOSbench.gitPull( )
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=stepResult,
+                                     onpass="Successfully pull onos. ",
+                                     onfail="Failed to pull onos. Exiting test ..." )
+            if not stepResult: main.exit()
+
+            main.step( "Building ONOS branch: " + gitBranch )
+            stepResult = main.ONOSbench.cleanInstall( skipTest = True )
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=stepResult,
+                                     onpass="Successfully build onos.",
+                                     onfail="Failed to build onos. Exiting test..." )
+            if not stepResult: main.exit()
+
+        else:
+            main.log.warn( "Skipped pulling onos and Skipped building ONOS" )
+
+
+    def CASE1( self, main ):
+        '''
+            Set up global test variables;
+            Uninstall all running cells in test env defined in .topo file
+
+        '''
+
+        main.case( "Constructing global test variables and clean cluster env." )
+
+        main.step( "Constructing test variables" )
+        main.branch = main.ONOSbench.getBranchName()
+        main.log.info( "Running onos branch: " + main.branch )
+        main.commitNum = main.ONOSbench.getVersion().split(' ')[1]
+        main.log.info( "Running onos commit Number: " + main.commitNum)
+        main.nodeList = main.params['CASE1']['NodeList'].split(",")
+        main.onosStartupSleep = float( main.params['CASE1']['SleepTimers']['onosStartup'] )
+        main.onosCfgSleep = float( main.params['CASE1']['SleepTimers']['onosCfg'] )
+        main.mnStartupSleep = float( main.params['CASE1']['SleepTimers']['mnStartup'] )
+        main.mnCfgSleep = float( main.params['CASE1']['SleepTimers']['mnCfg'] )
+        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,
+                                  [ "INFO",
+                                    "FOLLOWER",
+                                    "WARN",
+                                    "flow",
+                                    "ERROR",
+                                    "Except" ],
+                                  "s" )
+
+    def CASE10( self, main ):
+        """
+        Start ONOS cluster (1 node in this example) in three steps:
+        1) start a basic cluster with drivers app via ONOSDriver;
+        2) activate apps via ONOSCliDriver;
+        3) configure onos via ONOSCliDriver;
+        """
+
+        import time
+
+        numNodes = int( main.params['CASE10']['numNodes'] )
+        main.case( "Start up " + str( numNodes ) + "-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 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully started basic ONOS cluster ",
+                                 onfail="Failed to start basic ONOS Cluster " )
+
+        main.step( "Establishing Handles on ONOS CLIs.")
+        cliResult = main.TRUE
+        for n in range( 1, numNodes + 1 ):
+            handle = "main.ONOScli" + str( n )
+            cliResult = cliResult & ( eval( handle ).startCellCli() )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="Successfully started onos cli's ",
+                                 onfail="Failed to start onos cli's " )
+
+        main.step( "Activate onos apps.")
+        apps = main.params['CASE10'].get( 'Apps' )
+        if apps:
+            main.log.info( "Apps to activate: " + apps )
+            activateResult = main.TRUE
+            for a in apps.split(","):
+                activateResult = activateResult & main.ONOScli1.activateApp(a)
+            # TODO: check this worked
+            time.sleep( main.onosCfgSleep )  # wait for apps to activate
+        else:
+            main.log.warn( "No configurations were specified to be changed after startup" )
+        utilities.assert_equals( expect=main.TRUE,
+                                     actual=activateResult,
+                                     onpass="Successfully set config",
+                                     onfail="Failed to set config" )
+
+        main.step( "Set ONOS configurations" )
+        config = main.params['CASE10'].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.ONOScli1.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" )
+
+    def CASE11( self, main ):
+        """
+            Start mininet and assign controllers
+        """
+        import time
+
+        topology = main.params['CASE11']['topo']
+        main.log.report( "Start Mininet topology" )
+        main.log.case( "Start Mininet topology" )
+
+        main.step( "Starting Mininet Topology" )
+        topoResult = main.Mininet1.startNet( mnCmd=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()
+
+        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,
+                                                         port='6653' )
+        time.sleep(main.mnCfgSleep)
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully assign switches to controllers",
+                                 onfail="Failed to assign switches to controllers" )
+
+
+    def CASE12( self, main ):
+        """
+            Tests using through ONOS CLI handles
+        """
+
+        main.log.case( "Test some onos commands through CLI. ")
+        main.log.debug( main.ONOScli1.sendline("summary") )
+        main.log.debug( main.ONOScli1.sendline("devices") )
+
+    def CASE22( self, main ):
+        """
+            Tests using ONOS REST API handles
+        """
+
+        main.case( " Sample tests using ONOS REST API handles. ")
+        main.log.debug( main.ONOSrest1.send("/devices") )
+        main.log.debug( main.ONOSrest1.apps() )
+
+    def CASE32( self, main ):
+        """
+            Configure fwd app from .param json string with parameter configured.
+            Check if configuration successful
+            Run pingall to check connectivity
+            Check ONOS log for warning/error/exceptions
+        """
+        main.case( "Configure onos-app-fwd and check if configuration successful. " )
+        main.step( "Install reactive forwarding app." )
+        installResults = main.ONOScli1.activateApp( "org.onosproject.fwd" )
+        utilities.assert_equals( expect=main.TRUE, actual=installResults,
+                                 onpass = "Configure fwd successful", onfail="Configure fwd failed" )
+        main.step( "Run pingall to check connectivity. " )
+        pingResult = main.FALSE
+        passMsg = "Reactive Pingall test passed"
+        pingResult = main.Mininet1.pingall()
+        if not pingResult:
+           main.log.warn( "First pingall failed. Trying again..." )
+           pingResult = main.Mininet1.pingall()
+           passMsg += "on the second try"
+        utilities.assert_equals( expect=main.TRUE, actual=pingResult, onpass=passMsg, onfail= "Reactive Pingall failed, " + "one or more ping pairs failed." )
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo
new file mode 100755
index 0000000..a804d4a
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/SAMPstartTemplate_1node.topo
@@ -0,0 +1,52 @@
+<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>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS>
+                <home></home> #defines where onos home is
+            </COMPONENTS>
+        </ONOSbench>
+
+        <ONOScli1>
+            <host>OC1</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </ONOScli1>
+
+        <Mininet1>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetCliDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+                <home>~/mininet/custom/</home>
+            </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_1node/__init__.py b/TestON/tests/SAMP/SAMPstartTemplate_1node/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_1node/__init__.py
