BGP router now handles the case where groups don't exists right away.
Also reworked some logic to make delete routes work.
Change-Id: I1f65279284b85144a847f1295fcbd7695cb59167
diff --git a/core/store/dist/src/main/java/org/onosproject/store/statistic/impl/DistributedStatisticStore.java b/core/store/dist/src/main/java/org/onosproject/store/statistic/impl/DistributedStatisticStore.java
index 9c12528..64ebf06 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/statistic/impl/DistributedStatisticStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/statistic/impl/DistributedStatisticStore.java
@@ -288,8 +288,16 @@
private ConnectPoint buildConnectPoint(FlowRule rule) {
PortNumber port = getOutput(rule);
+
+ boolean hasGoto = rule.treatment().instructions()
+ .stream()
+ .anyMatch(i -> (i instanceof Instructions.GroupInstruction)
+ || (i instanceof Instructions.TableTypeTransition));
+
if (port == null) {
- log.debug("Rule {} has no output.", rule);
+ if (!hasGoto) {
+ log.debug("Rule {} has no output.", rule);
+ }
return null;
}
ConnectPoint cp = new ConnectPoint(rule.deviceId(), port);
diff --git a/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleStatisticStore.java b/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleStatisticStore.java
index 492ab27..9cfa41d 100644
--- a/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleStatisticStore.java
+++ b/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleStatisticStore.java
@@ -154,8 +154,16 @@
private ConnectPoint buildConnectPoint(FlowRule rule) {
PortNumber port = getOutput(rule);
+
+ boolean hasGoto = rule.treatment().instructions()
+ .stream()
+ .anyMatch(i -> (i instanceof Instructions.GroupInstruction)
+ || (i instanceof Instructions.TableTypeTransition));
+
if (port == null) {
- log.debug("Rule {} has no output.", rule);
+ if (!hasGoto) {
+ log.debug("Rule {} has no output.", rule);
+ }
return null;
}
ConnectPoint cp = new ConnectPoint(rule.deviceId(), port);