blob: 77e90e38ef0a59f2a8fdd02933163245afd0116b [file] [log] [blame]
Flavio Castro0a05b8d2016-06-16 17:26:51 -07001# This test should always succeed. it runs cases 1,2,3
2#CASE1: 2x2 Leaf-Spine topo and test IP connectivity
3#CASE2: 4x4 topo + IP connectivity test
4#CASE3: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test
Flavio Castrof7faa422016-06-14 11:02:09 -07005
6class SRSanity:
7
8 def __init__( self ):
9 self.default = ''
10
11 def CASE1( self, main ):
Flavio Castrof7faa422016-06-14 11:02:09 -070012 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070013 Sets up 1-node Onos-cluster
14 Start 2x2 Leaf-Spine topology
15 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070016 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070017 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
18 if not hasattr(main,'apps'):
19 run.initTest(main)
Flavio Castrof7faa422016-06-14 11:02:09 -070020
Flavio Castro0a05b8d2016-06-16 17:26:51 -070021 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
22 main.case( description )
Flavio Castrof7faa422016-06-14 11:02:09 -070023
Flavio Castro0a05b8d2016-06-16 17:26:51 -070024 main.cfgName = '2x2'
25 main.numCtrls = 1
26 run.installOnos(main)
27 run.startMininet(main, 'cord_fabric.py')
28 #pre-configured routing and bridging test
29 run.checkFlows(main, flowCount=116)
30 run.pingAll(main, "CASE1")
31 #TODO Dynamic config of hosts in subnet
32 #TODO Dynamic config of host not in subnet
33 #TODO Dynamic config of vlan xconnect
34 #TODO Vrouter integration
35 #TODO Mcast integration
36 run.cleanup(main)
Flavio Castrof7faa422016-06-14 11:02:09 -070037
Flavio Castrof7faa422016-06-14 11:02:09 -070038 def CASE2( self, main ):
39 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070040 Sets up 1-node Onos-cluster
41 Start 4x4 Leaf-Spine topology
42 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070043 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070044 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
45 if not hasattr(main,'apps'):
46 run.initTest(main)
47 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
48 main.case( description )
49 main.cfgName = '4x4'
50 main.numCtrls = 1
51 run.installOnos(main)
52 run.startMininet(main, 'cord_fabric.py', args="--leaf=4 --spine=4")
53 #pre-configured routing and bridging test
54 run.checkFlows(main, flowCount=350)
55 run.pingAll(main, 'CASE2')
56 #TODO Dynamic config of hosts in subnet
57 #TODO Dynamic config of host not in subnet
58 #TODO Dynamic config of vlan xconnect
59 #TODO Vrouter integration
60 #TODO Mcast integration
61 run.cleanup(main)
Flavio Castrof7faa422016-06-14 11:02:09 -070062
63 def CASE3( self, main ):
64 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070065 Sets up 3-node Onos-cluster
66 Start 2x2 Leaf-Spine topology
Flavio Castrof7faa422016-06-14 11:02:09 -070067 Pingall
68 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070069 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
70 if not hasattr(main,'apps'):
71 run.initTest(main)
72 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
Flavio Castrof7faa422016-06-14 11:02:09 -070073 main.case( description )
Flavio Castro0a05b8d2016-06-16 17:26:51 -070074 main.cfgName = '2x2'
75 main.numCtrls = 3
76 run.installOnos(main)
77 run.startMininet(main, 'cord_fabric.py')
78 #pre-configured routing and bridging test
79 run.checkFlows(main, flowCount=116)
80 run.pingAll(main, 'CASE3')
81 #TODO Dynamic config of hosts in subnet
82 #TODO Dynamic config of host not in subnet
83 #TODO Dynamic config of vlan xconnect
84 #TODO Vrouter integration
85 #TODO Mcast integration
86 run.cleanup(main)