Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 1 | """ |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 2 | Copyright 2016 Open Networking Foundation ( ONF ) |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 3 | |
| 4 | Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>, |
| 5 | the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>, |
| 6 | or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg> |
| 7 | |
| 8 | TestON is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 2 of the License, or |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 11 | ( at your option ) any later version. |
Jeremy Ronquillo | b27ce4c | 2017-07-17 12:41:28 -0700 | [diff] [blame] | 12 | |
| 13 | TestON is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with TestON. If not, see <http://www.gnu.org/licenses/>. |
| 20 | """ |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 21 | # CASE1: 2x2 Leaf-Spine topo and test IP connectivity |
| 22 | # CASE2: 4x4 topo + IP connectivity test |
| 23 | # CASE3: Single switch topo + IP connectivity test |
| 24 | # CASE4: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test |
| 25 | # CASE5: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test |
| 26 | # CASE6: Single switch + 3-node ONOS CLUSTER + IP connectivity test |
| 27 | |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 28 | |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 29 | class SRDynamic: |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 30 | |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 31 | def __init__( self ): |
| 32 | self.default = '' |
| 33 | |
| 34 | def CASE1( self, main ): |
| 35 | """ |
| 36 | Sets up 1-node Onos-cluster |
| 37 | Start 2x2 Leaf-Spine topology |
| 38 | Pingall |
| 39 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 40 | try: |
| 41 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 42 | except ImportError: |
| 43 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 44 | main.cleanAndExit() |
| 45 | try: |
| 46 | main.funcs |
| 47 | except ( NameError, AttributeError ): |
| 48 | main.funcs = SRDynamicFuncs() |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 49 | |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 50 | main.funcs.runTest( main, 1, 1, '2x2', 116, 140, False ) |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 51 | |
| 52 | def CASE2( self, main ): |
| 53 | """ |
| 54 | Sets up 1-node Onos-cluster |
| 55 | Start 4x4 Leaf-Spine topology |
| 56 | Pingall |
| 57 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 58 | try: |
| 59 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 60 | except ImportError: |
| 61 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 62 | main.cleanAndExit() |
| 63 | try: |
| 64 | main.funcs |
| 65 | except ( NameError, AttributeError ): |
| 66 | main.funcs = SRDynamicFuncs() |
| 67 | |
| 68 | main.funcs.runTest( main, 2, 1, '4x4', 350, 380, False ) |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 69 | |
| 70 | def CASE3( self, main ): |
| 71 | """ |
| 72 | Sets up 1-node Onos-cluster |
| 73 | Start single switch topology |
| 74 | Pingall |
| 75 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 76 | try: |
| 77 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 78 | except ImportError: |
| 79 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 80 | main.cleanAndExit() |
| 81 | try: |
| 82 | main.funcs |
| 83 | except ( NameError, AttributeError ): |
| 84 | main.funcs = SRDynamicFuncs() |
| 85 | |
| 86 | main.funcs.runTest( main, 3, 1, '0x1', 15, 18, False ) |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 87 | |
| 88 | def CASE4( self, main ): |
| 89 | """ |
| 90 | Sets up 3-node Onos-cluster |
| 91 | Start 2x2 Leaf-Spine topology |
| 92 | Pingall |
| 93 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 94 | try: |
| 95 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 96 | except ImportError: |
| 97 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 98 | main.cleanAndExit() |
| 99 | try: |
| 100 | main.funcs |
| 101 | except ( NameError, AttributeError ): |
| 102 | main.funcs = SRDynamicFuncs() |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 103 | |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 104 | main.funcs.runTest( main, 4, 3, '2x2', 116, 140, True ) |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 105 | |
| 106 | def CASE5( self, main ): |
| 107 | """ |
| 108 | Sets up 3-node Onos-cluster |
| 109 | Start 4x4 Leaf-Spine topology |
| 110 | Pingall |
| 111 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 112 | try: |
| 113 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 114 | except ImportError: |
| 115 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 116 | main.cleanAndExit() |
| 117 | try: |
| 118 | main.funcs |
| 119 | except ( NameError, AttributeError ): |
| 120 | main.funcs = SRDynamicFuncs() |
| 121 | |
| 122 | main.funcs.runTest( main, 5, 3, '4x4', 350, 380, True ) |
Flavio Castro | ab163ca | 2016-07-07 14:05:00 -0700 | [diff] [blame] | 123 | |
| 124 | def CASE6( self, main ): |
| 125 | """ |
| 126 | Sets up 3-node Onos-cluster |
| 127 | Start single switch topology |
| 128 | Pingall |
| 129 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 130 | try: |
| 131 | from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs |
| 132 | except ImportError: |
| 133 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 134 | main.cleanAndExit() |
| 135 | try: |
| 136 | main.funcs |
| 137 | except ( NameError, AttributeError ): |
| 138 | main.funcs = SRDynamicFuncs() |
| 139 | |
| 140 | main.funcs.runTest( main, 6, 3, '0x1', 15, 20, True ) |