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 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 21 | class FUNCgroup: |
| 22 | |
| 23 | def __init__( self ): |
| 24 | self.default = '' |
| 25 | |
| 26 | def CASE1( self, main ): |
| 27 | import os |
| 28 | import imp |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 29 | """ |
| 30 | - Construct tests variables |
| 31 | - GIT ( optional ) |
| 32 | - Checkout ONOS master branch |
| 33 | - Pull latest ONOS code |
| 34 | - Building ONOS ( optional ) |
| 35 | - Install ONOS package |
| 36 | - Build ONOS package |
| 37 | """ |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 38 | try: |
| 39 | from tests.dependencies.ONOSSetup import ONOSSetup |
| 40 | main.testSetUp = ONOSSetup() |
| 41 | except ImportError: |
| 42 | main.log.error( "ONOSSetup not found. exiting the test" ) |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 43 | main.cleanAndExit() |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 44 | main.testSetUp.envSetupDescription() |
| 45 | stepResult = main.FALSE |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 46 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 47 | try: |
| 48 | # Test variables |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 49 | main.cellName = main.params[ 'ENV' ][ 'cellName' ] |
| 50 | main.apps = main.params[ 'ENV' ][ 'cellApps' ] |
| 51 | main.ONOSport = main.params[ 'CTRL' ][ 'port' ] |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 52 | main.dependencyPath = main.testOnDirectory + \ |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 53 | main.params[ 'DEPENDENCY' ][ 'path' ] |
| 54 | wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ] |
| 55 | wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ] |
| 56 | main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ] |
| 57 | bucket = main.params[ 'DEPENDENCY' ][ 'bucket' ] |
| 58 | main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] ) |
| 59 | main.startMNSleep = int( main.params[ 'SLEEP' ][ 'startMN' ] ) |
| 60 | main.addFlowSleep = int( main.params[ 'SLEEP' ][ 'addFlow' ] ) |
| 61 | main.delFlowSleep = int( main.params[ 'SLEEP' ][ 'delFlow' ] ) |
| 62 | main.addGroupSleep = int( main.params[ 'SLEEP' ][ 'addGroup' ] ) |
| 63 | main.delGroupSleep = int( main.params[ 'SLEEP' ][ 'delGroup' ] ) |
| 64 | main.debug = main.params[ 'DEBUG' ] |
| 65 | main.swDPID = main.params[ 'TEST' ][ 'swDPID' ] |
| 66 | egressPort1 = main.params[ 'TEST' ][ 'egressPort1' ] |
| 67 | egressPort2 = main.params[ 'TEST' ][ 'egressPort2' ] |
| 68 | egressPort3 = main.params[ 'TEST' ][ 'egressPort3' ] |
| 69 | ingressPort = main.params[ 'TEST' ][ 'ingressPort' ] |
| 70 | appCookie = main.params[ 'TEST' ][ 'appCookie' ] |
| 71 | type1 = main.params[ 'TEST' ][ 'type1' ] |
| 72 | type2 = main.params[ 'TEST' ][ 'type2' ] |
| 73 | groupId = main.params[ 'TEST' ][ 'groupId' ] |
| 74 | priority = main.params[ 'TEST' ][ 'priority' ] |
| 75 | deviceId = main.params[ 'TEST' ][ 'swDPID' ] |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 76 | main.scapyHostNames = main.params[ 'SCAPY' ][ 'HOSTNAMES' ].split( ',' ) |
| 77 | main.scapyHosts = [] # List of scapy hosts for iterating |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 78 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 79 | main.debug = True if "on" in main.debug else False |
| 80 | # -- INIT SECTION, ONLY RUNS ONCE -- # |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 81 | |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 82 | main.buckets = imp.load_source( bucket, |
| 83 | main.dependencyPath + |
| 84 | bucket + |
| 85 | ".py" ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 86 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 87 | stepResult = main.testSetUp.envSetup() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 88 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 89 | except Exception as e: |
| 90 | main.testSetUp.envSetupException( e ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 91 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 92 | main.testSetUp.evnSetupConclusion( stepResult ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 93 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 94 | def CASE2( self, main ): |
| 95 | """ |
| 96 | - Set up cell |
| 97 | - Create cell file |
| 98 | - Set cell file |
| 99 | - Verify cell file |
| 100 | - Kill ONOS process |
| 101 | - Uninstall ONOS cluster |
| 102 | - Verify ONOS start up |
| 103 | - Install ONOS cluster |
| 104 | - Connect to cli |
| 105 | """ |
You Wang | a0f6ff6 | 2018-01-11 15:46:30 -0800 | [diff] [blame] | 106 | main.testSetUp.ONOSSetUp( main.Cluster ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 107 | |
| 108 | def CASE3( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 109 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 110 | Start Mininet |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 111 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 112 | import json |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 113 | import time |
| 114 | try: |
| 115 | from tests.dependencies.topology import Topology |
| 116 | except ImportError: |
| 117 | main.log.error( "Topology not found exiting the test" ) |
Devin Lim | 4407596 | 2017-08-11 10:56:37 -0700 | [diff] [blame] | 118 | main.cleanAndExit() |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 119 | try: |
| 120 | main.topoRelated |
| 121 | except ( NameError, AttributeError ): |
| 122 | main.topoRelated = Topology() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 123 | |
| 124 | main.case( "Setup mininet and compare ONOS topology view to Mininet topology" ) |
| 125 | main.caseExplanation = "Start mininet with custom topology and compare topology " +\ |
| 126 | "elements between Mininet and ONOS" |
| 127 | |
You Wang | 84f981d | 2018-01-12 16:11:50 -0800 | [diff] [blame^] | 128 | main.step( "Copy Mininet topology file" ) |
| 129 | copyResult = main.ONOSbench.scp( main.Mininet1, |
| 130 | main.dependencyPath + main.topology, |
| 131 | main.Mininet1.home + '/custom/', |
| 132 | direction="to" ) |
| 133 | utilities.assert_equals( expect=main.TRUE, |
| 134 | actual=copyResult, |
| 135 | onpass="Successfully copy mininet topo file", |
| 136 | onfail="Failed to copy mininet topo file" ) |
| 137 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 138 | main.step( "Setup Mininet Topology" ) |
| 139 | topology = main.Mininet1.home + '/custom/' + main.topology |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 140 | stepResult = main.Mininet1.startNet( topoFile=topology ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 141 | |
| 142 | utilities.assert_equals( expect=main.TRUE, |
| 143 | actual=stepResult, |
| 144 | onpass="Successfully loaded topology", |
| 145 | onfail="Failed to load topology" ) |
| 146 | |
| 147 | main.step( "Assign switch to controller" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 148 | stepResult = main.Mininet1.assignSwController( "s1", main.Cluster.active( 0 ).ipAddress ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 149 | |
| 150 | utilities.assert_equals( expect=main.TRUE, |
| 151 | actual=stepResult, |
| 152 | onpass="Successfully assigned switch to controller", |
| 153 | onfail="Failed to assign switch to controller" ) |
| 154 | |
| 155 | time.sleep( main.startMNSleep ) |
| 156 | |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 157 | main.topoRelated.compareTopos( main.Mininet1 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 158 | |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 159 | main.step( "Create hosts and start scapy" ) |
| 160 | scapyResult = main.TRUE |
| 161 | for hostName in main.scapyHostNames: |
| 162 | main.Scapy.createHostComponent( hostName ) |
| 163 | main.scapyHosts.append( getattr( main, hostName ) ) |
| 164 | |
| 165 | main.step( "Start scapy components" ) |
| 166 | for host in main.scapyHosts: |
| 167 | host.startHostCli() |
| 168 | host.startScapy() |
| 169 | host.updateSelf() |
| 170 | main.log.debug( host.name ) |
| 171 | main.log.debug( host.hostIp ) |
| 172 | main.log.debug( host.hostMac ) |
| 173 | |
| 174 | utilities.assert_equals( expect=main.TRUE, |
| 175 | actual=scapyResult, |
| 176 | onpass="Successfully created Scapy Components", |
| 177 | onfail="Failed to discover Scapy Components" ) |
| 178 | |
You Wang | 84f981d | 2018-01-12 16:11:50 -0800 | [diff] [blame^] | 179 | def CASE11( self, main ): |
| 180 | """ |
| 181 | Connect to a physical network, assign controllers and start scapy |
| 182 | """ |
| 183 | import time |
| 184 | main.case( "Connecting to physical network" ) |
| 185 | |
| 186 | main.step( "Connecting to physical network" ) |
| 187 | topoResult = main.NetworkBench.connectToNet() |
| 188 | stepResult = topoResult |
| 189 | utilities.assert_equals( expect=main.TRUE, |
| 190 | actual=stepResult, |
| 191 | onpass="Successfully loaded topology", |
| 192 | onfail="Failed to load topology" ) |
| 193 | # Exit if topology did not load properly |
| 194 | if not topoResult: |
| 195 | main.cleanAndExit() |
| 196 | |
| 197 | main.step( "Assign switches to controllers." ) |
| 198 | assignResult = main.TRUE |
| 199 | for i in range( 1, 2 ): |
| 200 | assignResult = assignResult & main.NetworkBench.assignSwController( sw="s" + str( i ), |
| 201 | ip=main.Cluster.getIps(), |
| 202 | port='6653' ) |
| 203 | utilities.assert_equals( expect=main.TRUE, |
| 204 | actual=stepResult, |
| 205 | onpass="Successfully assign switches to controllers", |
| 206 | onfail="Failed to assign switches to controllers" ) |
| 207 | |
| 208 | main.step( "Start scapy" ) |
| 209 | scapyResult = main.TRUE |
| 210 | for hostName in main.scapyHostNames: |
| 211 | main.scapyHosts.append( getattr( main, hostName ) ) |
| 212 | |
| 213 | for host in main.scapyHosts: |
| 214 | host.startScapy() |
| 215 | host.updateSelf() |
| 216 | main.log.debug( host.name ) |
| 217 | main.log.debug( host.hostIp ) |
| 218 | main.log.debug( host.hostMac ) |
| 219 | |
| 220 | utilities.assert_equals( expect=main.TRUE, |
| 221 | actual=scapyResult, |
| 222 | onpass="Successfully created Scapy Components", |
| 223 | onfail="Failed to discover Scapy Components" ) |
| 224 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 225 | def CASE4( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 226 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 227 | Testing scapy |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 228 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 229 | main.case( "Testing scapy" ) |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 230 | for host in main.scapyHosts: |
| 231 | host.stopScapy() |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 232 | host.startScapy() |
| 233 | host.updateSelf() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 234 | main.log.debug( host.name ) |
| 235 | main.log.debug( host.hostIp ) |
| 236 | main.log.debug( host.hostMac ) |
| 237 | |
| 238 | main.step( "Sending/Receiving Test packet - Filter doesn't match" ) |
| 239 | main.log.info( "Starting Filter..." ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 240 | main.h2.startFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 241 | main.log.info( "Building Ether frame..." ) |
| 242 | main.h1.buildEther( dst=main.h2.hostMac ) |
| 243 | main.log.info( "Sending Packet..." ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 244 | main.h1.sendPacket() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 245 | main.log.info( "Checking Filter..." ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 246 | finished = main.h2.checkFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 247 | main.log.debug( finished ) |
| 248 | i = "" |
| 249 | if finished: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 250 | a = main.h2.readPackets() |
| 251 | for i in a.splitlines(): |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 252 | main.log.info( i ) |
| 253 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 254 | kill = main.h2.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 255 | main.log.debug( kill ) |
| 256 | main.h2.handle.sendline( "" ) |
| 257 | main.h2.handle.expect( main.h2.scapyPrompt ) |
| 258 | main.log.debug( main.h2.handle.before ) |
| 259 | utilities.assert_equals( expect=True, |
| 260 | actual="dst=00:00:00:00:00:02 src=00:00:00:00:00:01" in i, |
| 261 | onpass="Pass", |
| 262 | onfail="Fail" ) |
| 263 | |
| 264 | main.step( "Sending/Receiving Test packet - Filter matches" ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 265 | main.h2.startFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 266 | main.h1.buildEther( dst=main.h2.hostMac ) |
| 267 | main.h1.buildIP( dst=main.h2.hostIp ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 268 | main.h1.sendPacket() |
| 269 | finished = main.h2.checkFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 270 | i = "" |
| 271 | if finished: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 272 | a = main.h2.readPackets() |
| 273 | for i in a.splitlines(): |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 274 | main.log.info( i ) |
| 275 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 276 | kill = main.h2.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 277 | main.log.debug( kill ) |
| 278 | main.h2.handle.sendline( "" ) |
| 279 | main.h2.handle.expect( main.h2.scapyPrompt ) |
| 280 | main.log.debug( main.h2.handle.before ) |
| 281 | utilities.assert_equals( expect=True, |
| 282 | actual="dst=00:00:00:00:00:02 src=00:00:00:00:00:01" in i, |
| 283 | onpass="Pass", |
| 284 | onfail="Fail" ) |
| 285 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 286 | def CASE5( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 287 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 288 | Adding Group of type "ALL" using Rest api |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 289 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 290 | import json |
| 291 | import time |
| 292 | isAdded = main.FALSE |
| 293 | main.case( "Verify Group of type All are successfully Added" ) |
| 294 | main.caseExplanation = " Install a Group of type ALL " +\ |
| 295 | " Verify the Group is Added " +\ |
| 296 | " Add a flow using the group " +\ |
| 297 | " Send a packet that verifies the action bucket of the group" |
| 298 | |
| 299 | main.step( "Add Group using Rest api" ) |
| 300 | bucketList = [] |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 301 | bucket = main.buckets.addBucket( main, egressPort=egressPort1 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 302 | bucketList.append( bucket ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 303 | bucket = main.buckets.addBucket( main, egressPort=egressPort2 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 304 | bucketList.append( bucket ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 305 | bucket = main.buckets.addBucket( main, egressPort=egressPort3 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 306 | bucketList.append( bucket ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 307 | ctrl = main.Cluster.active( 0 ) |
| 308 | response = ctrl.REST.addGroup( deviceId=deviceId, |
| 309 | groupType=type1, |
| 310 | bucketList=bucketList, |
| 311 | appCookie=appCookie, |
| 312 | groupId=groupId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 313 | |
| 314 | utilities.assert_equals( expect=main.TRUE, |
| 315 | actual=response, |
| 316 | onpass="Successfully added Groups of type ALL", |
| 317 | onfail="Failed to add Groups of type ALL" ) |
| 318 | |
| 319 | # Giving ONOS time to add the group |
| 320 | time.sleep( main.addGroupSleep ) |
| 321 | |
| 322 | main.step( "Check groups are in ADDED state" ) |
| 323 | |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 324 | response = ctrl.REST.getGroups( deviceId=deviceId, |
| 325 | appCookie=appCookie ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 326 | responsejson = json.loads( response ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 327 | for item in responsejson: |
| 328 | if item[ "state" ] == "ADDED": |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 329 | isAdded = main.TRUE |
| 330 | |
| 331 | utilities.assert_equals( expect=main.TRUE, |
| 332 | actual=isAdded, |
| 333 | onpass="All Group is in Added State", |
| 334 | onfail="All Group is not in Added State" ) |
| 335 | |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 336 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 337 | Adding flow using rest api |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 338 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 339 | isAdded = main.FALSE |
| 340 | |
| 341 | main.step( "Adding flow with Group using rest api" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 342 | response = ctrl.REST.addFlow( deviceId=deviceId, |
| 343 | priority=priority, |
| 344 | ingressPort=ingressPort, |
| 345 | groupId=groupId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 346 | utilities.assert_equals( expect=main.TRUE, |
| 347 | actual=response, |
| 348 | onpass="Successfully Added Flows", |
| 349 | onfail="Failed to Add flows" ) |
| 350 | |
| 351 | # Giving ONOS time to add the flow |
| 352 | time.sleep( main.addFlowSleep ) |
| 353 | |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 354 | response = ctrl.REST.getFlows( deviceId=deviceId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 355 | responsejson = json.loads( response ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 356 | for item in responsejson: |
| 357 | if item[ "priority" ] == int( priority ) and item[ "state" ] == "ADDED": |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 358 | isAdded = main.TRUE |
| 359 | |
| 360 | utilities.assert_equals( expect=main.TRUE, |
| 361 | actual=isAdded, |
| 362 | onpass="Flow is in Added State", |
| 363 | onfail="Flow is not in Added State" ) |
| 364 | |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 365 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 366 | Sends a packet using scapy |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 367 | """ |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 368 | main.step( "Testing Group by sending packet using Scapy" ) |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 369 | for host in main.scapyHosts: |
| 370 | host.stopScapy() |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 371 | host.startScapy() |
| 372 | host.updateSelf() |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 373 | main.log.debug( host.name ) |
| 374 | main.log.debug( host.hostIp ) |
| 375 | main.log.debug( host.hostMac ) |
| 376 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 377 | main.log.info( "Constructing Packet" ) |
| 378 | main.h1.buildEther( dst=main.h1.hostMac ) |
| 379 | main.h1.buildIP( dst=main.h1.hostIp ) |
| 380 | main.log.info( "Start Filter on host2,host3,host4" ) |
| 381 | main.h2.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) ) |
| 382 | main.h3.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) ) |
| 383 | main.h4.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) ) |
| 384 | main.log.info( "sending packet to Host" ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 385 | main.h1.sendPacket() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 386 | main.log.info( "Checking filter for our packet" ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 387 | stepResultH2 = main.h2.checkFilter() |
| 388 | stepResultH3 = main.h3.checkFilter() |
| 389 | stepResultH4 = main.h4.checkFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 390 | |
| 391 | if stepResultH2: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 392 | main.log.info( "Packet : %s" % main.h2.readPackets() ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 393 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 394 | main.h2.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 395 | |
| 396 | if stepResultH3: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 397 | main.log.info( "Packet : %s" % main.h3.readPackets() ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 398 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 399 | main.h2.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 400 | |
| 401 | if stepResultH4: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 402 | main.log.info( "Packet : %s" % main.h4.readPackets() ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 403 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 404 | main.h4.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 405 | |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 406 | if stepResultH2 and stepResultH3 and stepResultH4: |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 407 | main.log.info( "Success!!!Packet sent to port 1 is received at port 2,3 and 4" ) |
| 408 | stepResult = main.TRUE |
| 409 | else: |
| 410 | main.log.info( "Failure!!!Packet sent to port 1 is not received at port 2,3 and 4" ) |
| 411 | stepResult = main.FALSE |
| 412 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 413 | utilities.assert_equals( expect=main.TRUE, |
| 414 | actual=stepResult, |
| 415 | onpass="Packet sent to port 1 is received at port 2,3,4 ", |
| 416 | onfail="Packet sent to port 1 is not received at port 2,3,4 " ) |
| 417 | |
| 418 | def CASE6( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 419 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 420 | Deleting the Group and Flow |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 421 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 422 | import json |
| 423 | import time |
| 424 | respFlowId = 1 |
| 425 | |
| 426 | main.case( "Delete the Group and Flow added through Rest api " ) |
| 427 | main.step( "Deleting Group and Flows" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 428 | ctrl = main.Cluster.active( 0 ) |
Jeremy Ronquillo | 23fb216 | 2017-09-15 14:59:57 -0700 | [diff] [blame] | 429 | # Get Flow ID |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 430 | response = ctrl.REST.getFlows( deviceId=deviceId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 431 | responsejson = json.loads( response ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 432 | for item in responsejson: |
| 433 | if item[ "priority" ] == int( priority ): |
| 434 | respFlowId = item[ "id" ] |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 435 | |
| 436 | main.step( "Deleting the created flow by deviceId and flowId" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 437 | flowResponse = ctrl.REST.removeFlow( deviceId=deviceId, |
| 438 | flowId=respFlowId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 439 | |
| 440 | utilities.assert_equals( expect=main.TRUE, |
| 441 | actual=flowResponse, |
| 442 | onpass="Deleting flow is successful!!!", |
| 443 | onfail="Deleting flow is failure!!!" ) |
| 444 | |
| 445 | # Giving ONOS time to delete the flow |
| 446 | time.sleep( main.delFlowSleep ) |
| 447 | |
| 448 | main.step( "Deleting the created group by deviceId and appCookie" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 449 | groupResponse = ctrl.REST.removeGroup( deviceId=deviceId, |
| 450 | appCookie=appCookie ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 451 | |
| 452 | utilities.assert_equals( expect=main.TRUE, |
| 453 | actual=groupResponse, |
| 454 | onpass="Deleting Group is successful!!!", |
| 455 | onfail="Deleting Group is failure!!!" ) |
| 456 | |
| 457 | # Giving ONOS time to delete the group |
| 458 | time.sleep( main.delGroupSleep ) |
| 459 | |
| 460 | def CASE7( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 461 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 462 | Adding Group of type "INDIRECT" using Rest api. |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 463 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 464 | import json |
| 465 | import time |
| 466 | isAdded = main.FALSE |
| 467 | |
| 468 | main.case( "Verify Group of type INDIRECT are successfully Added" ) |
| 469 | main.caseExplanation = " Install a Group of type INDIRECT " +\ |
| 470 | " Verify the Group is Added " +\ |
| 471 | " Add a flow using the group " +\ |
| 472 | " Send a packet that verifies the action bucket of the group" |
| 473 | |
| 474 | main.step( "Add Group using Rest api" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 475 | ctrl = main.Cluster.active( 0 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 476 | bucketList = [] |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 477 | bucket = main.buckets.addBucket( main, egressPort=egressPort1 ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 478 | bucketList.append( bucket ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 479 | response = ctrl.REST.addGroup( deviceId=deviceId, |
| 480 | groupType=type2, |
| 481 | bucketList=bucketList, |
| 482 | appCookie=appCookie, |
| 483 | groupId=groupId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 484 | |
| 485 | utilities.assert_equals( expect=main.TRUE, |
| 486 | actual=response, |
| 487 | onpass="Successfully added Groups of type INDIRECT", |
| 488 | onfail="Failed to add Groups of type INDIRECT" ) |
| 489 | |
| 490 | # Giving ONOS time to add the group |
| 491 | time.sleep( main.addGroupSleep ) |
| 492 | |
| 493 | main.step( "Check groups are in ADDED state" ) |
| 494 | |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 495 | response = ctrl.REST.getGroups( deviceId=deviceId, |
| 496 | appCookie=appCookie ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 497 | responsejson = json.loads( response ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 498 | for item in responsejson: |
| 499 | if item[ "state" ] == "ADDED": |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 500 | isAdded = main.TRUE |
| 501 | |
| 502 | utilities.assert_equals( expect=main.TRUE, |
| 503 | actual=isAdded, |
| 504 | onpass="INDIRECT Group is in Added State", |
| 505 | onfail="INDIRECT Group is not in Added State" ) |
| 506 | |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 507 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 508 | Adding flows using rest api |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 509 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 510 | isAdded = main.FALSE |
| 511 | |
| 512 | main.step( "Adding flow with Group using rest api" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 513 | response = ctrl.REST.addFlow( deviceId=deviceId, |
| 514 | priority=priority, |
| 515 | ingressPort=ingressPort, |
| 516 | groupId=groupId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 517 | utilities.assert_equals( expect=main.TRUE, |
| 518 | actual=response, |
| 519 | onpass="Successfully Added Flows", |
| 520 | onfail="Failed to Add flows" ) |
| 521 | |
| 522 | # Giving ONOS time to add the flow |
| 523 | time.sleep( main.addFlowSleep ) |
| 524 | |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 525 | response = ctrl.REST.getFlows( deviceId=deviceId ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 526 | responsejson = json.loads( response ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 527 | for item in responsejson: |
| 528 | if item[ "priority" ] == int( priority ) and item[ "state" ] == "ADDED": |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 529 | isAdded = main.TRUE |
| 530 | |
| 531 | utilities.assert_equals( expect=main.TRUE, |
| 532 | actual=isAdded, |
| 533 | onpass="Flow is in Added State", |
| 534 | onfail="Flow is not in Added State" ) |
| 535 | |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 536 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 537 | Sends a packet using scapy |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 538 | """ |
Devin Lim | 58046fa | 2017-07-05 16:55:00 -0700 | [diff] [blame] | 539 | main.step( "Testing Group by sending packet using Scapy" ) |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 540 | for host in main.scapyHosts: |
| 541 | host.stopScapy() |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 542 | host.startScapy() |
| 543 | host.updateSelf() |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 544 | main.log.debug( host.name ) |
| 545 | main.log.debug( host.hostIp ) |
| 546 | main.log.debug( host.hostMac ) |
| 547 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 548 | main.log.info( "Constructing Packet" ) |
| 549 | main.h1.buildEther( dst=main.h1.hostMac ) |
| 550 | main.h1.buildIP( dst=main.h1.hostIp ) |
| 551 | main.log.info( "Start Filter on host2" ) |
| 552 | main.h2.startFilter( pktFilter="ether host %s and ip host %s" % ( main.h1.hostMac, main.h1.hostIp ) ) |
| 553 | main.log.info( "sending packet to Host" ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 554 | main.h1.sendPacket() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 555 | main.log.info( "Checking filter for our packet" ) |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 556 | stepResultH2 = main.h2.checkFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 557 | |
| 558 | if stepResultH2: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 559 | main.log.info( "Packet : %s" % main.h2.readPackets() ) |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 560 | else: |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 561 | main.h2.killFilter() |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 562 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 563 | utilities.assert_equals( expect=main.TRUE, |
| 564 | actual=stepResultH2, |
| 565 | onpass="Packet sent to port 1 is received at port 2 successfully!!!", |
| 566 | onfail="Failure!!!Packet sent to port 1 is not received at port 2" ) |
| 567 | |
You Wang | dafb6e2 | 2018-01-22 17:01:00 -0800 | [diff] [blame] | 568 | def CASE10( self, main ): |
| 569 | """ |
| 570 | Stop mininet and remove scapy host |
| 571 | """ |
| 572 | try: |
| 573 | from tests.dependencies.utils import Utils |
| 574 | except ImportError: |
| 575 | main.log.error( "Utils not found exiting the test" ) |
| 576 | main.cleanAndExit() |
| 577 | try: |
| 578 | main.Utils |
| 579 | except ( NameError, AttributeError ): |
| 580 | main.Utils = Utils() |
| 581 | main.log.report( "Stop Mininet and Scapy" ) |
| 582 | main.case( "Stop Mininet and Scapy" ) |
| 583 | main.caseExplanation = "Stopping the current mininet topology " +\ |
| 584 | "to start up fresh" |
| 585 | main.step( "Stopping and Removing Scapy Host Components" ) |
| 586 | scapyResult = main.TRUE |
| 587 | for host in main.scapyHosts: |
| 588 | scapyResult = scapyResult and host.stopScapy() |
| 589 | main.log.info( "Stopped Scapy Host: {0}".format( host.name ) ) |
| 590 | |
| 591 | for host in main.scapyHosts: |
| 592 | scapyResult = scapyResult and main.Scapy.removeHostComponent( host.name ) |
| 593 | main.log.info( "Removed Scapy Host Component: {0}".format( host.name ) ) |
| 594 | |
| 595 | main.scapyHosts = [] |
| 596 | |
| 597 | utilities.assert_equals( expect=main.TRUE, |
| 598 | actual=scapyResult, |
| 599 | onpass="Successfully stopped scapy and removed host components", |
| 600 | onfail="Failed to stop mininet and scapy" ) |
| 601 | |
| 602 | mininetResult = main.Utils.mininetCleanup( main.Mininet1 ) |
| 603 | # Exit if topology did not load properly |
| 604 | if not ( mininetResult and scapyResult ): |
| 605 | main.cleanAndExit() |
| 606 | |
You Wang | 84f981d | 2018-01-12 16:11:50 -0800 | [diff] [blame^] | 607 | def CASE12( self, main ): |
| 608 | """ |
| 609 | Stop Scapy on physical hosts |
| 610 | """ |
| 611 | main.case( "Stop Scapy" ) |
| 612 | main.step( "Stopping Scapy Hosts" ) |
| 613 | scapyResult = main.TRUE |
| 614 | for host in main.scapyHosts: |
| 615 | host.stopScapy() |
| 616 | utilities.assert_equals( expect=main.TRUE, |
| 617 | actual=scapyResult, |
| 618 | onpass="Successfully stopped scapy", |
| 619 | onfail="Failed to stop scapy" ) |
| 620 | |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 621 | def CASE100( self, main ): |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 622 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 623 | Report errors/warnings/exceptions |
Jon Hall | 602d0a7 | 2017-05-24 16:06:53 -0700 | [diff] [blame] | 624 | """ |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 625 | main.log.info( "Error report: \n" ) |
Devin Lim | 142b534 | 2017-07-20 15:22:39 -0700 | [diff] [blame] | 626 | main.ONOSbench.logReport( main.Cluster.active( 0 ).ipAddress, |
kavitha Alagesan | 373e055 | 2016-11-22 05:22:05 +0530 | [diff] [blame] | 627 | [ "INFO", |
| 628 | "FOLLOWER", |
| 629 | "WARN", |
| 630 | "flow", |
| 631 | "group", |
| 632 | "ERROR", |
| 633 | "Except" ], |
| 634 | "s" ) |