correction in device reason update for tech profile (tcont) removal

Signed-off-by: mpagenko <michael.pagenkopf@adtran.com>
Change-Id: I451be78d2720d0d1ae8fb4c718bd39eb08afa249
diff --git a/internal/pkg/onuadaptercore/onu_device_entry.go b/internal/pkg/onuadaptercore/onu_device_entry.go
index 2603ca0..a494418 100644
--- a/internal/pkg/onuadaptercore/onu_device_entry.go
+++ b/internal/pkg/onuadaptercore/onu_device_entry.go
@@ -747,10 +747,10 @@
 
 	for k, v := range oo.sOnuPersistentData.PersUniConfig {
 		if v.PersUniID == aUniID {
-			logger.Debugw(ctx, "PersUniConfig-entry already exists", log.Fields{"device-id": oo.deviceID, "uniID": aUniID})
+			logger.Debugw(ctx, "PersUniConfig-entry exists", log.Fields{"device-id": oo.deviceID, "uniID": aUniID})
 			existingPath, ok := oo.sOnuPersistentData.PersUniConfig[k].PersTpPathMap[aTpID]
 			if !ok {
-				logger.Debugw(ctx, "tp-does-not-exist--to-be-created-afresh", log.Fields{"device-id": oo.deviceID, "uniID": aUniID, "tpID": aTpID, "path": aPathString})
+				logger.Debugw(ctx, "tp-does-not-exist", log.Fields{"device-id": oo.deviceID, "uniID": aUniID, "tpID": aTpID, "path": aPathString})
 			}
 			if existingPath != aPathString {
 				if aPathString == "" {
@@ -769,11 +769,6 @@
 				//no active TechProfile
 				logger.Debugw(ctx, "UniTp path has already been removed - no AniSide config to be removed", log.Fields{
 					"device-id": oo.deviceID, "uniID": aUniID})
-				// attention 201105: this block is at the moment entered for each of subsequent GemPortDeletes and TContDelete
-				//   as the path is already cleared with the first GemPort - this will probably change with the upcoming real
-				//   TechProfile removal (still TODO), but anyway the reasonUpdate initiated here should not harm overall behavior
-				go oo.baseDeviceHandler.deviceProcStatusUpdate(ctx, OmciAniResourceRemoved)
-				// no flow config pending on 'remove' so far
 			} else {
 				//the given TechProfile already exists and is assumed to be active - update devReason as if the config has been done here
 				//was needed e.g. in voltha POD Tests:Validate authentication on a disabled ONU
@@ -823,6 +818,11 @@
 		}
 	}
 	//flow update was faster than tp-config - create PersUniConfig-entry
+	//TODO!!: following activity to 'add' some new uni entry might not be quite correct if this function is called to clear the data
+	//  (e.g after flow removal from RemoveUniFlowParams()).
+	//  This has the effect of misleading indication that there is still some active UNI entry, even though there might be only some nil flow entry
+	//  The effect of this flaw is that at TechProfile removal there is an additional attempt to remove the entry even though no techProfile exists anymore
+	//  The code is not changed here because of the current release lane, changes might have unexpected secondary effects, perhaps later with more elaborate tests
 	tmpConfig := uniPersConfig{PersUniID: aUniID, PersTpPathMap: make(map[uint8]string), PersFlowParams: make([]uniVlanFlowParams, len(*aUniVlanFlowParams))}
 	copy(tmpConfig.PersFlowParams, *aUniVlanFlowParams)
 	oo.sOnuPersistentData.PersUniConfig = append(oo.sOnuPersistentData.PersUniConfig, tmpConfig)