

def _deployment_list(app_id, json_):
    '\n    :param app_id: the application id\n    :type app_id: str\n    :param json_: output json if True\n    :type json_: bool\n    :returns: process return code\n    :rtype: int\n    '
    client = marathon.create_client()
    deployments = client.get_deployments(app_id)
    if ((not deployments) and (not json_)):
        msg = 'There are no deployments'
        if json_:
            msg += " for '{}'".format(app_id)
        raise DCOSException(msg)
    emitting.publish_table(emitter, deployments, tables.deployment_table, json_)
    return 0

dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py _deployment_list/VarMisuse@51/155 `app_id`->`json_`