Techprofile module to receive KVStore config from adapter,
Re-tested openolt-adapter & openonu-adapter for EAPOL/DHCP/HSIA on Edgecore OLT & TWSH ONT kit
Change-Id: I9cdf0365d888bfa619e1c16cac01970cc5aba856
diff --git a/common/techprofile/config.go b/common/techprofile/config.go
index 5312dc0..9d521ed 100644
--- a/common/techprofile/config.go
+++ b/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,