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" )