blob: f46f0a5116046f8a5b34314e2ba93486f9b68aa2 [file] [log] [blame]
Jon Hall32c90f32021-06-24 16:32:44 -07001class SRpairedLeaves:
2 def __init__( self ):
3 self.default = ''
4
5 def CASE1( self, main ):
6 """
7 Connect to Pod
8 Check host dataplane connectivity
9 Collect logs and analyze results
10 """
11 try:
12 from tests.USECASE.SegmentRouting.SRStaging.dependencies.SRStagingTest import SRStagingTest
13 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
14 import datetime
15 import json
16 except ImportError as e:
17 main.log.exception( "SRStagingTest not found. Exiting the test" )
18 main.cleanAndExit()
19 try:
20 main.funcs
21 except ( NameError, AttributeError ):
22 main.funcs = SRStagingTest()
23
24 try:
25 main.log.debug( "loading parser script" )
26 import tests.USECASE.SegmentRouting.SRStaging.dependencies.log_breakdown as logParser
27 except ImportError as e:
28 main.log.exception( "Error running script" )
29 descPrefix = "Host Connectivity"
30 pod = main.params['GRAPH'].get( 'nodeCluster', "hardware" )
31 main.cfgName = 'CASE001'
32 main.funcs.setupTest( main,
33 topology='0x2',
34 onosNodes=3,
35 description="%s tests on the %s pod" % ( descPrefix, pod ) )
36 switches = int( main.params[ 'TOPO' ][ 'switchNum' ] )
37 links = int( main.params[ 'TOPO' ][ 'linkNum' ] )
38 hosts = [ 'h1', 'h2', 'h3', 'mgmt' ]
39 run.verifyTopology( main, switches, links, main.Cluster.numCtrls )
40 #run.loadChart( main ) # stores hosts to ping and expected results
41 #run.pingAll( main, useScapy=False )
42 run.verifyPing( main, hosts, hosts )
43 #main.funcs.cleanup( main )
44 # run.verifyTraffic
45
46 def CASE2( self, main ):
47 """
48 Connect to Pod
49 Check host to gateway connectivity
50 Collect logs and analyze results
51 """
52 try:
53 from tests.USECASE.SegmentRouting.SRStaging.dependencies.SRStagingTest import SRStagingTest
54 import json
55 except ImportError:
56 main.log.error( "SRStagingTest not found. Exiting the test" )
57 main.cleanAndExit()
58 try:
59 main.funcs
60 except ( NameError, AttributeError ):
61 main.funcs = SRStagingTest()
62
63 descPrefix = "Host to gateway connectivity"
64 pod = main.params['GRAPH'].get( 'nodeCluster', "hardware" )
65 main.funcs.setupTest( main,
66 topology='0x2',
67 onosNodes=3,
68 description="%s tests on the %s pod" % ( descPrefix, pod ) )
69 run.pingAllFabricIntfs( main, hosts, dumpFlows=False )
70 #main.funcs.cleanup( main )