Merge branch 'ONOS-Next' of https://github.com/OPENNETWORKINGLAB/ONLabTest into ONOS-Next
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 349943e..2d4afd4 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -837,22 +837,32 @@
             main.cleanup()
             main.exit()
 
-    def intents(self):
+    def intents(self, json_format = False):
         '''
+        Optional:
+            * json_format: enable output formatting in json
         Description:
             Obtain intents currently installed 
         '''
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            if json_format:
+                self.handle.sendline("intents -j")
+                self.handle.expect("intents -j")
+                self.handle.expect("onos>")
 
-            self.handle.sendline("intents")
-            self.handle.expect("onos>")
+                handle = self.handle.before
 
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            else:
+                self.handle.sendline("")
+                self.handle.expect("onos>")
 
-            handle = self.handle.before
+                self.handle.sendline("intents")
+                self.handle.expect("onos>")
+
+                self.handle.sendline("")
+                self.handle.expect("onos>")
+
+                handle = self.handle.before
 
             return handle
 
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.params b/TestON/tests/ONOSNextTest/ONOSNextTest.params
index 01c432e..019b746 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.params
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.params
@@ -12,4 +12,9 @@
         <port1>6633</port1>
     </CTRL>
 
+    <GIT>
+        <autoPull>off</autoPull>
+        <checkout>master</checkout>
+    </GIT>
+
 </PARAMS>
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.py b/TestON/tests/ONOSNextTest/ONOSNextTest.py
index f01446c..de441ba 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.py
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.py
@@ -25,9 +25,13 @@
         import time
 
         cell_name = main.params['ENV']['cellName']
+
         ONOS1_ip = main.params['CTRL']['ip1']
         ONOS1_port = main.params['CTRL']['port1']
         
+        git_pull_trigger = main.params['GIT']['autoPull']
+        git_checkout_branch = main.params['GIT']['branch']
+
         main.case("Setting up test environment")
         
         main.step("Creating cell file")
@@ -38,14 +42,18 @@
                 "10.128.20.11")
 
         main.step("Applying cell variable to environment")
-        cell_result = main.ONOSbench.set_cell(cell_name)
-        #cell_result = main.ONOSbench.set_cell("temp_cell_2")
+        #cell_result = main.ONOSbench.set_cell(cell_name)
+        cell_result = main.ONOSbench.set_cell("temp_cell_2")
         verify_result = main.ONOSbench.verify_cell()
-        
-        main.step("Git checkout and pull master")
-        #main.ONOSbench.git_checkout("master")
-        #git_pull_result = main.ONOSbench.git_pull()
-        
+       
+        if git_pull_trigger == 'on':
+            main.step("Git checkout and pull master")
+            main.ONOSbench.git_checkout(git_checkout_branch)
+            git_pull_result = main.ONOSbench.git_pull()
+        else:
+            main.log.info("Git checkout and pull skipped by config")
+            git_pull_result = main.TRUE
+
         main.step("Using mvn clean & install")
         #clean_install_result = main.ONOSbench.clean_install()
         clean_install_result = main.TRUE