add SDN-IP test case 3,4 and update code style
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py b/TestON/drivers/common/cli/quaggaclidriver.py
index f0cfecc..ecd1c52 100644
--- a/TestON/drivers/common/cli/quaggaclidriver.py
+++ b/TestON/drivers/common/cli/quaggaclidriver.py
@@ -26,21 +26,21 @@
self.name = self.options[ 'name' ]
# self.handle = super( QuaggaCliDriver,self ).connect(
- # userName=self.userName, ipAddress=self.ipAddress,port=self.port,
+ # user_name=self.user_name, ip_address=self.ip_address,port=self.port,
# pwd=self.pwd )
self.handle = super(
QuaggaCliDriver,
self ).connect(
- userName=self.userName,
- ipAddress="1.1.1.1",
- port=self.port,
- pwd=self.pwd )
+ user_name=self.user_name,
+ ip_address="1.1.1.1",
+ port=self.port,
+ pwd=self.pwd )
main.log.info(
"connect parameters:" + str(
- self.userName ) + ";" + str(
- self.ipAddress ) + ";" + str(
- self.port ) + ";" + str(
- self.pwd ) )
+ self.user_name ) + ";" + str(
+ self.ip_address ) + ";" + str(
+ self.port ) + ";" + str(
+ self.pwd ) )
if self.handle:
# self.handle.expect( "",timeout=10 )
@@ -59,19 +59,13 @@
main.log.info( "NO HANDLE" )
return main.FALSE
- def loginQuagga( self, ipAddress ):
+ def loginQuagga( self, ip_address ):
self.name = self.options[ 'name' ]
self.handle = super( QuaggaCliDriver, self ).connect(
- userName=self.userName, ipAddress=ipAddress,
+ user_name=self.user_name, ip_address=ip_address,
port=self.port, pwd=self.pwd )
- main.log.info( "connect parameters:" +
- str( self.userName ) +
- ";" +
- str( self.ipAddress ) +
- ";" +
- str( self.port ) +
- ";" +
- str( self.pwd ) )
+ main.log.info( "connect parameters:" + str( self.user_name ) + ";"
+ + str( self.ip_address ) + ";" + str( self.port ) + ";" + str( self.pwd ) )
if self.handle:
# self.handle.expect( "" )
@@ -85,7 +79,7 @@
self.handle.sendline( "enable" )
# self.handle.expect( "bgpd#", timeout=5 )
self.handle.expect( "bgpd#" )
- main.log.info( "I in quagga on host " + str( ipAddress ) )
+ main.log.info( "I am in quagga on host " + str( ip_address ) )
return self.handle
else:
@@ -114,8 +108,7 @@
def generatePrefixes( self, net, numRoutes ):
main.log.info( "I am in generate_prefixes method!" )
- # each IP prefix will be composed by
- #"net" + "." + m + "." + n + "." + x
+ # each IP prefix will be composed by "net" + "." + m + "." + n + "." + x
# the length of each IP prefix is 24
routes = []
routesGen = 0
@@ -145,37 +138,42 @@
# This method generates a multiple to single point intent(
# MultiPointToSinglePointIntent ) for a given route
def generateExpectedSingleRouteIntent(
- self,
- prefix,
- nextHop,
- nextHopMac,
+ self,
+ prefix,
+ nextHop,
+ nextHopMac,
sdnipData ):
- ingress = []
+ ingresses = []
egress = ""
for peer in sdnipData[ 'bgpPeers' ]:
if peer[ 'ipAddress' ] == nextHop:
- egress = "of:" + \
- str( peer[ 'attachmentDpid' ] ).replace( ":", "" ) + ":" +\
- str( peer[ 'attachmentPort' ] )
- else:
- ingress.append( "of:" +
- str( peer[ 'attachmentDpid' ] ).replace( ":",
- "" ) + ":" +
- str( peer[ 'attachmentPort' ] ) )
+ egress = "of:" + str(
+ peer[ 'attachmentDpid' ] ).replace( ":",
+ "" ) + ":" + str( peer[ 'attachmentPort' ] )
+ for peer in sdnipData[ 'bgpPeers' ]:
+ if not peer[ 'ipAddress' ] == nextHop:
+ ingress = "of:" + str(
+ peer[ 'attachmentDpid' ] ).replace( ":",
+ "" ) + ":" + str( peer[ 'attachmentPort' ] )
+ if not ingress == egress and ingress not in ingresses:
+ ingresses.append( ingress )
+ # ingresses.append( "of:" + str( peer[ 'attachmentDpid' ]
+ # ).replace( ":", "" ) + ":" + str( peer[ 'attachmentPort'
+ # ] ) )
selector = "ETH_TYPE{ethType=800},IPV4_DST{ip=" + prefix + "}"
treatment = "[ETH_DST{mac=" + str( nextHopMac ) + "}]"
intent = egress + "/" + \
- str( sorted( ingress ) ) + "/" + selector + "/" + treatment
+ str( sorted( ingresses ) ) + "/" + selector + "/" + treatment
return intent
def generateExpectedOnePeerRouteIntents(
- self,
- prefixes,
- nextHop,
- nextHopMac,
+ self,
+ prefixes,
+ nextHop,
+ nextHopMac,
sdnipJsonFilePath ):
intents = []
sdnipJsonFile = open( sdnipJsonFilePath ).read()
@@ -220,14 +218,13 @@
for intent in intentsJsonObj:
if intent[ 'appId' ] != "org.onosproject.sdnip":
continue
- if intent[ 'type' ] == "MultiPointToSinglePointIntent" and intent[
- 'state' ] == 'INSTALLED':
+ if intent[ 'type' ] == "MultiPointToSinglePointIntent" and intent[ 'state' ] == 'INSTALLED':
egress = str( intent[ 'egress' ][ 'device' ] ) + ":" + str(
intent[ 'egress' ][ 'port' ] )
ingress = []
for attachmentPoint in intent[ 'ingress' ]:
- ingress.append( str( attachmentPoint[ 'device' ] ) +
- ":" + str( attachmentPoint[ 'port' ] ) )
+ ingress.append(
+ str( attachmentPoint[ 'device' ] ) + ":" + str( attachmentPoint[ 'port' ] ) )
selector = intent[ 'selector' ].replace(
"[", "" ).replace( "]", "" ).replace( " ", "" )
@@ -237,7 +234,7 @@
intent = egress + "/" + \
str( sorted( ingress ) ) + "/" + \
- selector + "/" + intent[ 'treatment' ]
+ selector + "/" + intent[ 'treatment' ]
intents.append( intent )
return sorted( intents )
@@ -251,20 +248,16 @@
for intent in intentsJsonObj:
if intent[ 'appId' ] != "org.onosproject.sdnip":
continue
- if intent[ 'type' ] == "PointToPointIntent" and "protocol=6"\
- in str( intent[ 'selector' ] ):
+ if intent[ 'type' ] == "PointToPointIntent" and "protocol=6" in str( intent[ 'selector' ] ):
ingress = str( intent[ 'ingress' ][ 'device' ] ) + ":" + str(
intent[ 'ingress' ][ 'port' ] )
egress = str( intent[ 'egress' ][ 'device' ] ) + ":" + str(
intent[ 'egress' ][ 'port' ] )
selector = str(
- intent[ 'selector' ] ).replace(
- " ",
- "" ).replace(
- "[",
- "" ).replace(
- "]",
- "" ).split( "," )
+ intent[ 'selector' ] ).replace( " ",
+ "" ).replace( "[",
+ "" ).replace( "]",
+ "" ).split( "," )
intent = ingress + "/" + egress + \
"/" + str( sorted( selector ) )
intents.append( intent )
@@ -283,25 +276,19 @@
bgpPeerAttachmentPoint = ""
bgpSpeakerAttachmentPoint = "of:" + str(
sdnipData[ 'bgpSpeakers' ][ 0 ][ 'attachmentDpid' ] ).replace( ":",
- "" ) + ":" +\
- str( sdnipData[ 'bgpSpeakers' ][ 0 ][ 'attachmentPort' ] )
+ "" ) + ":" + str( sdnipData[ 'bgpSpeakers' ][ 0 ][ 'attachmentPort' ] )
for peer in sdnipData[ 'bgpPeers' ]:
- bgpPeerAttachmentPoint = "of:" + \
- str( peer[ 'attachmentDpid' ] ).replace( ":", "" ) +\
- ":" + str( peer[ 'attachmentPort' ] )
+ bgpPeerAttachmentPoint = "of:" + str(
+ peer[ 'attachmentDpid' ] ).replace( ":",
+ "" ) + ":" + str( peer[ 'attachmentPort' ] )
# find out the BGP speaker IP address for this BGP peer
bgpSpeakerIpAddress = ""
- for interfaceAddress in sdnipData[
- 'bgpSpeakers' ][ 0 ][ 'interfaceAddresses' ]:
+ for interfaceAddress in sdnipData[ 'bgpSpeakers' ][ 0 ][ 'interfaceAddresses' ]:
# if eq( interfaceAddress[ 'interfaceDpid' ],sdnipData[
# 'bgpSpeakers' ][ 0 ][ 'attachmentDpid' ] ) and eq(
- # interfaceAddress[ 'interfacePort' ], sdnipData[
- # 'bgpSpeakers' ][ 0 ][ 'attachmentPort' ] ):
- if eq(
- interfaceAddress[ 'interfaceDpid' ],
- peer[ 'attachmentDpid' ] ) and eq(
- interfaceAddress[ 'interfacePort' ],
- peer[ 'attachmentPort' ] ):
+ # interfaceAddress[ 'interfacePort' ], sdnipData[ 'bgpSpeakers'
+ # ][ 0 ][ 'attachmentPort' ] ):
+ if eq( interfaceAddress[ 'interfaceDpid' ], peer[ 'attachmentDpid' ] ) and eq( interfaceAddress[ 'interfacePort' ], peer[ 'attachmentPort' ] ):
bgpSpeakerIpAddress = interfaceAddress[ 'ipAddress' ]
break
else:
@@ -309,20 +296,16 @@
# from bgpSpeakerAttachmentPoint to bgpPeerAttachmentPoint
# direction
- selectorStr = "IPV4_SRC{ip=" + bgpSpeakerIpAddress +\
- "/32}," + "IPV4_DST{ip=" + peer[ 'ipAddress' ] + "/32}," +\
- "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800},\
- TCP_DST{tcpPort=179}"
+ selectorStr = "IPV4_SRC{ip=" + bgpSpeakerIpAddress + "/32}," + "IPV4_DST{ip=" + peer[
+ 'ipAddress' ] + "/32}," + "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_DST{tcpPort=179}"
selector = selectorStr.replace( " ", "" ).replace(
"[", "" ).replace( "]", "" ).split( "," )
intent = bgpSpeakerAttachmentPoint + "/" + \
bgpPeerAttachmentPoint + "/" + str( sorted( selector ) )
intents.append( intent )
- selectorStr = "IPV4_SRC{ip=" + bgpSpeakerIpAddress + "/32}," +\
- "IPV4_DST{ip=" + peer[ 'ipAddress' ] + "/32}," +\
- "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800},\
- TCP_SRC{tcpPort=179}"
+ selectorStr = "IPV4_SRC{ip=" + bgpSpeakerIpAddress + "/32}," + "IPV4_DST{ip=" + peer[
+ 'ipAddress' ] + "/32}," + "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_SRC{tcpPort=179}"
selector = selectorStr.replace( " ", "" ).replace(
"[", "" ).replace( "]", "" ).split( "," )
intent = bgpSpeakerAttachmentPoint + "/" + \
@@ -331,20 +314,16 @@
# from bgpPeerAttachmentPoint to bgpSpeakerAttachmentPoint
# direction
- selectorStr = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," +\
- "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," + \
- "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800},\
- TCP_DST{tcpPort=179}"
+ selectorStr = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," + "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," + \
+ "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_DST{tcpPort=179}"
selector = selectorStr.replace( " ", "" ).replace(
"[", "" ).replace( "]", "" ).split( "," )
intent = bgpPeerAttachmentPoint + "/" + \
bgpSpeakerAttachmentPoint + "/" + str( sorted( selector ) )
intents.append( intent )
- selectorStr = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," +\
- "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," +\
- "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800},\
- TCP_SRC{tcpPort=179}"
+ selectorStr = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," + "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," + \
+ "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_SRC{tcpPort=179}"
selector = selectorStr.replace( " ", "" ).replace(
"[", "" ).replace( "]", "" ).split( "," )
intent = bgpPeerAttachmentPoint + "/" + \
@@ -374,8 +353,8 @@
except:
main.log.warn( "Failed to add route" )
self.disconnect()
- waitTimer = 1.00 / routeRate
- time.sleep( waitTimer )
+ # waitTimer = 1.00 / routeRate
+ # time.sleep( waitTimer )
if routesAdded == len( routes ):
main.log.info( "Finished adding routes" )
return main.TRUE
@@ -402,38 +381,28 @@
except:
main.log.warn( "Failed to add route" )
self.disconnect()
- waitTimer = 1.00 / routeRate
- time.sleep( waitTimer )
+ # waitTimer = 1.00 / routeRate
+ # time.sleep( waitTimer )
if routesAdded == len( routes ):
main.log.info( "Finished deleting routes" )
return main.TRUE
return main.FALSE
- def pingTest( self, ipAddress, pingTestFile, pingTestResultFile ):
- main.log.info( "Start the ping test on host:" + str( ipAddress ) )
+ def pingTest( self, ip_address, pingTestFile, pingTestResultFile ):
+ main.log.info( "Start the ping test on host:" + str( ip_address ) )
self.name = self.options[ 'name' ]
self.handle = super( QuaggaCliDriver, self ).connect(
- userName=self.userName, ipAddress=ipAddress,
+ user_name=self.user_name, ip_address=ip_address,
port=self.port, pwd=self.pwd )
- main.log.info( "connect parameters:" +
- str( self.userName ) +
- ";" +
- str( self.ipAddress ) +
- ";" +
- str( self.port ) +
- ";" +
- str( self.pwd ) )
+ main.log.info( "connect parameters:" + str( self.user_name ) + ";"
+ + str( self.ip_address ) + ";" + str( self.port ) + ";" + str( self.pwd ) )
if self.handle:
# self.handle.expect( "" )
# self.handle.expect( "\$" )
- main.log.info( "I in host " + str( ipAddress ) )
- main.log.info(
- pingTestFile +
- " > " +
- pingTestResultFile +
- " &" )
+ main.log.info( "I in host " + str( ip_address ) )
+ main.log.info( pingTestFile + " > " + pingTestResultFile + " &" )
self.handle.sendline(
pingTestFile +
" > " +
@@ -467,8 +436,10 @@
numRoutes = 255
for m in range( 1, j + 1 ):
for n in range( 1, numRoutes + 1 ):
- network = str( net ) + "." + str( m ) + \
- "." + str( n ) + ".0/24"
+ network = str(
+ net ) + "." + str(
+ m ) + "." + str(
+ n ) + ".0/24"
routeCmd = "network " + network
try:
self.handle.sendline( routeCmd )
@@ -518,8 +489,10 @@
numRoutes = 255
for m in range( 1, j + 1 ):
for n in range( 1, numRoutes + 1 ):
- network = str( net ) + "." + str( m ) + \
- "." + str( n ) + ".0/24"
+ network = str(
+ net ) + "." + str(
+ m ) + "." + str(
+ n ) + ".0/24"
routeCmd = "no network " + network
try:
self.handle.sendline( routeCmd )
@@ -532,8 +505,10 @@
routesDeleted = routesDeleted + 1
for d in range( j + 1, j + 2 ):
for e in range( 1, k + 1 ):
- network = str( net ) + "." + str( d ) + \
- "." + str( e ) + ".0/24"
+ network = str(
+ net ) + "." + str(
+ d ) + "." + str(
+ e ) + ".0/24"
routeCmd = "no network " + network
try:
self.handle.sendline( routeCmd )
@@ -554,7 +529,7 @@
child = pexpect.spawn( "telnet " + ip )
i = child.expect( [ "login:", "CLI#", pexpect.TIMEOUT ] )
if i == 0:
- print "Username and password required. Passing login info."
+ print "user_name and password required. Passing login info."
child.sendline( user )
child.expect( "Password:" )
child.sendline( passwd )
@@ -572,8 +547,8 @@
while True:
i = child.expect(
[ '17\d\.\d{1,3}\.\d{1,3}\.\d{1,3}',
- 'CLI#',
- pexpect.TIMEOUT ] )
+ 'CLI#',
+ pexpect.TIMEOUT ] )
if i == 0:
count = count + 1
elif i == 1:
@@ -620,3 +595,4 @@
main.log.error( "Connection failed to the host" )
response = main.FALSE
return response
+
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.params b/TestON/tests/SdnIpTest/SdnIpTest.params
index bb5826d..7f7ef2d 100755
--- a/TestON/tests/SdnIpTest/SdnIpTest.params
+++ b/TestON/tests/SdnIpTest/SdnIpTest.params
@@ -1,6 +1,6 @@
<PARAMS>
- <testcases>1,2</testcases>
+ <testcases>4</testcases>
#Environment variables
<ENV>
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.py b/TestON/tests/SdnIpTest/SdnIpTest.py
index 081b1ca..7957776 100644
--- a/TestON/tests/SdnIpTest/SdnIpTest.py
+++ b/TestON/tests/SdnIpTest/SdnIpTest.py
@@ -8,15 +8,25 @@
def __init__( self ):
self.default = ''
- def CASE1( self, main ):
+# from cupshelpers.config import prefix
+
+# Testing the basic functionality of SDN-IP
+
+
+class SdnIpTest:
+
+ def __init__( self ):
+ self.default = ''
+
+ def CASE4( self, main ):
"""
Test the SDN-IP functionality
- allRoutes_expected: all expected routes for all BGP peers
- routeIntents_expected: all expected MultiPointToSinglePointIntent intents
- bgpIntents_expected: expected PointToPointIntent intents
- allRoutes_actual: all routes from ONOS LCI
- routeIntents_actual: actual MultiPointToSinglePointIntent intents from ONOS CLI
- bgpIntents_actual: actual PointToPointIntent intents from ONOS CLI
+ allRoutesExpected: all expected routes for all BGP peers
+ routeIntentsExpected: all expected MultiPointToSinglePointIntent intents
+ bgpIntentsExpected: expected PointToPointIntent intents
+ allRoutesActual: all routes from ONOS LCI
+ routeIntentsActual: actual MultiPointToSinglePointIntent intents from ONOS CLI
+ bgpIntentsActual: actual PointToPointIntent intents from ONOS CLI
"""
import time
import json
@@ -26,122 +36,138 @@
main.case(
"The test case is to help to setup the TestON environment and test new drivers" )
- SDNIP_JSON_FILE_PATH = "../tests/SdnIpTest/sdnip.json"
+ # SDNIPJSONFILEPATH = "../tests/SdnIpTest/sdnip.json"
+ SDNIPJSONFILEPATH = "/home/admin/workspace/onos/tools/package/config/sdnip.json"
# all expected routes for all BGP peers
- allRoutes_expected = []
+ allRoutesExpected = []
main.step( "Start to generate routes for all BGP peers" )
- # bgpPeerHosts = []
- # for i in range( 3, 5 ):
- # bgpPeerHosts.append( "host" + str( i ) )
- # main.log.info( "BGP Peer Hosts are:" + bgpPeerHosts )
-
- # for i in range( 3, 5 ):
- # QuaggaCliHost = "QuaggaCliHost" + str( i )
- # prefixes = main.QuaggaCliHost.generate_prefixes( 3, 10 )
-
- # main.log.info( prefixes )
- # allRoutes_expected.append( prefixes )
main.log.info( "Generate prefixes for host3" )
- prefixes_host3 = main.QuaggaCliHost3.generate_prefixes( 3, 10 )
- main.log.info( prefixes_host3 )
+ prefixesHost3 = main.QuaggaCliHost3.generatePrefixes( 3, 10 )
+ main.log.info( prefixesHost3 )
# generate route with next hop
- for prefix in prefixes_host3:
- allRoutes_expected.append( prefix + "/" + "192.168.20.1" )
- routeIntents_expected_host3 = main.QuaggaCliHost3.generate_expected_onePeerRouteIntents(
- prefixes_host3,
- "192.168.20.1",
- "00:00:00:00:02:02",
- SDNIP_JSON_FILE_PATH )
+ for prefix in prefixesHost3:
+ allRoutesExpected.append( prefix + "/" + "192.168.20.1" )
+ routeIntentsExpectedHost3 = main.QuaggaCliHost3.generateExpectedOnePeerRouteIntents(
+ prefixesHost3, "192.168.20.1", "00:00:00:00:02:02", SDNIPJSONFILEPATH )
main.log.info( "Generate prefixes for host4" )
- prefixes_host4 = main.QuaggaCliHost4.generate_prefixes( 4, 10 )
- main.log.info( prefixes_host4 )
+ prefixesHost4 = main.QuaggaCliHost4.generatePrefixes( 4, 10 )
+ main.log.info( prefixesHost4 )
# generate route with next hop
- for prefix in prefixes_host4:
- allRoutes_expected.append( prefix + "/" + "192.168.30.1" )
- routeIntents_expected_host4 = main.QuaggaCliHost4.generate_expected_onePeerRouteIntents(
- prefixes_host4,
- "192.168.30.1",
- "00:00:00:00:03:01",
- SDNIP_JSON_FILE_PATH )
+ for prefix in prefixesHost4:
+ allRoutesExpected.append( prefix + "/" + "192.168.30.1" )
+ routeIntentsExpectedHost4 = main.QuaggaCliHost4.generateExpectedOnePeerRouteIntents(
+ prefixesHost4, "192.168.30.1", "00:00:00:00:03:01", SDNIPJSONFILEPATH )
- routeIntents_expected = routeIntents_expected_host3 + \
- routeIntents_expected_host4
+ main.log.info( "Generate prefixes for host5" )
+ prefixesHost5 = main.QuaggaCliHost5.generatePrefixes( 5, 10 )
+ main.log.info( prefixesHost5 )
+ for prefix in prefixesHost5:
+ allRoutesExpected.append( prefix + "/" + "192.168.60.2" )
+ routeIntentsExpectedHost5 = main.QuaggaCliHost5.generateExpectedOnePeerRouteIntents(
+ prefixesHost5, "192.168.60.1", "00:00:00:00:06:02", SDNIPJSONFILEPATH )
- cell_name = main.params[ 'ENV' ][ 'cellName' ]
- ONOS1_ip = main.params[ 'CTRL' ][ 'ip1' ]
+ routeIntentsExpected = routeIntentsExpectedHost3 + \
+ routeIntentsExpectedHost4 + routeIntentsExpectedHost5
+
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
main.step( "Set cell for ONOS-cli environment" )
- main.ONOScli.set_cell( cell_name )
- verify_result = main.ONOSbench.verify_cell()
- main.log.report( "Removing raft logs" )
- main.ONOSbench.onos_remove_raft_logs()
- main.log.report( "Uninstalling ONOS" )
- main.ONOSbench.onos_uninstall( ONOS1_ip )
- main.step( "Creating ONOS package" )
- package_result = main.ONOSbench.onos_package()
+ main.ONOScli.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
- main.step( "Starting ONOS service" )
- # TODO: start ONOS from Mininet Script
- # start_result = main.ONOSbench.onos_start( "127.0.0.1" )
+ main.log.report( "Removing raft logs" )
+ main.ONOSbench.onosRemoveRaftLogs()
+ main.log.report( "Uninstalling ONOS" )
+ main.ONOSbench.onosUninstall( ONOS1Ip )
+
main.step( "Installing ONOS package" )
- onos1_install_result = main.ONOSbench.onos_install(
- options="-f",
- node=ONOS1_ip )
+ onos1InstallResult = main.ONOSbench.onosInstall(
+ options="-f", node=ONOS1Ip )
main.step( "Checking if ONOS is up yet" )
- time.sleep( 60 )
- onos1_isup = main.ONOSbench.isup( ONOS1_ip )
- if not onos1_isup:
+ time.sleep( 150 )
+ onos1Isup = main.ONOSbench.isup( ONOS1Ip )
+ if not onos1Isup:
main.log.report( "ONOS1 didn't start!" )
main.step( "Start ONOS-cli" )
- # TODO: change the hardcode in start_onos_cli method in ONOS CLI driver
- main.ONOScli.start_onos_cli( ONOS1_ip )
+ main.ONOScli.startOnosCli( ONOS1Ip )
main.step( "Get devices in the network" )
- list_result = main.ONOScli.devices( json_format=False )
- main.log.info( list_result )
+ listResult = main.ONOScli.devices( jsonFormat=False )
+ main.log.info( listResult )
time.sleep( 10 )
main.log.info( "Installing sdn-ip feature" )
- main.ONOScli.feature_install( "onos-app-sdnip" )
+ main.ONOScli.featureInstall( "onos-app-sdnip" )
time.sleep( 10 )
main.step( "Login all BGP peers and add routes into peers" )
+
main.log.info( "Login Quagga CLI on host3" )
main.QuaggaCliHost3.loginQuagga( "1.168.30.2" )
main.log.info( "Enter configuration model of Quagga CLI on host3" )
- main.QuaggaCliHost3.enter_config( 64514 )
+ main.QuaggaCliHost3.enterConfig( 64514 )
main.log.info( "Add routes to Quagga on host3" )
- main.QuaggaCliHost3.add_routes( prefixes_host3, 1 )
+ main.QuaggaCliHost3.addRoutes( prefixesHost3, 1 )
main.log.info( "Login Quagga CLI on host4" )
main.QuaggaCliHost4.loginQuagga( "1.168.30.3" )
main.log.info( "Enter configuration model of Quagga CLI on host4" )
- main.QuaggaCliHost4.enter_config( 64516 )
+ main.QuaggaCliHost4.enterConfig( 64516 )
main.log.info( "Add routes to Quagga on host4" )
- main.QuaggaCliHost4.add_routes( prefixes_host4, 1 )
+ main.QuaggaCliHost4.addRoutes( prefixesHost4, 1 )
+
+ main.log.info( "Login Quagga CLI on host5" )
+ main.QuaggaCliHost5.loginQuagga( "1.168.30.5" )
+ main.log.info( "Enter configuration model of Quagga CLI on host5" )
+ main.QuaggaCliHost5.enterConfig( 64521 )
+ main.log.info( "Add routes to Quagga on host5" )
+ main.QuaggaCliHost5.addRoutes( prefixesHost5, 1 )
+
+ for i in range( 101, 201 ):
+ prefixesHostX = main.QuaggaCliHost.generatePrefixes( str( i ), 10 )
+ main.log.info( prefixesHostX )
+ for prefix in prefixesHostX:
+ allRoutesExpected.append(
+ prefix + "/" + "192.168.40." + str( i - 100 ) )
+
+ routeIntentsExpectedHostX = main.QuaggaCliHost.generateExpectedOnePeerRouteIntents(
+ prefixesHostX, "192.168.40." + str( i - 100 ), "00:00:%02d:00:00:90" %
+ ( i - 101 ), SDNIPJSONFILEPATH )
+ routeIntentsExpected = routeIntentsExpected + \
+ routeIntentsExpectedHostX
+
+ main.log.info( "Login Quagga CLI on host" + str( i ) )
+ QuaggaCliHostX = getattr( main, ( 'QuaggaCliHost' + str( i ) ) )
+ QuaggaCliHostX.loginQuagga( "1.168.30." + str( i ) )
+ main.log.info(
+ "Enter configuration model of Quagga CLI on host" + str( i ) )
+ QuaggaCliHostX.enterConfig( 65000 + i - 100 )
+ main.log.info( "Add routes to Quagga on host" + str( i ) )
+ QuaggaCliHostX.addRoutes( prefixesHostX, 1 )
+
time.sleep( 60 )
- # get all routes inside SDN-IP
- get_routes_result = main.ONOScli.routes( json_format=True )
+ # get routes inside SDN-IP
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
# parse routes from ONOS CLI
- allRoutes_actual = main.QuaggaCliHost3.extract_actual_routes(
- get_routes_result )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
- allRoutes_str_expected = str( sorted( allRoutes_expected ) )
- allRoutes_str_actual = str( allRoutes_actual ).replace( 'u', "" )
+ allRoutesStrExpected = str( sorted( allRoutesExpected ) )
+ allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
main.step( "Check routes installed" )
main.log.info( "Routes expected:" )
- main.log.info( allRoutes_str_expected )
+ main.log.info( allRoutesStrExpected )
main.log.info( "Routes get from ONOS CLI:" )
- main.log.info( allRoutes_str_actual )
- utilities.assert_equals(
- expect=allRoutes_str_expected,
- actual=allRoutes_str_actual,
- onpass="***Routes in SDN-IP are correct!***",
- onfail="***Routes in SDN-IP are wrong!***" )
- if( eq( allRoutes_str_expected, allRoutes_str_actual ) ):
+ main.log.info( allRoutesStrActual )
+ utilities.assertEquals(
+ expect=allRoutesStrExpected, actual=allRoutesStrActual,
+ onpass="***Routes in SDN-IP are correct!***",
+ onfail="***Routes in SDN-IP are wrong!***" )
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
main.log.report(
"***Routes in SDN-IP after adding routes are correct!***" )
else:
@@ -149,28 +175,26 @@
"***Routes in SDN-IP after adding routes are wrong!***" )
time.sleep( 20 )
- get_intents_result = main.ONOScli.intents( json_format=True )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
main.step( "Check MultiPointToSinglePointIntent intents installed" )
- # route_intents_expected are generated when generating routes
+ # routeIntentsExpected are generated when generating routes
# get rpoute intents from ONOS CLI
- routeIntents_actual = main.QuaggaCliHost3.extract_actual_routeIntents(
- get_intents_result )
- routeIntents_str_expected = str( sorted( routeIntents_expected ) )
- routeIntents_str_actual = str( routeIntents_actual ).replace( 'u', "" )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ routeIntentsStrExpected = str( sorted( routeIntentsExpected ) )
+ routeIntentsStrActual = str( routeIntentsActual ).replace( 'u', "" )
main.log.info( "MultiPointToSinglePoint intents expected:" )
- main.log.info( routeIntents_str_expected )
+ main.log.info( routeIntentsStrExpected )
main.log.info( "MultiPointToSinglePoint intents get from ONOS CLI:" )
- main.log.info( routeIntents_str_actual )
- utilities.assert_equals(
- expect=True,
- actual=eq(
- routeIntents_str_expected,
- routeIntents_str_actual ),
- onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
- onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
+ main.log.info( routeIntentsStrActual )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ routeIntentsStrExpected, routeIntentsStrActual ),
+ onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
+ onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
- if( eq( routeIntents_str_expected, routeIntents_str_actual ) ):
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
main.log.report(
"***MultiPointToSinglePoint Intents before deleting routes correct!***" )
else:
@@ -179,28 +203,26 @@
main.step( "Check BGP PointToPointIntent intents installed" )
# bgp intents expected
- bgpIntents_expected = main.QuaggaCliHost3.generate_expected_bgpIntents(
- SDNIP_JSON_FILE_PATH )
+ bgpIntentsExpected = main.QuaggaCliHost3.generateExpectedBgpIntents(
+ SDNIPJSONFILEPATH )
# get BGP intents from ONOS CLI
- bgpIntents_actual = main.QuaggaCliHost3.extract_actual_bgpIntents(
- get_intents_result )
+ bgpIntentsActual = main.QuaggaCliHost3.extractActualBgpIntents(
+ getIntentsResult )
- bgpIntents_str_expected = str( bgpIntents_expected ).replace( 'u', "" )
- bgpIntents_str_actual = str( bgpIntents_actual )
+ bgpIntentsStrExpected = str( bgpIntentsExpected ).replace( 'u', "" )
+ bgpIntentsStrActual = str( bgpIntentsActual )
main.log.info( "PointToPointIntent intents expected:" )
- main.log.info( bgpIntents_str_expected )
+ main.log.info( bgpIntentsStrExpected )
main.log.info( "PointToPointIntent intents get from ONOS CLI:" )
- main.log.info( bgpIntents_str_actual )
+ main.log.info( bgpIntentsStrActual )
- utilities.assert_equals(
- expect=True,
- actual=eq(
- bgpIntents_str_expected,
- bgpIntents_str_actual ),
- onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
- onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ bgpIntentsStrExpected, bgpIntentsStrActual ),
+ onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
+ onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
- if ( eq( bgpIntents_str_expected, bgpIntents_str_actual ) ):
+ if ( eq( bgpIntentsStrExpected, bgpIntentsStrActual ) ):
main.log.report(
"***PointToPointIntent Intents in SDN-IP are correct!***" )
else:
@@ -210,56 +232,54 @@
#============================= Ping Test ========================
# wait until all MultiPointToSinglePoint
time.sleep( 20 )
- ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-before-delete-routes-" + \
+ pingTestScript = "~/SDNIP/test-tools/CASE4-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE4-ping-results-before-delete-routes-" + \
strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
- ping_test_results = main.QuaggaCliHost.ping_test(
+ pingTestResults = main.QuaggaCliHost.pingTest(
"1.168.30.100",
- ping_test_script,
- ping_test_results_file )
- main.log.info( ping_test_results )
-
- # ping test
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
+ time.sleep( 20 )
#============================= Deleting Routes ==================
main.step( "Check deleting routes installed" )
- main.QuaggaCliHost3.delete_routes( prefixes_host3, 1 )
- main.QuaggaCliHost4.delete_routes( prefixes_host4, 1 )
+ main.QuaggaCliHost3.deleteRoutes( prefixesHost3, 1 )
+ main.QuaggaCliHost4.deleteRoutes( prefixesHost4, 1 )
+ main.QuaggaCliHost5.deleteRoutes( prefixesHost5, 1 )
- # main.log.info( "main.ONOScli.get_routes_num() = " )
- # main.log.info( main.ONOScli.get_routes_num() )
- # utilities.assert_equals( expect="Total SDN-IP routes = 1", actual=
- # main.ONOScli.get_routes_num(),
- get_routes_result = main.ONOScli.routes( json_format=True )
- allRoutes_actual = main.QuaggaCliHost3.extract_actual_routes(
- get_routes_result )
+ for i in range( 101, 201 ):
+ prefixesHostX = main.QuaggaCliHost.generatePrefixes( str( i ), 10 )
+ main.log.info( prefixesHostX )
+ QuaggaCliHostX = getattr( main, ( 'QuaggaCliHost' + str( i ) ) )
+ QuaggaCliHostX.deleteRoutes( prefixesHostX, 1 )
+
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
main.log.info( "allRoutes_actual = " )
- main.log.info( allRoutes_actual )
+ main.log.info( allRoutesActual )
- utilities.assert_equals(
- expect="[]",
- actual=str( allRoutes_actual ),
- onpass="***Route number in SDN-IP is 0, correct!***",
- onfail="***Routes number in SDN-IP is not 0, wrong!***" )
+ utilities.assertEquals( expect="[]", actual=str( allRoutesActual ),
+ onpass="***Route number in SDN-IP is 0, correct!***",
+ onfail="***Routes number in SDN-IP is not 0, wrong!***" )
- if( eq( allRoutes_str_expected, allRoutes_str_actual ) ):
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
main.log.report( "***Routes in SDN-IP after deleting correct!***" )
else:
main.log.report( "***Routes in SDN-IP after deleting wrong!***" )
main.step( "Check intents after deleting routes" )
- get_intents_result = main.ONOScli.intents( json_format=True )
- routeIntents_actual = main.QuaggaCliHost3.extract_actual_routeIntents(
- get_intents_result )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
main.log.info( "main.ONOScli.intents()= " )
- main.log.info( routeIntents_actual )
- utilities.assert_equals(
- expect="[]",
- actual=str( routeIntents_actual ),
- onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
- onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
+ main.log.info( routeIntentsActual )
+ utilities.assertEquals( expect="[]", actual=str( routeIntentsActual ),
+ onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
+ onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
- if( eq( routeIntents_str_expected, routeIntents_str_actual ) ):
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
main.log.report(
"***MultiPointToSinglePoint Intents after deleting routes correct!***" )
else:
@@ -267,14 +287,548 @@
"***MultiPointToSinglePoint Intents after deleting routes wrong!***" )
time.sleep( 20 )
- ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-after-delete-routes-" + \
+ pingTestScript = "~/SDNIP/test-tools/CASE4-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE4-ping-results-after-delete-routes-" + \
strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
- ping_test_results = main.QuaggaCliHost.ping_test(
+ pingTestResults = main.QuaggaCliHost.pingTest(
"1.168.30.100",
- ping_test_script,
- ping_test_results_file )
- main.log.info( ping_test_results )
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
+ time.sleep( 100 )
+
+ # main.step( "Test whether Mininet is started" )
+ # main.Mininet2.handle.sendline( "xterm host1" )
+ # main.Mininet2.handle.expect( "mininet>" )
+
+ def CASE3( self, main ):
+ """
+ Test the SDN-IP functionality
+ allRoutesExpected: all expected routes for all BGP peers
+ routeIntentsExpected: all expected MultiPointToSinglePointIntent intents
+ bgpIntentsExpected: expected PointToPointIntent intents
+ allRoutesActual: all routes from ONOS LCI
+ routeIntentsActual: actual MultiPointToSinglePointIntent intents from ONOS CLI
+ bgpIntentsActual: actual PointToPointIntent intents from ONOS CLI
+ """
+ import time
+ import json
+ from operator import eq
+ # from datetime import datetime
+ from time import localtime, strftime
+
+ main.case(
+ "The test case is to help to setup the TestON environment and test new drivers" )
+ # SDNIPJSONFILEPATH = "../tests/SdnIpTest/sdnip.json"
+ SDNIPJSONFILEPATH = "/home/admin/workspace/onos/tools/package/config/sdnip.json"
+ # all expected routes for all BGP peers
+ allRoutesExpected = []
+ main.step( "Start to generate routes for all BGP peers" )
+ main.log.info( "Generate prefixes for host3" )
+ prefixesHost3 = main.QuaggaCliHost3.generatePrefixes( 3, 10 )
+ main.log.info( prefixesHost3 )
+ # generate route with next hop
+ for prefix in prefixesHost3:
+ allRoutesExpected.append( prefix + "/" + "192.168.20.1" )
+ routeIntentsExpectedHost3 = main.QuaggaCliHost3.generateExpectedOnePeerRouteIntents(
+ prefixesHost3, "192.168.20.1", "00:00:00:00:02:02", SDNIPJSONFILEPATH )
+
+ main.log.info( "Generate prefixes for host4" )
+ prefixesHost4 = main.QuaggaCliHost4.generatePrefixes( 4, 10 )
+ main.log.info( prefixesHost4 )
+ # generate route with next hop
+ for prefix in prefixesHost4:
+ allRoutesExpected.append( prefix + "/" + "192.168.30.1" )
+ routeIntentsExpectedHost4 = main.QuaggaCliHost4.generateExpectedOnePeerRouteIntents(
+ prefixesHost4, "192.168.30.1", "00:00:00:00:03:01", SDNIPJSONFILEPATH )
+
+ routeIntentsExpected = routeIntentsExpectedHost3 + \
+ routeIntentsExpectedHost4
+
+ #
+ # main.log.info( "Generate prefixes for 100 guaggas" )
+ # for i in range( 101, 105 ):
+ # prefixesHostX=main.QuaggaCliHost.generatePrefixes( str( i ),10 )
+ # main.log.info( prefixesHostX )
+ # for prefix in prefixesHostX:
+ # allRoutesExpected.append( prefix + "/" + "192.168.40."+ str( i-100 ) )
+ # routeIntentsExpectedHostX = main.QuaggaCliHost.generateExpectedOnePeerRouteIntents( prefixesHostX, "192.168.40."+str( i ), "00:00:"+str( i-101 )+":00:00:90", SDNIPJSONFILEPATH )
+ # routeIntentsExpected = routeIntentsExpected + routeIntentsExpectedHostX
+ #
+
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
+ main.step( "Set cell for ONOS-cli environment" )
+ main.ONOScli.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
+
+ main.log.report( "Removing raft logs" )
+ main.ONOSbench.onosRemoveRaftLogs()
+ main.log.report( "Uninstalling ONOS" )
+ main.ONOSbench.onosUninstall( ONOS1Ip )
+
+ main.step( "Installing ONOS package" )
+ onos1InstallResult = main.ONOSbench.onosInstall(
+ options="-f", node=ONOS1Ip )
+
+ main.step( "Checking if ONOS is up yet" )
+ time.sleep( 60 )
+ onos1Isup = main.ONOSbench.isup( ONOS1Ip )
+ if not onos1Isup:
+ main.log.report( "ONOS1 didn't start!" )
+
+ main.step( "Start ONOS-cli" )
+
+ main.ONOScli.startOnosCli( ONOS1Ip )
+
+ main.step( "Get devices in the network" )
+ listResult = main.ONOScli.devices( jsonFormat=False )
+ main.log.info( listResult )
+ time.sleep( 10 )
+ main.log.info( "Installing sdn-ip feature" )
+ main.ONOScli.featureInstall( "onos-app-sdnip" )
+ time.sleep( 10 )
+ main.step( "Login all BGP peers and add routes into peers" )
+
+ main.log.info( "Login Quagga CLI on host3" )
+ main.QuaggaCliHost3.loginQuagga( "1.168.30.2" )
+ main.log.info( "Enter configuration model of Quagga CLI on host3" )
+ main.QuaggaCliHost3.enterConfig( 64514 )
+ main.log.info( "Add routes to Quagga on host3" )
+ main.QuaggaCliHost3.addRoutes( prefixesHost3, 1 )
+
+ main.log.info( "Login Quagga CLI on host4" )
+ main.QuaggaCliHost4.loginQuagga( "1.168.30.3" )
+ main.log.info( "Enter configuration model of Quagga CLI on host4" )
+ main.QuaggaCliHost4.enterConfig( 64516 )
+ main.log.info( "Add routes to Quagga on host4" )
+ main.QuaggaCliHost4.addRoutes( prefixesHost4, 1 )
+
+ for i in range( 101, 201 ):
+ prefixesHostX = main.QuaggaCliHost.generatePrefixes( str( i ), 10 )
+ main.log.info( prefixesHostX )
+ for prefix in prefixesHostX:
+ allRoutesExpected.append(
+ prefix + "/" + "192.168.40." + str( i - 100 ) )
+
+ routeIntentsExpectedHostX = main.QuaggaCliHost.generateExpectedOnePeerRouteIntents(
+ prefixesHostX, "192.168.40." + str( i - 100 ), "00:00:%02d:00:00:90" %
+ ( i - 101 ), SDNIPJSONFILEPATH )
+ routeIntentsExpected = routeIntentsExpected + \
+ routeIntentsExpectedHostX
+
+ main.log.info( "Login Quagga CLI on host" + str( i ) )
+ QuaggaCliHostX = getattr( main, ( 'QuaggaCliHost' + str( i ) ) )
+ QuaggaCliHostX.loginQuagga( "1.168.30." + str( i ) )
+ main.log.info(
+ "Enter configuration model of Quagga CLI on host" + str( i ) )
+ QuaggaCliHostX.enterConfig( 65000 + i - 100 )
+ main.log.info( "Add routes to Quagga on host" + str( i ) )
+ QuaggaCliHostX.addRoutes( prefixesHostX, 1 )
+
+ time.sleep( 60 )
+
+ # get routes inside SDN-IP
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+
+ # parse routes from ONOS CLI
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
+
+ allRoutesStrExpected = str( sorted( allRoutesExpected ) )
+ allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+ main.step( "Check routes installed" )
+ main.log.info( "Routes expected:" )
+ main.log.info( allRoutesStrExpected )
+ main.log.info( "Routes get from ONOS CLI:" )
+ main.log.info( allRoutesStrActual )
+ utilities.assertEquals(
+ expect=allRoutesStrExpected, actual=allRoutesStrActual,
+ onpass="***Routes in SDN-IP are correct!***",
+ onfail="***Routes in SDN-IP are wrong!***" )
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
+ main.log.report(
+ "***Routes in SDN-IP after adding routes are correct!***" )
+ else:
+ main.log.report(
+ "***Routes in SDN-IP after adding routes are wrong!***" )
+
+ time.sleep( 20 )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+
+ main.step( "Check MultiPointToSinglePointIntent intents installed" )
+ # routeIntentsExpected are generated when generating routes
+ # get rpoute intents from ONOS CLI
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ routeIntentsStrExpected = str( sorted( routeIntentsExpected ) )
+ routeIntentsStrActual = str( routeIntentsActual ).replace( 'u', "" )
+ main.log.info( "MultiPointToSinglePoint intents expected:" )
+ main.log.info( routeIntentsStrExpected )
+ main.log.info( "MultiPointToSinglePoint intents get from ONOS CLI:" )
+ main.log.info( routeIntentsStrActual )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ routeIntentsStrExpected, routeIntentsStrActual ),
+ onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
+ onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
+
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
+ main.log.report(
+ "***MultiPointToSinglePoint Intents before deleting routes correct!***" )
+ else:
+ main.log.report(
+ "***MultiPointToSinglePoint Intents before deleting routes wrong!***" )
+
+ main.step( "Check BGP PointToPointIntent intents installed" )
+ # bgp intents expected
+ bgpIntentsExpected = main.QuaggaCliHost3.generateExpectedBgpIntents(
+ SDNIPJSONFILEPATH )
+ # get BGP intents from ONOS CLI
+ bgpIntentsActual = main.QuaggaCliHost3.extractActualBgpIntents(
+ getIntentsResult )
+
+ bgpIntentsStrExpected = str( bgpIntentsExpected ).replace( 'u', "" )
+ bgpIntentsStrActual = str( bgpIntentsActual )
+ main.log.info( "PointToPointIntent intents expected:" )
+ main.log.info( bgpIntentsStrExpected )
+ main.log.info( "PointToPointIntent intents get from ONOS CLI:" )
+ main.log.info( bgpIntentsStrActual )
+
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ bgpIntentsStrExpected, bgpIntentsStrActual ),
+ onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
+ onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
+
+ if ( eq( bgpIntentsStrExpected, bgpIntentsStrActual ) ):
+ main.log.report(
+ "***PointToPointIntent Intents in SDN-IP are correct!***" )
+ else:
+ main.log.report(
+ "***PointToPointIntent Intents in SDN-IP are wrong!***" )
+
+ #============================= Ping Test ========================
+ # wait until all MultiPointToSinglePoint
+ time.sleep( 20 )
+ pingTestScript = "~/SDNIP/test-tools/CASE3-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE3-ping-results-before-delete-routes-" + \
+ strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
+ "1.168.30.100",
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
+ time.sleep( 20 )
+
+ #============================= Deleting Routes ==================
+ main.step( "Check deleting routes installed" )
+ main.QuaggaCliHost3.deleteRoutes( prefixesHost3, 1 )
+ main.QuaggaCliHost4.deleteRoutes( prefixesHost4, 1 )
+ for i in range( 101, 201 ):
+ prefixesHostX = main.QuaggaCliHost.generatePrefixes( str( i ), 10 )
+ main.log.info( prefixesHostX )
+ QuaggaCliHostX = getattr( main, ( 'QuaggaCliHost' + str( i ) ) )
+ QuaggaCliHostX.deleteRoutes( prefixesHostX, 1 )
+
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
+ main.log.info( "allRoutes_actual = " )
+ main.log.info( allRoutesActual )
+
+ utilities.assertEquals( expect="[]", actual=str( allRoutesActual ),
+ onpass="***Route number in SDN-IP is 0, correct!***",
+ onfail="***Routes number in SDN-IP is not 0, wrong!***" )
+
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
+ main.log.report( "***Routes in SDN-IP after deleting correct!***" )
+ else:
+ main.log.report( "***Routes in SDN-IP after deleting wrong!***" )
+
+ main.step( "Check intents after deleting routes" )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ main.log.info( "main.ONOScli.intents()= " )
+ main.log.info( routeIntentsActual )
+ utilities.assertEquals( expect="[]", actual=str( routeIntentsActual ),
+ onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
+ onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
+
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
+ main.log.report(
+ "***MultiPointToSinglePoint Intents after deleting routes correct!***" )
+ else:
+ main.log.report(
+ "***MultiPointToSinglePoint Intents after deleting routes wrong!***" )
+
+ time.sleep( 20 )
+ pingTestScript = "~/SDNIP/test-tools/CASE3-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE3-ping-results-after-delete-routes-" + \
+ strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
+ "1.168.30.100",
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
+ time.sleep( 100 )
+
+ # main.step( "Test whether Mininet is started" )
+ # main.Mininet2.handle.sendline( "xterm host1" )
+ # main.Mininet2.handle.expect( "mininet>" )
+
+ def CASE1( self, main ):
+ """
+ Test the SDN-IP functionality
+ allRoutesExpected: all expected routes for all BGP peers
+ routeIntentsExpected: all expected MultiPointToSinglePointIntent intents
+ bgpIntentsExpected: expected PointToPointIntent intents
+ allRoutesActual: all routes from ONOS LCI
+ routeIntentsActual: actual MultiPointToSinglePointIntent intents from ONOS CLI
+ bgpIntentsActual: actual PointToPointIntent intents from ONOS CLI
+ """
+ import time
+ import json
+ from operator import eq
+ # from datetime import datetime
+ from time import localtime, strftime
+
+ main.case(
+ "The test case is to help to setup the TestON environment and test new drivers" )
+ SDNIPJSONFILEPATH = "../tests/SdnIpTest/sdnip.json"
+ # all expected routes for all BGP peers
+ allRoutesExpected = []
+ main.step( "Start to generate routes for all BGP peers" )
+ # bgpPeerHosts = []
+ # for i in range( 3, 5 ):
+ # bgpPeerHosts.append( "host" + str( i ) )
+ # main.log.info( "BGP Peer Hosts are:" + bgpPeerHosts )
+
+ # for i in range( 3, 5 ):
+ # QuaggaCliHost = "QuaggaCliHost" + str( i )
+ # prefixes = main.QuaggaCliHost.generatePrefixes( 3, 10 )
+
+ # main.log.info( prefixes )
+ # allRoutesExpected.append( prefixes )
+ main.log.info( "Generate prefixes for host3" )
+ prefixesHost3 = main.QuaggaCliHost3.generatePrefixes( 3, 10 )
+ main.log.info( prefixesHost3 )
+ # generate route with next hop
+ for prefix in prefixesHost3:
+ allRoutesExpected.append( prefix + "/" + "192.168.20.1" )
+ routeIntentsExpectedHost3 = main.QuaggaCliHost3.generateExpectedOnePeerRouteIntents(
+ prefixesHost3, "192.168.20.1", "00:00:00:00:02:02", SDNIPJSONFILEPATH )
+
+ main.log.info( "Generate prefixes for host4" )
+ prefixesHost4 = main.QuaggaCliHost4.generatePrefixes( 4, 10 )
+ main.log.info( prefixesHost4 )
+ # generate route with next hop
+ for prefix in prefixesHost4:
+ allRoutesExpected.append( prefix + "/" + "192.168.30.1" )
+ routeIntentsExpectedHost4 = main.QuaggaCliHost4.generateExpectedOnePeerRouteIntents(
+ prefixesHost4, "192.168.30.1", "00:00:00:00:03:01", SDNIPJSONFILEPATH )
+
+ routeIntentsExpected = routeIntentsExpectedHost3 + \
+ routeIntentsExpectedHost4
+
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
+ main.step( "Set cell for ONOS-cli environment" )
+ main.ONOScli.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
+ main.log.report( "Removing raft logs" )
+ main.ONOSbench.onosRemoveRaftLogs()
+ main.log.report( "Uninstalling ONOS" )
+ main.ONOSbench.onosUninstall( ONOS1Ip )
+ main.step( "Creating ONOS package" )
+ packageResult = main.ONOSbench.onosPackage()
+
+ main.step( "Starting ONOS service" )
+ # TODO: start ONOS from Mininet Script
+ # startResult = main.ONOSbench.onosStart( "127.0.0.1" )
+ main.step( "Installing ONOS package" )
+ onos1InstallResult = main.ONOSbench.onosInstall(
+ options="-f", node=ONOS1Ip )
+
+ main.step( "Checking if ONOS is up yet" )
+ time.sleep( 60 )
+ onos1Isup = main.ONOSbench.isup( ONOS1Ip )
+ if not onos1Isup:
+ main.log.report( "ONOS1 didn't start!" )
+
+ main.step( "Start ONOS-cli" )
+ # TODO: change the hardcode in startOnosCli method in ONOS CLI driver
+
+ main.ONOScli.startOnosCli( ONOS1Ip )
+
+ main.step( "Get devices in the network" )
+ listResult = main.ONOScli.devices( jsonFormat=False )
+ main.log.info( listResult )
+ time.sleep( 10 )
+ main.log.info( "Installing sdn-ip feature" )
+ main.ONOScli.featureInstall( "onos-app-sdnip" )
+ time.sleep( 10 )
+ main.step( "Login all BGP peers and add routes into peers" )
+ main.log.info( "Login Quagga CLI on host3" )
+ main.QuaggaCliHost3.loginQuagga( "1.168.30.2" )
+ main.log.info( "Enter configuration model of Quagga CLI on host3" )
+ main.QuaggaCliHost3.enterConfig( 64514 )
+ main.log.info( "Add routes to Quagga on host3" )
+ main.QuaggaCliHost3.addRoutes( prefixesHost3, 1 )
+
+ main.log.info( "Login Quagga CLI on host4" )
+ main.QuaggaCliHost4.loginQuagga( "1.168.30.3" )
+ main.log.info( "Enter configuration model of Quagga CLI on host4" )
+ main.QuaggaCliHost4.enterConfig( 64516 )
+ main.log.info( "Add routes to Quagga on host4" )
+ main.QuaggaCliHost4.addRoutes( prefixesHost4, 1 )
+ time.sleep( 60 )
+
+ # get all routes inside SDN-IP
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+
+ # parse routes from ONOS CLI
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
+
+ allRoutesStrExpected = str( sorted( allRoutesExpected ) )
+ allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+ main.step( "Check routes installed" )
+ main.log.info( "Routes expected:" )
+ main.log.info( allRoutesStrExpected )
+ main.log.info( "Routes get from ONOS CLI:" )
+ main.log.info( allRoutesStrActual )
+ utilities.assertEquals(
+ expect=allRoutesStrExpected, actual=allRoutesStrActual,
+ onpass="***Routes in SDN-IP are correct!***",
+ onfail="***Routes in SDN-IP are wrong!***" )
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
+ main.log.report(
+ "***Routes in SDN-IP after adding routes are correct!***" )
+ else:
+ main.log.report(
+ "***Routes in SDN-IP after adding routes are wrong!***" )
+
+ time.sleep( 20 )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+
+ main.step( "Check MultiPointToSinglePointIntent intents installed" )
+ # routeIntentsExpected are generated when generating routes
+ # get rpoute intents from ONOS CLI
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ routeIntentsStrExpected = str( sorted( routeIntentsExpected ) )
+ routeIntentsStrActual = str( routeIntentsActual ).replace( 'u', "" )
+ main.log.info( "MultiPointToSinglePoint intents expected:" )
+ main.log.info( routeIntentsStrExpected )
+ main.log.info( "MultiPointToSinglePoint intents get from ONOS CLI:" )
+ main.log.info( routeIntentsStrActual )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ routeIntentsStrExpected, routeIntentsStrActual ),
+ onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
+ onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
+
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
+ main.log.report(
+ "***MultiPointToSinglePoint Intents before deleting routes correct!***" )
+ else:
+ main.log.report(
+ "***MultiPointToSinglePoint Intents before deleting routes wrong!***" )
+
+ main.step( "Check BGP PointToPointIntent intents installed" )
+ # bgp intents expected
+ bgpIntentsExpected = main.QuaggaCliHost3.generateExpectedBgpIntents(
+ SDNIPJSONFILEPATH )
+ # get BGP intents from ONOS CLI
+ bgpIntentsActual = main.QuaggaCliHost3.extractActualBgpIntents(
+ getIntentsResult )
+
+ bgpIntentsStrExpected = str( bgpIntentsExpected ).replace( 'u', "" )
+ bgpIntentsStrActual = str( bgpIntentsActual )
+ main.log.info( "PointToPointIntent intents expected:" )
+ main.log.info( bgpIntentsStrExpected )
+ main.log.info( "PointToPointIntent intents get from ONOS CLI:" )
+ main.log.info( bgpIntentsStrActual )
+
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ bgpIntentsStrExpected, bgpIntentsStrActual ),
+ onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
+ onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
+
+ if ( eq( bgpIntentsStrExpected, bgpIntentsStrActual ) ):
+ main.log.report(
+ "***PointToPointIntent Intents in SDN-IP are correct!***" )
+ else:
+ main.log.report(
+ "***PointToPointIntent Intents in SDN-IP are wrong!***" )
+
+ #============================= Ping Test ========================
+ # wait until all MultiPointToSinglePoint
+ time.sleep( 20 )
+ pingTestScript = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-before-delete-routes-" + \
+ strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
+ "1.168.30.100",
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
+
+ # ping test
+
+ #============================= Deleting Routes ==================
+ main.step( "Check deleting routes installed" )
+ main.QuaggaCliHost3.deleteRoutes( prefixesHost3, 1 )
+ main.QuaggaCliHost4.deleteRoutes( prefixesHost4, 1 )
+
+ # main.log.info( "main.ONOScli.get_routes_num() = " )
+ # main.log.info( main.ONOScli.getRoutesNum() )
+ # utilities.assertEquals( expect="Total SDN-IP routes = 1", actual=
+ # main.ONOScli.getRoutesNum(),
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
+ main.log.info( "allRoutes_actual = " )
+ main.log.info( allRoutesActual )
+
+ utilities.assertEquals( expect="[]", actual=str( allRoutesActual ),
+ onpass="***Route number in SDN-IP is 0, correct!***",
+ onfail="***Routes number in SDN-IP is not 0, wrong!***" )
+
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
+ main.log.report( "***Routes in SDN-IP after deleting correct!***" )
+ else:
+ main.log.report( "***Routes in SDN-IP after deleting wrong!***" )
+
+ main.step( "Check intents after deleting routes" )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ main.log.info( "main.ONOScli.intents()= " )
+ main.log.info( routeIntentsActual )
+ utilities.assertEquals( expect="[]", actual=str( routeIntentsActual ),
+ onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
+ onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
+
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
+ main.log.report(
+ "***MultiPointToSinglePoint Intents after deleting routes correct!***" )
+ else:
+ main.log.report(
+ "***MultiPointToSinglePoint Intents after deleting routes wrong!***" )
+
+ time.sleep( 20 )
+ pingTestScript = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-after-delete-routes-" + \
+ strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
+ "1.168.30.100",
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
time.sleep( 30 )
# main.step( "Test whether Mininet is started" )
@@ -284,12 +838,12 @@
def CASE2( self, main ):
"""
Test the SDN-IP functionality
- allRoutes_expected: all expected routes for all BGP peers
- routeIntents_expected: all expected MultiPointToSinglePointIntent intents
- bgpIntents_expected: expected PointToPointIntent intents
- allRoutes_actual: all routes from ONOS LCI
- routeIntents_actual: actual MultiPointToSinglePointIntent intents from ONOS CLI
- bgpIntents_actual: actual PointToPointIntent intents from ONOS CLI
+ allRoutesExpected: all expected routes for all BGP peers
+ routeIntentsExpected: all expected MultiPointToSinglePointIntent intents
+ bgpIntentsExpected: expected PointToPointIntent intents
+ allRoutesActual: all routes from ONOS LCI
+ routeIntentsActual: actual MultiPointToSinglePointIntent intents from ONOS CLI
+ bgpIntentsActual: actual PointToPointIntent intents from ONOS CLI
"""
import time
import json
@@ -298,187 +852,175 @@
main.case(
"The test case is to help to setup the TestON environment and test new drivers" )
- SDNIP_JSON_FILE_PATH = "../tests/SdnIpTest/sdnip.json"
+ SDNIPJSONFILEPATH = "../tests/SdnIpTest/sdnip.json"
# all expected routes for all BGP peers
- allRoutes_expected = []
+ allRoutesExpected = []
main.step( "Start to generate routes for all BGP peers" )
main.log.info( "Generate prefixes for host3" )
- prefixes_host3 = main.QuaggaCliHost3.generate_prefixes( 3, 10 )
- main.log.info( prefixes_host3 )
+ prefixesHost3 = main.QuaggaCliHost3.generatePrefixes( 3, 10 )
+ main.log.info( prefixesHost3 )
# generate route with next hop
- for prefix in prefixes_host3:
- allRoutes_expected.append( prefix + "/" + "192.168.20.1" )
- routeIntents_expected_host3 = main.QuaggaCliHost3.generate_expected_onePeerRouteIntents(
- prefixes_host3,
- "192.168.20.1",
- "00:00:00:00:02:02",
- SDNIP_JSON_FILE_PATH )
+ for prefix in prefixesHost3:
+ allRoutesExpected.append( prefix + "/" + "192.168.20.1" )
+ routeIntentsExpectedHost3 = main.QuaggaCliHost3.generateExpectedOnePeerRouteIntents(
+ prefixesHost3, "192.168.20.1", "00:00:00:00:02:02", SDNIPJSONFILEPATH )
main.log.info( "Generate prefixes for host4" )
- prefixes_host4 = main.QuaggaCliHost4.generate_prefixes( 4, 10 )
- main.log.info( prefixes_host4 )
+ prefixesHost4 = main.QuaggaCliHost4.generatePrefixes( 4, 10 )
+ main.log.info( prefixesHost4 )
# generate route with next hop
- for prefix in prefixes_host4:
- allRoutes_expected.append( prefix + "/" + "192.168.30.1" )
- routeIntents_expected_host4 = main.QuaggaCliHost4.generate_expected_onePeerRouteIntents(
- prefixes_host4,
- "192.168.30.1",
- "00:00:00:00:03:01",
- SDNIP_JSON_FILE_PATH )
+ for prefix in prefixesHost4:
+ allRoutesExpected.append( prefix + "/" + "192.168.30.1" )
+ routeIntentsExpectedHost4 = main.QuaggaCliHost4.generateExpectedOnePeerRouteIntents(
+ prefixesHost4, "192.168.30.1", "00:00:00:00:03:01", SDNIPJSONFILEPATH )
- routeIntents_expected = routeIntents_expected_host3 + \
- routeIntents_expected_host4
+ routeIntentsExpected = routeIntentsExpectedHost3 + \
+ routeIntentsExpectedHost4
main.log.report( "Removing raft logs" )
- main.ONOSbench.onos_remove_raft_logs()
+ main.ONOSbench.onosRemoveRaftLogs()
main.log.report( "Uninstalling ONOS" )
- main.ONOSbench.onos_uninstall( ONOS1_ip )
+ main.ONOSbench.onosUninstall( ONOS1Ip )
- cell_name = main.params[ 'ENV' ][ 'cellName' ]
- ONOS1_ip = main.params[ 'CTRL' ][ 'ip1' ]
+ cellName = main.params[ 'ENV' ][ 'cellName' ]
+ ONOS1Ip = main.params[ 'CTRL' ][ 'ip1' ]
main.step( "Set cell for ONOS-cli environment" )
- main.ONOScli.set_cell( cell_name )
- verify_result = main.ONOSbench.verify_cell()
- #main.log.report( "Removing raft logs" )
- # main.ONOSbench.onos_remove_raft_logs()
- #main.log.report( "Uninstalling ONOS" )
- # main.ONOSbench.onos_uninstall( ONOS1_ip )
+ main.ONOScli.setCell( cellName )
+ verifyResult = main.ONOSbench.verifyCell()
+ # main.log.report( "Removing raft logs" )
+ # main.ONOSbench.onosRemoveRaftLogs()
+ # main.log.report( "Uninstalling ONOS" )
+ # main.ONOSbench.onosUninstall( ONOS1Ip )
main.step( "Creating ONOS package" )
- package_result = main.ONOSbench.onos_package()
+ # packageResult = main.ONOSbench.onosPackage()
main.step( "Installing ONOS package" )
- onos1_install_result = main.ONOSbench.onos_install(
- options="-f",
- node=ONOS1_ip )
+ # onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+ # node=ONOS1Ip )
main.step( "Checking if ONOS is up yet" )
- time.sleep( 60 )
- onos1_isup = main.ONOSbench.isup( ONOS1_ip )
- if not onos1_isup:
+ # time.sleep( 60 )
+ onos1Isup = main.ONOSbench.isup( ONOS1Ip )
+ if not onos1Isup:
main.log.report( "ONOS1 didn't start!" )
main.step( "Start ONOS-cli" )
- main.ONOScli.start_onos_cli( ONOS1_ip )
+ main.ONOScli.startOnosCli( ONOS1Ip )
main.step( "Get devices in the network" )
- list_result = main.ONOScli.devices( json_format=False )
- main.log.info( list_result )
+ listResult = main.ONOScli.devices( jsonFormat=False )
+ main.log.info( listResult )
time.sleep( 10 )
main.log.info( "Installing sdn-ip feature" )
- main.ONOScli.feature_install( "onos-app-sdnip" )
+ main.ONOScli.featureInstall( "onos-app-sdnip" )
time.sleep( 10 )
main.step( "Check BGP PointToPointIntent intents installed" )
# bgp intents expected
- bgpIntents_expected = main.QuaggaCliHost3.generate_expected_bgpIntents(
- SDNIP_JSON_FILE_PATH )
+ bgpIntentsExpected = main.QuaggaCliHost3.generateExpectedBgpIntents(
+ SDNIPJSONFILEPATH )
# get BGP intents from ONOS CLI
- get_intents_result = main.ONOScli.intents( json_format=True )
- bgpIntents_actual = main.QuaggaCliHost3.extract_actual_bgpIntents(
- get_intents_result )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+ bgpIntentsActual = main.QuaggaCliHost3.extractActualBgpIntents(
+ getIntentsResult )
- bgpIntents_str_expected = str( bgpIntents_expected ).replace( 'u', "" )
- bgpIntents_str_actual = str( bgpIntents_actual )
+ bgpIntentsStrExpected = str( bgpIntentsExpected ).replace( 'u', "" )
+ bgpIntentsStrActual = str( bgpIntentsActual )
main.log.info( "PointToPointIntent intents expected:" )
- main.log.info( bgpIntents_str_expected )
+ main.log.info( bgpIntentsStrExpected )
main.log.info( "PointToPointIntent intents get from ONOS CLI:" )
- main.log.info( bgpIntents_str_actual )
+ main.log.info( bgpIntentsStrActual )
- utilities.assert_equals(
- expect=True,
- actual=eq(
- bgpIntents_str_expected,
- bgpIntents_str_actual ),
- onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
- onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ bgpIntentsStrExpected, bgpIntentsStrActual ),
+ onpass="***PointToPointIntent Intents in SDN-IP are correct!***",
+ onfail="***PointToPointIntent Intents in SDN-IP are wrong!***" )
- if ( eq( bgpIntents_str_expected, bgpIntents_str_actual ) ):
+ if ( eq( bgpIntentsStrExpected, bgpIntentsStrActual ) ):
main.log.report(
"***PointToPointIntent Intents in SDN-IP are correct!***" )
else:
main.log.report(
"***PointToPointIntent Intents in SDN-IP are wrong!***" )
- allRoutes_str_expected = str( sorted( allRoutes_expected ) )
- routeIntents_str_expected = str( sorted( routeIntents_expected ) )
- ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- # round_num = 0;
+ allRoutesStrExpected = str( sorted( allRoutesExpected ) )
+ routeIntentsStrExpected = str( sorted( routeIntentsExpected ) )
+ pingTestScript = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
+ # roundNum = 0;
# while( True ):
- for round_num in range( 1, 6 ):
+ for roundNum in range( 1, 6 ):
# round = round + 1;
- main.log.report(
- "The Round " +
- str( round_num ) +
- " test starts........................................" )
+ main.log.report( "The Round " + str( roundNum ) +
+ " test starts........................................" )
main.step( "Login all BGP peers and add routes into peers" )
main.log.info( "Login Quagga CLI on host3" )
main.QuaggaCliHost3.loginQuagga( "1.168.30.2" )
main.log.info( "Enter configuration model of Quagga CLI on host3" )
- main.QuaggaCliHost3.enter_config( 64514 )
+ main.QuaggaCliHost3.enterConfig( 64514 )
main.log.info( "Add routes to Quagga on host3" )
- main.QuaggaCliHost3.add_routes( prefixes_host3, 1 )
+ main.QuaggaCliHost3.addRoutes( prefixesHost3, 1 )
main.log.info( "Login Quagga CLI on host4" )
main.QuaggaCliHost4.loginQuagga( "1.168.30.3" )
main.log.info( "Enter configuration model of Quagga CLI on host4" )
- main.QuaggaCliHost4.enter_config( 64516 )
+ main.QuaggaCliHost4.enterConfig( 64516 )
main.log.info( "Add routes to Quagga on host4" )
- main.QuaggaCliHost4.add_routes( prefixes_host4, 1 )
+ main.QuaggaCliHost4.addRoutes( prefixesHost4, 1 )
time.sleep( 60 )
# get all routes inside SDN-IP
- get_routes_result = main.ONOScli.routes( json_format=True )
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
# parse routes from ONOS CLI
- allRoutes_actual = main.QuaggaCliHost3.extract_actual_routes(
- get_routes_result )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
- # allRoutes_str_expected = str( sorted( allRoutes_expected ) )
- allRoutes_str_actual = str( allRoutes_actual ).replace( 'u', "" )
+ # allRoutesStrExpected = str( sorted( allRoutesExpected ) )
+ allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
main.step( "Check routes installed" )
main.log.info( "Routes expected:" )
- main.log.info( allRoutes_str_expected )
+ main.log.info( allRoutesStrExpected )
main.log.info( "Routes get from ONOS CLI:" )
- main.log.info( allRoutes_str_actual )
- utilities.assert_equals(
- expect=allRoutes_str_expected,
- actual=allRoutes_str_actual,
- onpass="***Routes in SDN-IP are correct!***",
- onfail="***Routes in SDN-IP are wrong!***" )
- if( eq( allRoutes_str_expected, allRoutes_str_actual ) ):
+ main.log.info( allRoutesStrActual )
+ utilities.assertEquals(
+ expect=allRoutesStrExpected, actual=allRoutesStrActual,
+ onpass="***Routes in SDN-IP are correct!***",
+ onfail="***Routes in SDN-IP are wrong!***" )
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
main.log.report(
"***Routes in SDN-IP after adding correct!***" )
else:
main.log.report( "***Routes in SDN-IP after adding wrong!***" )
time.sleep( 20 )
- get_intents_result = main.ONOScli.intents( json_format=True )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
main.step(
"Check MultiPointToSinglePointIntent intents installed" )
- # route_intents_expected are generated when generating routes
+ # routeIntentsExpected are generated when generating routes
# get route intents from ONOS CLI
- routeIntents_actual = main.QuaggaCliHost3.extract_actual_routeIntents(
- get_intents_result )
- # routeIntents_str_expected = str( sorted( routeIntents_expected ) )
- routeIntents_str_actual = str(
- routeIntents_actual ).replace( 'u', "" )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
+ # routeIntentsStrExpected = str( sorted( routeIntentsExpected ) )
+ routeIntentsStrActual = str(
+ routeIntentsActual ).replace(
+ 'u',
+ "" )
main.log.info( "MultiPointToSinglePoint intents expected:" )
- main.log.info( routeIntents_str_expected )
+ main.log.info( routeIntentsStrExpected )
main.log.info(
"MultiPointToSinglePoint intents get from ONOS CLI:" )
- main.log.info( routeIntents_str_actual )
- utilities.assert_equals(
- expect=True,
- actual=eq(
- routeIntents_str_expected,
- routeIntents_str_actual ),
- onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
- onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
+ main.log.info( routeIntentsStrActual )
+ utilities.assertEquals(
+ expect=True, actual=eq(
+ routeIntentsStrExpected, routeIntentsStrActual ),
+ onpass="***MultiPointToSinglePoint Intents in SDN-IP are correct!***",
+ onfail="***MultiPointToSinglePoint Intents in SDN-IP are wrong!***" )
- if( eq( routeIntents_str_expected, routeIntents_str_actual ) ):
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
main.log.report(
"***MultiPointToSinglePoint Intents after adding routes correct!***" )
else:
@@ -488,36 +1030,35 @@
#============================= Ping Test ========================
# wait until all MultiPointToSinglePoint
time.sleep( 20 )
- # ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE2-Round" + \
- str( round_num ) + "-ping-results-before-delete-routes-" + strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
- ping_test_results = main.QuaggaCliHost.ping_test(
+ # pingTestScript = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE2-Round" + str(
+ roundNum ) + "-ping-results-before-delete-routes-" + strftime( "%Y-%m-%d_%H:%M:%S",
+ localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
"1.168.30.100",
- ping_test_script,
- ping_test_results_file )
- main.log.info( ping_test_results )
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
# ping test
#============================= Deleting Routes ==================
main.step( "Check deleting routes installed" )
main.log.info( "Delete routes to Quagga on host3" )
- main.QuaggaCliHost3.delete_routes( prefixes_host3, 1 )
+ main.QuaggaCliHost3.deleteRoutes( prefixesHost3, 1 )
main.log.info( "Delete routes to Quagga on host4" )
- main.QuaggaCliHost4.delete_routes( prefixes_host4, 1 )
+ main.QuaggaCliHost4.deleteRoutes( prefixesHost4, 1 )
- get_routes_result = main.ONOScli.routes( json_format=True )
- allRoutes_actual = main.QuaggaCliHost3.extract_actual_routes(
- get_routes_result )
+ getRoutesResult = main.ONOScli.routes( jsonFormat=True )
+ allRoutesActual = main.QuaggaCliHost3.extractActualRoutes(
+ getRoutesResult )
main.log.info( "allRoutes_actual = " )
- main.log.info( allRoutes_actual )
+ main.log.info( allRoutesActual )
- utilities.assert_equals(
- expect="[]",
- actual=str( allRoutes_actual ),
- onpass="***Route number in SDN-IP is 0, correct!***",
- onfail="***Routes number in SDN-IP is not 0, wrong!***" )
+ utilities.assertEquals( expect="[]", actual=str( allRoutesActual ),
+ onpass="***Route number in SDN-IP is 0, correct!***",
+ onfail="***Routes number in SDN-IP is not 0, wrong!***" )
- if( eq( allRoutes_str_expected, allRoutes_str_actual ) ):
+ if( eq( allRoutesStrExpected, allRoutesStrActual ) ):
main.log.report(
"***Routes in SDN-IP after deleting correct!***" )
else:
@@ -525,18 +1066,17 @@
"***Routes in SDN-IP after deleting wrong!***" )
main.step( "Check intents after deleting routes" )
- get_intents_result = main.ONOScli.intents( json_format=True )
- routeIntents_actual = main.QuaggaCliHost3.extract_actual_routeIntents(
- get_intents_result )
+ getIntentsResult = main.ONOScli.intents( jsonFormat=True )
+ routeIntentsActual = main.QuaggaCliHost3.extractActualRouteIntents(
+ getIntentsResult )
main.log.info( "main.ONOScli.intents()= " )
- main.log.info( routeIntents_actual )
- utilities.assert_equals(
- expect="[]",
- actual=str( routeIntents_actual ),
- onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
- onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
+ main.log.info( routeIntentsActual )
+ utilities.assertEquals(
+ expect="[]", actual=str( routeIntentsActual ),
+ onpass="***MultiPointToSinglePoint Intents number in SDN-IP is 0, correct!***",
+ onfail="***MultiPointToSinglePoint Intents number in SDN-IP is 0, wrong!***" )
- if( eq( routeIntents_str_expected, routeIntents_str_actual ) ):
+ if( eq( routeIntentsStrExpected, routeIntentsStrActual ) ):
main.log.report(
"***MultiPointToSinglePoint Intents after deleting routes correct!***" )
else:
@@ -544,12 +1084,14 @@
"***MultiPointToSinglePoint Intents after deleting routes wrong!***" )
time.sleep( 20 )
- # ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE2-Round" + \
- str( round_num ) + "-ping-results-after-delete-routes-" + strftime( "%Y-%m-%d_%H:%M:%S", localtime() ) + ".txt"
- ping_test_results = main.QuaggaCliHost.ping_test(
+ # pingTestScript = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
+ pingTestResultsFile = "~/SDNIP/SdnIpIntentDemo/log/CASE2-Round" + str(
+ roundNum ) + "-ping-results-after-delete-routes-" + strftime( "%Y-%m-%d_%H:%M:%S",
+ localtime() ) + ".txt"
+ pingTestResults = main.QuaggaCliHost.pingTest(
"1.168.30.100",
- ping_test_script,
- ping_test_results_file )
- main.log.info( ping_test_results )
+ pingTestScript,
+ pingTestResultsFile )
+ main.log.info( pingTestResults )
time.sleep( 30 )
+
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.topo b/TestON/tests/SdnIpTest/SdnIpTest.topo
index 6df1975..fe9d1bb 100755
--- a/TestON/tests/SdnIpTest/SdnIpTest.topo
+++ b/TestON/tests/SdnIpTest/SdnIpTest.topo
@@ -33,7 +33,7 @@
<user>admin</user>
<password>onos_test</password>
<type>QuaggaCliDriver</type>
- <connect_order>5</connect_order>
+ <connect_order>4</connect_order>
<COMPONENTS> </COMPONENTS>
</QuaggaCliHost3>
<QuaggaCliHost4>
@@ -44,14 +44,827 @@
<connect_order>5</connect_order>
<COMPONENTS> </COMPONENTS>
</QuaggaCliHost4>
+ <QuaggaCliHost5>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>6</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost5>
+
<QuaggaCliHost>
<host>127.0.0.1</host>
<user>admin</user>
<password>onos_test</password>
<type>QuaggaCliDriver</type>
- <connect_order>5</connect_order>
+ <connect_order>7</connect_order>
<COMPONENTS> </COMPONENTS>
</QuaggaCliHost>
+ <QuaggaCliHost101>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>101</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost101>
+ <QuaggaCliHost102>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>102</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost102>
+ <QuaggaCliHost103>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>103</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost103>
+ <QuaggaCliHost104>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>104</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost104>
+ <QuaggaCliHost105>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>105</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost105>
+ <QuaggaCliHost106>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>106</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost106>
+ <QuaggaCliHost107>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>107</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost107>
+ <QuaggaCliHost108>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>108</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost108>
+ <QuaggaCliHost109>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>109</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost109>
+ <QuaggaCliHost110>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>110</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost110>
+ <QuaggaCliHost111>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>111</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost111>
+ <QuaggaCliHost112>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>112</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost112>
+ <QuaggaCliHost113>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>113</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost113>
+ <QuaggaCliHost114>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>114</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost114>
+ <QuaggaCliHost115>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>115</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost115>
+ <QuaggaCliHost116>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>116</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost116>
+ <QuaggaCliHost117>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>117</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost117>
+ <QuaggaCliHost118>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>118</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost118>
+ <QuaggaCliHost119>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>119</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost119>
+ <QuaggaCliHost120>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>120</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost120>
+ <QuaggaCliHost121>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>121</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost121>
+ <QuaggaCliHost122>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>122</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost122>
+ <QuaggaCliHost123>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>123</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost123>
+ <QuaggaCliHost124>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>124</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost124>
+ <QuaggaCliHost125>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>125</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost125>
+ <QuaggaCliHost126>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>126</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost126>
+ <QuaggaCliHost127>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>127</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost127>
+ <QuaggaCliHost128>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>128</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost128>
+ <QuaggaCliHost129>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>129</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost129>
+ <QuaggaCliHost130>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>130</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost130>
+ <QuaggaCliHost131>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>131</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost131>
+ <QuaggaCliHost132>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>132</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost132>
+ <QuaggaCliHost133>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>133</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost133>
+ <QuaggaCliHost134>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>134</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost134>
+ <QuaggaCliHost135>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>135</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost135>
+ <QuaggaCliHost136>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>136</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost136>
+ <QuaggaCliHost137>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>137</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost137>
+ <QuaggaCliHost138>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>138</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost138>
+ <QuaggaCliHost139>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>139</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost139>
+ <QuaggaCliHost140>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>140</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost140>
+ <QuaggaCliHost141>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>141</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost141>
+ <QuaggaCliHost142>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>142</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost142>
+ <QuaggaCliHost143>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>143</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost143>
+ <QuaggaCliHost144>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>144</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost144>
+ <QuaggaCliHost145>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>145</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost145>
+ <QuaggaCliHost146>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>146</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost146>
+ <QuaggaCliHost147>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>147</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost147>
+ <QuaggaCliHost148>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>148</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost148>
+ <QuaggaCliHost149>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>149</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost149>
+ <QuaggaCliHost150>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>150</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost150>
+ <QuaggaCliHost151>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>151</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost151>
+ <QuaggaCliHost152>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>152</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost152>
+ <QuaggaCliHost153>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>153</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost153>
+ <QuaggaCliHost154>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>154</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost154>
+ <QuaggaCliHost155>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>155</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost155>
+ <QuaggaCliHost156>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>156</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost156>
+ <QuaggaCliHost157>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>157</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost157>
+ <QuaggaCliHost158>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>158</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost158>
+ <QuaggaCliHost159>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>159</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost159>
+ <QuaggaCliHost160>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>160</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost160>
+ <QuaggaCliHost161>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>161</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost161>
+ <QuaggaCliHost162>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>162</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost162>
+ <QuaggaCliHost163>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>163</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost163>
+ <QuaggaCliHost164>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>164</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost164>
+ <QuaggaCliHost165>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>165</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost165>
+ <QuaggaCliHost166>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>166</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost166>
+ <QuaggaCliHost167>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>167</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost167>
+ <QuaggaCliHost168>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>168</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost168>
+ <QuaggaCliHost169>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>169</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost169>
+ <QuaggaCliHost170>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>170</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost170>
+ <QuaggaCliHost171>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>171</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost171>
+ <QuaggaCliHost172>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>172</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost172>
+ <QuaggaCliHost173>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>173</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost173>
+ <QuaggaCliHost174>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>174</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost174>
+ <QuaggaCliHost175>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>175</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost175>
+ <QuaggaCliHost176>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>176</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost176>
+ <QuaggaCliHost177>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>177</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost177>
+ <QuaggaCliHost178>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>178</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost178>
+ <QuaggaCliHost179>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>179</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost179>
+ <QuaggaCliHost180>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>180</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost180>
+ <QuaggaCliHost181>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>181</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost181>
+ <QuaggaCliHost182>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>182</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost182>
+ <QuaggaCliHost183>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>183</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost183>
+ <QuaggaCliHost184>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>184</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost184>
+ <QuaggaCliHost185>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>185</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost185>
+ <QuaggaCliHost186>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>186</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost186>
+ <QuaggaCliHost187>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>187</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost187>
+ <QuaggaCliHost188>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>188</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost188>
+ <QuaggaCliHost189>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>189</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost189>
+ <QuaggaCliHost190>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>190</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost190>
+ <QuaggaCliHost191>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>191</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost191>
+ <QuaggaCliHost192>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>192</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost192>
+ <QuaggaCliHost193>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>193</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost193>
+
+ <QuaggaCliHost194>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>194</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost194>
+ <QuaggaCliHost195>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>195</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost195>
+ <QuaggaCliHost196>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>196</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost196>
+ <QuaggaCliHost197>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>197</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost197>
+ <QuaggaCliHost198>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>198</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost198>
+ <QuaggaCliHost199>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>199</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost199>
+ <QuaggaCliHost200>
+ <host>127.0.0.1</host>
+ <user>admin</user>
+ <password>onos_test</password>
+ <type>QuaggaCliDriver</type>
+ <connect_order>200</connect_order>
+ <COMPONENTS> </COMPONENTS>
+ </QuaggaCliHost200>
+
+
</COMPONENT>
</TOPOLOGY>
+