Some fixes for the optical app
Change-Id: Ib3e317ad080d822ac41b1cf113ba388a7ce78316
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
index c102a6e..0321064 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/OpticalPathIntentInstaller.java
@@ -101,14 +101,19 @@
@Override
public List<FlowRuleBatchOperation> uninstall(OpticalPathIntent intent) {
LinkResourceAllocations allocations = resourceService.getAllocations(intent.id());
- return generateRules(intent, allocations, FlowRuleOperation.REMOVE);
+ List<FlowRuleBatchOperation> rules = generateRules(intent, allocations, FlowRuleOperation.REMOVE);
+ log.info("uninstall rules: {}", rules);
+ return rules;
}
@Override
- public List<FlowRuleBatchOperation> replace(OpticalPathIntent intent,
+ public List<FlowRuleBatchOperation> replace(OpticalPathIntent oldIntent,
OpticalPathIntent newIntent) {
// FIXME: implement this
- return null;
+ List<FlowRuleBatchOperation> batches = Lists.newArrayList();
+ batches.addAll(uninstall(oldIntent));
+ batches.addAll(install(newIntent));
+ return batches;
}
private LinkResourceAllocations assignWavelength(OpticalPathIntent intent) {