[SEBA-815]Multi Tcont support by OLT app.
[VOL-2525] Fixing the OLT app meter removal and optimizing the bandwith profile to meter map with a Multimap
Change-Id: I024ef2fcb3d3e59cc86bd2088726ae513fcff796
diff --git a/api/src/main/java/org/opencord/olt/AccessDeviceEvent.java b/api/src/main/java/org/opencord/olt/AccessDeviceEvent.java
index 3c189dd..3a4146c 100644
--- a/api/src/main/java/org/opencord/olt/AccessDeviceEvent.java
+++ b/api/src/main/java/org/opencord/olt/AccessDeviceEvent.java
@@ -29,21 +29,12 @@
private final Optional<VlanId> sVlan;
private final Optional<VlanId> cVlan;
+ private final Optional<Integer> tpId;
private final Optional<Port> port;
public enum Type {
/**
- * A subscriber was registered and provisioned.
- */
- SUBSCRIBER_REGISTERED,
-
- /**
- * A subscriber was unregistered and deprovisioned.
- */
- SUBSCRIBER_UNREGISTERED,
-
- /**
* An access device connected.
*/
DEVICE_CONNECTED,
@@ -61,55 +52,87 @@
/**
* An existing UNI port was removed.
*/
- UNI_REMOVED
+ UNI_REMOVED,
+
+ /**
+ * A uniTag (one service) was registered and provisioned.
+ */
+ SUBSCRIBER_UNI_TAG_REGISTERED,
+
+ /**
+ * A uniTag (one service) was unregistered and deprovisioned.
+ */
+ SUBSCRIBER_UNI_TAG_UNREGISTERED,
+
+ /**
+ * A uniTag (one service) was failed while registration.
+ */
+ SUBSCRIBER_UNI_TAG_REGISTRATION_FAILED,
+
+ /**
+ * A uniTag (one service) was failed while unregistration.
+ */
+ SUBSCRIBER_UNI_TAG_UNREGISTRATION_FAILED
}
/**
+ * Creates an event of a given type and for the specified device, port,
+ * along with the cVlanId, sVlanId, and tpId. The vlan fields may not be provisioned
+ * if the event is related to the access device (dis)connection.
*
+ * @param type the event type
+ * @param deviceId the device id
+ * @param port the device port
+ * @param sVlanId the service vlan
+ * @param cVlanId the customer vlan
+ * @param tpId the technology profile
+ */
+ public AccessDeviceEvent(Type type, DeviceId deviceId,
+ Port port,
+ VlanId sVlanId,
+ VlanId cVlanId,
+ Integer tpId) {
+ super(type, deviceId);
+ this.port = Optional.ofNullable(port);
+ this.sVlan = Optional.ofNullable(sVlanId);
+ this.cVlan = Optional.ofNullable(cVlanId);
+ this.tpId = Optional.ofNullable(tpId);
+ }
+
+ /**
* Creates an event of a given type and for the specified device,
* along with the cVlanId and sVlanId. The vlan fields may not be provisioned
* if the event is related to the access device (dis)connection.
*
- * @param type the event type
+ * @param type the event type
* @param deviceId the device id
- * @param sVlanId the service vlan
- * @param cVlanId the customer vlan
+ * @param sVlanId the service vlan
+ * @param cVlanId the customer vlan
+ * @param tpId the technology profile id
*/
public AccessDeviceEvent(Type type, DeviceId deviceId,
VlanId sVlanId,
- VlanId cVlanId) {
+ VlanId cVlanId,
+ Integer tpId) {
super(type, deviceId);
this.sVlan = Optional.ofNullable(sVlanId);
this.cVlan = Optional.ofNullable(cVlanId);
+ this.tpId = Optional.ofNullable(tpId);
this.port = Optional.empty();
}
/**
+ * Creates an event of a given type and for the specified device and port.
*
- * Creates an event of a given type and for the specified device, and timestamp
- * along with the cVlanId and sVlanId. The vlan fields may not be provisioned
- * if the event is related to the access device (dis)connection.
- *
- * @param type the event type
+ * @param type the event type
* @param deviceId the device id
- * @param time a timestamp
- * @param sVlanId the service vlan
- * @param cVlanId the customer vlan
+ * @param port the device port
*/
- protected AccessDeviceEvent(Type type, DeviceId deviceId, long time,
- VlanId sVlanId,
- VlanId cVlanId) {
- super(type, deviceId, time);
- this.sVlan = Optional.ofNullable(sVlanId);
- this.cVlan = Optional.ofNullable(cVlanId);
- this.port = Optional.empty();
-
- }
-
public AccessDeviceEvent(Type type, DeviceId deviceId, Port port) {
super(type, deviceId);
this.sVlan = Optional.empty();
this.cVlan = Optional.empty();
+ this.tpId = Optional.empty();
this.port = Optional.ofNullable(port);
}
@@ -125,4 +148,8 @@
return port;
}
+ public Optional<Integer> tpId() {
+ return tpId;
+ }
+
}