[VOL-1036] Initial implementation of device lifecycle management
Change-Id: I5aa58fdcbcd852f6f5eef35d48f25f76e20c0418
diff --git a/rw_core/core/core.go b/rw_core/core/core.go
index 06f3ca3..480e32f 100644
--- a/rw_core/core/core.go
+++ b/rw_core/core/core.go
@@ -24,7 +24,6 @@
"github.com/opencord/voltha-go/protos/voltha"
"github.com/opencord/voltha-go/rw_core/config"
"google.golang.org/grpc"
- "reflect"
)
type Core struct {
@@ -35,8 +34,8 @@
grpcNBIAPIHanfler *APIHandler
config *config.RWCoreFlags
kmp *kafka.KafkaMessagingProxy
- clusterDataRoot *model.Root
- localDataRoot *model.Root
+ clusterDataRoot model.Root
+ localDataRoot model.Root
clusterDataProxy *model.Proxy
localDataProxy *model.Proxy
exitChannel chan int
@@ -52,10 +51,10 @@
core.exitChannel = make(chan int, 1)
core.config = cf
// TODO: Setup the KV store
- core.clusterDataRoot = model.NewRoot(&voltha.Voltha{}, nil, reflect.TypeOf(model.NonPersistedRevision{}))
- core.localDataRoot = model.NewRoot(&voltha.CoreInstance{}, nil, reflect.TypeOf(model.NonPersistedRevision{}))
- core.clusterDataProxy = core.clusterDataRoot.Node.GetProxy("/", false)
- core.localDataProxy = core.localDataRoot.Node.GetProxy("/", false)
+ core.clusterDataRoot = model.NewRoot(&voltha.Voltha{}, nil)
+ core.localDataRoot = model.NewRoot(&voltha.CoreInstance{}, nil)
+ core.clusterDataProxy = core.clusterDataRoot.GetProxy("/", false)
+ core.localDataProxy = core.localDataRoot.GetProxy("/", false)
return &core
}
@@ -79,7 +78,7 @@
log.Info("core-stopped")
}
-//startGRPCService creates the grpc service handler, registers it to the grpc server
+//startGRPCService creates the grpc service handlers, registers it to the grpc server
// and starts the server
func (core *Core) startGRPCService(ctx context.Context) {
// create an insecure gserver server
@@ -129,7 +128,7 @@
requestProxy := NewAdapterRequestHandlerProxy(dMgr, ldMgr, cdProxy, ldProxy)
core.kmp.SubscribeWithTarget(kafka.Topic{Name: core.config.CoreTopic}, requestProxy)
- log.Info("request-handler")
+ log.Info("request-handlers")
return nil
}