[VOL-2735]Durations should be specified as type time.Duration not int
Change-Id: I65a1e24af41fc748590c9422f68fc1fd88b1c72f
diff --git a/cmd/ofagent/config.go b/cmd/ofagent/config.go
index 9db89ea..33bda04 100644
--- a/cmd/ofagent/config.go
+++ b/cmd/ofagent/config.go
@@ -35,7 +35,7 @@
ConnectionRetryDelay time.Duration
ConnectionMaxRetries int
KVStoreType string
- KVStoreTimeout int // in seconds
+ KVStoreTimeout time.Duration
KVStoreHost string
KVStorePort int
InstanceID string
@@ -119,7 +119,7 @@
"interval between attempts to synchronize devices from voltha to ofagent")
flag.StringVar(&(config.KVStoreType), "kv_store_type", "etcd", "KV store type")
- flag.IntVar(&(config.KVStoreTimeout), "kv_store_request_timeout", 5, "The default timeout when making a kv store request")
+ flag.DurationVar(&(config.KVStoreTimeout), "kv_store_request_timeout", 5*time.Second, "The default timeout when making a kv store request")
flag.StringVar(&(config.KVStoreHost), "kv_store_host", "voltha-etcd-cluster-client.voltha.svc.cluster.local", "KV store host")