Update to FUNCintentRest

Currently Changes:
    -Updated cases in FUNCintentRest up to case 1000
	-Case 8 replaced with case 8 from FUNCintent
	 and some small modifications
	-Cases were added and existing cases were
	 renumbered to more closely match FUNCintent
	-Cases 1000, 2000, 5000 refactored to match
	 cases 1000, 2000, 5000 from FUNCintent
    -Three functions added to FUNCintentRest's
     FuncIntentFunction from the one in FUNCintent
	-sendDiscoveryArp
	-confirmHostDiscovery
	-populateHostsData
    -The function hostIntent was split into
     installHostIntent and testHostIntent
    -The function pointIntent was split into
     installPointIntent and testPointIntent

TODO:
    -Finish updating rest of cases
    -Continue updating FUNCintentRest to use Scapy
    -Add cli instance to provide function thes rest
     API is missing

Uncompletable
    -Complete Case 3000, 4000, and write analogue to
     Case 6000 in FUNCintent
	-the REST API does not currently support
	 Single to Multi and Multi to Single Point Intents.

Change-Id: I94917bef3fcaaec9d365df12528df0a05e98246f
diff --git a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
index 0419583..fe26d5a 100644
--- a/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
+++ b/TestON/tests/FUNCintent/Dependency/FuncIntentFunction.py
@@ -11,18 +11,18 @@
     self.default = ''
 
 def installHostIntent( main,
-                                name,
-                                host1,
-                                host2,
-                                onosNode=0,
-                                ethType="",
-                                bandwidth="",
-                                lambdaAlloc=False,
-                                ipProto="",
-                                ipAddresses="",
-                                tcp="",
-                                sw1="",
-                                sw2=""):
+                       name,
+                       host1,
+                       host2,
+                       onosNode=0,
+                       ethType="",
+                       bandwidth="",
+                       lambdaAlloc=False,
+                       ipProto="",
+                       ipAddresses="",
+                       tcp="",
+                       sw1="",
+                       sw2=""):
     """
     Installs a Host Intent
 
@@ -83,7 +83,7 @@
                         args=( main, [ intentId ] ), sleep=main.checkIntentSleep ):
         return intentId
     else:
-        main.log.error( "Single to Multi Intent did not install correctly" )
+        main.log.error( "Host Intent did not install correctly" )
         return main.FALSE
 
 def testHostIntent( main,
@@ -149,7 +149,7 @@
     tempHostsData = {}
     onosNode = int( onosNode )
 
-    main.log.info( itemName + ": Testing Single to Multi Point Intent" )
+    main.log.info( itemName + ": Testing Host Intent" )
 
     if not host1.get( "id" ):
         main.log.warn( "Id not given for host1 {0}. Loading from main.hostData".format( host1.get( "name" ) ) )
@@ -1511,8 +1511,7 @@
         # Second check of intents since some of the intents may be in
         # INSTALLING state, they should be in INSTALLED at this time
         for i in range( main.numCtrls ):
-            tempResult = main.CLIs[ i ].checkIntentState(
-                                                        intentsId=intentsId )
+            tempResult = main.CLIs[ i ].checkIntentState( intentsId=intentsId )
             results.append( tempResult )
         if all( result == main.TRUE for result in results ):
             main.log.info( itemName + ": Intents are installed correctly" )
diff --git a/TestON/tests/FUNCintent/FUNCintent.params b/TestON/tests/FUNCintent/FUNCintent.params
index f061c67..d19a45d 100644
--- a/TestON/tests/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNCintent/FUNCintent.params
@@ -16,7 +16,7 @@
     # 3000 - Test single to multi point intents
     # 4000 - Test multi to single point intents
     # 5000 - Test host mobility
-    # 6000 - Test multi to single end point failure
+    # 6000 - Test Multi Point intent End Point Failure
 
     <testcases>1,[2,10,12,13,15,1000,2000,3000,4000,5000,6000,16]*2,[2,11,12,13,15,1000,2000,3000,4000,5000,6000,16]*2</testcases>
 
diff --git a/TestON/tests/FUNCintent/FUNCintent.py b/TestON/tests/FUNCintent/FUNCintent.py
index b4ca8af..e1660f1 100644
--- a/TestON/tests/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNCintent/FUNCintent.py
@@ -538,7 +538,6 @@
                                  onpass="Successfully populated hostsData",
                                  onfail="Failed to populate hostsData" )
 
-
     def CASE16( self, main ):
         """
             Stop mininet and remove scapy host
@@ -1496,7 +1495,7 @@
         main.step( "Testing host mobility by moving h1 from s5 to s6" )
         h1PreMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ]
 
-        main.log.info( "Moving h1 from s5 to s6" )
+        main.log.info( "Moving h1 from s5 to s6")
         main.Mininet1.moveHost( "h1","s5","s6" )
 
         # Send discovery ping from moved host
@@ -1530,16 +1529,16 @@
                                               onosNode='0',
                                               host1=host1,
                                               host2=host2 )
-
-        testResult = main.intentFunction.testHostIntent( main,
-                                              name='Host Mobility IPV4',
-                                              intentId = installResult,
-                                              onosNode='0',
-                                              host1=host1,
-                                              host2=host2,
-                                              sw1="s6",
-                                              sw2="s2",
-                                              expectedLink=18 )
+        if installResult:
+            testResult = main.intentFunction.testHostIntent( main,
+                                                  name='Host Mobility IPV4',
+                                                  intentId = installResult,
+                                                  onosNode='0',
+                                                  host1=host1,
+                                                  host2=host2,
+                                                  sw1="s6",
+                                                  sw2="s2",
+                                                  expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1924,4 +1923,4 @@
                                  onpass=main.assertReturnString,
                                  onfail=main.assertReturnString )
 
-        main.intentFunction.report( main )
+        main.intentFunction.report( main )
\ No newline at end of file