blob: 1c9154030654b486174ba63286c88e8671bf6568 [file] [log] [blame]
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -08001# Testing the basic intent for ipv6 functionality of ONOS
2
3class FUNCipv6Intent:
4
5 def __init__( self ):
6 self.default = ''
7
8 def CASE1( self, main ):
9 import time
10 import imp
11 import re
12
13 """
14 - Construct tests variables
15 - GIT ( optional )
16 - Checkout ONOS master branch
17 - Pull latest ONOS code
18 - Building ONOS ( optional )
19 - Install ONOS package
20 - Build ONOS package
21 """
22
23 main.case( "Constructing test variables and building ONOS package" )
24 main.step( "Constructing test variables" )
25 main.caseExplanation = "This test case is mainly for loading " +\
26 "from params file, and pull and build the " +\
27 " latest ONOS package"
28 stepResult = main.FALSE
29
30 # Test variables
31 try:
32 main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
33 main.apps = main.params[ 'ENV' ][ 'cellApps' ]
34 gitBranch = main.params[ 'GIT' ][ 'branch' ]
35 main.dependencyPath = main.testOnDirectory + \
36 main.params[ 'DEPENDENCY' ][ 'path' ]
37 main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
38 main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
39 if main.ONOSbench.maxNodes:
40 main.maxNodes = int( main.ONOSbench.maxNodes )
41 else:
42 main.maxNodes = 0
43 wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
44 wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
45 wrapperFile3 = main.params[ 'DEPENDENCY' ][ 'wrapper3' ]
46 main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
47 main.checkIntentSleep = int( main.params[ 'SLEEP' ][ 'checkintent' ] )
48 main.removeIntentSleep = int( main.params[ 'SLEEP' ][ 'removeintent' ] )
49 main.rerouteSleep = int( main.params[ 'SLEEP' ][ 'reroute' ] )
50 main.fwdSleep = int( main.params[ 'SLEEP' ][ 'fwd' ] )
51 main.checkTopoAttempts = int( main.params[ 'SLEEP' ][ 'topoAttempts' ] )
52 gitPull = main.params[ 'GIT' ][ 'pull' ]
53 main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
54 main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
55 main.cellData = {} # for creating cell file
56 main.hostsData = {}
57 main.CLIs = []
58 main.ONOSip = []
59 main.assertReturnString = '' # Assembled assert return string
60
61 main.ONOSip = main.ONOSbench.getOnosIps()
62 print main.ONOSip
63
64 # Assigning ONOS cli handles to a list
65 for i in range( 1, main.maxNodes + 1 ):
66 main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
67
68 # -- INIT SECTION, ONLY RUNS ONCE -- #
69 main.startUp = imp.load_source( wrapperFile1,
70 main.dependencyPath +
71 wrapperFile1 +
72 ".py" )
73
74 main.intentFunction = imp.load_source( wrapperFile2,
75 main.dependencyPath +
76 wrapperFile2 +
77 ".py" )
78
79 main.topo = imp.load_source( wrapperFile3,
80 main.dependencyPath +
81 wrapperFile3 +
82 ".py" )
83
84 copyResult1 = main.ONOSbench.scp( main.Mininet1,
85 main.dependencyPath +
86 main.topology,
87 main.Mininet1.home,
88 direction="to" )
89 if main.CLIs:
90 stepResult = main.TRUE
91 else:
92 main.log.error( "Did not properly created list of ONOS CLI handle" )
93 stepResult = main.FALSE
94 except Exception as e:
95 main.log.exception(e)
96 main.cleanup()
97 main.exit()
98
99 utilities.assert_equals( expect=main.TRUE,
100 actual=stepResult,
101 onpass="Successfully construct " +
102 "test variables ",
103 onfail="Failed to construct test variables" )
104
105 if gitPull == 'True':
106 main.step( "Building ONOS in " + gitBranch + " branch" )
107 onosBuildResult = main.startUp.onosBuild( main, gitBranch )
108 stepResult = onosBuildResult
109 utilities.assert_equals( expect=main.TRUE,
110 actual=stepResult,
111 onpass="Successfully compiled " +
112 "latest ONOS",
113 onfail="Failed to compile " +
114 "latest ONOS" )
115 else:
116 main.log.warn( "Did not pull new code so skipping mvn " +
117 "clean install" )
118 main.ONOSbench.getVersion( report=True )
119
120 def CASE2( self, main ):
121 """
122 - Set up cell
123 - Create cell file
124 - Set cell file
125 - Verify cell file
126 - Kill ONOS process
127 - Uninstall ONOS cluster
128 - Verify ONOS start up
129 - Install ONOS cluster
130 - Connect to cli
131 """
132
133 # main.scale[ 0 ] determines the current number of ONOS controller
134 main.numCtrls = int( main.scale[ 0 ] )
135
136 main.case( "Starting up " + str( main.numCtrls ) +
137 " node(s) ONOS cluster" )
138 main.caseExplanation = "Set up ONOS with " + str( main.numCtrls ) +\
139 " node(s) ONOS cluster"
140
141
142
143 #kill off all onos processes
144 main.log.info( "Safety check, killing all ONOS processes" +
Jon Hall70b2ff42015-11-17 15:49:44 -0800145 " before initiating environment setup" )
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -0800146
147 for i in range( main.maxNodes ):
148 main.ONOSbench.onosDie( main.ONOSip[ i ] )
149
150 print "NODE COUNT = ", main.numCtrls
151
152 tempOnosIp = []
153 for i in range( main.numCtrls ):
154 tempOnosIp.append( main.ONOSip[i] )
155
156 main.ONOSbench.createCellFile( main.ONOSbench.ip_address,
157 "temp", main.Mininet1.ip_address,
158 main.apps, tempOnosIp )
159
160 main.step( "Apply cell to environment" )
161 cellResult = main.ONOSbench.setCell( "temp" )
162 verifyResult = main.ONOSbench.verifyCell()
163 stepResult = cellResult and verifyResult
164 utilities.assert_equals( expect=main.TRUE,
165 actual=stepResult,
166 onpass="Successfully applied cell to " + \
167 "environment",
168 onfail="Failed to apply cell to environment " )
sathishmad953462015-12-03 17:42:07 +0530169
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -0800170 main.step( "Creating ONOS package" )
171 packageResult = main.ONOSbench.onosPackage()
172 stepResult = packageResult
173 utilities.assert_equals( expect=main.TRUE,
174 actual=stepResult,
175 onpass="Successfully created ONOS package",
176 onfail="Failed to create ONOS package" )
177
178 time.sleep( main.startUpSleep )
179 main.step( "Uninstalling ONOS package" )
180 onosUninstallResult = main.TRUE
181 for ip in main.ONOSip:
182 onosUninstallResult = onosUninstallResult and \
183 main.ONOSbench.onosUninstall( nodeIp=ip )
184 stepResult = onosUninstallResult
185 utilities.assert_equals( expect=main.TRUE,
186 actual=stepResult,
187 onpass="Successfully uninstalled ONOS package",
188 onfail="Failed to uninstall ONOS package" )
189
190 time.sleep( main.startUpSleep )
191 main.step( "Installing ONOS package" )
192 onosInstallResult = main.TRUE
193 for i in range( main.numCtrls ):
194 onosInstallResult = onosInstallResult and \
195 main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
196 stepResult = onosInstallResult
197 utilities.assert_equals( expect=main.TRUE,
198 actual=stepResult,
199 onpass="Successfully installed ONOS package",
200 onfail="Failed to install ONOS package" )
201
202 time.sleep( main.startUpSleep )
203 main.step( "Starting ONOS service" )
204 stopResult = main.TRUE
205 startResult = main.TRUE
206 onosIsUp = main.TRUE
207
208 for i in range( main.numCtrls ):
209 onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
210 if onosIsUp == main.TRUE:
211 main.log.report( "ONOS instance is up and ready" )
212 else:
213 main.log.report( "ONOS instance may not be up, stop and " +
214 "start ONOS again " )
215
216 for i in range( main.numCtrls ):
217 stopResult = stopResult and \
218 main.ONOSbench.onosStop( main.ONOSip[ i ] )
219 for i in range( main.numCtrls ):
220 startResult = startResult and \
221 main.ONOSbench.onosStart( main.ONOSip[ i ] )
222 stepResult = onosIsUp and stopResult and startResult
223 utilities.assert_equals( expect=main.TRUE,
224 actual=stepResult,
225 onpass="ONOS service is ready",
226 onfail="ONOS service did not start properly" )
227
228 main.step( "Start ONOS cli" )
229 cliResult = main.TRUE
230 for i in range( main.numCtrls ):
231 cliResult = cliResult and \
232 main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
233 stepResult = cliResult
234 utilities.assert_equals( expect=main.TRUE,
235 actual=stepResult,
236 onpass="Successfully start ONOS cli",
237 onfail="Failed to start ONOS cli" )
238
Jon Hall11845ed2016-02-11 11:25:31 -0800239 main.step( "Checking that ONOS is ready" )
sathishmad953462015-12-03 17:42:07 +0530240 for i in range( 3 ):
Jon Hall11845ed2016-02-11 11:25:31 -0800241 ready = True
Jeremy5f820072016-02-11 13:50:35 -0800242 for i in range( int( main.scale[ 0 ] ) ):
243 output = main.CLIs[ i ].summary()
Jon Hall11845ed2016-02-11 11:25:31 -0800244 if not output:
245 ready = False
246 time.sleep( 30 )
247 utilities.assert_equals( expect=True, actual=ready,
248 onpass="ONOS summary command succeded",
249 onfail="ONOS summary command failed" )
250 if not ready:
251 main.cleanup()
252 main.exit()
253
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530254 main.step( "setup the ipv6NeighbourDiscovery" )
255 cfgResult1 = main.CLIs[0].setCfg( "org.onosproject.proxyarp.ProxyArp", "ipv6NeighborDiscovery", "true" )
256 cfgResult2 = main.CLIs[0].setCfg( "org.onosproject.provider.host.impl.HostLocationProvider", "ipv6NeighborDiscovery", "true" )
257 cfgResult = cfgResult1 and cfgResult2
258 utilities.assert_equals( expect=main.TRUE, actual=cfgResult,
259 onpass="ipv6NeighborDiscovery cfg is set to true",
260 onfail="Failed to cfg set ipv6NeighborDiscovery" )
261
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -0800262 # Remove the first element in main.scale list
263 main.scale.remove( main.scale[ 0 ] )
264
265 main.intentFunction.report( main )
266
267 def CASE11( self, main ):
268 """
269 Start Mininet topology with OF 1.3 switches
270 """
271 main.OFProtocol = "1.3"
272 main.log.report( "Start Mininet topology with OF 1.3 switches" )
273 main.case( "Start Mininet topology with OF 1.3 switches" )
274 main.caseExplanation = "Start mininet topology with OF 1.3 " +\
275 "switches to test intents, exits out if " +\
276 "topology did not start correctly"
277
278 main.step( "Starting Mininet topology with OF 1.3 switches" )
279 args = "--switch ovs,protocols=OpenFlow13"
280 topoResult = main.Mininet1.startNet( topoFile=main.dependencyPath +
281 main.topology,
282 args=args )
283 stepResult = topoResult
284 utilities.assert_equals( expect=main.TRUE,
285 actual=stepResult,
286 onpass="Successfully loaded topology",
287 onfail="Failed to load topology" )
288 # Exit if topology did not load properly
289 if not topoResult:
290 main.cleanup()
291 main.exit()
292
293 def CASE12( self, main ):
294 """
295 Assign mastership to controllers
296 """
297 import re
298
299 main.case( "Assign switches to controllers" )
300 main.step( "Assigning switches to controllers" )
301 main.caseExplanation = "Assign OF " + main.OFProtocol +\
302 " switches to ONOS nodes"
303
304 assignResult = main.TRUE
305 switchList = []
306
307 # Creates a list switch name, use getSwitch() function later...
308 for i in range( 1, ( main.numSwitch + 1 ) ):
309 switchList.append( 's' + str( i ) )
310
311 tempONOSip = []
312 for i in range( main.numCtrls ):
313 tempONOSip.append( main.ONOSip[ i ] )
314
315 assignResult = main.Mininet1.assignSwController( sw=switchList,
316 ip=tempONOSip,
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530317 port='6633' )
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -0800318 if not assignResult:
319 main.cleanup()
320 main.exit()
321
322 for i in range( 1, ( main.numSwitch + 1 ) ):
323 response = main.Mininet1.getSwController( "s" + str( i ) )
324 print( "Response is " + str( response ) )
325 if re.search( "tcp:" + main.ONOSip[ 0 ], response ):
326 assignResult = assignResult and main.TRUE
327 else:
328 assignResult = main.FALSE
329 stepResult = assignResult
330 utilities.assert_equals( expect=main.TRUE,
331 actual=stepResult,
332 onpass="Successfully assigned switches" +
333 "to controller",
334 onfail="Failed to assign switches to " +
335 "controller" )
336
sathishmad953462015-12-03 17:42:07 +0530337 def CASE13( self, main ):
338 """
339 Discover all hosts and store its data to a dictionary
340 """
341 main.case( "Discover all hosts" )
342
343 stepResult = main.TRUE
344 main.step( "Discover all hosts using pingall " )
345 stepResult = main.intentFunction.getHostsData( main )
346 utilities.assert_equals( expect=main.TRUE,
347 actual=stepResult,
348 onpass="Successfully discovered hosts",
349 onfail="Failed to discover hosts" )
350
Subhash Kumar Singhc73b3a72015-11-03 21:34:04 -0800351 def CASE14( self, main ):
352 """
353 Stop mininet
354 """
355 main.log.report( "Stop Mininet topology" )
356 main.case( "Stop Mininet topology" )
357 main.caseExplanation = "Stopping the current mininet topology " +\
358 "to start up fresh"
359
360 main.step( "Stopping Mininet Topology" )
361 topoResult = main.Mininet1.stopNet( )
362 stepResult = topoResult
363 utilities.assert_equals( expect=main.TRUE,
364 actual=stepResult,
365 onpass="Successfully stop mininet",
366 onfail="Failed to stop mininet" )
367 # Exit if topology did not load properly
368 if not topoResult:
369 main.cleanup()
370 main.exit()
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530371
372 def CASE2000( self, main ):
373 """
374 add point intents between 2 hosts:
375 - Get device ids | ports
376 - Add point intents
377 - Check intents
378 - Verify flows
379 - Ping hosts
380 - Reroute
381 - Link down
382 - Verify flows
383 - Check topology
384 - Ping hosts
385 - Link up
386 - Verify flows
387 - Check topology
388 - Ping hosts
389 - Remove intents
390 """
391 import time
392 import json
393 import re
394
395 # Assert variables - These variable's name|format must be followed
396 # if you want to use the wrapper function
397 assert main, "There is no main"
398 assert main.CLIs, "There is no main.CLIs"
399 assert main.Mininet1, "Mininet handle should be named Mininet1"
400 assert main.numSwitch, "Placed the total number of switch topology in \
401 main.numSwitch"
402
403 main.testName = "Point Intents"
404 main.case( main.testName + " Test - " + str( main.numCtrls ) +
405 " NODE(S) - OF " + main.OFProtocol )
406 main.caseExplanation = "This test case will test point to point" +\
407 " intents using " + str( main.numCtrls ) +\
408 " node(s) cluster;\n" +\
409 "Different type of hosts will be tested in " +\
410 "each step such as IPV4, Dual stack, VLAN etc" +\
411 ";\nThe test will use OF " + main.OFProtocol +\
412 " OVS running in Mininet"
413
414 # No option point intents
415 main.step( "NOOPTION: Add point intents between h1 and h9, ipv6 hosts" )
416 main.assertReturnString = "Assertion Result for NOOPTION point intent\n"
417 stepResult = main.TRUE
418 stepResult = main.intentFunction.pointIntent(
419 main,
420 name="NOOPTION",
421 host1="h1",
422 host2="h9",
423 deviceId1="of:0000000000000005/1",
424 deviceId2="of:0000000000000006/1")
425
426 utilities.assert_equals( expect=main.TRUE,
427 actual=stepResult,
428 onpass=main.assertReturnString,
429 onfail=main.assertReturnString )
sathishmad953462015-12-03 17:42:07 +0530430 """
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530431 stepResult = main.TRUE
432 main.step( "IPV6: Add point intents between h1 and h9" )
433 main.assertReturnString = "Assertion Result for IPV6 point intent\n"
434 stepResult = main.intentFunction.pointIntent(
435 main,
436 name="IPV6",
437 host1="h1",
438 host2="h9",
439 deviceId1="of:0000000000000005/1",
440 deviceId2="of:0000000000000006/1",
441 port1="",
442 port2="",
443 ethType="IPV6",
444 mac1="00:00:00:00:00:01",
445 mac2="00:00:00:00:00:09",
446 bandwidth="",
447 lambdaAlloc=False,
448 ipProto="",
449 ip1="",
450 ip2="",
451 tcp1="",
452 tcp2="",
453 expectedLink=18 )
454
455 utilities.assert_equals( expect=main.TRUE,
456 actual=stepResult,
457 onpass=main.assertReturnString,
458 onfail=main.assertReturnString )
459
460 main.step( "IPV6_2: Add point intents between h1 and h9" )
461 main.assertReturnString = "Assertion Result for IPV6 no mac address point intents\n"
462 stepResult = main.intentFunction.pointIntent(
463 main,
464 name="IPV6_2",
465 host1="h1",
466 host2="h9",
467 deviceId1="of:0000000000000005/1",
468 deviceId2="of:0000000000000006/1",
469 ipProto="",
470 ip1="",
471 ip2="",
472 tcp1="",
473 tcp2="",
474 expectedLink=18 )
475
476 utilities.assert_equals( expect=main.TRUE,
477 actual=stepResult,
478 onpass=main.assertReturnString,
479 onfail=main.assertReturnString )
sathishmad953462015-12-03 17:42:07 +0530480
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530481 main.step( "SDNIP-ICMP: Add point intents between h1 and h9" )
sathishmad953462015-12-03 17:42:07 +0530482 main.assertReturnString = "Assertion Result for SDNIP-ICMP IPV6 using ICMP point intents\n"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530483 mac1 = main.hostsData[ 'h1' ][ 'mac' ]
484 mac2 = main.hostsData[ 'h9' ][ 'mac' ]
sathishmad953462015-12-03 17:42:07 +0530485 main.log.debug(mac2)
486
487 # TODO : Fix is IPv6 arg format
488 # when we install the intent "add-point-intent --ethType IPV6 --ethSrc 00:00:00:00:00:01
489 # --ethDst 00:00:00:00:00:09 --ipProto 1 --ipSrc 10:1::1/128 --ipDst 10:1::5/128
490 # of:0000000000000005/1 of:0000000000000006/1" controller reports following error :
491 # Malformed IP prefix string: 10:1::1. Address must take form "x.x.x.x/y" or "xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/y"
492 #ip1 = main.Mininet1.getIPAddress( 'h1', proto='IPV6' )
493 #ip2 = main.Mininet1.getIPAddress( 'h9', proto='IPV6')
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530494
495 ipProto = main.params[ 'SDNIP' ][ 'icmpProto' ]
496 # Uneccessary, not including this in the selectors
sathishmad953462015-12-03 17:42:07 +0530497 #tcp1 = main.params[ 'SDNIP' ][ 'srcPort' ]
498 #tcp2 = main.params[ 'SDNIP' ][ 'dstPort' ]
499 ip1 = str( main.hostsData[ 'h1' ][ 'ipAddresses' ][ 0 ] ) + "/128"
500 ip2 = str( main.hostsData[ 'h9' ][ 'ipAddresses' ][ 0 ] ) + "/128"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530501
502 stepResult = main.intentFunction.pointIntent(
503 main,
504 name="SDNIP-ICMP",
505 host1="h1",
506 host2="h9",
507 deviceId1="of:0000000000000005/1",
508 deviceId2="of:0000000000000006/1",
509 mac1=mac1,
510 mac2=mac2,
511 ethType="IPV6",
512 ipProto=ipProto,
513 ip1=ip1,
514 ip2=ip2 )
515
516 utilities.assert_equals( expect=main.TRUE,
517 actual=stepResult,
518 onpass=main.assertReturnString,
519 onfail=main.assertReturnString )
sathishmad953462015-12-03 17:42:07 +0530520 """
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530521 main.step( "SDNIP-TCP: Add point intents between h1 and h9" )
sathishmad953462015-12-03 17:42:07 +0530522 main.assertReturnString = "Assertion Result for SDNIP-TCP IPV6 using TCP point intents\n"
523 mac1 = main.hostsData[ 'h3' ][ 'mac' ]
524 mac2 = main.hostsData[ 'h11' ][ 'mac' ]
525 ip1 = str( main.hostsData[ 'h3' ][ 'ipAddresses' ][ 0 ] ) + "/128"
526 ip2 = str( main.hostsData[ 'h11' ][ 'ipAddresses' ][ 0 ] ) + "/128"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530527 ipProto = main.params[ 'SDNIP' ][ 'tcpProto' ]
528 tcp1 = main.params[ 'SDNIP' ][ 'srcPort' ]
529 tcp2 = main.params[ 'SDNIP' ][ 'dstPort' ]
530
531 stepResult = main.intentFunction.pointIntentTcp(
532 main,
533 name="SDNIP-TCP",
sathishmad953462015-12-03 17:42:07 +0530534 host1="h3",
535 host2="h11",
536 deviceId1="of:0000000000000005/3",
537 deviceId2="of:0000000000000006/3",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530538 mac1=mac1,
539 mac2=mac2,
540 ethType="IPV4",
541 ipProto=ipProto,
542 ip1=ip1,
543 ip2=ip2,
544 tcp1=tcp1,
545 tcp2=tcp2 )
546
547 utilities.assert_equals( expect=main.TRUE,
sathishmad953462015-12-03 17:42:07 +0530548 actual=stepResult,
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530549 onpass=main.assertReturnString,
550 onfail=main.assertReturnString )
sathishmad953462015-12-03 17:42:07 +0530551 """
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530552 main.step( "DUALSTACK1: Add point intents between h3 and h11" )
sathishmad953462015-12-03 17:42:07 +0530553 main.assertReturnString = "Assertion Result for Dualstack1 IPV6 with mac address point intents\n"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530554 stepResult = main.intentFunction.pointIntent(
555 main,
556 name="DUALSTACK1",
557 host1="h3",
558 host2="h11",
sathishmad953462015-12-03 17:42:07 +0530559 deviceId1="of:0000000000000005/3",
560 deviceId2="of:0000000000000006/3",
561 port1="",
562 port2="",
563 ethType="IPV6",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530564 mac1="00:00:00:00:00:03",
565 mac2="00:00:00:00:00:0B",
566 bandwidth="",
567 lambdaAlloc=False,
568 ipProto="",
569 ip1="",
570 ip2="",
571 tcp1="",
572 tcp2="",
sathishmad953462015-12-03 17:42:07 +0530573 sw1="",
574 sw2="",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530575 expectedLink=18 )
576
577 utilities.assert_equals( expect=main.TRUE,
578 actual=stepResult,
579 onpass=main.assertReturnString,
580 onfail=main.assertReturnString )
581
sathishmad953462015-12-03 17:42:07 +0530582 main.step( "VLAN: Add point intents between h5 and h24" )
583 main.assertReturnString = "Assertion Result for VLAN IPV6 with mac address point intents\n"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530584 stepResult = main.intentFunction.pointIntent(
585 main,
586 name="VLAN",
587 host1="h5",
sathishmad953462015-12-03 17:42:07 +0530588 host2="h24",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530589 deviceId1="of:0000000000000005/5",
sathishmad953462015-12-03 17:42:07 +0530590 deviceId2="of:0000000000000007/8",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530591 port1="",
592 port2="",
sathishmad953462015-12-03 17:42:07 +0530593 ethType="IPV6",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530594 mac1="00:00:00:00:00:05",
sathishmad953462015-12-03 17:42:07 +0530595 mac2="00:00:00:00:00:18",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530596 bandwidth="",
597 lambdaAlloc=False,
598 ipProto="",
599 ip1="",
600 ip2="",
601 tcp1="",
602 tcp2="",
sathishmad953462015-12-03 17:42:07 +0530603 sw1="",
604 sw2="",
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530605 expectedLink=18 )
606
607 utilities.assert_equals( expect=main.TRUE,
608 actual=stepResult,
609 onpass=main.assertReturnString,
610 onfail=main.assertReturnString )
sathishmad953462015-12-03 17:42:07 +0530611
612 main.step( "1HOP: Add point intents between h1 and h9" )
613 main.assertReturnString = "Assertion Result for 1HOP IPV6 with no mac address point intents\n"
Subhash Kumar Singh5ea4d302015-11-05 14:36:52 +0530614 stepResult = main.intentFunction.hostIntent( main,
615 name='1HOP',
616 host1='h1',
617 host2='h9',
618 host1Id='00:00:00:00:00:01/-1',
619 host2Id='00:00:00:00:00:09/-1')
620
621 utilities.assert_equals( expect=main.TRUE,
622 actual=stepResult,
623 onpass=main.assertReturnString,
624 onfail=main.assertReturnString )
625 """
626 main.intentFunction.report( main )