Update old functionality test
diff --git a/TestON/tests/ProdFunc13/ProdFunc13.py b/TestON/tests/ProdFunc13/ProdFunc13.py
index 5551759..45d66dc 100644
--- a/TestON/tests/ProdFunc13/ProdFunc13.py
+++ b/TestON/tests/ProdFunc13/ProdFunc13.py
@@ -41,16 +41,13 @@
cellResult = main.ONOSbench.setCell( cellName )
verifyResult = main.ONOSbench.verifyCell()
- main.step( "Removing raft logs before a clen installation of ONOS" )
- main.ONOSbench.onosRemoveRaftLogs()
-
main.step( "Git checkout and get version" )
- #main.ONOSbench.gitCheckout( "master" )
+ main.ONOSbench.gitCheckout( "master" )
gitPullResult = main.ONOSbench.gitPull()
main.log.info( "git_pull_result = " + str( gitPullResult ))
main.ONOSbench.getVersion( report=True )
- if gitPullResult == 1:
+ if gitPullResult == 100:
main.step( "Using mvn clean & install" )
main.ONOSbench.cleanInstall()
elif gitPullResult == 0:
@@ -192,7 +189,7 @@
main.case( "Disconnecting mininet and restarting ONOS" )
main.step( "Disconnecting mininet and restarting ONOS" )
mininetDisconnect = main.Mininet1.disconnect()
- print "mininetDisconnect = ", mininetDisconnect
+ print "mininetDisconnect = ", mininetDisconnect
main.step( "Removing raft logs before a clen installation of ONOS" )
main.ONOSbench.onosRemoveRaftLogs()
@@ -558,6 +555,7 @@
" all the switches to all the controllers and" +
" discovering the hosts in reactive mode" )
main.log.report( "__________________________________" )
+
main.case( "Pingall Test" )
main.step( "Assigning switches to controllers" )
ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
@@ -750,13 +748,13 @@
main.log.warn( main.ONOS2.apps() )
main.log.warn( main.ONOS2.appIDs() )
- time.sleep( 45 ) #Time delay to have all the flows ready
+ time.sleep(25) #Time delay to have all the flows ready
main.step( "Pingall" )
pingResult = main.FALSE
time1 = time.time()
pingResult = main.Mininet1.pingall( timeout=120,
shortCircuit=True,
- acceptableFailed=10)
+ acceptableFailed=20 )
time2 = time.time()
print "Time for pingall: %2f seconds" % ( time2 - time1 )
@@ -806,7 +804,7 @@
"Point intents for hosts on same devices" +
"installed correctly. Cleaning up" )
- case11Result = ping and pingResult
+ case11Result = ping
utilities.assert_equals(
expect = main.TRUE,
actual = case11Result,
@@ -1132,8 +1130,8 @@
main.step( "Determine the current number of switches and links" )
topologyOutput = main.ONOS2.topology()
topologyResult = main.ONOS1.getTopology( topologyOutput )
- activeSwitches = topologyResult[ 'deviceCount' ]
- links = topologyResult[ 'linkCount' ]
+ activeSwitches = topologyResult[ 'devices' ]
+ links = topologyResult[ 'links' ]
print "activeSwitches = ", type( activeSwitches )
print "links = ", type( links )
main.log.info(
@@ -1250,7 +1248,7 @@
main.step(
"Iterate through the intentids list and remove each intent" )
for id in intentids:
- main.ONOS2.removeIntent( intentId=id )
+ main.ONOS2.removeIntent( intentId=id ,purge=True)
intentResult = main.ONOS2.intents( jsonFormat=False )
main.log.info( "intent_result = " + intentResult )
@@ -1323,21 +1321,28 @@
"Adding bidirectional point for mn hosts" +
"( h8-h18, h9-h19, h10-h20, h11-h21, h12-h22, " +
"h13-h23, h14-h24, h15-h25, h16-h26, h17-h27 )" )
-
+ macsDict = {}
+ for i in range( 1,29 ):
+ macsDict[ 'h' + str( i ) ]= main.Mininet1.getMacAddress( host='h'+ str( i ) )
+ print macsDict
main.step( "Add point intents for mn hosts h8 and h18 or" +
"ONOS hosts h8 and h12" )
# main.step(var1)
ptpIntentResult = main.ONOS2.addPointIntent(
- "of:0000000000003008/1",
- "of:0000000000006018/1" )
+ ingressDevice="of:0000000000003008/1",
+ egressDevice="of:0000000000006018/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h8' ))
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
# main.log.info( getIntentResult )
ptpIntentResult = main.ONOS2.addPointIntent(
- "of:0000000000006018/1",
- "of:0000000000003008/1" )
+ ingressDevice="of:0000000000006018/1",
+ egressDevice="of:0000000000003008/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h18' ))
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1347,7 +1352,9 @@
main.step(var2)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003009/1",
- "of:0000000000006019/1" )
+ "of:0000000000006019/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h9' ))
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1355,7 +1362,9 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006019/1",
- "of:0000000000003009/1" )
+ "of:0000000000003009/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h19' ))
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1365,7 +1374,10 @@
main.step(var3)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003010/1",
- "of:0000000000006020/1" )
+ "of:0000000000006020/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h10' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1373,7 +1385,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006020/1",
- "of:0000000000003010/1" )
+ "of:0000000000003010/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h20' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1384,7 +1399,10 @@
main.case(var4)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003011/1",
- "of:0000000000006021/1" )
+ "of:0000000000006021/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h11' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1392,7 +1410,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006021/1",
- "of:0000000000003011/1" )
+ "of:0000000000003011/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h21' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1403,7 +1424,10 @@
main.case(var5)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003012/1",
- "of:0000000000006022/1" )
+ "of:0000000000006022/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h12' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1411,7 +1435,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006022/1",
- "of:0000000000003012/1" )
+ "of:0000000000003012/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h22' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1422,7 +1449,10 @@
main.case(var6)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003013/1",
- "of:0000000000006023/1" )
+ "of:0000000000006023/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h13' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1430,7 +1460,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006023/1",
- "of:0000000000003013/1" )
+ "of:0000000000003013/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h23' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1441,7 +1474,10 @@
main.case(var7)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003014/1",
- "of:0000000000006024/1" )
+ "of:0000000000006024/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h14' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1449,7 +1485,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006024/1",
- "of:0000000000003014/1" )
+ "of:0000000000003014/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h24' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1460,7 +1499,10 @@
main.case(var8)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003015/1",
- "of:0000000000006025/1" )
+ "of:0000000000006025/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h15' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1468,7 +1510,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006025/1",
- "of:0000000000003015/1" )
+ "of:0000000000003015/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h25' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1479,7 +1524,10 @@
main.case(var9)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003016/1",
- "of:0000000000006026/1" )
+ "of:0000000000006026/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h16' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1487,7 +1535,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006026/1",
- "of:0000000000003016/1" )
+ "of:0000000000003016/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h26' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1498,7 +1549,10 @@
main.case(var10)
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000003017/1",
- "of:0000000000006027/1" )
+ "of:0000000000006027/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h17' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )
@@ -1506,7 +1560,10 @@
ptpIntentResult = main.ONOS2.addPointIntent(
"of:0000000000006027/1",
- "of:0000000000003017/1" )
+ "of:0000000000003017/1",
+ ethType='IPV4',
+ ethSrc=macsDict.get( 'h27' ))
+
if ptpIntentResult == main.TRUE:
getIntentResult = main.ONOS2.intents()
main.log.info( "Point to point intent install successful" )