Install buildout in a specific directory

    It is a thin wrapper to modules.buildout.buildout

    name
        directory to execute in

    quiet

        do not output console & logs

    config
        buildout config to use (default: buildout.cfg)

    parts
        specific buildout parts to run

    user
        user used to run buildout as

        .. versionadded:: 2014.1.4

    env
        environment variables to set when running

    buildout_ver
        force a specific buildout version (1 | 2)

    test_release
        buildout accept test release

    new_st
        Forcing use of setuptools >= 0.7

    distribute
        use distribute over setuptools if possible

    offline
        does buildout run offline

    python
        python to use

    debug
        run buildout with -D debug flag

    onlyif
        Only execute cmd if statement on the host return 0

    unless
        Do not execute cmd if statement on the host return 0

    newest
        run buildout in newest mode

    verbose
        run buildout in verbose mode (-vvvvv)

    use_vt
        Use the new salt VT to stream output [experimental]

    loglevel
        loglevel for buildout commands

def installed(name,
              config='buildout.cfg',
              quiet=False,
              parts=None,
              user=None,
              env=(),
              buildout_ver=None,
              test_release=False,
              distribute=None,
              new_st=None,
              offline=False,
              newest=False,
              python=sys.executable,
              debug=False,
              verbose=False,
              unless=None,
              onlyif=None,
              use_vt=False,
              loglevel='debug',
              **kwargs):
    '''
    Install buildout in a specific directory

    It is a thin wrapper to modules.buildout.buildout

    name
        directory to execute in

    quiet

        do not output console & logs

    config
        buildout config to use (default: buildout.cfg)

    parts
        specific buildout parts to run

    user
        user used to run buildout as

        .. versionadded:: 2014.1.4

    env
        environment variables to set when running

    buildout_ver
        force a specific buildout version (1 | 2)

    test_release
        buildout accept test release

    new_st
        Forcing use of setuptools >= 0.7

    distribute
        use distribute over setuptools if possible

    offline
        does buildout run offline

    python
        python to use

    debug
        run buildout with -D debug flag

    onlyif
        Only execute cmd if statement on the host return 0

    unless
        Do not execute cmd if statement on the host return 0

    newest
        run buildout in newest mode

    verbose
        run buildout in verbose mode (-vvvvv)

    use_vt
        Use the new salt VT to stream output [experimental]

    loglevel
        loglevel for buildout commands
    '''
    ret = {}

    if 'group' in kwargs:
        log.warning("Passing 'group' is deprecated, just remove it")
    output_loglevel = kwargs.get('output_loglevel', None)
    if output_loglevel and not loglevel:
        log.warning("Passing 'output_loglevel' is deprecated,"
                 ' please use loglevel instead')
    try:
        test_release = int(test_release)
    except ValueError:
        test_release = None

    func = __salt('buildout.buildout')
    kwargs = dict(
        directory=name,
        config=config,
        parts=parts,
        runas=user,
        env=env,
        buildout_ver=buildout_ver,
        test_release=test_release,
        distribute=distribute,
        new_st=new_st,
        offline=offline,
        newest=newest,
        python=python,
        debug=debug,
        verbose=verbose,
        onlyif=onlyif,
        unless=unless,
        use_vt=use_vt,
        loglevel=loglevel
    )
    ret.update(_ret_status(func(**kwargs), name, quiet=quiet))
    return ret