VOL-2408 - Refactor / Use voltha-lib-go Logging
Change-Id: I6e7d9eaba49c104cd50bb5692a2ff9733014fac4
diff --git a/openflow/utils.go b/openflow/utils.go
index 7994fd2..d87c338 100644
--- a/openflow/utils.go
+++ b/openflow/utils.go
@@ -17,9 +17,7 @@
package openflow
import (
- "encoding/json"
"fmt"
- "log"
"strings"
"sync"
@@ -62,8 +60,6 @@
outputAction.Output = &output
ofpAction.Action = &outputAction
ofpAction.Type = openflow_13.OfpActionType_OFPAT_OUTPUT
- js, _ := json.Marshal(outputAction)
- log.Printf("EXTRACT ACTION %s", js)
case ofp.OFPATCopyTtlOut: //CopyTtltOut
case ofp.OFPATCopyTtlIn: //CopyTtlIn
case ofp.OFPATSetMplsTtl: //SetMplsTtl
@@ -71,9 +67,6 @@
case ofp.OFPATPushVLAN: //PushVlan
var pushVlan openflow_13.OfpAction_Push
loxiPushAction := action.(*ofp.ActionPushVlan)
- fields := loxiPushAction.GetActionFields()
- fieldsJS, _ := json.Marshal(fields)
- log.Printf("\n\nPushVlan fields %s\n\n", fieldsJS)
var push openflow_13.OfpActionPush
push.Ethertype = uint32(loxiPushAction.Ethertype) //TODO This should be available in the fields
pushVlan.Push = &push
@@ -98,6 +91,7 @@
loxiSetField := action.(*ofp.ActionSetField)
oxmName := loxiSetField.Field.GetOXMName()
switch oxmName {
+ //TODO handle set field sith other fields
case "vlan_vid":
ofpOxmOfbField.Type = openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID
var vlanVid openflow_13.OfpOxmOfbField_VlanVid
@@ -105,8 +99,6 @@
vlanVid.VlanVid = uint32(VlanVid)
ofpOxmOfbField.Value = &vlanVid
- default:
- log.Printf("UNHANDLED SET FIELD %s", oxmName)
}
ofpOxmField_OfbField.OfbField = &ofpOxmOfbField
ofpOxmField.Field = &ofpOxmField_OfbField