VOL-2153 remove flow_utils.go from voltha-go
Change-Id: I81bdc9ed78e6a6b00a176f9c8366ff56fb7777b0
diff --git a/rw_core/core/device_agent.go b/rw_core/core/device_agent.go
index 4a5274b..c8e07a9 100755
--- a/rw_core/core/device_agent.go
+++ b/rw_core/core/device_agent.go
@@ -19,8 +19,9 @@
"context"
"fmt"
"github.com/gogo/protobuf/proto"
- fu "github.com/opencord/voltha-go/rw_core/utils"
+ coreutils "github.com/opencord/voltha-go/rw_core/utils"
"github.com/opencord/voltha-lib-go/pkg/db/model"
+ fu "github.com/opencord/voltha-lib-go/pkg/flows"
"github.com/opencord/voltha-lib-go/pkg/log"
ic "github.com/opencord/voltha-protos/go/inter_container"
ofp "github.com/opencord/voltha-protos/go/openflow_13"
@@ -323,7 +324,7 @@
device.FlowGroups = &voltha.FlowGroups{Items: updatedGroups}
go agent.updateDeviceWithoutLockAsync(device, chdB)
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
log.Debugw("Failed to get response from adapter[or] DB", log.Fields{"result": res})
return status.Errorf(codes.Aborted, "errors-%s", res)
}
@@ -414,7 +415,7 @@
device.FlowGroups = &voltha.FlowGroups{Items: groupsToKeep}
go agent.updateDeviceWithoutLockAsync(device, chdB)
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
return nil
@@ -522,7 +523,7 @@
device.FlowGroups = &voltha.FlowGroups{Items: updatedGroups}
go agent.updateDeviceWithoutLockAsync(device, chdB)
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chAdapters, chdB); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
return nil
diff --git a/rw_core/core/logical_device_agent.go b/rw_core/core/logical_device_agent.go
index 21f65fa..c36e1a2 100644
--- a/rw_core/core/logical_device_agent.go
+++ b/rw_core/core/logical_device_agent.go
@@ -22,8 +22,9 @@
"github.com/gogo/protobuf/proto"
fd "github.com/opencord/voltha-go/rw_core/flow_decomposition"
"github.com/opencord/voltha-go/rw_core/graph"
- fu "github.com/opencord/voltha-go/rw_core/utils"
+ coreutils "github.com/opencord/voltha-go/rw_core/utils"
"github.com/opencord/voltha-lib-go/pkg/db/model"
+ fu "github.com/opencord/voltha-lib-go/pkg/flows"
"github.com/opencord/voltha-lib-go/pkg/log"
ic "github.com/opencord/voltha-protos/go/inter_container"
ofp "github.com/opencord/voltha-protos/go/openflow_13"
@@ -406,7 +407,7 @@
}(child, ch)
}
// Wait for completion
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
}
@@ -1034,7 +1035,7 @@
}(deviceId, value.ListFlows(), value.ListGroups())
}
// Wait for completion
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
return nil
@@ -1056,7 +1057,7 @@
}(deviceId, value.ListFlows(), value.ListGroups())
}
// Wait for completion
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
return nil
@@ -1078,7 +1079,7 @@
}(deviceId, value.ListFlows(), value.ListGroups())
}
// Wait for completion
- if res := fu.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
+ if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, chnlsList...); res != nil {
return status.Errorf(codes.Aborted, "errors-%s", res)
}
return nil