def host_get(host=None, name=None, hostids=None, **connection_args):
 conn_args = _login(**connection_args)
 try:
  if conn_args:
   method = 'host.get'
   params = {'output': 'extend', 'filter': {}}
   if ((not name) and (not hostids) and (not host)):
    return False
   if name:
    params['filter'].setdefault('name', name)
   if hostids:
    params.setdefault('hostids', hostids)
   if host:
    params['filter'].setdefault('host', host)
   params = _params_extend(params, **connection_args)
   ret = _query(method, params, conn_args['url'], conn_args['auth'])
   return (ret['result'] if (len(ret['result']) > 0) else False)
  else:
   raise KeyError
 except KeyError:
  return False

def host_get ( host = None , name = None , hostids = None , ** connection_args ) : conn_args = _login ( ** connection_args ) try : if conn_args : method = 'host.get' params = { 'output' : 'extend' , 'filter' : { } } if ( ( not name ) and ( not hostids ) and ( not host ) ) : return False if name : params [ 'filter' ] . setdefault ( 'name' , name ) if hostids : params . setdefault ( 'hostids' , hostids ) if host : params [ 'filter' ] . setdefault ( 'host' , host ) params = _params_extend ( params , ** connection_args ) ret = _query ( method , params , conn_args [ 'url' ] , conn_args [ 'auth' ] ) return ( ret [ 'result' ] if ( len ( ret [ 'result' ] ) > 0 ) else False ) else : raise KeyError except KeyError : return False
retrieve hosts according to the given parameters .