From fc52a702ae6bd622d4fc9142b24ce76e4d7a3271 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 24 Feb 2017 09:36:32 +0800 Subject: Correct the type error of env CLI Option in tempest.py Change-Id: Id7a4f567c7c81e17c33b5c3ba558fa1cc891b42d Signed-off-by: Alex Yang --- deploy/tempest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'deploy') diff --git a/deploy/tempest.py b/deploy/tempest.py index 34af9b5a..2b72cbc2 100644 --- a/deploy/tempest.py +++ b/deploy/tempest.py @@ -31,7 +31,7 @@ _CLI_OPTS = [ help='Config cluster'), cfg.StrOpt('host', help='Config host'), - cfg.StrOpt('env', + cfg.IntOpt('env', help='deploy environment'), ] @@ -86,7 +86,7 @@ def prepare_install(): cluster_id = cluster_info.id add_hosts_interface(cluster_id, hosts_info, hosts_name, host_interface_map, vip) - if conf['env'] and conf['env'] == 0: + if 'env' in conf and conf['env'] == 0: build_pxe_for_os(cluster_id) except Exception: print("Deploy failed!!!.%s." % traceback.format_exc()) -- cgit