def _restart(app_id, force):

    client = marathon.create_client()

    desc = client.get_app(app_id)

    if desc['instances'] <= 0:
        app_id = client.normalize_app_id(app_id)
        emitter.publish(
            'Unable to perform rolling restart of application {!r} '
            'because it has no running tasks'.format(
                app_id,
                desc['instances']))
        return 1

    payload = client.restart_app(app_id, force)

    emitter.publish('Created deployment {}'.format(payload['deploymentId']))
    return 0
Test to run chef-client
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py/_restart--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/states/chef_test.py/ChefTestCase.test_client