marathon.py 文件源码

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

项目:deb-python-dcos 作者: openstack 项目源码 文件源码
def add_pod(pod_path, wait=True):
    """Add a pod, and wait for it to deploy

    :param pod_path: path to pod's json definition
    :type pod_path: str
    :param wait: whether to wait for the deploy
    :type wait: bool
    :rtype: None
    """

    cmd = ['dcos', 'marathon', 'pod', 'add', pod_path]
    returncode, stdout, stderr = exec_command(cmd)
    assert returncode == 0
    assert re.fullmatch('Created deployment \S+\n', stdout.decode('utf-8'))
    assert stderr == b''

    if wait:
        watch_all_deployments()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号