Create host with ASG location only
Partial revert of #17120
Change-Id: I6c67f0c4f05abf5b2e4ded1aec8ebf88c144cbde
diff --git a/app/src/main/java/org/opencord/bng/impl/BngManager.java b/app/src/main/java/org/opencord/bng/impl/BngManager.java
index fa5c755..30c872a 100644
--- a/app/src/main/java/org/opencord/bng/impl/BngManager.java
+++ b/app/src/main/java/org/opencord/bng/impl/BngManager.java
@@ -253,19 +253,26 @@
ConnectPoint asgConnectPoint,
ConnectPoint oltConnectPoint,
String onuSerialNumber) {
- Set<HostLocation> hostLocation = Set.of(new HostLocation(oltConnectPoint.deviceId(),
- oltConnectPoint.port(),
- System.currentTimeMillis()));
- Set<HostLocation> auxLocation = Set.of(new HostLocation(asgConnectPoint.deviceId(),
- asgConnectPoint.port(),
- System.currentTimeMillis()));
+// FIXME: use auxLocation when ONOS bug is fixed.
+// Set<HostLocation> auxLocation = Set.of(new HostLocation(asgConnectPoint.deviceId(),
+// asgConnectPoint.port(),
+// System.currentTimeMillis()));
+// Set<HostLocation> hostLocation = Set.of(new HostLocation(oltConnectPoint.deviceId(),
+// oltConnectPoint.port(),
+// System.currentTimeMillis()));
+
+ Set<HostLocation> hostLocation = Set.of(new HostLocation(asgConnectPoint.deviceId(),
+ asgConnectPoint.port(),
+ System.currentTimeMillis()));
+
var annotations = DefaultAnnotations.builder()
.set(ONU_ANNOTATION, onuSerialNumber)
.build();
Set<IpAddress> ips = hostIp != null
? ImmutableSet.of(hostIp) : ImmutableSet.of();
return new DefaultHostDescription(hostMac, sTag,
- hostLocation, auxLocation,
+ hostLocation,
+// auxLocation,
ips, cTag, EthType.EtherType.QINQ.ethType(),
false, annotations);
}
diff --git a/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
index c840efc..237ecce 100644
--- a/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
+++ b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
@@ -132,7 +132,9 @@
/**
* Ephemeral internal map to trace the attachment information. This map is
* mainly used to modify the packet towards the PPPoE server or towards the
- * attachment. FIXME: this map should be cleaned after some time.
+ * attachment.
+ * FIXME: this map should be cleaned after some time.
+ * FIXME: consider the case of user that moves around
*/
private Map<MacAddress, BngAttachment> mapSrcMacToAttInfo;