VOL-1643 Update voltha-go to use voltha-protos and voltha-lib-go v3.0.0
Change-Id: I86744943d59de38e9285ed7f53adc49c3b047e62
diff --git a/ro_core/core/common_test.go b/ro_core/core/common_test.go
index bf7c7c1..44f8d65 100644
--- a/ro_core/core/common_test.go
+++ b/ro_core/core/common_test.go
@@ -16,7 +16,7 @@
package core
import (
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
)
const (
diff --git a/ro_core/core/core.go b/ro_core/core/core.go
index a125798..2a20784 100644
--- a/ro_core/core/core.go
+++ b/ro_core/core/core.go
@@ -24,12 +24,12 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/ro_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/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/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/ro_core/core/core_test.go b/ro_core/core/core_test.go
index 02cdc84..5af1048 100644
--- a/ro_core/core/core_test.go
+++ b/ro_core/core/core_test.go
@@ -22,10 +22,10 @@
"testing"
"github.com/opencord/voltha-go/ro_core/config"
- "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/v2/pkg/mocks"
- 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/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/mocks"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
)
diff --git a/ro_core/core/device_agent.go b/ro_core/core/device_agent.go
index b056bec..109d060 100644
--- a/ro_core/core/device_agent.go
+++ b/ro_core/core/device_agent.go
@@ -22,8 +22,8 @@
"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-protos/v2/go/voltha"
+ "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/ro_core/core/device_agent_test.go b/ro_core/core/device_agent_test.go
index 246737f..9634408 100644
--- a/ro_core/core/device_agent_test.go
+++ b/ro_core/core/device_agent_test.go
@@ -20,8 +20,8 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/ro_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/db"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
)
diff --git a/ro_core/core/device_manager.go b/ro_core/core/device_manager.go
index b73ec10..aaa4a73 100644
--- a/ro_core/core/device_manager.go
+++ b/ro_core/core/device_manager.go
@@ -21,9 +21,9 @@
"sync"
"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"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/ro_core/core/device_manager_test.go b/ro_core/core/device_manager_test.go
index da58e67..510eb45 100644
--- a/ro_core/core/device_manager_test.go
+++ b/ro_core/core/device_manager_test.go
@@ -20,8 +20,8 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/ro_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/db"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/db"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
)
diff --git a/ro_core/core/grpc_nbi_api_handler.go b/ro_core/core/grpc_nbi_api_handler.go
index 0a73ff2..8fdc03c 100644
--- a/ro_core/core/grpc_nbi_api_handler.go
+++ b/ro_core/core/grpc_nbi_api_handler.go
@@ -22,11 +22,11 @@
"github.com/golang/protobuf/ptypes/empty"
da "github.com/opencord/voltha-go/common/core/northbound/grpc"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "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-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"
@@ -106,7 +106,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)
}
@@ -114,7 +114,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/ro_core/core/grpc_nbi_api_handler_test.go b/ro_core/core/grpc_nbi_api_handler_test.go
index 0a95daa..a62f8e5 100644
--- a/ro_core/core/grpc_nbi_api_handler_test.go
+++ b/ro_core/core/grpc_nbi_api_handler_test.go
@@ -21,9 +21,9 @@
"testing"
"github.com/opencord/voltha-go/ro_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/common"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/common"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
)
@@ -70,15 +70,15 @@
testLogDef := &voltha.Logging{
ComponentName: "testing",
PackageName: "default",
- Level: voltha.LogLevel_LogLevel(log.GetDefaultLogLevel())}
+ Level: voltha.LogLevel_Types(log.GetDefaultLogLevel())}
testLogEmpty := &voltha.Logging{
ComponentName: "testing",
PackageName: "",
- Level: voltha.LogLevel_LogLevel(log.GetDefaultLogLevel())}
+ Level: voltha.LogLevel_Types(log.GetDefaultLogLevel())}
testLog := &voltha.Logging{
ComponentName: "testing",
PackageName: "testing",
- Level: voltha.LogLevel_LogLevel(log.GetDefaultLogLevel())}
+ Level: voltha.LogLevel_Types(log.GetDefaultLogLevel())}
testLog3 := &voltha.Logging{
ComponentName: "testing",
PackageName: "github.com/opencord/voltha-go/ro_core/core",
@@ -96,10 +96,10 @@
want int
wantErr error
}{
- {"TestUpdateLogLevel-1", ahndl, args{testCtx, testLogDef}, 0, nil},
- {"TestUpdateLogLevel-2", ahndl, args{testCtx, testLogEmpty}, 5, nil},
- {"TestUpdateLogLevel-3", ahndl, args{testCtx, testLog}, 5, nil},
- {"TestUpdateLogLevel-4", ahndl, args{testCtx, testLog3}, 3, nil},
+ {"TestUpdateLogLevel-1", ahndl, args{testCtx, testLogDef}, log.DebugLevel, nil},
+ {"TestUpdateLogLevel-2", ahndl, args{testCtx, testLogEmpty}, log.FatalLevel, nil},
+ {"TestUpdateLogLevel-3", ahndl, args{testCtx, testLog}, log.FatalLevel, nil},
+ {"TestUpdateLogLevel-4", ahndl, args{testCtx, testLog3}, log.ErrorLevel, nil},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@@ -142,13 +142,12 @@
want int
wantErr error
}{
- {"TestGetLogLevels-1", ahndl, args{testCtx, testLc}, 0, nil},
- {"TestGetLogLevels-2", ahndl, args{testCtx, testLc}, 1, nil},
- {"TestGetLogLevels-3", ahndl, args{testCtx, testLc}, 2, nil},
- {"TestGetLogLevels-4", ahndl, args{testCtx, testLc}, 3, nil},
- {"TestGetLogLevels-5", ahndl, args{testCtx, testLc}, 4, nil},
- {"TestGetLogLevels-6", ahndl, args{testCtx, testLc}, 5, nil},
- {"TestGetLogLevels-7", ahndl, args{testCtx, testLc}, 3, nil},
+ {"TestGetLogLevels-1", ahndl, args{testCtx, testLc}, log.DebugLevel, nil},
+ {"TestGetLogLevels-2", ahndl, args{testCtx, testLc}, log.InfoLevel, nil},
+ {"TestGetLogLevels-3", ahndl, args{testCtx, testLc}, log.WarnLevel, nil},
+ {"TestGetLogLevels-4", ahndl, args{testCtx, testLc}, log.ErrorLevel, nil},
+ {"TestGetLogLevels-5", ahndl, args{testCtx, testLc}, log.FatalLevel, nil},
+ {"TestGetLogLevels-6", ahndl, args{testCtx, testLc}, log.ErrorLevel, nil},
}
for itt, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
diff --git a/ro_core/core/logical_device_agent.go b/ro_core/core/logical_device_agent.go
index 407511f..374b2aa 100644
--- a/ro_core/core/logical_device_agent.go
+++ b/ro_core/core/logical_device_agent.go
@@ -22,8 +22,8 @@
"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-protos/v2/go/voltha"
+ "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/ro_core/core/logical_device_agent_test.go b/ro_core/core/logical_device_agent_test.go
index 1685606..18e8c97 100644
--- a/ro_core/core/logical_device_agent_test.go
+++ b/ro_core/core/logical_device_agent_test.go
@@ -18,7 +18,7 @@
import (
"context"
"github.com/opencord/voltha-go/ro_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
"strconv"
diff --git a/ro_core/core/logical_device_manager.go b/ro_core/core/logical_device_manager.go
index fc09f12..e9e433f 100644
--- a/ro_core/core/logical_device_manager.go
+++ b/ro_core/core/logical_device_manager.go
@@ -21,9 +21,9 @@
"sync"
"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"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/ro_core/core/logical_device_manager_test.go b/ro_core/core/logical_device_manager_test.go
index a53e4ec..7e91d37 100644
--- a/ro_core/core/logical_device_manager_test.go
+++ b/ro_core/core/logical_device_manager_test.go
@@ -22,9 +22,9 @@
"github.com/opencord/voltha-go/db/model"
"github.com/opencord/voltha-go/ro_core/config"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "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-protos/v3/go/openflow_13"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"github.com/stretchr/testify/assert"
)
diff --git a/ro_core/core/model_proxy.go b/ro_core/core/model_proxy.go
index 56233eb..3775540 100644
--- a/ro_core/core/model_proxy.go
+++ b/ro_core/core/model_proxy.go
@@ -22,7 +22,7 @@
"sync"
"github.com/opencord/voltha-go/db/model"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/ro_core/core/model_proxy_manager.go b/ro_core/core/model_proxy_manager.go
index d971c4a..42d0ad6 100644
--- a/ro_core/core/model_proxy_manager.go
+++ b/ro_core/core/model_proxy_manager.go
@@ -21,9 +21,9 @@
"encoding/json"
"github.com/opencord/voltha-go/db/model"
- "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/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/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/ro_core/core/model_proxy_manager_test.go b/ro_core/core/model_proxy_manager_test.go
index c375f7d..b23781b 100644
--- a/ro_core/core/model_proxy_manager_test.go
+++ b/ro_core/core/model_proxy_manager_test.go
@@ -17,12 +17,13 @@
import (
"context"
- "github.com/opencord/voltha-go/db/model"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-protos/v2/go/voltha"
- "github.com/stretchr/testify/assert"
"reflect"
"testing"
+
+ "github.com/opencord/voltha-go/db/model"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
+ "github.com/stretchr/testify/assert"
)
func makeModelProxyManagerObj() *ModelProxyManager {
diff --git a/ro_core/core/model_proxy_test.go b/ro_core/core/model_proxy_test.go
index 5c26563..41f814c 100644
--- a/ro_core/core/model_proxy_test.go
+++ b/ro_core/core/model_proxy_test.go
@@ -17,13 +17,13 @@
import (
"context"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"github.com/stretchr/testify/assert"
"reflect"
"testing"
"github.com/opencord/voltha-go/db/model"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)