execution.py 文件源码

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

项目:ceph-lcm 作者: Mirantis 项目源码 文件源码
def log(ctx, execution_id, client):
    """Get execution log (plain text from ansible-playbook) for a certain
    execution."""

    response = client.get_execution_log(execution_id,
                                        headers={"Content-Type": "text/plain"},
                                        raw_response=True, stream=True)
    if ctx.obj["pager"]:
        click.echo_via_pager(response.text)
    else:
        for line in response.iter_lines(decode_unicode=True):
            click.echo(line)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号