VOL-1643 Update voltha-go to use voltha-protos and voltha-lib-go v3.0.0
Change-Id: I86744943d59de38e9285ed7f53adc49c3b047e62
diff --git a/rw_core/config/config.go b/rw_core/config/config.go
index 5ba2f3c..0ffe807 100644
--- a/rw_core/config/config.go
+++ b/rw_core/config/config.go
@@ -22,7 +22,7 @@
"time"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
)
// RW Core service default constants
diff --git a/rw_core/core/adapter_manager.go b/rw_core/core/adapter_manager.go
index ef02ff8..e502ff1 100644
--- a/rw_core/core/adapter_manager.go
+++ b/rw_core/core/adapter_manager.go
@@ -24,9 +24,9 @@
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/db/model"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/probe"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/probe"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// sentinel constants
diff --git a/rw_core/core/adapter_proxy.go b/rw_core/core/adapter_proxy.go
index a39e241..86a6431 100755
--- a/rw_core/core/adapter_proxy.go
+++ b/rw_core/core/adapter_proxy.go
@@ -21,11 +21,11 @@
"github.com/golang/protobuf/ptypes"
a "github.com/golang/protobuf/ptypes/any"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/rw_core/core/adapter_proxy_test.go b/rw_core/core/adapter_proxy_test.go
index c281f03..1827b5a 100755
--- a/rw_core/core/adapter_proxy_test.go
+++ b/rw_core/core/adapter_proxy_test.go
@@ -22,12 +22,12 @@
"time"
cm "github.com/opencord/voltha-go/rw_core/mocks"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- lm "github.com/opencord/voltha-lib-go/v2/pkg/mocks"
- of "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ lm "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ of "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
diff --git a/rw_core/core/adapter_request_handler.go b/rw_core/core/adapter_request_handler.go
index 0ffe8e1..07db0be 100644
--- a/rw_core/core/adapter_request_handler.go
+++ b/rw_core/core/adapter_request_handler.go
@@ -24,10 +24,10 @@
"github.com/golang/protobuf/ptypes/empty"
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/rw_core/utils"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -586,8 +586,8 @@
}
// When the enum is not set (i.e. -1), Go still convert to the Enum type with the value being -1
go func() {
- err := rhp.deviceMgr.updateDeviceStatus(deviceID.Id, voltha.OperStatus_OperStatus(operStatus.Val),
- voltha.ConnectStatus_ConnectStatus(connStatus.Val))
+ err := rhp.deviceMgr.updateDeviceStatus(deviceID.Id, voltha.OperStatus_Types(operStatus.Val),
+ voltha.ConnectStatus_Types(connStatus.Val))
if err != nil {
log.Errorw("unable-to-update-device-status", log.Fields{"error": err})
}
@@ -650,8 +650,8 @@
// When the enum is not set (i.e. -1), Go still convert to the Enum type with the value being -1
go func() {
- err := rhp.deviceMgr.updateChildrenStatus(deviceID.Id, voltha.OperStatus_OperStatus(operStatus.Val),
- voltha.ConnectStatus_ConnectStatus(connStatus.Val))
+ err := rhp.deviceMgr.updateChildrenStatus(deviceID.Id, voltha.OperStatus_Types(operStatus.Val),
+ voltha.ConnectStatus_Types(connStatus.Val))
if err != nil {
log.Errorw("unable-to-update-children-status", log.Fields{"error": err})
}
@@ -710,7 +710,7 @@
}
go func() {
- err := rhp.deviceMgr.updatePortsState(deviceID.Id, voltha.OperStatus_OperStatus(operStatus.Val))
+ err := rhp.deviceMgr.updatePortsState(deviceID.Id, voltha.OperStatus_Types(operStatus.Val))
if err != nil {
log.Errorw("unable-to-update-ports-state", log.Fields{"error": err})
}
@@ -779,7 +779,7 @@
go func() {
err := rhp.deviceMgr.updatePortState(deviceID.Id, voltha.Port_PortType(portType.Val), uint32(portNo.Val),
- voltha.OperStatus_OperStatus(operStatus.Val))
+ voltha.OperStatus_Types(operStatus.Val))
if err != nil {
log.Errorw("unable-to-update-port-state", log.Fields{"error": err})
}
diff --git a/rw_core/core/common_test.go b/rw_core/core/common_test.go
index 9098f0f..33e92d5 100644
--- a/rw_core/core/common_test.go
+++ b/rw_core/core/common_test.go
@@ -18,23 +18,24 @@
import (
"context"
"fmt"
+ "strconv"
+ "time"
+
"github.com/golang/protobuf/ptypes/empty"
"github.com/google/uuid"
"github.com/opencord/voltha-go/rw_core/config"
cm "github.com/opencord/voltha-go/rw_core/mocks"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- "github.com/opencord/voltha-lib-go/v2/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- lm "github.com/opencord/voltha-lib-go/v2/pkg/mocks"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ lm "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/phayes/freeport"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
- "strconv"
- "time"
)
const (
diff --git a/rw_core/core/core.go b/rw_core/core/core.go
index cb23586..228148c 100644
--- a/rw_core/core/core.go
+++ b/rw_core/core/core.go
@@ -23,13 +23,13 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/rw_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/db"
- "github.com/opencord/voltha-lib-go/v2/pkg/db/kvstore"
- grpcserver "github.com/opencord/voltha-lib-go/v2/pkg/grpc"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/probe"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
+ grpcserver "github.com/opencord/voltha-lib-go/v3/pkg/grpc"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/probe"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
diff --git a/rw_core/core/device_agent.go b/rw_core/core/device_agent.go
index 0cbd448..a97e12a 100755
--- a/rw_core/core/device_agent.go
+++ b/rw_core/core/device_agent.go
@@ -27,11 +27,11 @@
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/db/model"
coreutils "github.com/opencord/voltha-go/rw_core/utils"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -651,7 +651,7 @@
return nil
}
-func (agent *DeviceAgent) updateAdminState(adminState voltha.AdminState_AdminState) error {
+func (agent *DeviceAgent) updateAdminState(adminState voltha.AdminState_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
log.Debugw("updateAdminState", log.Fields{"id": agent.deviceID})
@@ -1134,18 +1134,18 @@
return agent.updateDeviceInStoreWithoutLock(cloned, false, "")
}
-func (agent *DeviceAgent) updateDeviceStatus(operStatus voltha.OperStatus_OperStatus, connStatus voltha.ConnectStatus_ConnectStatus) error {
+func (agent *DeviceAgent) updateDeviceStatus(operStatus voltha.OperStatus_Types, connStatus voltha.ConnectStatus_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
cloned := agent.getDeviceWithoutLock()
// Ensure the enums passed in are valid - they will be invalid if they are not set when this function is invoked
- if s, ok := voltha.ConnectStatus_ConnectStatus_value[connStatus.String()]; ok {
+ if s, ok := voltha.ConnectStatus_Types_value[connStatus.String()]; ok {
log.Debugw("updateDeviceStatus-conn", log.Fields{"ok": ok, "val": s})
cloned.ConnectStatus = connStatus
}
- if s, ok := voltha.OperStatus_OperStatus_value[operStatus.String()]; ok {
+ if s, ok := voltha.OperStatus_Types_value[operStatus.String()]; ok {
log.Debugw("updateDeviceStatus-oper", log.Fields{"ok": ok, "val": s})
cloned.OperStatus = operStatus
}
@@ -1181,7 +1181,7 @@
return agent.updateDeviceInStoreWithoutLock(cloned, false, "")
}
-func (agent *DeviceAgent) updatePortState(portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_OperStatus) error {
+func (agent *DeviceAgent) updatePortState(portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_Types) error {
agent.lockDevice.Lock()
defer agent.lockDevice.Unlock()
// Work only on latest data
diff --git a/rw_core/core/device_agent_test.go b/rw_core/core/device_agent_test.go
index b00c42c..0da55bd 100755
--- a/rw_core/core/device_agent_test.go
+++ b/rw_core/core/device_agent_test.go
@@ -19,12 +19,12 @@
"context"
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/rw_core/config"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- lm "github.com/opencord/voltha-lib-go/v2/pkg/mocks"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ lm "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
"math/rand"
diff --git a/rw_core/core/device_manager.go b/rw_core/core/device_manager.go
index 59cf0a4..7365503 100755
--- a/rw_core/core/device_manager.go
+++ b/rw_core/core/device_manager.go
@@ -25,12 +25,12 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/rw_core/utils"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/probe"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/probe"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -837,7 +837,7 @@
return nil, status.Errorf(codes.NotFound, "%s", deviceID)
}
-func (dMgr *DeviceManager) updateDeviceStatus(deviceID string, operStatus voltha.OperStatus_OperStatus, connStatus voltha.ConnectStatus_ConnectStatus) error {
+func (dMgr *DeviceManager) updateDeviceStatus(deviceID string, operStatus voltha.OperStatus_Types, connStatus voltha.ConnectStatus_Types) error {
log.Debugw("updateDeviceStatus", log.Fields{"deviceid": deviceID, "operStatus": operStatus, "connStatus": connStatus})
if agent := dMgr.getDeviceAgent(deviceID); agent != nil {
return agent.updateDeviceStatus(operStatus, connStatus)
@@ -845,7 +845,7 @@
return status.Errorf(codes.NotFound, "%s", deviceID)
}
-func (dMgr *DeviceManager) updateChildrenStatus(deviceID string, operStatus voltha.OperStatus_OperStatus, connStatus voltha.ConnectStatus_ConnectStatus) error {
+func (dMgr *DeviceManager) updateChildrenStatus(deviceID string, operStatus voltha.OperStatus_Types, connStatus voltha.ConnectStatus_Types) error {
log.Debugw("updateChildrenStatus", log.Fields{"parentDeviceid": deviceID, "operStatus": operStatus, "connStatus": connStatus})
var parentDevice *voltha.Device
var err error
@@ -869,7 +869,7 @@
return nil
}
-func (dMgr *DeviceManager) updatePortState(deviceID string, portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_OperStatus) error {
+func (dMgr *DeviceManager) updatePortState(deviceID string, portType voltha.Port_PortType, portNo uint32, operStatus voltha.OperStatus_Types) error {
log.Debugw("updatePortState", log.Fields{"deviceid": deviceID, "portType": portType, "portNo": portNo, "operStatus": operStatus})
if agent := dMgr.getDeviceAgent(deviceID); agent != nil {
if err := agent.updatePortState(portType, portNo, operStatus); err != nil {
@@ -913,10 +913,10 @@
}
//updatePortsState updates all ports on the device
-func (dMgr *DeviceManager) updatePortsState(deviceID string, state voltha.OperStatus_OperStatus) error {
+func (dMgr *DeviceManager) updatePortsState(deviceID string, state voltha.OperStatus_Types) error {
log.Debugw("updatePortsState", log.Fields{"deviceid": deviceID})
- var adminState voltha.AdminState_AdminState
+ var adminState voltha.AdminState_Types
if agent := dMgr.getDeviceAgent(deviceID); agent != nil {
switch state {
case voltha.OperStatus_ACTIVE:
diff --git a/rw_core/core/device_ownership.go b/rw_core/core/device_ownership.go
index 5f4d0d5..687efcb 100644
--- a/rw_core/core/device_ownership.go
+++ b/rw_core/core/device_ownership.go
@@ -23,9 +23,9 @@
"time"
"github.com/opencord/voltha-go/rw_core/utils"
- "github.com/opencord/voltha-lib-go/v2/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/rw_core/core/device_state_transitions.go b/rw_core/core/device_state_transitions.go
index 5188e56..d280270 100644
--- a/rw_core/core/device_state_transitions.go
+++ b/rw_core/core/device_state_transitions.go
@@ -18,8 +18,8 @@
import (
"github.com/opencord/voltha-go/rw_core/coreif"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// DeviceType mentions type of device like parent, child
@@ -33,9 +33,9 @@
// DeviceState has admin, operational and connection status of device
type DeviceState struct {
- Admin voltha.AdminState_AdminState
- Connection voltha.ConnectStatus_ConnectStatus
- Operational voltha.OperStatus_OperStatus
+ Admin voltha.AdminState_Types
+ Connection voltha.ConnectStatus_Types
+ Operational voltha.OperStatus_Types
}
// TransitionHandler function type which takes device as input parameter
diff --git a/rw_core/core/device_state_transitions_test.go b/rw_core/core/device_state_transitions_test.go
index fdd58ca..7894378 100644
--- a/rw_core/core/device_state_transitions_test.go
+++ b/rw_core/core/device_state_transitions_test.go
@@ -21,8 +21,8 @@
"github.com/opencord/voltha-go/rw_core/coreif"
"github.com/opencord/voltha-go/rw_core/mocks"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
)
@@ -45,7 +45,7 @@
transitionMap = NewTransitionMap(tdm)
}
-func getDevice(root bool, admin voltha.AdminState_AdminState, conn voltha.ConnectStatus_ConnectStatus, oper voltha.OperStatus_OperStatus) *voltha.Device {
+func getDevice(root bool, admin voltha.AdminState_Types, conn voltha.ConnectStatus_Types, oper voltha.OperStatus_Types) *voltha.Device {
return &voltha.Device{
Id: "test",
Root: root,
diff --git a/rw_core/core/grpc_nbi_api_handler.go b/rw_core/core/grpc_nbi_api_handler.go
index 2da4d9e..0378260 100755
--- a/rw_core/core/grpc_nbi_api_handler.go
+++ b/rw_core/core/grpc_nbi_api_handler.go
@@ -27,12 +27,12 @@
"github.com/golang/protobuf/ptypes/empty"
da "github.com/opencord/voltha-go/common/core/northbound/grpc"
"github.com/opencord/voltha-go/rw_core/utils"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/version"
- "github.com/opencord/voltha-protos/v2/go/common"
- "github.com/opencord/voltha-protos/v2/go/omci"
- "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/version"
+ "github.com/opencord/voltha-protos/v3/go/common"
+ "github.com/opencord/voltha-protos/v3/go/omci"
+ "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
@@ -215,7 +215,7 @@
logLevel := &voltha.Logging{
ComponentName: in.ComponentName,
PackageName: packageName,
- Level: voltha.LogLevel_LogLevel(level)}
+ Level: voltha.LogLevel_Types(level)}
logLevels.Items = append(logLevels.Items, logLevel)
}
@@ -223,7 +223,7 @@
logLevel := &voltha.Logging{
ComponentName: in.ComponentName,
PackageName: "default",
- Level: voltha.LogLevel_LogLevel(log.GetDefaultLogLevel())}
+ Level: voltha.LogLevel_Types(log.GetDefaultLogLevel())}
logLevels.Items = append(logLevels.Items, logLevel)
return logLevels, nil
diff --git a/rw_core/core/grpc_nbi_api_handler_test.go b/rw_core/core/grpc_nbi_api_handler_test.go
index e0b6f64..9df697d 100755
--- a/rw_core/core/grpc_nbi_api_handler_test.go
+++ b/rw_core/core/grpc_nbi_api_handler_test.go
@@ -19,22 +19,23 @@
"context"
"errors"
"fmt"
+ "strings"
+ "testing"
+ "time"
+
"github.com/golang/protobuf/ptypes/empty"
"github.com/opencord/voltha-go/rw_core/config"
cm "github.com/opencord/voltha-go/rw_core/mocks"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- lm "github.com/opencord/voltha-lib-go/v2/pkg/mocks"
- "github.com/opencord/voltha-lib-go/v2/pkg/version"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ lm "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ "github.com/opencord/voltha-lib-go/v3/pkg/version"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "strings"
- "testing"
- "time"
)
type NBTest struct {
diff --git a/rw_core/core/logical_device_agent.go b/rw_core/core/logical_device_agent.go
index 776a0fa..d9b5837 100644
--- a/rw_core/core/logical_device_agent.go
+++ b/rw_core/core/logical_device_agent.go
@@ -30,11 +30,11 @@
fd "github.com/opencord/voltha-go/rw_core/flowdecomposition"
"github.com/opencord/voltha-go/rw_core/graph"
coreutils "github.com/opencord/voltha-go/rw_core/utils"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -414,7 +414,7 @@
}
// updatePortState updates the port state of the device
-func (agent *LogicalDeviceAgent) updatePortState(deviceID string, portNo uint32, operStatus voltha.OperStatus_OperStatus) error {
+func (agent *LogicalDeviceAgent) updatePortState(deviceID string, portNo uint32, operStatus voltha.OperStatus_Types) error {
log.Infow("updatePortState-start", log.Fields{"logicalDeviceId": agent.logicalDeviceID, "portNo": portNo, "state": operStatus})
agent.lockLogicalDevice.Lock()
defer agent.lockLogicalDevice.Unlock()
@@ -441,7 +441,7 @@
}
// updatePortsState updates the ports state related to the device
-func (agent *LogicalDeviceAgent) updatePortsState(device *voltha.Device, state voltha.AdminState_AdminState) error {
+func (agent *LogicalDeviceAgent) updatePortsState(device *voltha.Device, state voltha.AdminState_Types) error {
log.Infow("updatePortsState-start", log.Fields{"logicalDeviceId": agent.logicalDeviceID})
agent.lockLogicalDevice.Lock()
defer agent.lockLogicalDevice.Unlock()
diff --git a/rw_core/core/logical_device_agent_test.go b/rw_core/core/logical_device_agent_test.go
index f8f9348..65c5cb6 100644
--- a/rw_core/core/logical_device_agent_test.go
+++ b/rw_core/core/logical_device_agent_test.go
@@ -19,13 +19,13 @@
"context"
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/rw_core/config"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- lm "github.com/opencord/voltha-lib-go/v2/pkg/mocks"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ lm "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
"math/rand"
diff --git a/rw_core/core/logical_device_manager.go b/rw_core/core/logical_device_manager.go
index 6783e29..7195034 100644
--- a/rw_core/core/logical_device_manager.go
+++ b/rw_core/core/logical_device_manager.go
@@ -23,11 +23,11 @@
"sync"
"github.com/opencord/voltha-go/db/model"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/probe"
- "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/probe"
+ "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
@@ -503,7 +503,7 @@
}
return nil
}
-func (ldMgr *LogicalDeviceManager) updatePortState(deviceID string, portNo uint32, state voltha.OperStatus_OperStatus) error {
+func (ldMgr *LogicalDeviceManager) updatePortState(deviceID string, portNo uint32, state voltha.OperStatus_Types) error {
log.Debugw("updatePortState", log.Fields{"deviceId": deviceID, "state": state, "portNo": portNo})
var ldID *string
@@ -521,7 +521,7 @@
return nil
}
-func (ldMgr *LogicalDeviceManager) updatePortsState(device *voltha.Device, state voltha.AdminState_AdminState) error {
+func (ldMgr *LogicalDeviceManager) updatePortsState(device *voltha.Device, state voltha.AdminState_Types) error {
log.Debugw("updatePortsState", log.Fields{"deviceId": device.Id, "state": state, "current-data": device})
var ldID *string
diff --git a/rw_core/core/transaction.go b/rw_core/core/transaction.go
index 1f63deb..93dd28f 100644
--- a/rw_core/core/transaction.go
+++ b/rw_core/core/transaction.go
@@ -32,8 +32,8 @@
import (
"time"
- "github.com/opencord/voltha-lib-go/v2/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/rw_core/coreif/adapter_manager_if.go b/rw_core/coreif/adapter_manager_if.go
index a4b0b63..7f661cf 100644
--- a/rw_core/coreif/adapter_manager_if.go
+++ b/rw_core/coreif/adapter_manager_if.go
@@ -19,7 +19,7 @@
import (
"context"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// AdapterManager represent adapter manager related methods
diff --git a/rw_core/coreif/core_if.go b/rw_core/coreif/core_if.go
index c63a738..78d138b 100644
--- a/rw_core/coreif/core_if.go
+++ b/rw_core/coreif/core_if.go
@@ -25,7 +25,7 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/rw_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
)
// Core represent core methods
diff --git a/rw_core/coreif/device_manager_if.go b/rw_core/coreif/device_manager_if.go
index 292a7b9..348e9b3 100644
--- a/rw_core/coreif/device_manager_if.go
+++ b/rw_core/coreif/device_manager_if.go
@@ -20,7 +20,7 @@
package coreif
-import "github.com/opencord/voltha-protos/v2/go/voltha"
+import "github.com/opencord/voltha-protos/v3/go/voltha"
// DeviceManager represents a generic device manager
type DeviceManager interface {
diff --git a/rw_core/coreif/logical_device_agent_if.go b/rw_core/coreif/logical_device_agent_if.go
index c9dbe6c..734e024 100644
--- a/rw_core/coreif/logical_device_agent_if.go
+++ b/rw_core/coreif/logical_device_agent_if.go
@@ -22,7 +22,7 @@
import (
"github.com/opencord/voltha-go/rw_core/graph"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// LogicalDeviceAgent represents a generic agent
diff --git a/rw_core/coreif/logical_device_manager_if.go b/rw_core/coreif/logical_device_manager_if.go
index 2beaea5..02068eb 100644
--- a/rw_core/coreif/logical_device_manager_if.go
+++ b/rw_core/coreif/logical_device_manager_if.go
@@ -23,8 +23,8 @@
import (
"context"
- "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// LogicalDeviceManager represent logical device manager related methods
diff --git a/rw_core/flowdecomposition/flow_decomposer.go b/rw_core/flowdecomposition/flow_decomposer.go
index 1d8d0a7..09592a8 100644
--- a/rw_core/flowdecomposition/flow_decomposer.go
+++ b/rw_core/flowdecomposition/flow_decomposer.go
@@ -20,10 +20,10 @@
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/rw_core/coreif"
"github.com/opencord/voltha-go/rw_core/graph"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
func init() {
diff --git a/rw_core/flowdecomposition/flow_decomposer_test.go b/rw_core/flowdecomposition/flow_decomposer_test.go
index dac2e6b..cf32c4d 100644
--- a/rw_core/flowdecomposition/flow_decomposer_test.go
+++ b/rw_core/flowdecomposition/flow_decomposer_test.go
@@ -19,10 +19,10 @@
"errors"
"github.com/opencord/voltha-go/rw_core/graph"
"github.com/opencord/voltha-go/rw_core/mocks"
- fu "github.com/opencord/voltha-lib-go/v2/pkg/flows"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ofp "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ fu "github.com/opencord/voltha-lib-go/v3/pkg/flows"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
"testing"
diff --git a/rw_core/graph/device_graph.go b/rw_core/graph/device_graph.go
index 02ad35d..c37cfd0 100644
--- a/rw_core/graph/device_graph.go
+++ b/rw_core/graph/device_graph.go
@@ -23,8 +23,8 @@
"sync"
"github.com/gyuho/goraph"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
func init() {
diff --git a/rw_core/graph/device_graph_test.go b/rw_core/graph/device_graph_test.go
index a4214e9..47d8b99 100644
--- a/rw_core/graph/device_graph_test.go
+++ b/rw_core/graph/device_graph_test.go
@@ -18,8 +18,8 @@
import (
"errors"
"fmt"
- "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
"math/rand"
"strconv"
diff --git a/rw_core/main.go b/rw_core/main.go
index 76d0952..daf4bb9 100644
--- a/rw_core/main.go
+++ b/rw_core/main.go
@@ -29,12 +29,12 @@
"github.com/opencord/voltha-go/rw_core/config"
c "github.com/opencord/voltha-go/rw_core/core"
"github.com/opencord/voltha-go/rw_core/utils"
- "github.com/opencord/voltha-lib-go/v2/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v2/pkg/kafka"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/probe"
- "github.com/opencord/voltha-lib-go/v2/pkg/version"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v3/pkg/kafka"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/probe"
+ "github.com/opencord/voltha-lib-go/v3/pkg/version"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
)
type rwCore struct {
diff --git a/rw_core/mocks/adapter.go b/rw_core/mocks/adapter.go
index cbe4af1..876ebea 100644
--- a/rw_core/mocks/adapter.go
+++ b/rw_core/mocks/adapter.go
@@ -21,10 +21,10 @@
"strings"
"sync"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters/adapterif"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- of "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ of "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/rw_core/mocks/adapter_olt.go b/rw_core/mocks/adapter_olt.go
index 7cf0d47..e7fed22 100644
--- a/rw_core/mocks/adapter_olt.go
+++ b/rw_core/mocks/adapter_olt.go
@@ -22,12 +22,12 @@
"strings"
"github.com/gogo/protobuf/proto"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters/adapterif"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- of "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ of "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
const (
diff --git a/rw_core/mocks/adapter_olt_test.go b/rw_core/mocks/adapter_olt_test.go
index aa91ab5..036d612 100644
--- a/rw_core/mocks/adapter_olt_test.go
+++ b/rw_core/mocks/adapter_olt_test.go
@@ -19,7 +19,7 @@
import (
"testing"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters"
)
func TestOLTAdapterImplementsIAdapter(t *testing.T) {
diff --git a/rw_core/mocks/adapter_onu.go b/rw_core/mocks/adapter_onu.go
index b641407..ea02210 100644
--- a/rw_core/mocks/adapter_onu.go
+++ b/rw_core/mocks/adapter_onu.go
@@ -22,12 +22,12 @@
"strings"
"github.com/gogo/protobuf/proto"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters/adapterif"
- com "github.com/opencord/voltha-lib-go/v2/pkg/adapters/common"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- of "github.com/opencord/voltha-protos/v2/go/openflow_13"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
+ com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ of "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// ONUAdapter represent ONU adapter attributes
diff --git a/rw_core/mocks/adapter_onu_test.go b/rw_core/mocks/adapter_onu_test.go
index 748815a..ff4ed32 100644
--- a/rw_core/mocks/adapter_onu_test.go
+++ b/rw_core/mocks/adapter_onu_test.go
@@ -17,7 +17,7 @@
package mocks
import (
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters"
"testing"
)
diff --git a/rw_core/mocks/adapter_test.go b/rw_core/mocks/adapter_test.go
index bc18cb5..f748ea9 100644
--- a/rw_core/mocks/adapter_test.go
+++ b/rw_core/mocks/adapter_test.go
@@ -17,7 +17,7 @@
package mocks
import (
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters"
"testing"
)
diff --git a/rw_core/mocks/common_test.go b/rw_core/mocks/common_test.go
index 1ff5700..eb1534f 100644
--- a/rw_core/mocks/common_test.go
+++ b/rw_core/mocks/common_test.go
@@ -16,7 +16,7 @@
package mocks
import (
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
)
const (
diff --git a/rw_core/mocks/device_manager.go b/rw_core/mocks/device_manager.go
index 1968efa..4c48955 100644
--- a/rw_core/mocks/device_manager.go
+++ b/rw_core/mocks/device_manager.go
@@ -19,7 +19,7 @@
import (
"context"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
)
// DeviceManager -
diff --git a/rw_core/utils/core_utils_test.go b/rw_core/utils/core_utils_test.go
index cc48b10..d7797e5 100644
--- a/rw_core/utils/core_utils_test.go
+++ b/rw_core/utils/core_utils_test.go
@@ -20,7 +20,7 @@
"testing"
"time"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"