ccu.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:ccu_and_eccu_publish 作者: gaofubin 项目源码 文件源码
def AkamaiEdgeGridConfig_Setup(config_file, section):
    config_file = os.path.expanduser(config_file)   
    if debug: print "DEBUG: config_file", config_file

    #Currently unused.
    required_options = ['client_token','client_secret','host','access_token']
    EdgeGridConfig = {}

    if os.path.isfile(config_file):
        config = ConfigParser.ConfigParser()
        config.readfp(open(config_file))
        for key, value in config.items(section):
            # ConfigParser lowercases magically
            EdgeGridConfig[key] = value
    else:
        print "Missing configuration file.  Run python gen_creds.py to get your credentials file set up once you've provisioned credentials in LUNA."
        exit()

    EdgeGridConfig['host'] = '%s://%s' % ('https', EdgeGridConfig['host'])

    if debug: print EdgeGridConfig
    return EdgeGridConfig

#Setup a EdgeGrid Session using the EdgeGridConfig previously loaded.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号