VOL-4059 If multicast gem configuring for one UNI, the already created Multicast GEM and its InterworkingTP shouldn’t be created again.
Change-Id: I9574fb0f08053e441e7a60157f078a1ad3287b2a
diff --git a/internal/pkg/onuadaptercore/onu_uni_tp.go b/internal/pkg/onuadaptercore/onu_uni_tp.go
index af0fdbe..dff13d4 100644
--- a/internal/pkg/onuadaptercore/onu_uni_tp.go
+++ b/internal/pkg/onuadaptercore/onu_uni_tp.go
@@ -110,6 +110,18 @@
mapRemoveGemEntry map[uniTP]*gemPortParamStruct //per UNI: pointer to GemEntry to be removed
}
+func (onuTP *onuUniTechProf) multicastConfiguredForOtherUniTps(ctx context.Context, uniTpKey uniTP) bool {
+ for _, aniFsm := range onuTP.pAniConfigFsm {
+ if aniFsm.uniTpKey.uniID == uniTpKey.uniID && aniFsm.uniTpKey.tpID == uniTpKey.tpID {
+ continue
+ }
+ if aniFsm.hasMulticastGem(ctx) {
+ return true
+ }
+ }
+ return false
+}
+
//newOnuUniTechProf returns the instance of a OnuUniTechProf
//(one instance per ONU/deviceHandler for all possible UNI's)
func newOnuUniTechProf(ctx context.Context, aDeviceHandler *deviceHandler) *onuUniTechProf {