marathon.py 文件源码

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

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

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

    cmd = ['dcos', 'marathon', 'group', 'add', group_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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号