Brian O'Connor

Improvements to OpticalPathProvisioner

- Support for more T ports
- Addresses ONOS-440

Change-Id: Iafbe57b4797f272678696b8b2e46e5a6487e7428
(cherry picked from commit 6aba3844)
...@@ -18,7 +18,6 @@ package org.onosproject.optical; ...@@ -18,7 +18,6 @@ package org.onosproject.optical;
18 import com.google.common.collect.Lists; 18 import com.google.common.collect.Lists;
19 import org.apache.felix.scr.annotations.Activate; 19 import org.apache.felix.scr.annotations.Activate;
20 import org.apache.felix.scr.annotations.Component; 20 import org.apache.felix.scr.annotations.Component;
21 -import org.apache.felix.scr.annotations.Deactivate;
22 import org.apache.felix.scr.annotations.Reference; 21 import org.apache.felix.scr.annotations.Reference;
23 import org.apache.felix.scr.annotations.ReferenceCardinality; 22 import org.apache.felix.scr.annotations.ReferenceCardinality;
24 import org.onosproject.core.ApplicationId; 23 import org.onosproject.core.ApplicationId;
...@@ -45,7 +44,11 @@ import org.slf4j.LoggerFactory; ...@@ -45,7 +44,11 @@ import org.slf4j.LoggerFactory;
45 44
46 import java.util.Iterator; 45 import java.util.Iterator;
47 import java.util.List; 46 import java.util.List;
47 +import java.util.Map;
48 import java.util.Set; 48 import java.util.Set;
49 +import java.util.concurrent.ConcurrentHashMap;
50 +
51 +import static org.onosproject.net.intent.IntentState.INSTALLED;
49 52
50 /** 53 /**
51 * OpticalPathProvisioner listens event notifications from the Intent F/W. 54 * OpticalPathProvisioner listens event notifications from the Intent F/W.
...@@ -74,18 +77,41 @@ public class OpticalPathProvisioner { ...@@ -74,18 +77,41 @@ public class OpticalPathProvisioner {
74 77
75 private ApplicationId appId; 78 private ApplicationId appId;
76 79
77 - //protected <IntentId> intentIdGenerator; 80 + // TODO use a shared map for distributed operation
81 + protected final Map<ConnectPoint, OpticalConnectivityIntent> inStatusTportMap =
82 + new ConcurrentHashMap<>();
83 + protected final Map<ConnectPoint, OpticalConnectivityIntent> outStatusTportMap =
84 + new ConcurrentHashMap<>();
85 +
86 + protected final Map<ConnectPoint, Map<ConnectPoint, Intent>> intentMap =
87 + new ConcurrentHashMap<>();
78 88
79 private final InternalOpticalPathProvisioner pathProvisioner = new InternalOpticalPathProvisioner(); 89 private final InternalOpticalPathProvisioner pathProvisioner = new InternalOpticalPathProvisioner();
80 90
81 @Activate 91 @Activate
82 protected void activate() { 92 protected void activate() {
93 + // TODO elect a leader and have one instance do the provisioning
83 intentService.addListener(pathProvisioner); 94 intentService.addListener(pathProvisioner);
84 appId = coreService.registerApplication("org.onosproject.optical"); 95 appId = coreService.registerApplication("org.onosproject.optical");
96 + initTport();
85 log.info("Starting optical path provisoning..."); 97 log.info("Starting optical path provisoning...");
86 } 98 }
87 99
88 - @Deactivate 100 + protected void initTport() {
101 + inStatusTportMap.clear();
102 + outStatusTportMap.clear();
103 + for (Intent intent : intentService.getIntents()) {
104 + if (intentService.getIntentState(intent.id()) == INSTALLED) {
105 + if (intent instanceof OpticalConnectivityIntent) {
106 + inStatusTportMap.put(((OpticalConnectivityIntent) intent).getSrc(),
107 + (OpticalConnectivityIntent) intent);
108 + outStatusTportMap.put(((OpticalConnectivityIntent) intent).getDst(),
109 + (OpticalConnectivityIntent) intent);
110 + }
111 + }
112 + }
113 + }
114 +
89 protected void deactivate() { 115 protected void deactivate() {
90 intentService.removeListener(pathProvisioner); 116 intentService.removeListener(pathProvisioner);
91 } 117 }
...@@ -104,26 +130,72 @@ public class OpticalPathProvisioner { ...@@ -104,26 +130,72 @@ public class OpticalPathProvisioner {
104 break; 130 break;
105 case WITHDRAWN: 131 case WITHDRAWN:
106 log.info("intent {} withdrawn.", event.subject()); 132 log.info("intent {} withdrawn.", event.subject());
107 - teardownLightpath(event.subject()); 133 + //FIXME
134 + //teardownLightpath(event.subject());
108 break; 135 break;
109 default: 136 default:
110 break; 137 break;
111 } 138 }
112 } 139 }
113 140
141 + private void reserveTport(Intent intent) {
142 + // TODO move to resourceManager
143 + if (intent instanceof OpticalConnectivityIntent) {
144 + OpticalConnectivityIntent opticalIntent =
145 + (OpticalConnectivityIntent) intent;
146 + if (inStatusTportMap.containsKey(opticalIntent.getSrc()) ||
147 + outStatusTportMap.containsKey(opticalIntent.getDst())) {
148 + //TODO throw an exception, perhaps
149 + log.warn("Overlapping reservation: {}", opticalIntent);
150 + }
151 + inStatusTportMap.put(opticalIntent.getSrc(), opticalIntent);
152 + outStatusTportMap.put(opticalIntent.getDst(), opticalIntent);
153 + }
154 + }
155 +
156 + /**
157 + * Registers an intent from src to dst.
158 + * @param src source point
159 + * @param dst destination point
160 + * @param intent intent to be registered
161 + * @return true if intent has not been previously added, false otherwise
162 + */
163 + private boolean addIntent(ConnectPoint src, ConnectPoint dst, Intent intent) {
164 + Map<ConnectPoint, Intent> srcMap = intentMap.get(src);
165 + if (srcMap == null) {
166 + srcMap = new ConcurrentHashMap<>();
167 + intentMap.put(src, srcMap);
168 + }
169 + if (srcMap.containsKey(dst)) {
170 + return false;
171 + } else {
172 + srcMap.put(dst, intent);
173 + return true;
174 + }
175 + }
176 +
114 private void setupLightpath(Intent intent) { 177 private void setupLightpath(Intent intent) {
115 - // TODO support more packet intent types 178 + // TODO change the coordination approach between packet intents and optical intents
179 + // Low speed LLDP may cause multiple calls which are not expected
180 +
181 + if (!IntentState.FAILED.equals(intentService.getIntentState(intent.id()))) {
182 + return;
183 + }
184 +
116 List<Intent> intents = Lists.newArrayList(); 185 List<Intent> intents = Lists.newArrayList();
117 if (intent instanceof HostToHostIntent) { 186 if (intent instanceof HostToHostIntent) {
118 HostToHostIntent hostToHostIntent = (HostToHostIntent) intent; 187 HostToHostIntent hostToHostIntent = (HostToHostIntent) intent;
119 Host one = hostService.getHost(hostToHostIntent.one()); 188 Host one = hostService.getHost(hostToHostIntent.one());
120 Host two = hostService.getHost(hostToHostIntent.two()); 189 Host two = hostService.getHost(hostToHostIntent.two());
190 + if (one == null || two == null) {
191 + return; //FIXME
192 + }
121 // provision both directions 193 // provision both directions
122 - intents.addAll(getOpticalPaths(one.location(), two.location())); 194 + intents.addAll(getOpticalPath(one.location(), two.location()));
123 - intents.addAll(getOpticalPaths(two.location(), one.location())); 195 + intents.addAll(getOpticalPath(two.location(), one.location()));
124 } else if (intent instanceof PointToPointIntent) { 196 } else if (intent instanceof PointToPointIntent) {
125 PointToPointIntent p2pIntent = (PointToPointIntent) intent; 197 PointToPointIntent p2pIntent = (PointToPointIntent) intent;
126 - intents.addAll(getOpticalPaths(p2pIntent.ingressPoint(), p2pIntent.egressPoint())); 198 + intents.addAll(getOpticalPath(p2pIntent.ingressPoint(), p2pIntent.egressPoint()));
127 } else { 199 } else {
128 log.info("Unsupported intent type: {}", intent.getClass()); 200 log.info("Unsupported intent type: {}", intent.getClass());
129 } 201 }
...@@ -133,16 +205,20 @@ public class OpticalPathProvisioner { ...@@ -133,16 +205,20 @@ public class OpticalPathProvisioner {
133 for (Intent i : intents) { 205 for (Intent i : intents) {
134 // TODO: don't allow duplicate intents between the same points for now 206 // TODO: don't allow duplicate intents between the same points for now
135 // we may want to allow this carefully in future to increase capacity 207 // we may want to allow this carefully in future to increase capacity
136 - Intent existing = intentService.getIntent(i.id()); 208 + if (i instanceof OpticalConnectivityIntent) {
137 - if (existing == null || 209 + OpticalConnectivityIntent oi = (OpticalConnectivityIntent) i;
138 - !IntentState.WITHDRAWN.equals(intentService.getIntentState(i.id()))) { 210 + if (addIntent(oi.getSrc(), oi.getDst(), oi)) {
139 ops.addSubmitOperation(i); 211 ops.addSubmitOperation(i);
212 + reserveTport(i);
213 + }
214 + } else {
215 + log.warn("Invalid intent type: {} for {}", i.getClass(), i);
140 } 216 }
141 } 217 }
142 intentService.execute(ops.build()); 218 intentService.execute(ops.build());
143 } 219 }
144 220
145 - private List<Intent> getOpticalPaths(ConnectPoint ingress, ConnectPoint egress) { 221 + private List<Intent> getOpticalPath(ConnectPoint ingress, ConnectPoint egress) {
146 Set<Path> paths = pathService.getPaths(ingress.deviceId(), 222 Set<Path> paths = pathService.getPaths(ingress.deviceId(),
147 egress.deviceId(), 223 egress.deviceId(),
148 new OpticalLinkWeight()); 224 new OpticalLinkWeight());
...@@ -151,16 +227,17 @@ public class OpticalPathProvisioner { ...@@ -151,16 +227,17 @@ public class OpticalPathProvisioner {
151 return Lists.newArrayList(); 227 return Lists.newArrayList();
152 } 228 }
153 229
154 - ConnectPoint srcWdmPoint = null;
155 - ConnectPoint dstWdmPoint = null;
156 - Iterator<Path> itrPath = paths.iterator();
157 - Path firstPath = itrPath.next();
158 - log.info(firstPath.links().toString());
159 -
160 List<Intent> connectionList = Lists.newArrayList(); 230 List<Intent> connectionList = Lists.newArrayList();
161 231
162 - Iterator<Link> itrLink = firstPath.links().iterator(); 232 + Iterator<Path> itrPath = paths.iterator();
233 + while (itrPath.hasNext()) {
234 + boolean usedTportFound = false;
235 + Path nextPath = itrPath.next();
236 + log.info(nextPath.links().toString()); // TODO drop log level
237 +
238 + Iterator<Link> itrLink = nextPath.links().iterator();
163 while (itrLink.hasNext()) { 239 while (itrLink.hasNext()) {
240 + ConnectPoint srcWdmPoint, dstWdmPoint;
164 Link link1 = itrLink.next(); 241 Link link1 = itrLink.next();
165 if (!isOpticalLink(link1)) { 242 if (!isOpticalLink(link1)) {
166 continue; 243 continue;
...@@ -169,29 +246,55 @@ public class OpticalPathProvisioner { ...@@ -169,29 +246,55 @@ public class OpticalPathProvisioner {
169 dstWdmPoint = srcWdmPoint; 246 dstWdmPoint = srcWdmPoint;
170 } 247 }
171 248
172 - while (true) { 249 + while (itrLink.hasNext()) {
173 - if (itrLink.hasNext()) {
174 Link link2 = itrLink.next(); 250 Link link2 = itrLink.next();
251 + if (isOpticalLink(link2)) {
175 dstWdmPoint = link2.src(); 252 dstWdmPoint = link2.src();
176 } else { 253 } else {
177 break; 254 break;
178 } 255 }
179 } 256 }
180 257
258 + if (inStatusTportMap.get(srcWdmPoint) != null ||
259 + outStatusTportMap.get(dstWdmPoint) != null) {
260 + usedTportFound = true;
261 + // log.info("used ConnectPoint {} to {} were found", srcWdmPoint, dstWdmPoint);
262 + break;
263 + }
264 +
181 Intent opticalIntent = new OpticalConnectivityIntent(appId, 265 Intent opticalIntent = new OpticalConnectivityIntent(appId,
182 srcWdmPoint, 266 srcWdmPoint,
183 dstWdmPoint); 267 dstWdmPoint);
184 log.info("Creating optical intent from {} to {}", srcWdmPoint, dstWdmPoint); 268 log.info("Creating optical intent from {} to {}", srcWdmPoint, dstWdmPoint);
185 connectionList.add(opticalIntent); 269 connectionList.add(opticalIntent);
270 +
271 + break;
186 } 272 }
187 - return connectionList; 273 +
274 + if (!usedTportFound) {
275 + break;
276 + } else {
277 + // reset the connection list
278 + connectionList = Lists.newArrayList();
188 } 279 }
189 280
281 + }
190 282
283 + return connectionList;
284 + }
191 285
192 private void teardownLightpath(Intent intent) { 286 private void teardownLightpath(Intent intent) {
193 - // TODO: tear down the idle lightpath if the utilization is close to zero. 287 + /* FIXME this command doesn't make much sense. we need to define the semantics
288 + // TODO move to resourceManager
289 + if (intent instanceof OpticalConnectivityIntent) {
290 + inStatusTportMap.remove(((OpticalConnectivityIntent) intent).getSrc());
291 + outStatusTportMap.remove(((OpticalConnectivityIntent) intent).getDst());
292 + // TODO tear down the idle lightpath if the utilization is zero.
293 +
194 } 294 }
295 + */ //end-FIXME
296 + }
297 +
195 } 298 }
196 299
197 private static boolean isOpticalLink(Link link) { 300 private static boolean isOpticalLink(Link link) {
...@@ -210,9 +313,9 @@ public class OpticalPathProvisioner { ...@@ -210,9 +313,9 @@ public class OpticalPathProvisioner {
210 return -1; // ignore inactive links 313 return -1; // ignore inactive links
211 } 314 }
212 if (isOpticalLink(edge.link())) { 315 if (isOpticalLink(edge.link())) {
213 - return 1000.0; // optical links 316 + return 1000; // optical links
214 } else { 317 } else {
215 - return 1.0; // packet links 318 + return 1; // packet links
216 } 319 }
217 } 320 }
218 } 321 }
......
...@@ -286,60 +286,60 @@ class BigOpticalTopo( Topo ): ...@@ -286,60 +286,60 @@ class BigOpticalTopo( Topo ):
286 286
287 # Packet/Optical cross connect links (this will be the tap interfaces) 287 # Packet/Optical cross connect links (this will be the tap interfaces)
288 self.addLink( WASHDCSWR, O72, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 288 self.addLink( WASHDCSWR, O72, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
289 - #self.addLink( WASHDCSWR, O72, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 289 + self.addLink( WASHDCSWR, O72, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
290 - #self.addLink( WASHDCSWR, O72, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 290 + self.addLink( WASHDCSWR, O72, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
291 - #self.addLink( WASHDCSWR, O72, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 291 + self.addLink( WASHDCSWR, O72, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
292 - #self.addLink( WASHDCSWR, O72, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 292 + self.addLink( WASHDCSWR, O72, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
293 self.addLink( SNJSCA02R, O61, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 293 self.addLink( SNJSCA02R, O61, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
294 - #self.addLink( SNJSCA02R, O61, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 294 + self.addLink( SNJSCA02R, O61, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
295 - #self.addLink( SNJSCA02R, O61, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 295 + self.addLink( SNJSCA02R, O61, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
296 - #self.addLink( SNJSCA02R, O61, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 296 + self.addLink( SNJSCA02R, O61, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
297 - #self.addLink( SNJSCA02R, O61, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 297 + self.addLink( SNJSCA02R, O61, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
298 self.addLink( SNANTXCAR, O57, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 298 self.addLink( SNANTXCAR, O57, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
299 - #self.addLink( SNANTXCAR, O57, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 299 + self.addLink( SNANTXCAR, O57, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
300 - #self.addLink( SNANTXCAR, O57, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 300 + self.addLink( SNANTXCAR, O57, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
301 - #self.addLink( SNANTXCAR, O57, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 301 + self.addLink( SNANTXCAR, O57, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
302 - #self.addLink( SNANTXCAR, O57, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 302 + self.addLink( SNANTXCAR, O57, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
303 self.addLink( ROCHNYXAR, O53, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 303 self.addLink( ROCHNYXAR, O53, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
304 - #self.addLink( ROCHNYXAR, O53, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 304 + self.addLink( ROCHNYXAR, O53, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
305 - #self.addLink( ROCHNYXAR, O53, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 305 + self.addLink( ROCHNYXAR, O53, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
306 - #self.addLink( ROCHNYXAR, O53, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 306 + self.addLink( ROCHNYXAR, O53, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
307 - #self.addLink( ROCHNYXAR, O53, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 307 + self.addLink( ROCHNYXAR, O53, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
308 self.addLink( PHNXAZMAR, O47, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 308 self.addLink( PHNXAZMAR, O47, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
309 - #self.addLink( PHNXAZMAR, O47, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 309 + self.addLink( PHNXAZMAR, O47, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
310 - #self.addLink( PHNXAZMAR, O47, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 310 + self.addLink( PHNXAZMAR, O47, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
311 - #self.addLink( PHNXAZMAR, O47, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 311 + self.addLink( PHNXAZMAR, O47, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
312 - #self.addLink( PHNXAZMAR, O47, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 312 + self.addLink( PHNXAZMAR, O47, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
313 self.addLink( ORLDFLMAR, O45, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 313 self.addLink( ORLDFLMAR, O45, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
314 - #self.addLink( ORLDFLMAR, O45, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 314 + self.addLink( ORLDFLMAR, O45, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
315 - #self.addLink( ORLDFLMAR, O45, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 315 + self.addLink( ORLDFLMAR, O45, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
316 - #self.addLink( ORLDFLMAR, O45, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 316 + self.addLink( ORLDFLMAR, O45, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
317 - #self.addLink( ORLDFLMAR, O45, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 317 + self.addLink( ORLDFLMAR, O45, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
318 self.addLink( NWRKNJ02R, O40, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 318 self.addLink( NWRKNJ02R, O40, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
319 - #self.addLink( NWRKNJ02R, O40, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 319 + self.addLink( NWRKNJ02R, O40, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
320 - #self.addLink( NWRKNJ02R, O40, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 320 + self.addLink( NWRKNJ02R, O40, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
321 - #self.addLink( NWRKNJ02R, O40, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 321 + self.addLink( NWRKNJ02R, O40, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
322 - #self.addLink( NWRKNJ02R, O40, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 322 + self.addLink( NWRKNJ02R, O40, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
323 self.addLink( MPLSMNDTR, O36, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 323 self.addLink( MPLSMNDTR, O36, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
324 - #self.addLink( MPLSMNDTR, O36, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 324 + self.addLink( MPLSMNDTR, O36, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
325 - #self.addLink( MPLSMNDTR, O36, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 325 + self.addLink( MPLSMNDTR, O36, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
326 - #self.addLink( MPLSMNDTR, O36, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 326 + self.addLink( MPLSMNDTR, O36, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
327 - #self.addLink( MPLSMNDTR, O36, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 327 + self.addLink( MPLSMNDTR, O36, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
328 self.addLink( LSANCA03R, O29, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 328 self.addLink( LSANCA03R, O29, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
329 - #self.addLink( LSANCA03R, O29, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 329 + self.addLink( LSANCA03R, O29, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
330 - #self.addLink( LSANCA03R, O29, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 330 + self.addLink( LSANCA03R, O29, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
331 - #self.addLink( LSANCA03R, O29, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 331 + self.addLink( LSANCA03R, O29, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
332 - #self.addLink( LSANCA03R, O29, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 332 + self.addLink( LSANCA03R, O29, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
333 self.addLink( DLLSTXTLR, O18, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 333 self.addLink( DLLSTXTLR, O18, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
334 - #self.addLink( DLLSTXTLR, O18, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 334 + self.addLink( DLLSTXTLR, O18, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
335 - #self.addLink( DLLSTXTLR, O18, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 335 + self.addLink( DLLSTXTLR, O18, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
336 - #self.addLink( DLLSTXTLR, O18, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 336 + self.addLink( DLLSTXTLR, O18, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
337 - #self.addLink( DLLSTXTLR, O18, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 337 + self.addLink( DLLSTXTLR, O18, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
338 self.addLink( ATLNGATLR, O4, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 338 self.addLink( ATLNGATLR, O4, port1=2, port2=10, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
339 - #self.addLink( ATLNGATLR, O4, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 339 + self.addLink( ATLNGATLR, O4, port1=3, port2=11, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
340 - #self.addLink( ATLNGATLR, O4, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 340 + self.addLink( ATLNGATLR, O4, port1=4, port2=12, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
341 - #self.addLink( ATLNGATLR, O4, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 341 + self.addLink( ATLNGATLR, O4, port1=5, port2=13, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
342 - #self.addLink( ATLNGATLR, O4, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink ) 342 + self.addLink( ATLNGATLR, O4, port1=6, port2=14, speed1=10000, annotations={ "bandwidth": 100000, "optical.type": "cross-connect", "durable": "true" }, cls=OpticalLink )
343 343
344 # Create Hosts 1..11 344 # Create Hosts 1..11
345 h1 = self.addHost( 'h1' ) 345 h1 = self.addHost( 'h1' )
......