blob: cfd9c09d3bae4056cf2409e08a81f28a88c41d34 [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001/*
David K. Bainbridge157bdab2020-01-16 14:38:05 -08002 Copyright 2020 the original author or authors.
Don Newton98fd8812019-09-23 15:15:02 -04003
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17package openflow
18
19import (
Rohan Agrawalc32d9932020-06-15 11:01:47 +000020 "context"
Don Newton98fd8812019-09-23 15:15:02 -040021 "encoding/json"
Jonathan Hart828908c2020-04-15 14:23:45 -070022 ofp "github.com/opencord/goloxi/of13"
Maninder12b909f2020-10-23 14:23:36 +053023 "github.com/opencord/voltha-lib-go/v4/pkg/log"
Don Newton98fd8812019-09-23 15:15:02 -040024)
25
Rohan Agrawalc32d9932020-06-15 11:01:47 +000026func (ofc *OFConnection) handleErrMsg(ctx context.Context, message ofp.IErrorMsg) {
David K. Bainbridge157bdab2020-01-16 14:38:05 -080027 if logger.V(log.DebugLevel) {
Don Newton7577f072020-01-06 12:41:11 -050028 js, _ := json.Marshal(message)
Rohan Agrawalc32d9932020-06-15 11:01:47 +000029 logger.Debugw(ctx, "handleErrMsg called",
David K. Bainbridge157bdab2020-01-16 14:38:05 -080030 log.Fields{
31 "device-id": ofc.DeviceID,
32 "request": js})
Don Newton7577f072020-01-06 12:41:11 -050033 }
Don Newton98fd8812019-09-23 15:15:02 -040034 //Not sure yet what if anything to do here
35}