Dep update to current voltha-go and voltha-protos
voltha-go update includes techprofile and
resource manager common library updates.
Also flow decomposer utilities were refactored
out of the flow_decomposer.go file into its own
utils file. This required a cooresponding code update.
Change-Id: I785f7fdfcbc6e790bf9220d31d95afcbbf373658
See: https://gerrit.opencord.org/#/c/13904/
diff --git a/vendor/github.com/opencord/voltha-go/common/techprofile/config.go b/vendor/github.com/opencord/voltha-go/common/techprofile/config.go
index 5312dc0..9d521ed 100644
--- a/vendor/github.com/opencord/voltha-go/common/techprofile/config.go
+++ b/vendor/github.com/opencord/voltha-go/common/techprofile/config.go
@@ -30,9 +30,9 @@
defaultPbits = "0b11111111"
defaultKVStoreType = "etcd"
- defaultKVStoreTimeout = 5 //in seconds
- defaultKVStoreHost = "172.21.0.8" // TODO: Need to get IP from adapter
- defaultKVStorePort = 2379 // Consul = 8500; Etcd = 2379
+ defaultKVStoreTimeout = 5 //in seconds
+ defaultKVStoreHost = "127.0.0.1"
+ defaultKVStorePort = 2379 // Consul = 8500; Etcd = 2379
// Tech profile path prefix in kv store
defaultKVPathPrefix = "service/voltha/technology_profiles"
@@ -98,13 +98,13 @@
DefaultNumTconts uint32
}
-func NewTechProfileFlags() *TechProfileFlags {
+func NewTechProfileFlags(KVStoreType string, KVStoreHost string, KVStorePort int) *TechProfileFlags {
// initialize with default values
var techProfileFlags = TechProfileFlags{
KVBackend: nil,
- KVStoreHost: defaultKVStoreHost,
- KVStorePort: defaultKVStorePort,
- KVStoreType: defaultKVStoreType,
+ KVStoreHost: KVStoreHost,
+ KVStorePort: KVStorePort,
+ KVStoreType: KVStoreType,
KVStoreTimeout: defaultKVStoreTimeout,
DefaultTPName: defaultTechProfileName,
TPKVPathPrefix: defaultKVPathPrefix,
diff --git a/vendor/github.com/opencord/voltha-go/common/techprofile/tech_profile.go b/vendor/github.com/opencord/voltha-go/common/techprofile/tech_profile.go
index 2879e99..e41e064 100644
--- a/vendor/github.com/opencord/voltha-go/common/techprofile/tech_profile.go
+++ b/vendor/github.com/opencord/voltha-go/common/techprofile/tech_profile.go
@@ -255,7 +255,7 @@
func newKVClient(storeType string, address string, timeout int) (kvstore.Client, error) {
- log.Infow("kv-store-type", log.Fields{"store": storeType})
+ log.Infow("kv-store", log.Fields{"storeType": storeType, "address": address})
switch storeType {
case "consul":
return kvstore.NewConsulClient(address, timeout)
@@ -265,10 +265,10 @@
return nil, errors.New("unsupported-kv-store")
}
-func NewTechProfile(resourceMgr iPonResourceMgr) (*TechProfileMgr, error) {
+func NewTechProfile(resourceMgr iPonResourceMgr, KVStoreType string, KVStoreHost string, KVStorePort int) (*TechProfileMgr, error) {
var techprofileObj TechProfileMgr
log.Debug("Initializing techprofile Manager")
- techprofileObj.config = NewTechProfileFlags()
+ techprofileObj.config = NewTechProfileFlags(KVStoreType, KVStoreHost, KVStorePort)
techprofileObj.config.KVBackend = techprofileObj.SetKVClient()
if techprofileObj.config.KVBackend == nil {
log.Error("Failed to initialize KV backend\n")