- Fix PM_Notes.md
- include ME Class ID info as part for UniStatus group metric

Change-Id: I42ddd9df833c802601c1cba7970fe60d2396a680
diff --git a/PM_Notes.md b/PM_Notes.md
index 4148207..cc05163 100644
--- a/PM_Notes.md
+++ b/PM_Notes.md
@@ -39,11 +39,20 @@
 // UniStatusGroupMetrics are supported UNI status names
 var UniStatusGroupMetrics = map[string]voltha.PmConfig_PmType{
 	"uni_port_no":     voltha.PmConfig_CONTEXT,
-	"ethernet_type":   voltha.PmConfig_GAUGE,
+	"me_class_id":     voltha.PmConfig_CONTEXT,
+	"entity_id":       voltha.PmConfig_CONTEXT,
+	"sensed_type":     voltha.PmConfig_GAUGE,
 	"oper_status":     voltha.PmConfig_GAUGE,
 	"uni_admin_state": voltha.PmConfig_GAUGE,
 }
 ```
+Note:
+1. UniStatusMetrics comprise metrics for either PPTP or VEIP ME's and the UNI-G ME.
+2. me_class_id defines the corresponding metric type with the ME class value as defined in G988, Table 12.2.4-1
+3. `sensed_type` is relevant only for PPTP ME (meaning me_class_id = 11) and per G.988 specification, "When a circuit pack is present, this attribute represents its type as one of the values from Table 9.1.5-1."
+4. Valid values for `oper_state` are 0 (enabled) and 1 (disabled)
+5. Valid values for `uni_admin_state` are 0 (unlocks) and 1 (locks)
+6. `oper_state` and `uni_admin_state` are relevant for both PPTP (me_class_id = 11) and VEIP ME (me_class_id = 329), however only `uni_admin_state` is relevant for UNI-G ME (me_class_id = 264).
 
 ### _EthernetBridgeHistory_
 ```
@@ -190,8 +199,8 @@
             },
             "metrics":{
                "ani_g_instance_id":32769,
-               "receive_power":57645,
-               "transmit_power":2748
+               "receive_power_dBm":1.2,
+               "transmit_power_dBm":-16.7
             }
          }
       ]
@@ -256,9 +265,11 @@
 ```
 Note: For more `event listen` options, check `voltctl event listen --help` command.
 
-## Remaining work
+## Future work
 The following Metrics could be supported in the future.
 
+- ANI-G Test report on demand
+- EthernetBridgeHistory and EthernetUniHistory counters on demand
 - xgPON_TC_History
 - xgPON_Downstream_History
 - xgPON_Upstream_History
diff --git a/VERSION b/VERSION
index 9579863..71364a5 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.7-dev181
+1.2.7-dev182
diff --git a/internal/pkg/onuadaptercore/onu_metrics_manager.go b/internal/pkg/onuadaptercore/onu_metrics_manager.go
index d94e102..984f8ab 100644
--- a/internal/pkg/onuadaptercore/onu_metrics_manager.go
+++ b/internal/pkg/onuadaptercore/onu_metrics_manager.go
@@ -82,8 +82,9 @@
 // UniStatusGroupMetrics are supported UNI status names
 var UniStatusGroupMetrics = map[string]voltha.PmConfig_PmType{
 	"uni_port_no":     voltha.PmConfig_CONTEXT,
+	"me_class_id":     voltha.PmConfig_CONTEXT,
 	"entity_id":       voltha.PmConfig_CONTEXT,
-	"ethernet_type":   voltha.PmConfig_GAUGE,
+	"sensed_type":     voltha.PmConfig_GAUGE,
 	"oper_status":     voltha.PmConfig_GAUGE,
 	"uni_admin_state": voltha.PmConfig_GAUGE,
 }
@@ -764,9 +765,11 @@
 				for _, uni := range mm.pDeviceHandler.uniEntityMap {
 					if uni.entityID == entityID {
 						unigMetrics["uni_port_no"] = float32(uni.portNo)
+						break
 					}
 				}
 			}
+			unigMetrics["me_class_id"] = float32(me.UniGClassID)
 
 			// create slice of metrics given that there could be more than one UNI-G instance
 			metricInfo := voltha.MetricInformation{Metadata: &mmd, Metrics: unigMetrics}
@@ -798,7 +801,7 @@
 			// Populate metric only if it was enabled.
 			for k := range UniStatusGroupMetrics {
 				switch k {
-				case "ethernet_type":
+				case "sensed_type":
 					if val, ok := meAttributes["SensedType"]; ok && val != nil {
 						pptpMetrics[k] = float32(val.(byte))
 					}
@@ -822,9 +825,11 @@
 			for _, uni := range mm.pDeviceHandler.uniEntityMap {
 				if uni.entityID == entityID {
 					pptpMetrics["uni_port_no"] = float32(uni.portNo)
+					break
 				}
 			}
 		}
+		pptpMetrics["me_class_id"] = float32(me.PhysicalPathTerminationPointEthernetUniClassID)
 
 		// create slice of metrics given that there could be more than one PPTP instance and
 		metricInfo := voltha.MetricInformation{Metadata: &mmd, Metrics: pptpMetrics}
@@ -876,9 +881,11 @@
 			for _, uni := range mm.pDeviceHandler.uniEntityMap {
 				if uni.entityID == entityID {
 					veipMetrics["uni_port_no"] = float32(uni.portNo)
+					break
 				}
 			}
 		}
+		veipMetrics["me_class_id"] = float32(me.VirtualEthernetInterfacePointClassID)
 
 		// create slice of metrics given that there could be more than one VEIP instance
 		metricInfo := voltha.MetricInformation{Metadata: &mmd, Metrics: veipMetrics}