This commit consists of the following:
1) The kafka messaging proxy in Twisted python for adapters
2) Initial implementation and containerization of ponsim OLT adapter
and ponsim ONU adapter
3) Initial submission of request and response facade in both Twisted
python and Go Language
4) Initial implementation of device management and logical device management
in the Core
5) Update to the log module to allow dynamic setting of log level per
package using the gRPC API
6) Bug fixes and minor changes
Change-Id: Ia8f033da84cfd08275335bae9542802415e7bb0f
diff --git a/rw_core/config/config.go b/rw_core/config/config.go
index 32b7abb..a999d7b 100644
--- a/rw_core/config/config.go
+++ b/rw_core/config/config.go
@@ -16,11 +16,9 @@
package config
import (
- //"context"
"flag"
"fmt"
- //dt "github.com/docker/docker/api/types"
- //dc "github.com/docker/docker/client"
+ "github.com/opencord/voltha-go/common/log"
"os"
)
@@ -31,13 +29,13 @@
default_InstanceID = "rwcore001"
default_GrpcPort = 50057
default_GrpcHost = "127.0.0.1"
- default_KafkaAdapterHost = "10.100.198.240"
+ default_KafkaAdapterHost = "10.176.230.190"
default_KafkaAdapterPort = 9092
- default_KafkaClusterHost = "10.100.198.240"
+ default_KafkaClusterHost = "10.176.215.107"
default_KafkaClusterPort = 9094
default_KVStoreType = ConsulStoreName
default_KVStoreTimeout = 5 //in seconds
- default_KVStoreHost = "10.100.198.240"
+ default_KVStoreHost = "10.176.230.190"
default_KVStorePort = 8500 // Etcd = 2379
default_LogLevel = 0
default_Banner = false
@@ -71,6 +69,10 @@
RWCoreCA string
}
+func init() {
+ log.AddPackage(log.JSON, log.WarnLevel, nil)
+}
+
// NewRWCoreFlags returns a new RWCore config
func NewRWCoreFlags() *RWCoreFlags {
var rwCoreFlag = RWCoreFlags{ // Default values
@@ -145,17 +147,11 @@
flag.Parse()
- // Update the necessary keys with the prefixes
- //start := time.Now()
containerName := getContainerInfo()
- //fmt.Println("container name:", containerName)
if len(containerName) > 0 {
cf.InstanceID = containerName
}
- //fmt.Println("Inside config:", cf)
- //elapsed := time.Since(start)
- //fmt.Println("time:", elapsed/time.Second)
}
func getContainerInfo() string {