Update of test JamesTest
diff --git a/TestON/tests/JamesTest/JamesTest.params b/TestON/tests/JamesTest/JamesTest.params
index f9540c3..8f76863 100644
--- a/TestON/tests/JamesTest/JamesTest.params
+++ b/TestON/tests/JamesTest/JamesTest.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>101,66,10</testcases>
+    <testcases>2,3,66</testcases>
     <tcpdump> 
         <intf>eth0</intf>
         <port>port 6633</port>
diff --git a/TestON/tests/JamesTest/JamesTest.py b/TestON/tests/JamesTest/JamesTest.py
index e4fabda..2f03add 100644
--- a/TestON/tests/JamesTest/JamesTest.py
+++ b/TestON/tests/JamesTest/JamesTest.py
@@ -154,16 +154,59 @@
     def CASE3(self,main) :    #Delete any remnant flows, then add flows, and time how long it takes flow tables to update
         main.log.report("Delete any flows from previous tests, then add flows from FLOWDEF file, then wait for switch flow tables to update")
         import time
+        from subprocess import Popen, PIPE
         main.case("Taking care of these flows!") 
         main.step("Cleaning out any leftover flows...")
+        masterSwitches = []
+        masterSwitches2 = []
+        for i in range(25): 
+            if i < 15:
+                j=i+1
+            else:
+                j=i+16
+            (stdout, stderr) = Popen(["curl",main.params['RESTCALL']['restIP1']+":"+main.params['RESTCALL']['restPort']+"/wm/onos/registry/switches/json"],stdout=PIPE).communicate()
+            switchDPID1 = main.Mininet1.getSwitchDPID(switch="s"+str(j))
+            sDPID1 = str(switchDPID1)
+            switchDPID2 = sDPID1[:2]+":"+sDPID1[2:4]+":"+sDPID1[4:6]+":"+sDPID1[6:8]+":"+sDPID1[8:10]+":"+sDPID1[10:12]+":"+sDPID1[12:14]+":"+sDPID1[14:]
+            master=main.Zookeeper1.findMaster(switchDPID = switchDPID2, switchList=stdout)
+            masterSwitches.append("s"+str(j)+" " + master)
+
+        for i in range(25): 
+            if i < 15:
+                j=i+1
+            else:
+                j=i+16
+            print j
+            (stdout, stderr) = Popen(["curl",main.params['RESTCALL']['restIP1']+":"+main.params['RESTCALL']['restPort']+"/wm/onos/registry/switches/json"],stdout=PIPE).communicate()
+            switchDPID1 = main.Mininet1.getSwitchDPID(switch="s"+str(j))
+            sDPID1 = str(switchDPID1)
+            switchDPID2 = sDPID1[:2]+":"+sDPID1[2:4]+":"+sDPID1[4:6]+":"+sDPID1[6:8]+":"+sDPID1[8:10]+":"+sDPID1[10:12]+":"+sDPID1[12:14]+":"+sDPID1[14:]
+            master=main.Zookeeper1.findMaster(switchDPID = switchDPID2, switchList=stdout)
+            masterSwitches2.append("s"+str(j)+" " + master)
+       
+
+
+
+        print masterSwitches
+        print "\n\n\n"
+        print masterSwitches2
+        print masterSwitches == masterSwitches2
         #main.ONOS1.delete_flow("all")
         strtTime = time.time()
         main.ONOS1.rm_intents()
-        print("world")
+        (stdout,stderr) = Popen(["curl",main.params['RESTCALL']['restIP1']+":"+main.params['RESTCALL']['restPort']+"/wm/onos/intent/high"],stdout=PIPE).communicate()
+        intent1 = stdout
+        print intent1 + "\n\n\n Intent 1 \n\n\n"
         main.ONOS1.add_intents()
         time.sleep(2)
-        main.ONOS1.add_intents()
-        print("hello")
+        (stdout,stderr) = Popen(["curl",main.params['RESTCALL']['restIP1']+":"+main.params['RESTCALL']['restPort']+"/wm/onos/intent/high"],stdout=PIPE).communicate()
+        intent2 = stdout
+        print intent2 + "\n\n\n Intent 2 \n\n\n"
+        changesMade = main.ONOS1.comp_intents(preIntents=intent1,postIntents=intent2)
+        print changesMade
+        if not changesMade:
+            print "Intents were Constant"
+            print changesMade
        # main.ONOS1.add_flow(main.params['FLOWDEF']['testONip'],main.params['FLOWDEF']['user'],main.params['FLOWDEF']['password'],main.params['FLOWDEF']['flowDef'])
         main.case("Checking flows")
        
@@ -978,7 +1021,19 @@
         else:
             main.log.report("\tINTENT FAILED TO BE DELETED")
         utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Intent Deleted Properly - Step Passed",onfail="INTENT NOT DELETED - STEP FAILED")
