def usergroup_exists(name=None, node=None, nodeids=None, **connection_args):
 conn_args = _login(**connection_args)
 zabbix_version = apiinfo_version(**connection_args)
 try:
  if conn_args:
   if (LooseVersion(zabbix_version) > LooseVersion('2.5')):
    if (not name):
     name = ''
    ret = usergroup_get(name, None, **connection_args)
    return bool(ret)
   else:
    method = 'usergroup.exists'
    params = {}
    if ((not name) and (not node) and (not nodeids)):
     return {'result': False, 'comment': 'Please submit name, node or nodeids parameter to check if at least one user group exists.'}
    if name:
     params['name'] = name
    if (LooseVersion(zabbix_version) < LooseVersion('2.4')):
     if node:
      params['node'] = node
     if nodeids:
      params['nodeids'] = nodeids
    ret = _query(method, params, conn_args['url'], conn_args['auth'])
    return ret['result']
  else:
   raise KeyError
 except KeyError:
  return False

def usergroup_exists ( name = None , node = None , nodeids = None , ** connection_args ) : conn_args = _login ( ** connection_args ) zabbix_version = apiinfo_version ( ** connection_args ) try : if conn_args : if ( LooseVersion ( zabbix_version ) > LooseVersion ( '2.5' ) ) : if ( not name ) : name = '' ret = usergroup_get ( name , None , ** connection_args ) return bool ( ret ) else : method = 'usergroup.exists' params = { } if ( ( not name ) and ( not node ) and ( not nodeids ) ) : return { 'result' : False , 'comment' : 'Please submit name, node or nodeids parameter to check if at least one user group exists.' } if name : params [ 'name' ] = name if ( LooseVersion ( zabbix_version ) < LooseVersion ( '2.4' ) ) : if node : params [ 'node' ] = node if nodeids : params [ 'nodeids' ] = nodeids ret = _query ( method , params , conn_args [ 'url' ] , conn_args [ 'auth' ] ) return ret [ 'result' ] else : raise KeyError except KeyError : return False
checks if at least one user group that matches the given filter criteria exists .