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 | 5608a39 | 2016-06-22 17:02:35 -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 |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 27 | |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 28 | |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 29 | class SRSanity: |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 30 | |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 31 | def __init__( self ): |
| 32 | self.default = '' |
| 33 | |
| 34 | def CASE1( self, main ): |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 35 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 36 | Sets up 1-node Onos-cluster |
| 37 | Start 2x2 Leaf-Spine topology |
| 38 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 39 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 40 | try: |
| 41 | from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 42 | except ImportError: |
| 43 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 44 | main.cleanAndExit() |
| 45 | try: |
| 46 | main.funcs |
| 47 | except ( NameError, AttributeError ): |
| 48 | main.funcs = SRSanityFuncs() |
| 49 | main.funcs.runTest( main, 1, 1, |
| 50 | '2x2', 116 ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 51 | |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 52 | def CASE2( self, main ): |
| 53 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 54 | Sets up 1-node Onos-cluster |
| 55 | Start 4x4 Leaf-Spine topology |
| 56 | Pingall |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 57 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 58 | try: |
| 59 | from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 60 | except ImportError: |
| 61 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 62 | main.cleanAndExit() |
| 63 | try: |
| 64 | main.funcs |
| 65 | except ( NameError, AttributeError ): |
| 66 | main.funcs = SRSanityFuncs() |
| 67 | main.funcs.runTest( main, 2, 1, |
| 68 | '4x4', 350 ) |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 69 | |
| 70 | def CASE3( self, main ): |
| 71 | """ |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 78 | except ImportError: |
| 79 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 80 | main.cleanAndExit() |
| 81 | try: |
| 82 | main.funcs |
| 83 | except ( NameError, AttributeError ): |
| 84 | main.funcs = SRSanityFuncs() |
| 85 | main.funcs.runTest( main, 3, 1, |
| 86 | '0x1', 15 ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -0700 | [diff] [blame] | 87 | |
| 88 | def CASE4( self, main ): |
| 89 | """ |
Flavio Castro | 0a05b8d | 2016-06-16 17:26:51 -0700 | [diff] [blame] | 90 | Sets up 3-node Onos-cluster |
| 91 | Start 2x2 Leaf-Spine topology |
Flavio Castro | f7faa42 | 2016-06-14 11:02:09 -0700 | [diff] [blame] | 92 | Pingall |
| 93 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 94 | try: |
| 95 | from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 96 | except ImportError: |
| 97 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 98 | main.cleanAndExit() |
| 99 | try: |
| 100 | main.funcs |
| 101 | except ( NameError, AttributeError ): |
| 102 | main.funcs = SRSanityFuncs() |
| 103 | main.funcs.runTest( main, 4, 3, |
| 104 | '2x2', 116 ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 114 | except ImportError: |
| 115 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 116 | main.cleanAndExit() |
| 117 | try: |
| 118 | main.funcs |
| 119 | except ( NameError, AttributeError ): |
| 120 | main.funcs = SRSanityFuncs() |
| 121 | main.funcs.runTest( main, 5, 3, |
| 122 | '4x4', 350 ) |
Flavio Castro | 02b4363 | 2016-06-20 17:07:27 -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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs |
| 132 | except ImportError: |
| 133 | main.log.error( "SRSanityFuncs not found. Exiting the test" ) |
| 134 | main.cleanAndExit() |
| 135 | try: |
| 136 | main.funcs |
| 137 | except ( NameError, AttributeError ): |
| 138 | main.funcs = SRSanityFuncs() |
| 139 | main.funcs.runTest( main, 6, 3, |
| 140 | '0x1', 15 ) |