Committed by
Gerrit Code Review
opticalUtils.py:
allow Linc to be aware of switches that are in the same domain as it, so that it doesn't wait for OVS devices not in its domain during startup. Change-Id: I542da075c65b54a866ac1f400e4e71a7f2164709
Showing
1 changed file
with
7 additions
and
1 deletions
... | @@ -356,13 +356,17 @@ class LINCSwitch(OpticalSwitch): | ... | @@ -356,13 +356,17 @@ class LINCSwitch(OpticalSwitch): |
356 | return configDict | 356 | return configDict |
357 | 357 | ||
358 | @staticmethod | 358 | @staticmethod |
359 | - def bootOE(net): | 359 | + def bootOE(net, domain=None): |
360 | """ | 360 | """ |
361 | Start the LINC optical emulator within a mininet instance | 361 | Start the LINC optical emulator within a mininet instance |
362 | 362 | ||
363 | This involves 1. converting the information stored in Linc* to configs | 363 | This involves 1. converting the information stored in Linc* to configs |
364 | for both LINC and the network config system, 2. starting Linc, 3. connecting | 364 | for both LINC and the network config system, 2. starting Linc, 3. connecting |
365 | cross-connects, and finally pushing the network configs to ONOS. | 365 | cross-connects, and finally pushing the network configs to ONOS. |
366 | + | ||
367 | + Inevitably, there are times when we have OVS switches that should not be | ||
368 | + under the control of the controller in charge of the Linc switches. We | ||
369 | + hint at these by passing domain information. | ||
366 | """ | 370 | """ |
367 | LINCSwitch.opticalJSON = {} | 371 | LINCSwitch.opticalJSON = {} |
368 | linkConfig = [] | 372 | linkConfig = [] |
... | @@ -371,6 +375,8 @@ class LINCSwitch(OpticalSwitch): | ... | @@ -371,6 +375,8 @@ class LINCSwitch(OpticalSwitch): |
371 | LINCSwitch.controllers = net.controllers | 375 | LINCSwitch.controllers = net.controllers |
372 | 376 | ||
373 | for switch in net.switches: | 377 | for switch in net.switches: |
378 | + if domain and switch not in domain: | ||
379 | + continue | ||
374 | if isinstance(switch, OpticalSwitch): | 380 | if isinstance(switch, OpticalSwitch): |
375 | devices.append(switch.json()) | 381 | devices.append(switch.json()) |
376 | elif isinstance(switch, OVSSwitch): | 382 | elif isinstance(switch, OVSSwitch): | ... | ... |
-
Please register or login to post a comment