-        main.ONOS1.del_intent(intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
+        #main.ONOS1.del_intent(intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
+        main.ONOS1.add_intent(intent_id=str(10),src_dpid="00:00:00:00:00:00:10:67",dst_dpid="00:00:00:00:00:32:21:10",src_mac="00:00:00:01:11:11",dst_mac="00:12:12:12:12:12",intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
+
+
+
+#*****************************************************************************************
+#*****************************************************************************************
+# Delete all intents, and ensure that all flows were deleted
+# Will delete, then call for intents.
+# Lastly try a ping test to check that all flows are deleted. 
+#*****************************************************************************************
+#*****************************************************************************************
+        main.step("Deleting all flows and check that they are all gone")
 
 
 #*****************************************************************************************
@@ -993,7 +1048,7 @@
         main.step("Installing incorrect intent and checking for deletion")
         main.ONOS1.add_intent(intent_id=str(200),src_dpid="00:00:00:00:00:00:45:67",dst_dpid="00:00:00:00:00:32:21:10",src_mac="00:00:00:01:11:11",dst_mac="00:12:12:12:12:12",intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
         main.ONOS1.show_intent(intent_id=str(200),intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
-        main.ONOS1.del_intent(intent_id=str(200),intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
+        main.ONOS1.del_intent(intent_id="intent_id=200",intentIP=intentIP,intentPort=intentPort,intentURL=intentURL)
         time.sleep(2)
         response = main.ONOS1.show_intent(intentIP=intentIP,intentPort=intentPort,intentURL=intentURL,intent_id=200)
         if re.search("INTENT_NOT_FOUND",response):
diff --git a/TestON/tests/JamesTest/intentsHigh.txt b/TestON/tests/JamesTest/intentsHigh.txt
new file mode 100644
index 0000000..2d0136d
--- /dev/null
+++ b/TestON/tests/JamesTest/intentsHigh.txt
@@ -0,0 +1 @@
+[{"id":"1:21","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:36","srcPortNumber":"1","srcMac":"00:00:00:00:00:15","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:11","dstPortNumber":"1","dstMac":"00:00:00:00:00:0b","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954989518098","setState, oldState:CREATED, newState:INST_REQ, time:342954990247919","setState, oldState:INST_REQ, newState:INST_ACK, time:342955016855087","setState, oldState:INST_ACK, newState:INST_ACK, time:342955029936391"]},{"id":"1:12","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:12","srcPortNumber":"1","srcMac":"00:00:00:00:00:0c","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:37","dstPortNumber":"1","dstMac":"00:00:00:00:00:16","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955001880348","setState, oldState:CREATED, newState:INST_REQ, time:342955001942196","setState, oldState:INST_REQ, newState:INST_ACK, time:342955066469194"]},{"id":"1:13","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:13","srcPortNumber":"1","srcMac":"00:00:00:00:00:0d","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:38","dstPortNumber":"1","dstMac":"00:00:00:00:00:17","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955037009378","setState, oldState:CREATED, newState:INST_REQ, time:342955057204350","setState, oldState:INST_REQ, newState:INST_ACK, time:342955109843115"]},{"id":"1:22","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:37","srcPortNumber":"1","srcMac":"00:00:00:00:00:16","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:12","dstPortNumber":"1","dstMac":"00:00:00:00:00:0c","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955017825966","setState, oldState:CREATED, newState:INST_REQ, time:342955020827141","setState, oldState:INST_REQ, newState:INST_ACK, time:342955036958151","setState, oldState:INST_ACK, newState:INST_ACK, time:342955067089568"]},{"id":"1:23","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:38","srcPortNumber":"1","srcMac":"00:00:00:00:00:17","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:13","dstPortNumber":"1","dstMac":"00:00:00:00:00:0d","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955078657886","setState, oldState:CREATED, newState:INST_REQ, time:342955078719125","setState, oldState:INST_REQ, newState:INST_ACK, time:342955151788326","setState, oldState:INST_ACK, newState:INST_ACK, time:342955172199848"]},{"id":"1:10","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:10","srcPortNumber":"1","srcMac":"00:00:00:00:00:0a","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:35","dstPortNumber":"1","dstMac":"00:00:00:00:00:14","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954934875925","setState, oldState:CREATED, newState:INST_REQ, time:342954934944636","setState, oldState:INST_REQ, newState:INST_ACK, time:342954962841723"]},{"id":"1:24","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:39","srcPortNumber":"1","srcMac":"00:00:00:00:00:18","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:14","dstPortNumber":"1","dstMac":"00:00:00:00:00:0e","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955193091906","setState, oldState:CREATED, newState:INST_REQ, time:342955193170354","setState, oldState:INST_REQ, newState:INST_ACK, time:342955217289973","setState, oldState:INST_ACK, newState:INST_ACK, time:342955240396703"]},{"id":"1:11","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:11","srcPortNumber":"1","srcMac":"00:00:00:00:00:0b","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:36","dstPortNumber":"1","dstMac":"00:00:00:00:00:15","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954970890675","setState, oldState:CREATED, newState:INST_REQ, time:342954972623090","setState, oldState:INST_REQ, newState:INST_ACK, time:342954990005267"]},{"id":"1:25","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:40","srcPortNumber":"1","srcMac":"00:00:00:00:00:19","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:15","dstPortNumber":"1","dstMac":"00:00:00:00:00:0f","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955219610331","setState, oldState:CREATED, newState:INST_REQ, time:342955229618793","setState, oldState:INST_REQ, newState:INST_ACK, time:342955255256696","setState, oldState:INST_ACK, newState:INST_ACK, time:342955321503127"]},{"id":"1:16","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:31","srcPortNumber":"1","srcMac":"00:00:00:00:00:10","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:06","dstPortNumber":"1","dstMac":"00:00:00:00:00:06","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954777534217","setState, oldState:CREATED, newState:INST_REQ, time:342954777610189","setState, oldState:INST_REQ, newState:INST_ACK, time:342954799456100","setState, oldState:INST_ACK, newState:INST_ACK, time:342954805786438"]},{"id":"1:17","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:32","srcPortNumber":"1","srcMac":"00:00:00:00:00:11","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:07","dstPortNumber":"1","dstMac":"00:00:00:00:00:07","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954818753786","setState, oldState:CREATED, newState:INST_REQ, time:342954818825415","setState, oldState:INST_REQ, newState:INST_ACK, time:342954837494403","setState, oldState:INST_ACK, newState:INST_ACK, time:342954849744029"]},{"id":"1:14","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:14","srcPortNumber":"1","srcMac":"00:00:00:00:00:0e","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:39","dstPortNumber":"1","dstMac":"00:00:00:00:00:18","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955119250545","setState, oldState:CREATED, newState:INST_REQ, time:342955119327278","setState, oldState:INST_REQ, newState:INST_ACK, time:342955212539535"]},{"id":"1:15","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:15","srcPortNumber":"1","srcMac":"00:00:00:00:00:0f","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:40","dstPortNumber":"1","dstMac":"00:00:00:00:00:19","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342955206543145","setState, oldState:CREATED, newState:INST_REQ, time:342955206598632","setState, oldState:INST_REQ, newState:INST_ACK, time:342955244230667"]},{"id":"1:8","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:08","srcPortNumber":"1","srcMac":"00:00:00:00:00:08","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:33","dstPortNumber":"1","dstMac":"00:00:00:00:00:12","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954840432768","setState, oldState:CREATED, newState:INST_REQ, time:342954841963557","setState, oldState:INST_REQ, newState:INST_ACK, time:342954885578977"]},{"id":"1:7","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:07","srcPortNumber":"1","srcMac":"00:00:00:00:00:07","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:32","dstPortNumber":"1","dstMac":"00:00:00:00:00:11","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954794382192","setState, oldState:CREATED, newState:INST_REQ, time:342954794456241","setState, oldState:INST_REQ, newState:INST_ACK, time:342954829521040"]},{"id":"1:6","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:06","srcPortNumber":"1","srcMac":"00:00:00:00:00:06","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:31","dstPortNumber":"1","dstMac":"00:00:00:00:00:10","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954756676678","setState, oldState:CREATED, newState:INST_REQ, time:342954756754118","setState, oldState:INST_REQ, newState:INST_ACK, time:342954791322748"]},{"id":"1:20","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:35","srcPortNumber":"1","srcMac":"00:00:00:00:00:14","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:10","dstPortNumber":"1","dstMac":"00:00:00:00:00:0a","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954950472615","setState, oldState:CREATED, newState:INST_REQ, time:342954950548932","setState, oldState:INST_REQ, newState:INST_ACK, time:342954969685306","setState, oldState:INST_ACK, newState:INST_ACK, time:342954977191044"]},{"id":"1:9","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:10:09","srcPortNumber":"1","srcMac":"00:00:00:00:00:09","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:20:34","dstPortNumber":"1","dstMac":"00:00:00:00:00:13","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954887372916","setState, oldState:CREATED, newState:INST_REQ, time:342954887444460","setState, oldState:INST_REQ, newState:INST_ACK, time:342954945549202"]},{"id":"1:19","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:34","srcPortNumber":"1","srcMac":"00:00:00:00:00:13","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:09","dstPortNumber":"1","dstMac":"00:00:00:00:00:09","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954916765288","setState, oldState:CREATED, newState:INST_REQ, time:342954918481103","setState, oldState:INST_REQ, newState:INST_ACK, time:342954943450046","setState, oldState:INST_ACK, newState:INST_ACK, time:342954959114541"]},{"id":"1:18","state":"INST_ACK","pathFrozen":"false","srcSwitchDpid":"00:00:00:00:00:00:20:33","srcPortNumber":"1","srcMac":"00:00:00:00:00:12","srcIp":"0.0.0.0","dstSwitchDpid":"00:00:00:00:00:00:10:08","dstPortNumber":"1","dstMac":"00:00:00:00:00:08","dstIp":"0.0.0.0","idleTimeout":"0","hardTimeout":"0","firstSwitchIdleTimeout":"0","firstSwitchHardTimeout":"0","logs":["created, time:342954872490248","setState, oldState:CREATED, newState:INST_REQ, time:342954874209159","setState, oldState:INST_REQ, newState:INST_ACK, time:342954915646785","setState, oldState:INST_ACK, newState:INST_ACK, time:342954927676302"]}]
\ No newline at end of file