From 4f72858f6aea7d206920ebcb9270a5f7f61d74fc Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Tue, 20 Dec 2016 17:44:43 -0800 Subject: [PATCH] Change etcd port entry in conf to int When load config for etcd port, mark it as int instead of string. Change-Id: Id7d354e1932ef00d6ed4e9592e8a6332e621729c --- valence/config.py | 2 +- valence/db/etcd_db.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/valence/config.py b/valence/config.py index b88fb1e..5f275c2 100644 --- a/valence/config.py +++ b/valence/config.py @@ -70,4 +70,4 @@ redfish_base_ext = get_option("podm", "redfish_base_ext", "/redfish/v1/") # Database etcd Settings etcd_host = get_option("database_etcd", "host", "localhost") -etcd_port = get_option("database_etcd", "port", 2379) +etcd_port = get_option("database_etcd", "port", 2379, int) diff --git a/valence/db/etcd_db.py b/valence/db/etcd_db.py index 906e54e..f034b30 100644 --- a/valence/db/etcd_db.py +++ b/valence/db/etcd_db.py @@ -22,7 +22,7 @@ etcd_directories = [ "/v1/pod_managers" ] -etcd_client = etcd.Client(config.etcd_host, int(config.etcd_port)) +etcd_client = etcd.Client(config.etcd_host, config.etcd_port) def init_etcd_db():