Initial commit for scale out tests
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params
new file mode 100644
index 0000000..4dacc99
--- /dev/null
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.params
@@ -0,0 +1,41 @@
+<PARAMS>
+
+    <testcases>1,2</testcases>
+
+    <ENV>
+    <cellName>cam_cells</cellName>
+    </ENV>
+
+    <SCALE>2</SCALE>
+
+    <GIT>
+        <autopull>on</autopull>
+        <checkout>master</checkout>
+    </GIT>
+
+    <CTRL>
+        <USER>admin</USER>
+        <ip1>10.128.5.51</ip1>
+        <port1>6633</port1>
+        <ip2>10.128.5.52</ip2>
+        <port2>6633</port2>
+        <ip3>10.128.5.53</ip3>
+        <port3>6633</port3>
+    </CTRL>
+
+    <MN>
+        <ip1>10.128.5.59</ip1>
+    </MN>
+
+    <BENCH>
+        <user>admin</user>
+        <ip1>10.128.5.55</ip1>
+    </BENCH>
+
+    <TEST>
+    </TEST>
+
+    <JSON>
+    </JSON>
+
+</PARAMS>
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py
new file mode 100644
index 0000000..a75d694
--- /dev/null
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.py
@@ -0,0 +1,136 @@
+# ScaleOutTemplate
+#
+# CASE1 starts number of nodes specified in param file
+#
+# cameron@onlab.us
+
+import sys 
+import os 
+
+
+class ScaleOutTemplate:
+    def __init__(self):
+        self.default = ''
+   
+    def CASE1(self, main):
+        
+        global cluster_count 
+        cluster_count = 1        
+
+        checkout_branch = main.params['GIT']['checkout']
+        git_pull = main.params['GIT']['autopull']
+        cell_name = main.params['ENV']['cellName']
+        BENCH_ip = main.params['BENCH']['ip1']
+        BENCH_user = main.params['BENCH']['user']
+        ONOS1_ip = main.params['CTRL']['ip1']
+        ONOS2_ip = main.params['CTRL']['ip2']
+        ONOS3_ip = main.params['CTRL']['ip3']
+        MN1_ip = main.params['MN']['ip1']
+
+        main.log.step("Cleaning Enviornment...")
+        main.ONOSbench.onos_uninstall(ONOS1_ip)
+        main.ONOSbench.onos_uninstall(ONOS2_ip)
+        main.ONOSbench.onos_uninstall(ONOS3_ip)                                     
+        
+        main.step("Git checkout and pull "+checkout_branch)
+        if git_pull == 'on':
+            checkout_result = main.ONOSbench.git_checkout(checkout_branch)       
+            pull_result = main.ONOSbench.git_pull()
+            
+        else:
+            checkout_result = main.TRUE
+            pull_result = main.TRUE
+            main.log.info("Skipped git checkout and pull")
+
+        mvn_result = main.ONOSbench.clean_install()
+                                                                   
+        main.step("Set cell for ONOS cli env")
+        main.ONOS1cli.set_cell(cell_name)
+        main.ONOS2cli.set_cell(cell_name)
+        main.ONOS3cli.set_cell(cell_name)
+
+        main.step("Creating ONOS package")
+        package_result = main.ONOSbench.onos_package()                             #no file or directory 
+
+        main.step("Installing ONOS package")
+        install1_result = main.ONOSbench.onos_install(node=ONOS1_ip)
+
+        cell_name = main.params['ENV']['cellName']
+        main.step("Applying cell file to environment")
+        cell_apply_result = main.ONOSbench.set_cell(cell_name)
+        main.step("verify cells")
+        verify_cell_result = main.ONOSbench.verify_cell()
+
+        main.step("Set cell for ONOS cli env")
+        main.ONOS1cli.set_cell(cell_name) 
+        cli1 = main.ONOS1cli.start_onos_cli(ONOS1_ip)  
+       
+
+    def CASE2(self, main):
+
+        '''  
+        Increase number of nodes and initiate CLI
+        '''
+        import time 
+        
+        global cluster_count
+        
+        ONOS1_ip = main.params['CTRL']['ip1']
+        ONOS2_ip = main.params['CTRL']['ip2']
+        ONOS3_ip = main.params['CTRL']['ip3']
+        #ONOS4_ip = main.params['CTRL']['ip4']
+        #ONOS5_ip = main.params['CTRL']['ip5']
+        #ONOS6_ip = main.params['CTRL']['ip6']
+        #ONOS7_ip = main.params['CTRL']['ip7']
+        cell_name = main.params['ENV']['cellName']
+        scale = int(main.params['SCALE'])
+       
+        #Cluster size increased everytime the case is defined
+        cluster_count += scale
+ 
+        main.log.report("Increasing cluster size to "+
+                str(cluster_count))
+        install_result = main.FALSE
+        
+        if scale == 2:
+            if cluster_count == 3:
+                main.log.info("Installing nodes 2 and 3")
+                install2_result = main.ONOSbench.onos_install(node=ONOS2_ip)
+                install3_result = main.ONOSbench.onos_install(node=ONOS3_ip)
+                cli2 = main.ONOS1cli.start_onos_cli(ONOS2_ip)
+                cli3 = main.ONOS1cli.start_onos_cli(ONOS3_ip)
+
+            '''
+            elif cluster_count == 5:
+
+                main.log.info("Installing nodes 4 and 5")
+                node4_result = main.ONOSbench.onos_install(node=ONOS4_ip)
+                node5_result = main.ONOSbench.onos_install(node=ONOS5_ip)
+                install_result = node4_result and node5_result
+                time.sleep(5)
+
+                main.ONOS4cli.start_onos_cli(ONOS4_ip)
+                main.ONOS5cli.start_onos_cli(ONOS5_ip)
+
+            elif cluster_count == 7:
+
+                main.log.info("Installing nodes 4 and 5")
+                node6_result = main.ONOSbench.onos_install(node=ONOS6_ip)
+                node7_result = main.ONOSbench.onos_install(node=ONOS7_ip)
+                install_result = node6_result and node7_result
+                time.sleep(5)
+
+                main.ONOS6cli.start_onos_cli(ONOS6_ip)
+                main.ONOS7cli.start_onos_cli(ONOS7_ip)
+            '''
+        if scale == 1: 
+            if cluster_count == 2:
+                main.log.info("Installing node 2")
+                install2_result = main.ONOSbench.onos_install(node=ONOS2_ip)
+                cli2 = main.ONOS1cli.start_onos_cli(ONOS2_ip)
+
+            if cluster_count == 3:
+                main.log.info("Installing node 3")
+                install3_result = main.ONOSbench.onos_install(node=ONOS3_ip)
+                cli3 = main.ONOS1cli.start_onos_cli(ONOS3_ip)
+
diff --git a/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
new file mode 100644
index 0000000..88c4d35
--- /dev/null
+++ b/TestON/tests/ScaleOutTemplate/ScaleOutTemplate.topo
@@ -0,0 +1,85 @@
+<TOPOLOGY>
+
+    <COMPONENT>
+
+        <ONOSbench>
+            <host>10.128.5.55</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOSbench>
+
+        <ONOS1cli>
+            <host>10.128.5.55</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1cli>
+        
+        <ONOS2cli>
+            <host>10.128.5.55</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS2cli>
+
+        <ONOS3cli>
+            <host>10.128.5.55</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS3cli>
+
+        <ONOS1>
+            <host>10.128.5.51</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS1>
+
+        <ONOS2>
+            <host>10.128.5.52</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS2>
+
+        <ONOS3>
+            <host>10.128.5.53</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS3>
+
+        <Mininet1>
+            <host>10.128.5.59</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>MininetCliDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS>
+                <arg1> --custom ~/mininet/custom/topo-2sw-2host.py </arg1>
+                <arg2> --arp --mac --topo mytopo</arg2>
+                <arg3> </arg3>
+                <controller> remote </controller>
+            </COMPONENTS>
+        </Mininet1>
+
+    </COMPONENT>
+
+</TOPOLOGY>
+
diff --git a/TestON/tests/ScaleOutTemplate/__init__.py b/TestON/tests/ScaleOutTemplate/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/ScaleOutTemplate/__init__.py