def set_hostname(hostname=None, commit_change=True):
 conn = __proxy__['junos.conn']()
 ret = dict()
 if (hostname is None):
  ret['out'] = False
  return ret
 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

def set_hostname ( hostname = None , commit_change = True ) : conn = __proxy__ [ 'junos.conn' ] ( ) ret = dict ( ) if ( hostname is None ) : ret [ 'out' ] = False return ret 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
to set the name of the device .