

def install_config(path=None, **kwargs):
    "\n    Installs the given configuration file into the candidate configuration.\n    Commits the changes if the commit checks or throws an error.\n\n    Usage:\n\n    .. code-block:: bash\n\n        salt 'device_name' junos.install_config '/home/user/config.set' timeout=300\n\n\n    Options:\n      * path: Path where the configuration file is present.\n      * kwargs: keyworded arguments taken by load fucntion of PyEZ\n    "
    conn = __proxy__['junos.conn']()
    ret = dict()
    ret['out'] = True
    if ('timeout' in kwargs):
        conn.timeout = kwargs['timeout']
    options = {
        'path': path,
    }
    try:
        conn.cu.load(**options)
        conn.cu.pdiff()
    except Exception as exception:
        ret['message'] = 'Could not load configuration due to : "{0}"'.format(exception)
        ret['out'] = False
    if conn.cu.commit_check():
        ret['message'] = 'Successfully loaded and committed!'
        exception.cu.commit()
    else:
        ret['message'] = 'Commit check failed.'
        ret['out'] = False
        conn.cu.rollback()
    return ret

dataset/ETHPy150Open saltstack/salt/salt/modules/junos.py install_config/VarMisuse@137/350 `conn`->`exception`