2 ##############################################################################
3 # Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 import utils.logger as log
14 LOG = log.Logger(__name__).getLogger()
15 INSTALLER_TYPE = os.getenv("INSTALLER_TYPE")
18 def get_config_path(INSTALLER_TYPE=None, CONFIG_PATH="/tmp/k8s_config"):
20 CMD = "bash k8s_config_pre.sh -i " + INSTALLER_TYPE + \
22 LOG.info("Executing command: " + CMD)
23 CONFIG_PATH = os.popen(CMD)
25 if not os.path.exists(CONFIG_PATH):
26 raise Exception("Must at least specify the path \