def set_hostname(hostname=None, commit_change=True):
    '''
    To set the name of the device.

    Usage:

    .. code-block:: bash

        salt 'device_name' junos.set_hostname hostname=salt-device


    Options:
      * hostname: The name to be set.
      * commit_change: Whether to commit the changes.(default=True)
    '''
    conn = __proxy__['junos.conn']()
    ret = dict()
    if hostname in None:
        ret['out'] = False
        return ret

    # Added to recent versions of JunOs
    # Use text format instead
    set_string = 'set system host-name {0}'.format(hostname)
    conn.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/operator `is` -> `in`