SEBA-1009-Minor version upgrade
Change-Id: I3fff2718ed28842872773fa0a93f73f127545f2f
diff --git a/impl/src/test/java/org/opencord/olt/impl/OltFlowTest.java b/impl/src/test/java/org/opencord/olt/impl/OltFlowTest.java
index 3283886..7defeb9 100644
--- a/impl/src/test/java/org/opencord/olt/impl/OltFlowTest.java
+++ b/impl/src/test/java/org/opencord/olt/impl/OltFlowTest.java
@@ -23,6 +23,7 @@
import java.util.Set;
import java.util.concurrent.CompletableFuture;
+import com.google.common.collect.Maps;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.Before;
import org.junit.Test;
@@ -116,6 +117,7 @@
oltFlowService.sadisService = new MockSadisService();
oltFlowService.bpService = oltFlowService.sadisService.getBandwidthProfileService();
oltFlowService.appId = appId;
+ oltFlowService.pendingEapolForDevice = Maps.newConcurrentMap();
}
@Test
@@ -123,56 +125,56 @@
oltFlowService.flowObjectiveService.clearQueue();
// ensure upstream dhcp traps can be added and removed
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 1;
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- false, true);
+ usMeterId, uniTagInfo,
+ false, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 2;
// Ensure upstream flow has no pcp unless properly specified.
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber2,
- usMeterId, uniTagInfoNoPcp,
- true, true);
+ usMeterId, uniTagInfoNoPcp,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 3;
// ensure upstream flows are not added if uniTagInfo is missing dhcp requirement
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfoNoDhcpNoIgmp,
- true, true);
+ usMeterId, uniTagInfoNoDhcpNoIgmp,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 3;
// ensure downstream traps don't succeed without global config for nni ports
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- true, false);
+ null, null,
+ true, false);
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- false, false);
+ null, null,
+ false, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 3;
// do global config for nni ports and now it should succeed
oltFlowService.enableDhcpOnNni = true;
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- true, false);
+ null, null,
+ true, false);
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- false, false);
+ null, null,
+ false, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 5;
// turn on DHCPv6 and we should get 2 flows
oltFlowService.enableDhcpV6 = true;
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 7;
// turn off DHCPv4 and it's only v6
oltFlowService.enableDhcpV4 = false;
oltFlowService.processDhcpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 8;
// cleanup
@@ -188,29 +190,29 @@
// ensure pppoed traps are not added if global config is off.
oltFlowService.enablePppoe = false;
oltFlowService.processPPPoEDFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 0;
// ensure upstream pppoed traps can be added and removed
oltFlowService.enablePppoe = true;
oltFlowService.processPPPoEDFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 1;
oltFlowService.processPPPoEDFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- false, true);
+ usMeterId, uniTagInfo,
+ false, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 2;
// ensure downstream pppoed traps can be added and removed
oltFlowService.processPPPoEDFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- true, false);
+ null, null,
+ true, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 3;
oltFlowService.processPPPoEDFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- false, false);
+ null, null,
+ false, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 4;
// cleanup
@@ -223,31 +225,31 @@
// ensure igmp flows can be added and removed
oltFlowService.processIgmpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfo,
- true, true);
+ usMeterId, uniTagInfo,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 1;
oltFlowService.processIgmpFilteringObjectives(DEVICE_ID_1, uniPortNumber, usMeterId,
- uniTagInfo,
- false, true);
+ uniTagInfo,
+ false, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 2;
// ensure igmp flow is not added if uniTag has no igmp requirement
oltFlowService.processIgmpFilteringObjectives(DEVICE_ID_1, uniPortNumber,
- usMeterId, uniTagInfoNoDhcpNoIgmp,
- true, true);
+ usMeterId, uniTagInfoNoDhcpNoIgmp,
+ true, true);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 2;
//ensure igmp flow on NNI fails without global setting
oltFlowService.processIgmpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- true, false);
+ null, null,
+ true, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 2;
// igmp trap on NNI should succeed with global config
oltFlowService.enableIgmpOnNni = true;
oltFlowService.processIgmpFilteringObjectives(DEVICE_ID_1, nniPortNumber,
- null, null,
- true, false);
+ null, null,
+ true, false);
assert oltFlowService.flowObjectiveService.getPendingFlowObjectives().size() == 3;
// cleanup
oltFlowService.flowObjectiveService.clearQueue();
@@ -331,7 +333,7 @@
assert selector.getCriterion(Criterion.Type.VLAN_VID) != null;
if (!upstream) {
- assert selector.getCriterion(Criterion.Type.METADATA) != null;
+ assert selector.getCriterion(Criterion.Type.METADATA) != null;
}
}
diff --git a/impl/src/test/java/org/opencord/olt/impl/OltTest.java b/impl/src/test/java/org/opencord/olt/impl/OltTest.java
index c417590..af63004 100644
--- a/impl/src/test/java/org/opencord/olt/impl/OltTest.java
+++ b/impl/src/test/java/org/opencord/olt/impl/OltTest.java
@@ -18,6 +18,8 @@
import static org.junit.Assert.assertEquals;
import java.util.Set;
+
+import com.google.common.collect.Maps;
import org.junit.Before;
import org.junit.Test;
@@ -53,6 +55,7 @@
olt.deviceService = new MockDeviceService();
olt.sadisService = new MockSadisService();
olt.subsService = olt.sadisService.getSubscriberInfoService();
+ olt.pendingSubscribersForDevice = Maps.newConcurrentMap();
}
/**
@@ -75,7 +78,7 @@
public void testGetSubscriber() {
ConnectPoint cp = ConnectPoint.deviceConnectPoint(OLT_DEV_ID + "/" + 2);
- SubscriberAndDeviceInformation s = olt.getSubscriber(cp);
+ SubscriberAndDeviceInformation s = olt.getSubscriber(cp);
assertEquals(s.circuitId(), CLIENT_CIRCUIT_ID);
assertEquals(s.nasPortId(), CLIENT_NAS_PORT_ID);
@@ -114,28 +117,33 @@
}
}
- private class MockPort implements Port {
+ private class MockPort implements Port {
@Override
public boolean isEnabled() {
return true;
}
+
@Override
public long portSpeed() {
return 1000;
}
+
@Override
public Element element() {
return null;
}
+
@Override
public PortNumber number() {
return null;
}
+
@Override
public Annotations annotations() {
return new MockAnnotations();
}
+
@Override
public Type type() {
return Port.Type.FIBER;
@@ -147,6 +155,7 @@
public String value(String val) {
return "BRCM12345678";
}
+
@Override
public Set<String> keys() {
return null;
@@ -155,7 +164,4 @@
}
-
-
-
}
\ No newline at end of file
diff --git a/impl/src/test/java/org/opencord/olt/impl/TestBase.java b/impl/src/test/java/org/opencord/olt/impl/TestBase.java
index 4d7bcd5..b6546d0 100644
--- a/impl/src/test/java/org/opencord/olt/impl/TestBase.java
+++ b/impl/src/test/java/org/opencord/olt/impl/TestBase.java
@@ -82,6 +82,11 @@
private class MockBpService implements BaseInformationService<BandwidthProfileInformation> {
@Override
+ public void clearLocalData() {
+
+ }
+
+ @Override
public void invalidateAll() {
}
@@ -113,6 +118,11 @@
}
@Override
+ public void clearLocalData() {
+
+ }
+
+ @Override
public void invalidateAll() {
}