Flavio Castro | 5608a39 | 2016-06-22 17:02:35 -0700 | [diff] [blame] | 1 | # CASE1: 2x2 Leaf-Spine topo and test IP connectivity |
| 2 | # CASE2: 4x4 topo + IP connectivity test |
| 3 | # CASE3: Single switch topo + IP connectivity test |
| 4 | # CASE4: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test |
| 5 | # CASE5: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test |
| 6 | # CASE6: Single switch + 3-node ONOS CLUSTER + IP connectivity test |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 7 | |
| 8 | class SRSanity: |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 9 | def __init__( self ): |
| 10 | self.default = '' |
| 11 | |
| 12 | def CASE1( self, main ): |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 13 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 14 | Sets up 1-node Onos-cluster |
| 15 | Start 2x2 Leaf-Spine topology |
| 16 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 17 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 18 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 19 | Testcaselib as run |
| 20 | if not hasattr( main, 'apps' ): |
| 21 | run.initTest( main ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 22 | |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 23 | description = "Bridging and Routing sanity test with 2x2 Leaf-spine " |
| 24 | main.case( description ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 25 | |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 26 | main.cfgName = '2x2' |
| 27 | main.numCtrls = 1 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 28 | run.installOnos( main ) |
| 29 | run.startMininet( main, 'cord_fabric.py' ) |
| 30 | # pre-configured routing and bridging test |
| 31 | run.checkFlows( main, minFlowCount=116 ) |
| 32 | run.pingAll( main, "CASE1" ) |
| 33 | # TODO Dynamic config of hosts in subnet |
| 34 | # TODO Dynamic config of host not in subnet |
| 35 | # TODO Dynamic config of vlan xconnect |
| 36 | # TODO Vrouter integration |
| 37 | # TODO Mcast integration |
| 38 | run.cleanup( main ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 39 | |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 40 | def CASE2( self, main ): |
| 41 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 42 | Sets up 1-node Onos-cluster |
| 43 | Start 4x4 Leaf-Spine topology |
| 44 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 45 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 46 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 47 | Testcaselib as run |
| 48 | if not hasattr( main, 'apps' ): |
| 49 | run.initTest( main ) |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 50 | description = "Bridging and Routing sanity test with 4x4 Leaf-spine " |
| 51 | main.case( description ) |
| 52 | main.cfgName = '4x4' |
| 53 | main.numCtrls = 1 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 54 | run.installOnos( main ) |
| 55 | run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" ) |
| 56 | # pre-configured routing and bridging test |
| 57 | run.checkFlows( main, minFlowCount=350 ) |
| 58 | run.pingAll( main, 'CASE2' ) |
| 59 | # TODO Dynamic config of hosts in subnet |
| 60 | # TODO Dynamic config of host not in subnet |
| 61 | # TODO Dynamic config of vlan xconnect |
| 62 | # TODO Vrouter integration |
| 63 | # TODO Mcast integration |
| 64 | run.cleanup( main ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 65 | |
| 66 | def CASE3( self, main ): |
| 67 | """ |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 68 | Sets up 1-node Onos-cluster |
| 69 | Start single switch topology |
| 70 | Pingall |
| 71 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 72 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 73 | Testcaselib as run |
| 74 | if not hasattr( main, 'apps' ): |
| 75 | run.initTest( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 76 | description = "Bridging and Routing sanity test with single switch " |
| 77 | main.case( description ) |
| 78 | main.cfgName = '0x1' |
| 79 | main.numCtrls = 1 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 80 | run.installOnos( main ) |
| 81 | run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" ) |
| 82 | # pre-configured routing and bridging test |
| 83 | run.checkFlows( main, minFlowCount=15 ) |
| 84 | run.pingAll( main, 'CASE3' ) |
| 85 | # TODO Dynamic config of hosts in subnet |
| 86 | # TODO Dynamic config of host not in subnet |
| 87 | # TODO Dynamic config of vlan xconnect |
| 88 | # TODO Vrouter integration |
| 89 | # TODO Mcast integration |
| 90 | run.cleanup( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 91 | |
| 92 | def CASE4( self, main ): |
| 93 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 94 | Sets up 3-node Onos-cluster |
| 95 | Start 2x2 Leaf-Spine topology |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 96 | Pingall |
| 97 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 98 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 99 | Testcaselib as run |
| 100 | if not hasattr( main, 'apps' ): |
| 101 | run.initTest( main ) |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 102 | description = "Bridging and Routing sanity test with 2x2 Leaf-spine " |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 103 | main.case( description ) |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 104 | main.cfgName = '2x2' |
| 105 | main.numCtrls = 3 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 106 | run.installOnos( main ) |
| 107 | run.startMininet( main, 'cord_fabric.py' ) |
| 108 | # pre-configured routing and bridging test |
| 109 | run.checkFlows( main, minFlowCount=116 ) |
| 110 | run.pingAll( main, 'CASE4' ) |
| 111 | # TODO Dynamic config of hosts in subnet |
| 112 | # TODO Dynamic config of host not in subnet |
| 113 | # TODO Dynamic config of vlan xconnect |
| 114 | # TODO Vrouter integration |
| 115 | # TODO Mcast integration |
| 116 | run.cleanup( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 117 | |
| 118 | def CASE5( self, main ): |
| 119 | """ |
| 120 | Sets up 3-node Onos-cluster |
| 121 | Start 4x4 Leaf-Spine topology |
| 122 | Pingall |
| 123 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 124 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 125 | Testcaselib as run |
| 126 | if not hasattr( main, 'apps' ): |
| 127 | run.initTest( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 128 | description = "Bridging and Routing sanity test with 4x4 Leaf-spine " |
| 129 | main.case( description ) |
| 130 | main.cfgName = '4x4' |
| 131 | main.numCtrls = 3 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 132 | run.installOnos( main ) |
| 133 | run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" ) |
| 134 | # pre-configured routing and bridging test |
| 135 | run.checkFlows( main, minFlowCount=350 ) |
| 136 | run.pingAll( main, 'CASE5' ) |
| 137 | # TODO Dynamic config of hosts in subnet |
| 138 | # TODO Dynamic config of host not in subnet |
| 139 | # TODO Dynamic config of vlan xconnect |
| 140 | # TODO Vrouter integration |
| 141 | # TODO Mcast integration |
| 142 | run.cleanup( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 143 | |
| 144 | def CASE6( self, main ): |
| 145 | """ |
| 146 | Sets up 3-node Onos-cluster |
| 147 | Start single switch topology |
| 148 | Pingall |
| 149 | """ |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 150 | from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \ |
| 151 | Testcaselib as run |
| 152 | if not hasattr( main, 'apps' ): |
| 153 | run.initTest( main ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 154 | description = "Bridging and Routing sanity test with single switch " |
| 155 | main.case( description ) |
| 156 | main.cfgName = '0x1' |
| 157 | main.numCtrls = 3 |
Flavio Castro | 49c218d | 2016-06-21 16:55:57 -0700 | [diff] [blame] | 158 | run.installOnos( main ) |
| 159 | run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" ) |
| 160 | # pre-configured routing and bridging test |
| 161 | run.checkFlows( main, minFlowCount=15 ) |
| 162 | run.pingAll( main, 'CASE4' ) |
| 163 | # TODO Dynamic config of hosts in subnet |
| 164 | # TODO Dynamic config of host not in subnet |
| 165 | # TODO Dynamic config of vlan xconnect |
| 166 | # TODO Vrouter integration |
| 167 | # TODO Mcast integration |
| 168 | run.cleanup( main ) |