utils.py 文件源码

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

项目:ovh-cli 作者: ovh 项目源码 文件源码
def launch_setup_2(ctx):
    """Choice 1 : user has the AK and AS tokens. We generate for him a link to
    validate the CK token."""
    endpoint = click.prompt('Endpoint', default='ovh-eu',
                            value_proc=check_endpoint)
    application_key = click.prompt('Application key')
    application_secret = click.prompt('Application secret')

    ctx.echo('')
    validation = get_ck_validation(endpoint, application_key,
                                   application_secret)
    ctx.info("Please visit the following link to authenticate you and "
             "validate the token :")
    ctx.info(validation['validationUrl'])
    click.pause()

    create_config_file(endpoint, application_key,
                       application_secret, validation['consumerKey'])

    ctx.success('Configuration file created.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号