def get_api_url():
"""
Get management url from the config file
"""
config_key = 'api_url'
try:
url = CONFIG.get(URL_SECTION, config_key)
if validators.url(str(url)):
return url
else:
print_config_error_and_exit(URL_SECTION, 'REST API URL(%s)' % config_key)
except (ConfigParser.NoOptionError, ConfigParser.NoSectionError):
return DEFAULT_API_URL
评论列表
文章目录