

def _list(json_):
    '\n    :param json_: output json if True\n    :type json_: bool\n    :returns: process return code\n    :rtype: int\n    '
    client = marathon.create_client()
    apps = client.get_apps()
    if json_:
        emitter.publish(apps)
    else:
        deployments = client.get_deployments()
        table = tables.app_table(apps, deployments)
        output = str(table)
        if output:
            emitter.publish(output)
    return 0

dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py _list/original