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 | 519072e | 2016-06-23 13:30:48 -0700 | [diff] [blame] | 21 | # CASE1: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience |
| 22 | # CASE2: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience |
| 23 | # CASE3: Single switch + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience |
| 24 | |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 25 | |
Flavio Castro | 519072e | 2016-06-23 13:30:48 -0700 | [diff] [blame] | 26 | class SROnosFailure: |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 27 | |
Flavio Castro | 519072e | 2016-06-23 13:30:48 -0700 | [diff] [blame] | 28 | def __init__( self ): |
| 29 | self.default = '' |
| 30 | |
| 31 | def CASE1( self, main ): |
| 32 | """ |
| 33 | Sets up 3-node Onos-cluster |
| 34 | Start 2x2 Leaf-Spine topology |
| 35 | Pingall |
| 36 | Induce ONOS Failure |
| 37 | Pingall |
| 38 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 39 | try: |
| 40 | from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs |
| 41 | except ImportError: |
| 42 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 43 | main.cleanAndExit() |
| 44 | try: |
| 45 | main.funcs |
| 46 | except ( NameError, AttributeError ): |
| 47 | main.funcs = SROnosFailureFuncs() |
| 48 | main.funcs.runTest( main, 1, 3, |
| 49 | '2x2', 116 ) |
Flavio Castro | 519072e | 2016-06-23 13:30:48 -0700 | [diff] [blame] | 50 | |
| 51 | def CASE2( self, main ): |
| 52 | """ |
| 53 | Sets up 3-node Onos-cluster |
| 54 | Start 4x4 Leaf-Spine topology |
| 55 | Pingall |
| 56 | Induce ONOS Failure |
| 57 | Pingall |
| 58 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 59 | try: |
| 60 | from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs |
| 61 | except ImportError: |
| 62 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 63 | main.cleanAndExit() |
| 64 | try: |
| 65 | main.funcs |
| 66 | except ( NameError, AttributeError ): |
| 67 | main.funcs = SROnosFailureFuncs() |
| 68 | main.funcs.runTest( main, 2, 3, |
| 69 | '4x4', 350 ) |
Flavio Castro | 519072e | 2016-06-23 13:30:48 -0700 | [diff] [blame] | 70 | |
| 71 | def CASE3( self, main ): |
| 72 | """ |
| 73 | Sets up 3-node Onos-cluster |
| 74 | Start single switch topology |
| 75 | Pingall |
| 76 | Induce ONOS Failure |
| 77 | Pingall |
| 78 | """ |
Devin Lim | 57221b0 | 2018-02-14 15:45:36 -0800 | [diff] [blame] | 79 | try: |
| 80 | from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs |
| 81 | except ImportError: |
| 82 | main.log.error( "SRClusterRestartFuncs not found. Exiting the test" ) |
| 83 | main.cleanAndExit() |
| 84 | try: |
| 85 | main.funcs |
| 86 | except ( NameError, AttributeError ): |
| 87 | main.funcs = SROnosFailureFuncs() |
| 88 | main.funcs.runTest( main, 3, 3, |
| 89 | '0x1', 15 ) |