[VOL-3068] Openolt flow manager must support set_field action
for vlan_pcp

Change-Id: I800123252bb2787c37e2c4a6f1b8484e88ccf6d6
diff --git a/internal/pkg/core/openolt_flowmgr.go b/internal/pkg/core/openolt_flowmgr.go
index ffdde7e..0031887 100644
--- a/internal/pkg/core/openolt_flowmgr.go
+++ b/internal/pkg/core/openolt_flowmgr.go
@@ -2930,13 +2930,18 @@
 
 func formulateSetFieldActionInfoFromFlow(field *ofp.OfpOxmField, actionInfo map[string]interface{}) {
 	if ofbField := field.GetOfbField(); ofbField != nil {
-		if fieldtype := ofbField.GetType(); fieldtype == ofp.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID {
+		fieldtype := ofbField.GetType()
+		if fieldtype == ofp.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID {
 			if vlan := ofbField.GetVlanVid(); vlan != 0 {
 				actionInfo[VlanVid] = vlan & 0xfff
 				logger.Debugw("action-set-vlan-vid", log.Fields{"actionInfo[VLAN_VID]": actionInfo[VlanVid].(uint32)})
 			} else {
 				logger.Error("No Invalid vlan id in set vlan-vid action")
 			}
+		} else if fieldtype == ofp.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_PCP {
+			pcp := ofbField.GetVlanPcp()
+			actionInfo[VlanPcp] = pcp
+			log.Debugw("action-set-vlan-pcp", log.Fields{"actionInfo[VLAN_PCP]": actionInfo[VlanPcp].(uint32)})
 		} else {
 			logger.Errorw("unsupported-action-set-field-type", log.Fields{"type": fieldtype})
 		}