def hostgroup_delete(hostgroupids, **connection_args):
 conn_args = _login(**connection_args)
 try:
  if conn_args:
   method = 'hostgroup.delete'
   if (not isinstance(hostgroupids, list)):
    params = [hostgroupids]
   else:
    params = hostgroupids
   ret = _query(method, params, conn_args['url'], conn_args['auth'])
   return ret['result']['groupids']
  else:
   raise KeyError
 except KeyError:
  return ret

def hostgroup_delete ( hostgroupids , ** connection_args ) : conn_args = _login ( ** connection_args ) try : if conn_args : method = 'hostgroup.delete' if ( not isinstance ( hostgroupids , list ) ) : params = [ hostgroupids ] else : params = hostgroupids ret = _query ( method , params , conn_args [ 'url' ] , conn_args [ 'auth' ] ) return ret [ 'result' ] [ 'groupids' ] else : raise KeyError except KeyError : return ret
delete the host group .