Adding more T-ports to big topo
Setting up bidirectional T-ports in OpticalPathProvisioner Change-Id: I4e97b2eb53d3d4182aae9c98a227de982f492950 (cherry picked from commit d6843bed)
Showing
4 changed files
with
12 additions
and
4 deletions
... | @@ -192,7 +192,9 @@ public class OpticalPathProvisioner { | ... | @@ -192,7 +192,9 @@ public class OpticalPathProvisioner { |
192 | } | 192 | } |
193 | // provision both directions | 193 | // provision both directions |
194 | intents.addAll(getOpticalPath(one.location(), two.location())); | 194 | intents.addAll(getOpticalPath(one.location(), two.location())); |
195 | - intents.addAll(getOpticalPath(two.location(), one.location())); | 195 | + // note: bi-directional intent is set up |
196 | + // HostToHost Intent requires symmetric path! | ||
197 | + //intents.addAll(getOpticalPath(two.location(), one.location())); | ||
196 | } else if (intent instanceof PointToPointIntent) { | 198 | } else if (intent instanceof PointToPointIntent) { |
197 | PointToPointIntent p2pIntent = (PointToPointIntent) intent; | 199 | PointToPointIntent p2pIntent = (PointToPointIntent) intent; |
198 | intents.addAll(getOpticalPath(p2pIntent.ingressPoint(), p2pIntent.egressPoint())); | 200 | intents.addAll(getOpticalPath(p2pIntent.ingressPoint(), p2pIntent.egressPoint())); |
... | @@ -265,8 +267,13 @@ public class OpticalPathProvisioner { | ... | @@ -265,8 +267,13 @@ public class OpticalPathProvisioner { |
265 | Intent opticalIntent = new OpticalConnectivityIntent(appId, | 267 | Intent opticalIntent = new OpticalConnectivityIntent(appId, |
266 | srcWdmPoint, | 268 | srcWdmPoint, |
267 | dstWdmPoint); | 269 | dstWdmPoint); |
270 | + Intent opticalIntent2 = new OpticalConnectivityIntent(appId, | ||
271 | + dstWdmPoint, | ||
272 | + srcWdmPoint); | ||
268 | log.info("Creating optical intent from {} to {}", srcWdmPoint, dstWdmPoint); | 273 | log.info("Creating optical intent from {} to {}", srcWdmPoint, dstWdmPoint); |
274 | + log.info("Creating optical intent from {} to {}", dstWdmPoint, srcWdmPoint); | ||
269 | connectionList.add(opticalIntent); | 275 | connectionList.add(opticalIntent); |
276 | + connectionList.add(opticalIntent2); | ||
270 | 277 | ||
271 | break; | 278 | break; |
272 | } | 279 | } | ... | ... |
... | @@ -28,7 +28,7 @@ class SmallOpticalTopo( Topo ): | ... | @@ -28,7 +28,7 @@ class SmallOpticalTopo( Topo ): |
28 | o9ann = { "latitude": 40.8, "longitude": -73.1, "optical.regens": 0 } | 28 | o9ann = { "latitude": 40.8, "longitude": -73.1, "optical.regens": 0 } |
29 | O9 = self.addSwitch( 'JFK-M10', dpid='0000ffffffffff09', annotations=o9ann, cls=OpticalSwitch ) | 29 | O9 = self.addSwitch( 'JFK-M10', dpid='0000ffffffffff09', annotations=o9ann, cls=OpticalSwitch ) |
30 | o10ann = { "latitude": 33.8, "longitude": -84.1, "optical.regens": 0 } | 30 | o10ann = { "latitude": 33.8, "longitude": -84.1, "optical.regens": 0 } |
31 | - O10 = self.addSwitch( 'ATL-S10', dpid='0000ffffffffff0A', annotations=o10ann, cls=OpticalSwitch ) | 31 | + O10 = self.addSwitch( 'ATL-S10', dpid='0000ffffffffff0a', annotations=o10ann, cls=OpticalSwitch ) |
32 | 32 | ||
33 | 33 | ||
34 | SFOR10 = self.addSwitch( 'SFO-R10', dpid='0000ffffffff0001', annotations={"latitude": 37.6, "longitude": -122.3} ) | 34 | SFOR10 = self.addSwitch( 'SFO-R10', dpid='0000ffffffff0001', annotations={"latitude": 37.6, "longitude": -122.3} ) | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -220,10 +220,11 @@ def startOE( net ): | ... | @@ -220,10 +220,11 @@ def startOE( net ): |
220 | onosDir = os.environ[ 'ONOS_ROOT' ] | 220 | onosDir = os.environ[ 'ONOS_ROOT' ] |
221 | except: | 221 | except: |
222 | onosDir = findDir( 'onos' ) | 222 | onosDir = findDir( 'onos' ) |
223 | - os.environ[ 'ONOS_ROOT' ] = onosDir | ||
224 | if not onosDir: | 223 | if not onosDir: |
225 | error( 'Please set ONOS_ROOT environment variable!\n' ) | 224 | error( 'Please set ONOS_ROOT environment variable!\n' ) |
226 | return False | 225 | return False |
226 | + else: | ||
227 | + os.environ[ 'ONOS_ROOT' ] = onosDir | ||
227 | 228 | ||
228 | info( '*** Writing Topology.json file\n' ) | 229 | info( '*** Writing Topology.json file\n' ) |
229 | with open( 'Topology.json', 'w' ) as outfile: | 230 | with open( 'Topology.json', 'w' ) as outfile: |
... | @@ -284,7 +285,7 @@ def startOE( net ): | ... | @@ -284,7 +285,7 @@ def startOE( net ): |
284 | intf2 = intfList[ 0 ] | 285 | intf2 = intfList[ 0 ] |
285 | intf.node.attach( findTap( intf2.node, intf2.node.ports[ intf2 ] ) ) | 286 | intf.node.attach( findTap( intf2.node, intf2.node.ports[ intf2 ] ) ) |
286 | 287 | ||
287 | - info( '*** Press any key to push Topology.json to onos...\n' ) | 288 | + info( '*** Press ENTER to push Topology.json to onos...\n' ) |
288 | raw_input() # FIXME... we should eventually remove this | 289 | raw_input() # FIXME... we should eventually remove this |
289 | info( '*** Pushing Topology.json to ONOS\n' ) | 290 | info( '*** Pushing Topology.json to ONOS\n' ) |
290 | output = quietRun( '%s/tools/test/bin/onos-topo-cfg %s Topology.json' % ( onosDir, net.controllers[ 0 ].ip ), shell=True ) | 291 | output = quietRun( '%s/tools/test/bin/onos-topo-cfg %s Topology.json' % ( onosDir, net.controllers[ 0 ].ip ), shell=True ) | ... | ... |
-
Please register or login to post a comment