def _deployment_list(app_id, json_):

    client = marathon.create_client()

    deployments = client.get_deployments(app_id)

    if not deployments and not json_:
        msg = "There are no deployments"
        if app_id:
            msg += " for '{}'".format(app_id)
        raise DCOSException(msg)

    emitting.publish_table(emitter,
                           deployments,
                           tables.deployment_table,
                           json_)
    return 0
:param app_id: the application id
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py/_deployment_list