Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 1 | # 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 Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 5 | |
| 6 | class SRSanity: |
| 7 | |
| 8 | def __init__( self ): |
| 9 | self.default = '' |
| 10 | |
| 11 | def CASE1( self, main ): |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 12 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 13 | Sets up 1-node Onos-cluster |
| 14 | Start 2x2 Leaf-Spine topology |
| 15 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 16 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 17 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run |
| 18 | if not hasattr(main,'apps'): |
| 19 | run.initTest(main) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 20 | |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 21 | description = "Bridging and Routing sanity test with 2x2 Leaf-spine " |
| 22 | main.case( description ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 23 | |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 24 | 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 Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 37 | |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 38 | def CASE2( self, main ): |
| 39 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 40 | Sets up 1-node Onos-cluster |
| 41 | Start 4x4 Leaf-Spine topology |
| 42 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 43 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 44 | 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 Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 62 | |
| 63 | def CASE3( self, main ): |
| 64 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 65 | Sets up 3-node Onos-cluster |
| 66 | Start 2x2 Leaf-Spine topology |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 67 | Pingall |
| 68 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 69 | 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 Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 73 | main.case( description ) |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 74 | 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) |