Thomas Vachuska

Merge remote-tracking branch 'origin/master'

......@@ -291,6 +291,17 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
linkProviderService.linkDetected(linkDescription);
log.info(String.format("WDM link: %s : %s",
linkDescription.src().toString(), linkDescription.dst().toString()));
DefaultLinkDescription linkDescriptionReverse =
new DefaultLinkDescription(snkPoint,
srcPoint,
Link.Type.OPTICAL,
extendedAttributes);
linkProviderService.linkDetected(linkDescriptionReverse);
log.info(String.format("WDM link: %s : %s",
linkDescriptionReverse.src().toString(), linkDescriptionReverse.dst().toString()));
}
// Discover the packet optical link objects
......@@ -322,6 +333,16 @@ public class OpticalConfigProvider extends AbstractProvider implements DevicePro
linkProviderService.linkDetected(linkDescription);
log.info(String.format("Packet-optical link: %s : %s",
linkDescription.src().toString(), linkDescription.dst().toString()));
DefaultLinkDescription linkDescriptionReverse =
new DefaultLinkDescription(snkPoint,
srcPoint,
Link.Type.OPTICAL,
extendedAttributes);
linkProviderService.linkDetected(linkDescriptionReverse);
log.info(String.format("Packet-optical link: %s : %s",
linkDescriptionReverse.src().toString(), linkDescriptionReverse.dst().toString()));
}
}
......
......@@ -52,37 +52,9 @@
},
"type": "wdmLink"
},
{
"allowed": true,
"nodeDpid1": "00:00:ff:ff:ff:ff:ff:03",
"nodeDpid2": "00:00:ff:ff:ff:ff:ff:01",
"params": {
"distKms": 1000,
"nodeName1": "ROADM3",
"nodeName2": "ROADM1",
"numWaves": 80,
"port1": 30,
"port2": 10
},
"type": "wdmLink"
},
{
"allowed": true,
"nodeDpid1": "00:00:ff:ff:ff:ff:ff:02",
"nodeDpid2": "00:00:ff:ff:ff:ff:ff:03",
"params": {
"distKms": 2000,
"nodeName1": "ROADM2",
"nodeName2": "ROADM3",
"numWaves": 80,
"port1": 20,
"port2": 31
},
"type": "wdmLink"
},
{
"allowed": true,
"nodeDpid1": "00:00:ff:ff:ff:ff:ff:03",
"nodeDpid2": "00:00:ff:ff:ff:ff:ff:02",
"params": {
......@@ -104,20 +76,7 @@
"nodeName1": "ROUTER1",
"nodeName2": "ROADM1",
"bandWidth": 100000,
"port1": 10,
"port2": 10
},
"type": "pktOptLink"
},
{
"allowed": true,
"nodeDpid1": "00:00:ff:ff:ff:ff:ff:01",
"nodeDpid2": "00:00:ff:ff:ff:ff:00:01",
"params": {
"nodeName1": "ROADM1",
"nodeName2": "ROUTER1",
"bandWidth": 100000,
"port1": 11,
"port1": 1,
"port2": 10
},
"type": "pktOptLink"
......@@ -131,24 +90,11 @@
"nodeName1": "ROUTER2",
"nodeName2": "ROADM2",
"bandWidth": 100000,
"port1": 10,
"port1": 1,
"port2": 11
},
"type": "pktOptLink"
},
{
"allowed": true,
"nodeDpid1": "00:00:ff:ff:ff:ff:ff:02",
"nodeDpid2": "00:00:ff:ff:ff:ff:00:02",
"params": {
"nodeName1": "ROADM2",
"nodeName2": "ROUTER2",
"bandWidth": 100000,
"port1": 21,
"port2": 10
},
"type": "pktOptLink"
}
]
}
......
......@@ -70,6 +70,7 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
public List<Intent> compile(OpticalConnectivityIntent intent) {
// TODO: compute multiple paths using the K-shortest path algorithm
List<Intent> retList = new ArrayList<>();
log.info("The system is comipling the OpticalConnectivityIntent:" + intent.toString());
Path path = calculatePath(intent.getSrcConnectPoint(), intent.getDst());
if (path == null) {
return retList;
......@@ -88,6 +89,8 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
intent.getDst(),
path);
log.info("a new OpticalPathIntent was created: " + newIntent.toString());
retList.add(newIntent);
return retList;
......@@ -123,6 +126,7 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
Iterator<Path> itr = paths.iterator();
while (itr.hasNext()) {
Path path = itr.next();
// log.info(String.format("total link number.:%d", path.links().size()));
if (path.cost() >= 10000) {
itr.remove();
}
......
......@@ -116,6 +116,7 @@ public class OpticalPathIntentInstaller implements IntentInstaller<OpticalPathIn
appId,
100,
true);
rules.add(new FlowRuleBatchEntry(FlowRuleOperation.ADD, rule));
prev = link.dst();
......