Catch exception generated during provisioning of subscriber
Before exceptions were silently dropped.
Also, rely on MacAddress.NONE definition for checking Mac Address validity.
Change-Id: Iec9d8a38df32708ddb0415a3b5116b7db685ea03
diff --git a/app/src/main/java/org/opencord/olt/impl/Olt.java b/app/src/main/java/org/opencord/olt/impl/Olt.java
index 000d5e6..0489f03 100644
--- a/app/src/main/java/org/opencord/olt/impl/Olt.java
+++ b/app/src/main/java/org/opencord/olt/impl/Olt.java
@@ -686,6 +686,10 @@
log.warn("Meter installation error while sending upstream flows. " +
"Result {} and MeterId {}", result, upstreamMeterId);
}
+ }).exceptionally(ex -> {
+ log.error("Upstream flow failed: " + ex.getMessage());
+ upFuture.complete(ObjectiveError.UNKNOWN);
+ return null;
});
downsteamMeterFuture.thenAcceptAsync(result -> {
@@ -719,6 +723,10 @@
log.warn("Meter installation error while sending upstream flows. " +
"Result {} and MeterId {}", result, downstreamMeterId);
}
+ }).exceptionally(ex -> {
+ log.error("Downstream flow failed: " + ex.getMessage());
+ downFuture.complete(ObjectiveError.UNKNOWN);
+ return null;
});
upFuture.thenAcceptBothAsync(downFuture, (upStatus, downStatus) -> {