Brian O'Connor

Adding more T-ports to big topo

Setting up bidirectional T-ports in OpticalPathProvisioner

Change-Id: I4e97b2eb53d3d4182aae9c98a227de982f492950
......@@ -192,7 +192,9 @@ public class OpticalPathProvisioner {
}
// provision both directions
intents.addAll(getOpticalPath(one.location(), two.location()));
intents.addAll(getOpticalPath(two.location(), one.location()));
// note: bi-directional intent is set up
// HostToHost Intent requires symmetric path!
//intents.addAll(getOpticalPath(two.location(), one.location()));
} else if (intent instanceof PointToPointIntent) {
PointToPointIntent p2pIntent = (PointToPointIntent) intent;
intents.addAll(getOpticalPath(p2pIntent.ingressPoint(), p2pIntent.egressPoint()));
......@@ -265,8 +267,13 @@ public class OpticalPathProvisioner {
Intent opticalIntent = new OpticalConnectivityIntent(appId,
srcWdmPoint,
dstWdmPoint);
Intent opticalIntent2 = new OpticalConnectivityIntent(appId,
dstWdmPoint,
srcWdmPoint);
log.info("Creating optical intent from {} to {}", srcWdmPoint, dstWdmPoint);
log.info("Creating optical intent from {} to {}", dstWdmPoint, srcWdmPoint);
connectionList.add(opticalIntent);
connectionList.add(opticalIntent2);
break;
}
......
......@@ -28,7 +28,7 @@ class SmallOpticalTopo( Topo ):
o9ann = { "latitude": 40.8, "longitude": -73.1, "optical.regens": 0 }
O9 = self.addSwitch( 'JFK-M10', dpid='0000ffffffffff09', annotations=o9ann, cls=OpticalSwitch )
o10ann = { "latitude": 33.8, "longitude": -84.1, "optical.regens": 0 }
O10 = self.addSwitch( 'ATL-S10', dpid='0000ffffffffff0A', annotations=o10ann, cls=OpticalSwitch )
O10 = self.addSwitch( 'ATL-S10', dpid='0000ffffffffff0a', annotations=o10ann, cls=OpticalSwitch )
SFOR10 = self.addSwitch( 'SFO-R10', dpid='0000ffffffff0001', annotations={"latitude": 37.6, "longitude": -122.3} )
......
This diff is collapsed. Click to expand it.
......@@ -226,10 +226,11 @@ def startOE( net, controllerIP=None, controllerPort=None ):
onosDir = os.environ[ 'ONOS_ROOT' ]
except:
onosDir = findDir( 'onos' )
os.environ[ 'ONOS_ROOT' ] = onosDir
if not onosDir:
error( 'Please set ONOS_ROOT environment variable!\n' )
return False
else:
os.environ[ 'ONOS_ROOT' ] = onosDir
info( '*** Writing Topology.json file\n' )
with open( 'Topology.json', 'w' ) as outfile:
......@@ -281,7 +282,7 @@ def startOE( net, controllerIP=None, controllerPort=None ):
intf2 = intfList[ 0 ]
intf.node.attach( findTap( intf2.node, intf2.node.ports[ intf2 ] ) )
info( '*** Press any key to push Topology.json to onos...\n' )
info( '*** Press ENTER to push Topology.json to onos...\n' )
raw_input() # FIXME... we should eventually remove this
info( '*** Pushing Topology.json to ONOS\n' )
output = quietRun( '%s/tools/test/bin/onos-topo-cfg %s Topology.json' % ( onosDir, controllerIP ), shell=True )
......