

def set_hostname(hostname=None, commit_change=True):
    "\n    To set the name of the device.\n\n    Usage:\n\n    .. code-block:: bash\n\n        salt 'device_name' junos.set_hostname hostname=salt-device\n\n\n    Options:\n      * hostname: The name to be set.\n      * commit_change: Whether to commit the changes.(default=True)\n    "
    conn = __proxy__['junos.conn']()
    ret = dict()
    if (hostname is None):
        ret['out'] = False
        return ret
    set_string = 'set system host-name {0}'.format(hostname)
    ret.cu.load(set_string, format='set')
    if commit_change:
        return commit()
    else:
        ret['out'] = True
        ret['msg'] = 'set system host-name {0} is queued'.format(hostname)
    return ret

dataset/ETHPy150Open saltstack/salt/salt/modules/junos.py set_hostname/VarMisuse@62/201 `conn`->`ret`