andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 1 | #TopoPerfNext |
| 2 | # |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 3 | #Topology Convergence scale-out test for ONOS-next |
| 4 | #NOTE: This test supports up to 7 nodes scale-out scenario |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 5 | # |
| 6 | #andrew@onlab.us |
| 7 | |
| 8 | import time |
| 9 | import sys |
| 10 | import os |
| 11 | import re |
| 12 | |
| 13 | class TopoConvNext: |
| 14 | def __init__(self): |
| 15 | self.default = '' |
| 16 | |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 17 | def CASE1(self, main): |
| 18 | ''' |
| 19 | ONOS startup sequence |
| 20 | ''' |
| 21 | import time |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 22 | |
| 23 | #****** |
| 24 | #Global cluster count for scale-out purposes |
| 25 | global cluster_count |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 26 | cluster_count = 1 |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 27 | #****** |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 28 | cell_name = main.params['ENV']['cellName'] |
| 29 | |
| 30 | git_pull = main.params['GIT']['autoPull'] |
| 31 | checkout_branch = main.params['GIT']['checkout'] |
| 32 | |
| 33 | ONOS1_ip = main.params['CTRL']['ip1'] |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 34 | ONOS2_ip = main.params['CTRL']['ip2'] |
| 35 | ONOS3_ip = main.params['CTRL']['ip3'] |
| 36 | ONOS4_ip = main.params['CTRL']['ip4'] |
| 37 | ONOS5_ip = main.params['CTRL']['ip5'] |
| 38 | ONOS6_ip = main.params['CTRL']['ip6'] |
| 39 | ONOS7_ip = main.params['CTRL']['ip7'] |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 40 | MN1_ip = main.params['MN']['ip1'] |
| 41 | BENCH_ip = main.params['BENCH']['ip'] |
| 42 | |
| 43 | main.case("Setting up test environment") |
| 44 | main.log.report("Setting up test environment") |
| 45 | |
| 46 | main.step("Creating cell file") |
| 47 | cell_file_result = main.ONOSbench.create_cell_file( |
| 48 | BENCH_ip, cell_name, MN1_ip, "onos-core", |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 49 | ONOS1_ip, ONOS2_ip, ONOS3_ip, ONOS4_ip, |
| 50 | ONOS5_ip, ONOS6_ip, ONOS7_ip) |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 51 | |
| 52 | main.step("Applying cell file to environment") |
| 53 | cell_apply_result = main.ONOSbench.set_cell(cell_name) |
| 54 | verify_cell_result = main.ONOSbench.verify_cell() |
| 55 | |
| 56 | main.step("Git checkout and pull "+checkout_branch) |
| 57 | if git_pull == 'on': |
| 58 | checkout_result = \ |
| 59 | main.ONOSbench.git_checkout(checkout_branch) |
| 60 | pull_result = main.ONOSbench.git_pull() |
| 61 | else: |
| 62 | checkout_result = main.TRUE |
| 63 | pull_result = main.TRUE |
| 64 | main.log.info("Skipped git checkout and pull") |
| 65 | |
| 66 | main.step("Using mvn clean & install") |
| 67 | #mvn_result = main.ONOSbench.clean_install() |
| 68 | mvn_result = main.TRUE |
| 69 | |
| 70 | main.step("Set cell for ONOS cli env") |
| 71 | main.ONOS1cli.set_cell(cell_name) |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 72 | main.ONOS2cli.set_cell(cell_name) |
| 73 | main.ONOS3cli.set_cell(cell_name) |
| 74 | main.ONOS4cli.set_cell(cell_name) |
| 75 | main.ONOS5cli.set_cell(cell_name) |
| 76 | main.ONOS6cli.set_cell(cell_name) |
| 77 | main.ONOS7cli.set_cell(cell_name) |
| 78 | |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 79 | main.step("Creating ONOS package") |
| 80 | package_result = main.ONOSbench.onos_package() |
| 81 | |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 82 | #Start test with single node only |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 83 | main.step("Installing ONOS package") |
| 84 | install1_result = main.ONOSbench.onos_install(node=ONOS1_ip) |
| 85 | |
| 86 | time.sleep(10) |
| 87 | |
| 88 | main.step("Start onos cli") |
| 89 | cli1 = main.ONOS1cli.start_onos_cli(ONOS1_ip) |
| 90 | |
| 91 | main.step("Enable metrics feature") |
| 92 | main.ONOS1cli.feature_install("onos-app-metrics") |
| 93 | |
| 94 | utilities.assert_equals(expect=main.TRUE, |
| 95 | actual= cell_file_result and cell_apply_result and\ |
| 96 | verify_cell_result and checkout_result and\ |
| 97 | pull_result and mvn_result and\ |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 98 | install1_result, |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 99 | onpass="Test Environment setup successful", |
| 100 | onfail="Failed to setup test environment") |
| 101 | |
| 102 | def CASE2(self, main): |
| 103 | ''' |
| 104 | 100 Switch discovery latency |
| 105 | |
| 106 | Important: |
| 107 | This test case can be potentially dangerous if |
| 108 | your machine has previously set iptables rules. |
| 109 | One of the steps of the test case will flush |
| 110 | all existing iptables rules. |
| 111 | Note: |
| 112 | You can specify the number of switches in the |
| 113 | params file to adjust the switch discovery size |
| 114 | (and specify the corresponding topology in Mininet1 |
| 115 | .topo file) |
| 116 | ''' |
| 117 | import time |
| 118 | import subprocess |
| 119 | import os |
| 120 | import requests |
| 121 | import json |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 122 | import numpy |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 123 | |
| 124 | ONOS_ip_list = [] |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 125 | ONOS_ip_list.append('0') |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 126 | ONOS_ip_list.append(main.params['CTRL']['ip1']) |
| 127 | ONOS_ip_list.append(main.params['CTRL']['ip2']) |
| 128 | ONOS_ip_list.append(main.params['CTRL']['ip3']) |
| 129 | ONOS_ip_list.append(main.params['CTRL']['ip4']) |
| 130 | ONOS_ip_list.append(main.params['CTRL']['ip5']) |
| 131 | ONOS_ip_list.append(main.params['CTRL']['ip6']) |
| 132 | ONOS_ip_list.append(main.params['CTRL']['ip7']) |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 133 | MN1_ip = main.params['MN']['ip1'] |
| 134 | ONOS_user = main.params['CTRL']['user'] |
| 135 | |
| 136 | default_sw_port = main.params['CTRL']['port1'] |
| 137 | |
| 138 | #Number of iterations of case |
| 139 | num_iter = main.params['TEST']['numIter'] |
| 140 | num_sw = main.params['TEST']['numSwitch'] |
| 141 | |
| 142 | #Timestamp 'keys' for json metrics output. |
| 143 | #These are subject to change, hence moved into params |
| 144 | deviceTimestamp = main.params['JSON']['deviceTimestamp'] |
| 145 | graphTimestamp = main.params['JSON']['graphTimestamp'] |
| 146 | |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 147 | #Threshold for this test case |
| 148 | sw_disc_threshold_str = main.params['TEST']['swDisc100Threshold'] |
| 149 | sw_disc_threshold_obj = sw_disc_threshold_str.split(",") |
| 150 | sw_disc_threshold_min = int(sw_disc_threshold_obj[0]) |
| 151 | sw_disc_threshold_max = int(sw_disc_threshold_obj[1]) |
| 152 | |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 153 | assertion = main.TRUE |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 154 | sw_discovery_lat_list = [] |
| 155 | |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 156 | main.case(str(num_sw)+" switch per "+str(cluster_count)+ |
| 157 | " nodes convergence latency") |
andrewonlab | 0d4478f | 2014-11-11 20:31:20 -0500 | [diff] [blame] | 158 | |
| 159 | main.log.report("Currently active ONOS node(s): ") |
| 160 | report_str = "Node " |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 161 | for node in range(1, cluster_count+1): |
| 162 | report_str += (str(node) + " ") |
andrewonlab | 0d4478f | 2014-11-11 20:31:20 -0500 | [diff] [blame] | 163 | main.log.report(report_str) |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 164 | |
andrewonlab | 0d4478f | 2014-11-11 20:31:20 -0500 | [diff] [blame] | 165 | main.step("Assigning "+num_sw+" switches to each ONOS") |
| 166 | index = 1 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 167 | for node in range(1, cluster_count+1): |
andrewonlab | 0d4478f | 2014-11-11 20:31:20 -0500 | [diff] [blame] | 168 | for i in range(index, int(num_sw)+index): |
| 169 | main.Mininet1.assign_sw_controller( |
| 170 | sw=str(i), |
| 171 | ip1=ONOS_ip_list[node], |
| 172 | port1=default_sw_port) |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 173 | index = i+1 |
| 174 | |
| 175 | main.log.info("Please check ptpd configuration to ensure "+\ |
| 176 | "all nodes' system times are in sync") |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 177 | |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 178 | time.sleep(10) |
| 179 | |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 180 | for i in range(0, int(num_iter)): |
| 181 | main.step("Set iptables rule to block sw connections") |
| 182 | |
| 183 | #INPUT rules |
| 184 | main.ONOS1.handle.sendline( |
| 185 | "sudo iptables -A INPUT -p tcp -s "+ |
| 186 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 187 | main.ONOS2.handle.sendline( |
| 188 | "sudo iptables -A INPUT -p tcp -s "+ |
| 189 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 190 | main.ONOS3.handle.sendline( |
| 191 | "sudo iptables -A INPUT -p tcp -s "+ |
| 192 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 193 | main.ONOS4.handle.sendline( |
| 194 | "sudo iptables -A INPUT -p tcp -s "+ |
| 195 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 196 | main.ONOS5.handle.sendline( |
| 197 | "sudo iptables -A INPUT -p tcp -s "+ |
| 198 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 199 | main.ONOS6.handle.sendline( |
| 200 | "sudo iptables -A INPUT -p tcp -s "+ |
| 201 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 202 | main.ONOS7.handle.sendline( |
| 203 | "sudo iptables -A INPUT -p tcp -s "+ |
| 204 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 205 | |
| 206 | #OUTPUT rules |
| 207 | main.ONOS1.handle.sendline( |
| 208 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 209 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 210 | main.ONOS2.handle.sendline( |
| 211 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 212 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 213 | main.ONOS3.handle.sendline( |
| 214 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 215 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 216 | main.ONOS4.handle.sendline( |
| 217 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 218 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 219 | main.ONOS5.handle.sendline( |
| 220 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 221 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 222 | main.ONOS6.handle.sendline( |
| 223 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 224 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
| 225 | main.ONOS7.handle.sendline( |
| 226 | "sudo iptables -A OUTPUT -p tcp -s "+ |
| 227 | MN1_ip+" --dport "+default_sw_port+" -j DROP") |
andrewonlab | 0d4478f | 2014-11-11 20:31:20 -0500 | [diff] [blame] | 228 | |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 229 | main.log.info("Please wait for switch connection to timeout") |
| 230 | time.sleep(60) |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 231 | |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 232 | main.step("Flushing iptables and obtaining t0") |
| 233 | t0_system = time.time()*1000 |
| 234 | main.ONOS1.handle.sendline("sudo iptables -F") |
| 235 | main.ONOS2.handle.sendline("sudo iptables -F") |
| 236 | main.ONOS3.handle.sendline("sudo iptables -F") |
| 237 | main.ONOS4.handle.sendline("sudo iptables -F") |
| 238 | main.ONOS5.handle.sendline("sudo iptables -F") |
| 239 | main.ONOS6.handle.sendline("sudo iptables -F") |
| 240 | main.ONOS7.handle.sendline("sudo iptables -F") |
| 241 | |
| 242 | counter_loop = 0 |
| 243 | counter_avail1 = 0 |
| 244 | counter_avail2 = 0 |
| 245 | counter_avail3 = 0 |
| 246 | counter_avail4 = 0 |
| 247 | counter_avail5 = 0 |
| 248 | counter_avail6 = 0 |
| 249 | counter_avail7 = 0 |
| 250 | onos1_dev = False |
| 251 | onos2_dev = False |
| 252 | onos3_dev = False |
| 253 | onos4_dev = False |
| 254 | onos5_dev = False |
| 255 | onos6_dev = False |
| 256 | onos7_dev = False |
| 257 | |
| 258 | #TODO: Think of a more elegant way to check all |
| 259 | # switches across all nodes |
| 260 | #Goodluck debugging this loop |
| 261 | while counter_loop < 60: |
| 262 | for node in range(1, cluster_count+1): |
| 263 | if node == 1 and not onos1_dev: |
| 264 | device_str_obj1 = main.ONOS1cli.devices() |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 265 | device_json1 = json.loads(device_str_obj1) |
| 266 | for device1 in device_json1: |
| 267 | if device1['available'] == True: |
| 268 | counter_avail1 += 1 |
| 269 | if counter_avail1 == int(num_sw): |
| 270 | onos1_dev = True |
| 271 | main.log.info("All devices have been"+ |
| 272 | " discovered on ONOS1") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 273 | else: |
| 274 | counter_avail1 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 275 | if node == 2 and not onos2_dev: |
| 276 | device_str_obj2 = main.ONOS2cli.devices() |
| 277 | device_json2 = json.loads(device_str_obj2) |
| 278 | for device2 in device_json2: |
| 279 | if device2['available'] == True: |
| 280 | counter_avail2 += 1 |
| 281 | if counter_avail2 == int(num_sw): |
| 282 | onos2_dev = True |
| 283 | main.log.info("All devices have been"+ |
| 284 | " discovered on ONOS2") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 285 | else: |
| 286 | counter_avail2 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 287 | if node == 3 and not onos3_dev: |
| 288 | device_str_obj3 = main.ONOS3cli.devices() |
| 289 | device_json3 = json.loads(device_str_obj3) |
| 290 | for device3 in device_json3: |
| 291 | if device3['available'] == True: |
| 292 | counter_avail3 += 1 |
| 293 | if counter_avail3 == int(num_sw): |
| 294 | onos3_dev = True |
| 295 | main.log.info("All devices have been"+ |
| 296 | " discovered on ONOS3") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 297 | else: |
| 298 | counter_avail3 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 299 | if node == 4 and not onos4_dev: |
| 300 | device_str_obj4 = main.ONOS4cli.devices() |
| 301 | device_json4 = json.loads(device_str_obj4) |
| 302 | for device4 in device_json4: |
| 303 | if device4['available'] == True: |
| 304 | counter_avail4 += 1 |
| 305 | if counter_avail4 == int(num_sw): |
| 306 | onos4_dev = True |
| 307 | main.log.info("All devices have been"+ |
| 308 | " discovered on ONOS4") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 309 | else: |
| 310 | counter_avail4 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 311 | if node == 5 and not onos5_dev: |
| 312 | device_str_obj5 = main.ONOS5cli.devices() |
| 313 | device_json5 = json.loads(device_str_obj5) |
| 314 | for device5 in device_json5: |
| 315 | if device5['available'] == True: |
| 316 | counter_avail5 += 1 |
| 317 | if counter_avail5 == int(num_sw): |
| 318 | onos5_dev = True |
| 319 | main.log.info("All devices have been"+ |
| 320 | " discovered on ONOS5") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 321 | else: |
| 322 | counter_avail5 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 323 | if node == 6 and not onos6_dev: |
| 324 | device_str_obj6 = main.ONOS6cli.devices() |
| 325 | device_json6 = json.loads(device_str_obj6) |
| 326 | for device6 in device_json6: |
| 327 | if device6['available'] == True: |
| 328 | counter_avail6 += 1 |
| 329 | if counter_avail6 == int(num_sw): |
| 330 | onos6_dev = True |
| 331 | main.log.info("All devices have been"+ |
| 332 | " discovered on ONOS6") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 333 | else: |
| 334 | counter_avail6 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 335 | if node == 7 and not onos7_dev: |
| 336 | device_str_obj7 = main.ONOS7cli.devices() |
| 337 | device_json7 = json.loads(device_str_obj7) |
| 338 | for device7 in device_json7: |
| 339 | if device7['available'] == True: |
| 340 | counter_avail7 += 1 |
| 341 | if counter_avail7 == int(num_sw): |
| 342 | onos7_dev = True |
| 343 | main.log.info("All devices have been"+ |
| 344 | " discovered on ONOS7") |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 345 | else: |
| 346 | counter_avail7 = 0 |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 347 | #END node loop |
| 348 | |
| 349 | #TODO: clean up this mess of an if statements if possible |
| 350 | #Treat each if as a separate test case with the given |
| 351 | # cluster count. Hence when the cluster count changes |
| 352 | # the desired calculations will be made |
| 353 | if cluster_count == 1: |
| 354 | if onos1_dev: |
| 355 | main.log.info("All devices have been discovered"+ |
| 356 | " on all ONOS instances") |
| 357 | json_str_metrics_1 =\ |
| 358 | main.ONOS1cli.topology_events_metrics() |
| 359 | json_obj_1 = json.loads(json_str_metrics_1) |
| 360 | graph_timestamp_1 =\ |
| 361 | json_obj_1[graphTimestamp]['value'] |
| 362 | |
| 363 | graph_lat_1 = \ |
| 364 | int(graph_timestamp_1) - int(t0_system) |
| 365 | |
| 366 | if graph_lat_1 > sw_disc_threshold_min\ |
| 367 | and graph_lat_1 < sw_disc_threshold_max: |
| 368 | sw_discovery_lat_list.append( |
| 369 | graph_lat_1) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 370 | main.log.info("Sw discovery latency of "+ |
| 371 | str(cluster_count)+" node(s): "+ |
| 372 | str(graph_lat_1)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 373 | else: |
| 374 | main.log.info("Switch discovery latency "+ |
| 375 | "exceeded the threshold.") |
| 376 | |
| 377 | #Break while loop |
| 378 | break |
| 379 | if cluster_count == 2: |
| 380 | if onos1_dev and onos2_dev: |
| 381 | main.log.info("All devices have been discovered"+ |
| 382 | " on all ONOS instances") |
| 383 | json_str_metrics_1 =\ |
| 384 | main.ONOS1cli.topology_events_metrics() |
| 385 | json_str_metrics_2 =\ |
| 386 | main.ONOS2cli.topology_events_metrics() |
| 387 | json_obj_1 = json.loads(json_str_metrics_1) |
| 388 | json_obj_2 = json.loads(json_str_metrics_2) |
| 389 | graph_timestamp_1 =\ |
| 390 | json_obj_1[graphTimestamp]['value'] |
| 391 | graph_timestamp_2 =\ |
| 392 | json_obj_2[graphTimestamp]['value'] |
| 393 | |
| 394 | graph_lat_1 = \ |
| 395 | int(graph_timestamp_1) - int(t0_system) |
| 396 | graph_lat_2 = \ |
| 397 | int(graph_timestamp_2) - int(t0_system) |
| 398 | |
| 399 | avg_graph_lat = \ |
| 400 | (int(graph_lat_1) +\ |
| 401 | int(graph_lat_2)) / 2 |
| 402 | |
| 403 | if avg_graph_lat > sw_disc_threshold_min\ |
| 404 | and avg_graph_lat < sw_disc_threshold_max: |
| 405 | sw_discovery_lat_list.append( |
| 406 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 407 | main.log.info("Sw discovery latency of "+ |
| 408 | str(cluster_count)+" node(s): "+ |
| 409 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 410 | else: |
| 411 | main.log.info("Switch discovery latency "+ |
| 412 | "exceeded the threshold.") |
| 413 | |
| 414 | break |
| 415 | if cluster_count == 3: |
| 416 | if onos1_dev and onos2_dev and onos3_dev: |
| 417 | main.log.info("All devices have been discovered"+ |
| 418 | " on all ONOS instances") |
| 419 | json_str_metrics_1 =\ |
| 420 | main.ONOS1cli.topology_events_metrics() |
| 421 | json_str_metrics_2 =\ |
| 422 | main.ONOS2cli.topology_events_metrics() |
| 423 | json_str_metrics_3 =\ |
| 424 | main.ONOS3cli.topology_events_metrics() |
| 425 | json_obj_1 = json.loads(json_str_metrics_1) |
| 426 | json_obj_2 = json.loads(json_str_metrics_2) |
| 427 | json_obj_3 = json.loads(json_str_metrics_3) |
| 428 | graph_timestamp_1 =\ |
| 429 | json_obj_1[graphTimestamp]['value'] |
| 430 | graph_timestamp_2 =\ |
| 431 | json_obj_2[graphTimestamp]['value'] |
| 432 | graph_timestamp_3 =\ |
| 433 | json_obj_3[graphTimestamp]['value'] |
| 434 | |
| 435 | graph_lat_1 = \ |
| 436 | int(graph_timestamp_1) - int(t0_system) |
| 437 | graph_lat_2 = \ |
| 438 | int(graph_timestamp_2) - int(t0_system) |
| 439 | graph_lat_3 = \ |
| 440 | int(graph_timestamp_3) - int(t0_system) |
| 441 | |
| 442 | avg_graph_lat = \ |
| 443 | (int(graph_lat_1) +\ |
| 444 | int(graph_lat_2) +\ |
| 445 | int(graph_lat_3)) / 3 |
| 446 | |
| 447 | if avg_graph_lat > sw_disc_threshold_min\ |
| 448 | and avg_graph_lat < sw_disc_threshold_max: |
| 449 | sw_discovery_lat_list.append( |
| 450 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 451 | main.log.info("Sw discovery latency of "+ |
| 452 | str(cluster_count)+" node(s): "+ |
| 453 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 454 | else: |
| 455 | main.log.info("Switch discovery latency "+ |
| 456 | "exceeded the threshold.") |
| 457 | |
| 458 | break |
| 459 | if cluster_count == 4: |
| 460 | if onos1_dev and onos2_dev and onos3_dev and\ |
| 461 | onos4_dev: |
| 462 | main.log.info("All devices have been discovered"+ |
| 463 | " on all ONOS instances") |
| 464 | json_str_metrics_1 =\ |
| 465 | main.ONOS1cli.topology_events_metrics() |
| 466 | json_str_metrics_2 =\ |
| 467 | main.ONOS2cli.topology_events_metrics() |
| 468 | json_str_metrics_3 =\ |
| 469 | main.ONOS3cli.topology_events_metrics() |
| 470 | json_str_metrics_4 =\ |
| 471 | main.ONOS4cli.topology_events_metrics() |
| 472 | json_obj_1 = json.loads(json_str_metrics_1) |
| 473 | json_obj_2 = json.loads(json_str_metrics_2) |
| 474 | json_obj_3 = json.loads(json_str_metrics_3) |
| 475 | json_obj_4 = json.loads(json_str_metrics_4) |
| 476 | graph_timestamp_1 =\ |
| 477 | json_obj_1[graphTimestamp]['value'] |
| 478 | graph_timestamp_2 =\ |
| 479 | json_obj_2[graphTimestamp]['value'] |
| 480 | graph_timestamp_3 =\ |
| 481 | json_obj_3[graphTimestamp]['value'] |
| 482 | graph_timestamp_4 =\ |
| 483 | json_obj_4[graphTimestamp]['value'] |
| 484 | |
| 485 | graph_lat_1 = \ |
| 486 | int(graph_timestamp_1) - int(t0_system) |
| 487 | graph_lat_2 = \ |
| 488 | int(graph_timestamp_2) - int(t0_system) |
| 489 | graph_lat_3 = \ |
| 490 | int(graph_timestamp_3) - int(t0_system) |
| 491 | graph_lat_4 = \ |
| 492 | int(graph_timestamp_4) - int(t0_system) |
| 493 | |
| 494 | avg_graph_lat = \ |
| 495 | (int(graph_lat_1) +\ |
| 496 | int(graph_lat_2) +\ |
| 497 | int(graph_lat_3) +\ |
| 498 | int(graph_lat_4)) / 4 |
| 499 | |
| 500 | if avg_graph_lat > sw_disc_threshold_min\ |
| 501 | and avg_graph_lat < sw_disc_threshold_max: |
| 502 | sw_discovery_lat_list.append( |
| 503 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 504 | main.log.info("Sw discovery latency of "+ |
| 505 | str(cluster_count)+" node(s): "+ |
| 506 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 507 | else: |
| 508 | main.log.info("Switch discovery latency "+ |
| 509 | "exceeded the threshold.") |
| 510 | |
| 511 | break |
| 512 | if cluster_count == 5: |
| 513 | if onos1_dev and onos2_dev and onos3_dev and\ |
| 514 | onos4_dev and onos5_dev: |
| 515 | main.log.info("All devices have been discovered"+ |
| 516 | " on all ONOS instances") |
| 517 | json_str_metrics_1 =\ |
| 518 | main.ONOS1cli.topology_events_metrics() |
| 519 | json_str_metrics_2 =\ |
| 520 | main.ONOS2cli.topology_events_metrics() |
| 521 | json_str_metrics_3 =\ |
| 522 | main.ONOS3cli.topology_events_metrics() |
| 523 | json_str_metrics_4 =\ |
| 524 | main.ONOS4cli.topology_events_metrics() |
| 525 | json_str_metrics_5 =\ |
| 526 | main.ONOS5cli.topology_events_metrics() |
| 527 | json_obj_1 = json.loads(json_str_metrics_1) |
| 528 | json_obj_2 = json.loads(json_str_metrics_2) |
| 529 | json_obj_3 = json.loads(json_str_metrics_3) |
| 530 | json_obj_4 = json.loads(json_str_metrics_4) |
| 531 | json_obj_5 = json.loads(json_str_metrics_5) |
| 532 | graph_timestamp_1 =\ |
| 533 | json_obj_1[graphTimestamp]['value'] |
| 534 | graph_timestamp_2 =\ |
| 535 | json_obj_2[graphTimestamp]['value'] |
| 536 | graph_timestamp_3 =\ |
| 537 | json_obj_3[graphTimestamp]['value'] |
| 538 | graph_timestamp_4 =\ |
| 539 | json_obj_4[graphTimestamp]['value'] |
| 540 | graph_timestamp_5 =\ |
| 541 | json_obj_5[graphTimestamp]['value'] |
| 542 | |
| 543 | graph_lat_1 = \ |
| 544 | int(graph_timestamp_1) - int(t0_system) |
| 545 | graph_lat_2 = \ |
| 546 | int(graph_timestamp_2) - int(t0_system) |
| 547 | graph_lat_3 = \ |
| 548 | int(graph_timestamp_3) - int(t0_system) |
| 549 | graph_lat_4 = \ |
| 550 | int(graph_timestamp_4) - int(t0_system) |
| 551 | graph_lat_5 = \ |
| 552 | int(graph_timestamp_5) - int(t0_system) |
| 553 | |
| 554 | avg_graph_lat = \ |
| 555 | (int(graph_lat_1) +\ |
| 556 | int(graph_lat_2) +\ |
| 557 | int(graph_lat_3) +\ |
| 558 | int(graph_lat_4) +\ |
| 559 | int(graph_lat_5)) / 5 |
| 560 | |
| 561 | if avg_graph_lat > sw_disc_threshold_min\ |
| 562 | and avg_graph_lat < sw_disc_threshold_max: |
| 563 | sw_discovery_lat_list.append( |
| 564 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 565 | main.log.info("Sw discovery latency of "+ |
| 566 | str(cluster_count)+" node(s): "+ |
| 567 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 568 | else: |
| 569 | main.log.info("Switch discovery latency "+ |
| 570 | "exceeded the threshold.") |
| 571 | |
| 572 | break |
| 573 | if cluster_count == 6: |
| 574 | if onos1_dev and onos2_dev and onos3_dev and\ |
| 575 | onos4_dev and onos5_dev and onos6_dev: |
| 576 | main.log.info("All devices have been discovered"+ |
| 577 | " on all ONOS instances") |
| 578 | json_str_metrics_1 =\ |
| 579 | main.ONOS1cli.topology_events_metrics() |
| 580 | json_str_metrics_2 =\ |
| 581 | main.ONOS2cli.topology_events_metrics() |
| 582 | json_str_metrics_3 =\ |
| 583 | main.ONOS3cli.topology_events_metrics() |
| 584 | json_str_metrics_4 =\ |
| 585 | main.ONOS4cli.topology_events_metrics() |
| 586 | json_str_metrics_5 =\ |
| 587 | main.ONOS5cli.topology_events_metrics() |
| 588 | json_str_metrics_6 =\ |
| 589 | main.ONOS6cli.topology_events_metrics() |
| 590 | json_obj_1 = json.loads(json_str_metrics_1) |
| 591 | json_obj_2 = json.loads(json_str_metrics_2) |
| 592 | json_obj_3 = json.loads(json_str_metrics_3) |
| 593 | json_obj_4 = json.loads(json_str_metrics_4) |
| 594 | json_obj_5 = json.loads(json_str_metrics_5) |
| 595 | json_obj_6 = json.loads(json_str_metrics_6) |
| 596 | graph_timestamp_1 =\ |
| 597 | json_obj_1[graphTimestamp]['value'] |
| 598 | graph_timestamp_2 =\ |
| 599 | json_obj_2[graphTimestamp]['value'] |
| 600 | graph_timestamp_3 =\ |
| 601 | json_obj_3[graphTimestamp]['value'] |
| 602 | graph_timestamp_4 =\ |
| 603 | json_obj_4[graphTimestamp]['value'] |
| 604 | graph_timestamp_5 =\ |
| 605 | json_obj_5[graphTimestamp]['value'] |
| 606 | graph_timestamp_6 =\ |
| 607 | json_obj_6[graphTimestamp]['value'] |
| 608 | |
| 609 | graph_lat_1 = \ |
| 610 | int(graph_timestamp_1) - int(t0_system) |
| 611 | graph_lat_2 = \ |
| 612 | int(graph_timestamp_2) - int(t0_system) |
| 613 | graph_lat_3 = \ |
| 614 | int(graph_timestamp_3) - int(t0_system) |
| 615 | graph_lat_4 = \ |
| 616 | int(graph_timestamp_4) - int(t0_system) |
| 617 | graph_lat_5 = \ |
| 618 | int(graph_timestamp_5) - int(t0_system) |
| 619 | graph_lat_6 = \ |
| 620 | int(graph_timestamp_6) - int(t0_system) |
| 621 | |
| 622 | avg_graph_lat = \ |
| 623 | (int(graph_lat_1) +\ |
| 624 | int(graph_lat_2) +\ |
| 625 | int(graph_lat_3) +\ |
| 626 | int(graph_lat_4) +\ |
| 627 | int(graph_lat_5) +\ |
| 628 | int(graph_lat_6)) / 6 |
| 629 | |
| 630 | if avg_graph_lat > sw_disc_threshold_min\ |
| 631 | and avg_graph_lat < sw_disc_threshold_max: |
| 632 | sw_discovery_lat_list.append( |
| 633 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 634 | main.log.info("Sw discovery latency of "+ |
| 635 | str(cluster_count)+" node(s): "+ |
| 636 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 637 | else: |
| 638 | main.log.info("Switch discovery latency "+ |
| 639 | "exceeded the threshold.") |
| 640 | |
| 641 | break |
| 642 | if cluster_count == 7: |
| 643 | if onos1_dev and onos2_dev and onos3_dev and\ |
| 644 | onos4_dev and onos5_dev and onos6_dev and\ |
| 645 | onos7_dev: |
| 646 | main.log.info("All devices have been discovered"+ |
| 647 | " on all ONOS instances") |
| 648 | json_str_metrics_1 =\ |
| 649 | main.ONOS1cli.topology_events_metrics() |
| 650 | json_str_metrics_2 =\ |
| 651 | main.ONOS2cli.topology_events_metrics() |
| 652 | json_str_metrics_3 =\ |
| 653 | main.ONOS3cli.topology_events_metrics() |
| 654 | json_str_metrics_4 =\ |
| 655 | main.ONOS4cli.topology_events_metrics() |
| 656 | json_str_metrics_5 =\ |
| 657 | main.ONOS5cli.topology_events_metrics() |
| 658 | json_str_metrics_6 =\ |
| 659 | main.ONOS6cli.topology_events_metrics() |
| 660 | json_str_metrics_7 =\ |
| 661 | main.ONOS7cli.topology_events_metrics() |
| 662 | json_obj_1 = json.loads(json_str_metrics_1) |
| 663 | json_obj_2 = json.loads(json_str_metrics_2) |
| 664 | json_obj_3 = json.loads(json_str_metrics_3) |
| 665 | json_obj_4 = json.loads(json_str_metrics_4) |
| 666 | json_obj_5 = json.loads(json_str_metrics_5) |
| 667 | json_obj_6 = json.loads(json_str_metrics_6) |
| 668 | json_obj_7 = json.loads(json_str_metrics_7) |
| 669 | graph_timestamp_1 =\ |
| 670 | json_obj_1[graphTimestamp]['value'] |
| 671 | graph_timestamp_2 =\ |
| 672 | json_obj_2[graphTimestamp]['value'] |
| 673 | graph_timestamp_3 =\ |
| 674 | json_obj_3[graphTimestamp]['value'] |
| 675 | graph_timestamp_4 =\ |
| 676 | json_obj_4[graphTimestamp]['value'] |
| 677 | graph_timestamp_5 =\ |
| 678 | json_obj_5[graphTimestamp]['value'] |
| 679 | graph_timestamp_6 =\ |
| 680 | json_obj_6[graphTimestamp]['value'] |
| 681 | graph_timestamp_7 =\ |
| 682 | json_obj_7[graphTimestamp]['value'] |
| 683 | |
| 684 | graph_lat_1 = \ |
| 685 | int(graph_timestamp_1) - int(t0_system) |
| 686 | graph_lat_2 = \ |
| 687 | int(graph_timestamp_2) - int(t0_system) |
| 688 | graph_lat_3 = \ |
| 689 | int(graph_timestamp_3) - int(t0_system) |
| 690 | graph_lat_4 = \ |
| 691 | int(graph_timestamp_4) - int(t0_system) |
| 692 | graph_lat_5 = \ |
| 693 | int(graph_timestamp_5) - int(t0_system) |
| 694 | graph_lat_6 = \ |
| 695 | int(graph_timestamp_6) - int(t0_system) |
| 696 | graph_lat_7 = \ |
| 697 | int(graph_timestamp_7) - int(t0_system) |
| 698 | |
| 699 | avg_graph_lat = \ |
| 700 | (int(graph_lat_1) +\ |
| 701 | int(graph_lat_2) +\ |
| 702 | int(graph_lat_3) +\ |
| 703 | int(graph_lat_4) +\ |
| 704 | int(graph_lat_5) +\ |
| 705 | int(graph_lat_6) +\ |
| 706 | int(graph_lat_7)) / 7 |
| 707 | |
| 708 | if avg_graph_lat > sw_disc_threshold_min\ |
| 709 | and avg_graph_lat < sw_disc_threshold_max: |
| 710 | sw_discovery_lat_list.append( |
| 711 | avg_graph_lat) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 712 | main.log.info("Sw discovery latency of "+ |
| 713 | str(cluster_count)+" node(s): "+ |
| 714 | str(avg_graph_lat)+" ms") |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 715 | else: |
| 716 | main.log.info("Switch discovery latency "+ |
| 717 | "exceeded the threshold.") |
| 718 | |
| 719 | break |
| 720 | |
| 721 | counter_loop += 1 |
| 722 | time.sleep(3) |
| 723 | #END WHILE LOOP |
| 724 | #END ITERATION LOOP |
| 725 | #REPORT HERE |
| 726 | |
| 727 | if len(sw_discovery_lat_list) > 0: |
| 728 | sw_lat_avg = sum(sw_discovery_lat_list) / \ |
| 729 | len(sw_discovery_lat_list) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 730 | sw_lat_dev = numpy.std(sw_discovery_lat_list) |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 731 | else: |
| 732 | assertion = main.FALSE |
| 733 | |
| 734 | main.log.report("Switch discovery lat for "+\ |
| 735 | str(cluster_count)+" instances, 100 sw each: ") |
| 736 | main.log.report("Avg: "+str(sw_lat_avg)+" ms") |
| 737 | main.log.report("Std Deviation: "+str(sw_lat_dev)+" ms") |
| 738 | |
| 739 | utilities.assert_equals(expect=main.TRUE, actual=assertion, |
| 740 | onpass="Switch discovery convergence latency" +\ |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 741 | " for "+str(cluster_count)+" nodes successful", |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 742 | onfail="Switch discovery convergence latency" +\ |
| 743 | " test failed") |
| 744 | |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 745 | |
| 746 | def CASE3(self, main): |
| 747 | ''' |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 748 | Increase number of nodes and initiate CLI |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 749 | ''' |
| 750 | import time |
| 751 | import subprocess |
| 752 | import os |
| 753 | import requests |
| 754 | import json |
| 755 | |
| 756 | ONOS_ip_list = [] |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 757 | ONOS_ip_list.append('0') #Append 0 for index 0 |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 758 | ONOS_ip_list.append(main.params['CTRL']['ip1']) |
| 759 | ONOS_ip_list.append(main.params['CTRL']['ip2']) |
| 760 | ONOS_ip_list.append(main.params['CTRL']['ip3']) |
| 761 | ONOS_ip_list.append(main.params['CTRL']['ip4']) |
| 762 | ONOS_ip_list.append(main.params['CTRL']['ip5']) |
| 763 | ONOS_ip_list.append(main.params['CTRL']['ip6']) |
| 764 | ONOS_ip_list.append(main.params['CTRL']['ip7']) |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 765 | |
| 766 | MN1_ip = main.params['MN']['ip1'] |
| 767 | BENCH_ip = main.params['BENCH']['ip'] |
| 768 | |
| 769 | #NOTE:We start with cluster_count at 1. The first |
| 770 | #case already initialized ONOS1. Increase the |
| 771 | #cluster count and start from 2. |
| 772 | #You can optionally change the increment to |
| 773 | #test steps of node sizes, such as 1,3,5,7 |
| 774 | |
| 775 | global cluster_count |
andrewonlab | 54cec4b | 2014-11-12 13:30:23 -0500 | [diff] [blame] | 776 | cluster_count += 2 |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 777 | |
| 778 | #Supports up to 7 node configuration |
andrewonlab | 51b180b | 2014-11-12 18:19:28 -0500 | [diff] [blame] | 779 | for node in range(1, cluster_count+1): |
| 780 | if node == 2: |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 781 | main.log.info("Starting CLI for instance "+ |
| 782 | ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 783 | main.ONOS2cli.start_onos_cli(ONOS_ip_list[node]) |
| 784 | main.log.info("Installing metrics feature") |
| 785 | main.ONOS2cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 786 | elif node == 3: |
| 787 | main.log.info("Starting CLI for instance "+ |
| 788 | ONOS_ip_list[node]) |
| 789 | main.ONOS3cli.start_onos_cli(ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 790 | main.log.info("Installing metrics feature") |
| 791 | main.ONOS3cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 792 | elif node == 4: |
| 793 | main.log.info("Starting CLI for instance "+ |
| 794 | ONOS_ip_list[node]) |
| 795 | main.ONOS4cli.start_onos_cli(ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 796 | main.log.info("Installing metrics feature") |
| 797 | main.ONOS4cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 798 | elif node == 5: |
| 799 | main.log.info("Starting CLI for instance "+ |
| 800 | ONOS_ip_list[node]) |
| 801 | main.ONOS5cli.start_onos_cli(ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 802 | main.log.info("Installing metrics feature") |
| 803 | main.ONOS5cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 804 | elif node == 6: |
| 805 | main.log.info("Starting CLI for instance "+ |
| 806 | ONOS_ip_list[node]) |
| 807 | main.ONOS6cli.start_onos_cli(ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 808 | main.log.info("Installing metrics feature") |
| 809 | main.ONOS6cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 810 | elif node == 7: |
| 811 | main.log.info("Starting CLI for instance "+ |
| 812 | ONOS_ip_list[node]) |
| 813 | main.ONOS7cli.start_onos_cli(ONOS_ip_list[node]) |
andrewonlab | fd8325f | 2014-11-12 19:14:06 -0500 | [diff] [blame^] | 814 | main.log.info("Installing metrics feature") |
| 815 | main.ONOS7cli.feature_install("onos-app-metrics") |
andrewonlab | add2fd6 | 2014-11-11 18:37:35 -0500 | [diff] [blame] | 816 | time.sleep(5) |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |