VOL-2029: Fix for OLT delete device.
Don't call core to get child device as onu might not exist during delete of parent device.
This would cause delays in delete and leaks with not releasing uniport resources.
Add the uni port to device handler for OLT when the uniport resources are allocated while adding flows.
Clear the uni port resources allocated during delete of olt device.
Also ensure the resources for the PON port are deleted in the background since the olt device delete
needs to finish within transaction timeout (8 seconds by default) and this can be time consuming.

Make the call to add uniPort to the ONU device after trap-nni flows.
make sca fixes to comment exported function.
And also change the uniPorts from array to a map for the onu device.

Change-Id: I4889032eab9c72acd64b5f553d5507c4d3bb00da
(cherry picked from commit bcdef458a348e0f6312c2e08221f5488fdec9ad4)
diff --git a/adaptercore/openolt_flowmgr.go b/adaptercore/openolt_flowmgr.go
index 7fb968f..50fae3c 100644
--- a/adaptercore/openolt_flowmgr.go
+++ b/adaptercore/openolt_flowmgr.go
@@ -1302,6 +1302,7 @@
 
 	log.Infow("Flow ports", log.Fields{"classifierInfo_inport": classifierInfo[InPort], "action_output": actionInfo[Output]})
 	portNo, intfID, onuID, uniID := ExtractAccessFromFlow(classifierInfo[InPort].(uint32), actionInfo[Output].(uint32))
+
 	if ethType, ok := classifierInfo[EthType]; ok {
 		if ethType.(uint32) == LldpEthType {
 			log.Info("Adding LLDP flow")
@@ -1320,6 +1321,9 @@
 			}
 		}
 	}
+
+	f.deviceHandler.AddUniPortToOnu(intfID, onuID, portNo)
+
 	/* Metadata 8 bytes:
 	    Most Significant 2 Bytes = Inner VLAN
 	    Next 2 Bytes = Tech Profile ID(TPID)