[VOL-2941] Upgrading to latest protos and lib
Change-Id: Ie0a92172023f629744f97a7499335cef490dcc3f
diff --git a/internal/pkg/adaptercore/device_handler.go b/internal/pkg/adaptercore/device_handler.go
index 22ecc1a..9c42d3c 100644
--- a/internal/pkg/adaptercore/device_handler.go
+++ b/internal/pkg/adaptercore/device_handler.go
@@ -19,11 +19,11 @@
"context"
"fmt"
"github.com/gogo/protobuf/proto"
- 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"
+ 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"
"strconv"
"strings"
"sync"
diff --git a/internal/pkg/adaptercore/simulated_olt.go b/internal/pkg/adaptercore/simulated_olt.go
index eb5673c..d8606ea 100644
--- a/internal/pkg/adaptercore/simulated_olt.go
+++ b/internal/pkg/adaptercore/simulated_olt.go
@@ -19,25 +19,25 @@
"context"
"errors"
"fmt"
- 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"
- 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"
+ 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"
+ 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"
"sync"
)
type SimulatedOLT struct {
deviceHandlers map[string]*DeviceHandler
coreProxy *com.CoreProxy
- kafkaICProxy *kafka.InterContainerProxy
+ kafkaICProxy kafka.InterContainerProxy
numOnus int
exitChannel chan int
lockDeviceHandlersMap sync.RWMutex
}
-func NewSimulatedOLT(ctx context.Context, kafkaICProxy *kafka.InterContainerProxy, coreProxy *com.CoreProxy, onuNumber int) *SimulatedOLT {
+func NewSimulatedOLT(ctx context.Context, kafkaICProxy kafka.InterContainerProxy, coreProxy *com.CoreProxy, onuNumber int) *SimulatedOLT {
var simulatedOLT SimulatedOLT
simulatedOLT.exitChannel = make(chan int, 1)
simulatedOLT.deviceHandlers = make(map[string]*DeviceHandler)
@@ -271,14 +271,6 @@
return errors.New("UnImplemented")
}
-func (so *SimulatedOLT) Suppress_alarm(filter *voltha.AlarmFilter) error {
- return errors.New("UnImplemented")
-}
-
-func (so *SimulatedOLT) Unsuppress_alarm(filter *voltha.AlarmFilter) error {
- return errors.New("UnImplemented")
-}
-
func (so *SimulatedOLT) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
return nil, errors.New("UnImplemented")
}
@@ -298,3 +290,27 @@
func (so *SimulatedOLT) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
return nil, errors.New("UnImplemented")
}
+
+func (oo *SimulatedOLT) Enable_port(deviceID string, port *voltha.Port) error {
+ return errors.New("UnImplemented")
+}
+
+func (oo *SimulatedOLT) Disable_port(deviceID string, port *voltha.Port) error {
+ return errors.New("UnImplemented")
+}
+
+func (oo *SimulatedOLT) Child_device_lost(deviceID string, pPortNo uint32, onuID uint32) error {
+ return errors.New("UnImplemented")
+}
+
+func (oo *SimulatedOLT) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) {
+ return nil, errors.New("UnImplemented")
+}
+
+func (oo *SimulatedOLT) Suppress_event(filter *voltha.EventFilter) error {
+ return errors.New("UnImplemented")
+}
+
+func (oo *SimulatedOLT) Unsuppress_event(filter *voltha.EventFilter) error {
+ return errors.New("UnImplemented")
+}
\ No newline at end of file
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 8b5e53f..2527caa 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -18,7 +18,7 @@
import (
"flag"
"fmt"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
"os"
)
@@ -34,7 +34,7 @@
default_KVStoreTimeout = 5 //in seconds
default_KVStoreHost = "127.0.0.1"
default_KVStorePort = 2379 // Consul = 8500; Etcd = 2379
- default_LogLevel = 0
+ default_LogLevel = "WARN"
default_Banner = false
default_Topic = "simulated_olt"
default_CoreTopic = "rwcore"
@@ -58,7 +58,7 @@
KVStorePort int
Topic string
CoreTopic string
- LogLevel int
+ LogLevel string
OnuNumber int
Banner bool
ProbeHost string
@@ -130,7 +130,7 @@
flag.IntVar(&(so.KVStorePort), "kv_store_port", default_KVStorePort, help)
help = fmt.Sprintf("Log level")
- flag.IntVar(&(so.LogLevel), "log_level", default_LogLevel, help)
+ flag.StringVar(&(so.LogLevel), "log_level", default_LogLevel, help)
help = fmt.Sprintf("Number of ONUs")
flag.IntVar(&(so.OnuNumber), "onu_number", default_OnuNumber, help)