[1814] in Moira

home help back first fref pref prev next nref lref last post

adding a container query

daemon@ATHENA.MIT.EDU (Qing Dong)
Mon Jul 16 14:02:01 2001

Message-Id: <200107161757.NAA04680@melbourne-city-street.mit.edu>
Date: Mon, 16 Jul 2001 13:57:02 -0400
To: moiradev@mit.edu
From: Qing Dong <dongq@MIT.EDU>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"

The pismere team would like to be able to walk the containers hierarchy,
therefore I am
adding a new query get_toplevel_containers. It takes no argument and
retrieves all the
top-level containers in the containers table. 

By the way, Garry, would you please set the permission to all the container
"get" queries to
default, so everybody will have access to them? We have the following "get"
queries:
get_toplevel_containers
get_subcontainers_of_container
get_machines_of_container
get_machine_to_container_map
get_container

Thanks a lot for your help. 

Qing
 

Index: queries2.c
===================================================================
RCS file:
\\dongq-afs\all\athena.mit.edu\astaff\project\moiradev\repository/moira/serv
er/queries2.c,v
retrieving revision 2.85
diff -c -r2.85 queries2.c
*** queries2.c	2001/05/23 21:31:40	2.85
--- queries2.c	2001/07/16 17:03:59
***************
*** 3287,3292 ****
--- 3287,3297 ----
    get_subcontainers_of_container,
  };
  
+ static char *gtlc_fields[] = {
+   "name",
+ };
+ 
+ 
  /* Generalized Query Definitions */
  
  /* Multiple versions of the same query MUST be listed in ascending
***************
*** 6755,6760 ****
--- 6760,6782 ----
      2,
      NULL,
      &gsoc_validate,
+   },
+ 
+   {
+     /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v8 */
+     "get_toplevel_containers",
+     "gtlc",
+     8,
+     RETRIEVE,
+     "c",
+     CONTAINERS_TABLE,
+     "name from containers",
+     gtlc_fields,
+     1,
+     "name not like '%/%',
+     0,
+     "name",
+     NULL,
    },
  
  };




home help back first fref pref prev next nref lref last post