]> andersk Git - moira.git/blob - clients/moira/menus.c
Fix varargs handling in menu_com_err_hook().
[moira.git] / clients / moira / menus.c
1 /* $Id$
2  *
3  *      This is the file menus.c for the Moira Client, which allows users
4  *      to quickly and easily maintain most parts of the Moira database.
5  *      It Contains: All menu definitions.
6  *
7  *      Created:        4/11/88
8  *      By:             Chris D. Peterson
9  *
10  * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology.
11  * For copying and distribution information, please see the file
12  * <mit-copyright.h>.
13  */
14
15 #include <stdio.h>
16
17 #include "mit-copyright.h"
18 #include <moira.h>
19 #include "defs.h"
20 #include "f_defs.h"
21 #include "globals.h"
22
23 #include <stdio.h>
24
25 RCSID("$Header$");
26
27 /* ------------------------- Second Tier Menus ------------------------- */
28
29 /*
30  * Cluster Data Menu
31  */
32
33 Menu cluster_data_menu = {
34   NULLFUNC,
35   NULLFUNC,
36   "Cluster Data Menu",
37   4,
38   {
39     { ShowClusterData, NULLMENU, 3, {
40       {"show", "Show Data on a given Cluster"},
41       {"clus", "Cluster's Name: "},
42       {"label", "Label Identifing the data: "},
43     } },
44     { AddClusterData, NULLMENU, 4, {
45       {"add", "Add Data to a given Cluster"},
46       {"clus", "Cluster Name: "},
47       {"label", "Label Identifing the data: "},
48       {"data", "The data to be added: "},
49     } },
50     { RemoveClusterData, NULLMENU, 3, {
51       {"delete", "Remove Data from a given Cluster"},
52       {"clus", "Cluster's Name: "},
53       {"label", "Label Identifing the data: "},
54     } },
55     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
56   }
57 };
58
59 /*
60  * List Information Menu
61  */
62
63 Menu list_info_menu = {
64   NULLFUNC,
65   NULLFUNC,
66   "List Information Menu",
67   3,
68   {
69     SIMPLEFUNC("member",
70                "Show all lists to which a given member belongs",
71                ListByMember),
72     SIMPLEFUNC("admin",
73                "Show all items which a given member can administer",
74                ListByAdministrator),
75     SIMPLEFUNC("public", "Show all public mailing lists",
76                ListAllPublicMailLists),
77   }
78 };
79
80 /*
81  * List Member Tags Menu
82  */
83
84 Menu list_tags_menu = {
85   NULL,
86   NULL,
87   "List Member Tags Menu",
88   2,
89   {
90     SIMPLEFUNC("change", "Change the tag on a list member", TagMember),
91     SIMPLEFUNC("show", "Show all list members with tags", ListMembersWithTags),
92   }
93 };
94
95 /*
96  * List Member Menu
97  */
98
99 Menu list_member_menu = {
100   ListmaintMemberMenuEntry,
101   ListmaintMemberMenuExit,
102   NULL,
103   8,
104   {
105     SIMPLEFUNC("add", "Add a member to this list", AddMember),
106     SIMPLEFUNC("remove", "Remove a member from this list", DeleteMember),
107     SIMPLEFUNC("all", "Show the members of this list", ListAllMembers),
108     SIMPLEFUNC("user", "Show the members of type USER", ListUserMembers),
109     SIMPLEFUNC("list", "Show the members of type LIST", ListListMembers),
110     SIMPLEFUNC("string", "Show the members of type STRING",
111                ListStringMembers),
112     SUBMENU("tags", "List Member Tags Menu", &list_tags_menu),
113     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
114   }
115 };
116
117 /*
118  *  Machine To Cluster Mappings Menu
119  */
120
121 Menu mappings_menu = {
122   NULLFUNC,
123   NULLFUNC,
124   "Machine To Cluster Mappings Menu",
125   4,
126   {
127     { MachineToClusterMap, NULLMENU, 3, {
128       {"map", "Show Machine to cluster mapping"},
129       {"name", "Machine's Name: "},
130       {"cluster", "Cluster's Name: "},
131     } },
132     { AddMachineToCluster, NULLMENU, 3, {
133       {"addcluster", "Add machine to a cluster"},
134       {"name", "Machine's Name: "},
135       {"cluster", "Cluster's Name: "},
136     } },
137     { RemoveMachineFromCluster, NULLMENU, 3, {
138       {"remcluster", "Remove machines from clusters"},
139       {"name", "Machine's Name: "},
140       {"cluster", "Cluster's Name: "},
141     } },
142     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
143   }
144 };
145
146 /*
147  * Post Office Box Menu
148  */
149
150 Menu pobox_menu = {
151   NULLFUNC,
152   NULLFUNC,
153   "Post Office Box Menu",
154   5,
155   {
156     {GetUserPOBox, NULLMENU, 2, {
157       {"show", "Show a user's post office box"},
158       {"login name", "login name: "}
159     } },
160     {SetUserPOBox, NULLMENU, 2, {
161       {"set", "Set (Add or Change) a user's post office box"},
162       {"login name", "login name: "}
163     } },
164     {SplitUserPOBox, NULLMENU, 2, {
165       {"split", "Split a user's post office box"},
166       {"login name", "login name: "}
167     } },
168     {RemoveUserPOBox, NULLMENU, 2, {
169       {"remove", "Remove a user's post office box"},
170       {"login name", "login name: "}
171     } },
172     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
173   }
174 };
175
176 /*
177  * Quota Menu
178  */
179
180 Menu quota_menu = {
181   NULLFUNC,
182   NULLFUNC,
183   "Quota Menu",
184   8,
185   {
186     SIMPLEFUNC("shdef", "Show default user quota (in KB)", ShowDefaultQuota),
187     {ChangeDefaultQuota, NULLMENU, 2, {
188       {"chdef", "Change default user quota"},
189       {"quota", "New quota (in KB): "}
190     } },
191     SIMPLEFUNC("getquota", "Show a quota on a filesystem",
192                GetQuota),
193     SIMPLEFUNC("getfsquotas", "Show all quotas on a filesystem",
194                GetQuotaByFilesys),
195     SIMPLEFUNC("addquota", "Add a new disk quota on a filesystem",
196                AddQuota),
197     SIMPLEFUNC("upquota", "Change a quota on a filesystem",
198                UpdateQuota),
199     SIMPLEFUNC("delquota", "Delete a quota on a filesystem",
200                DeleteQuota),
201     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
202   }
203 };
204
205 Menu fsgroup_menu = {
206   NULLFUNC,
207   NULLFUNC,
208   "Filesystem Group Menu",
209   6,
210   {
211     { GetFS, NULLMENU, 2, {
212       {"get", "Get individual or group filesystem information"},
213       {"name", "Name of Filesystem: "}
214     } },
215     { AddFSToGroup, NULLMENU, 3, {
216       {"add", "Add a new filesystem to an FS group"},
217       {"group", "FS Group name: "},
218       {"filsys", "Filesystem name: "}
219     } },
220     { RemoveFSFromGroup, NULLMENU, 3, {
221       {"remove", "Remove a filesystem from an FS group"},
222       {"group", "FS Group name: "},
223       {"filsys", "Filesystem name: "}
224     } },
225     { ChangeFSGroupOrder, NULLMENU, 2, {
226       {"order", "Change the order of filesystems in a group"},
227       {"group", "FS Group name: "}
228     } },
229     SIMPLEFUNC("help", "Info on Filesystem Groups", FSGroupHelp),
230     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
231   }
232 };
233
234 Menu service_menu = {
235   NULLFUNC,
236   NULLFUNC,
237   "DCM Service Menu",
238   6,
239   {
240     { showserv, NULLMENU, 2, {
241       { "showserv", "Show service information" },
242       { "service name", "Name of service: " },
243     } },
244     { addserv, NULLMENU, 2, {
245       { "addserv", "Add a new service" },
246       { "service name", "Name of service: " },
247     } },
248     { updateserv, NULLMENU, 2, {
249       { "updateserv", "Update service information" },
250       { "service name", "Name of service: " },
251     } },
252     { resetsrverr, NULLMENU, 2, {
253       { "resetsrverr", "Reset service error" },
254       { "service name", "Name of service: " },
255     } },
256     { resetsrvc, NULLMENU, 2, {
257       { "resetsrvc", "Reset service state" },
258       { "service name", "Name of service: " },
259     } },
260     { delserv, NULLMENU, 2, {
261       { "delserv", "Delete service info" },
262       { "service name", "Name of service: " },
263     } },
264   }
265 };
266
267 Menu host_menu = {
268   NULLFUNC,
269   NULLFUNC,
270   "DCM Host Menu",
271   7,
272   {
273     { showhost, NULLMENU, 3, {
274       { "showhost", "Show service/host tuple information" },
275       { "service name", "Name of service: " },
276       { "host name", "Name of machine: " },
277     } },
278     { addhost, NULLMENU, 3, {
279       { "addhost", "Add a new service/host tuple" },
280       { "service name", "Name of service: " },
281       { "host name", "Name of machine: " },
282     } },
283     { updatehost, NULLMENU, 3, {
284       { "updatehost", "Update a service/host tuple" },
285       { "service name", "Name of service: " },
286       { "host name", "Name of machine: " },
287     } },
288     { resethosterr, NULLMENU, 3, {
289       { "resethosterr", "Reset service/host error" },
290       { "service name", "Name of service: " },
291       { "host name", "Name of machine: " },
292     } },
293     { resethost, NULLMENU, 3, {
294       { "resethost", "Reset service/host state" },
295       { "service name", "Name of service: " },
296       { "host name", "Name of machine: " },
297     } },
298     { sethostor, NULLMENU, 3, {
299       { "override", "Set service/host override" },
300       { "service name", "Name of service: " },
301       { "host name", "Name of machine: " },
302     } },
303     { delhost, NULLMENU, 3, {
304       { "delhost", "Delete service/host tuple" },
305       { "service name", "Name of service: " },
306       { "host name", "Name of machine: " },
307     } },
308   }
309 };
310
311 /* ------------------------- First Tier Menus ------------------------- */
312
313 /*
314  * Cluster Menu
315  */
316
317 Menu cluster_menu = {
318   NULLFUNC,
319   NULLFUNC,
320   "Cluster Menu",
321   7,
322   {
323     { ShowClusterInfo, NULLMENU, 2, {
324       {"show", "Get cluster information"},
325       {"name", "Cluster's Name: "}
326     } },
327     { AddCluster, NULLMENU, 2, {
328       {"add", "Add a new cluster"},
329       {"name", "Cluster's Name: "},
330     } },
331     { UpdateCluster, NULLMENU, 2, {
332       {"update", "Update cluster information"},
333       {"name", "Cluster's Name: "},
334     } },
335     { DeleteCluster, NULLMENU, 2, {
336       {"delete", "Delete this cluster"},
337       {"name", "Cluster's Name: "}
338     } },
339     SUBMENU("mappings", "Machine To Cluster Mappings Menu", &mappings_menu),
340     SUBMENU("c_data", "Cluster Data Menu", &cluster_data_menu),
341     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
342   }
343 };
344
345 /*
346  * Filesystem Menu
347  */
348
349 Menu filesys_menu = {
350   NULLFUNC,
351   NULLFUNC,
352   "Filesystem Menu",
353   10,
354   {
355     { GetFS, NULLMENU, 2, {
356       {"get", "Get Filesystem Name Information"},
357       {"name", "Name of Filesystem: "}
358     } },
359     { GetFSM, NULLMENU, 2, {
360       {"getmach", "Get Filesystems by Machine"},
361       {"name", "Name of Server: "}
362     } },
363     { AddFS, NULLMENU, 2, {
364       {"add", "Add New Filesystem to Database"},
365       {"name", "name: "},
366     } },
367     { ChangeFS, NULLMENU, 2, {
368       {"change", "Update Filesystem Information"},
369       {"name", "name: "},
370     } },
371     { DeleteFS, NULLMENU, 2, {
372       {"delete", "Delete Filesystem"},
373       {"name", "Filesystem Name: "}
374     } },
375     SUBMENU("fsgroups", "File System Groups Menu", &fsgroup_menu),
376     { GetFSAlias, NULLMENU, 2, {
377       {"check", "Check An Association"},
378       {"name", "alias name : "}
379     } },
380     { CreateFSAlias, NULLMENU, 2, {
381       {"alias", "Associate with a Filesystem"},
382       {"name", "alias name : "},
383     } },
384     { DeleteFSAlias, NULLMENU, 2, {
385       {"unalias", "Disassociate from a Filesystem"},
386       {"name", "alias name : "},
387     } },
388     SUBMENU("quotas", "Quota Menu", &quota_menu),
389 /*    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
390 /*    SIMPLEFUNC("help", "Help ..", AttachHelp) */
391   }
392 };
393
394 Menu subnet_menu = {
395   NULLFUNC,
396   NULLFUNC,
397   "Network Menu",
398   5,
399   {
400     { ShowSubnetInfo, NULLMENU, 2, {
401       {"show", "Get network information"},
402       {"name", "Network's Name: "}
403     } },
404     { AddSubnet, NULLMENU, 2, {
405       {"add", "Add a new network"},
406       {"name", "Network's Name: "},
407     } },
408     { UpdateSubnet, NULLMENU, 2, {
409       {"update", "Update network information"},
410       {"name", "Network's Name: "},
411     } },
412     { DeleteSubnet, NULLMENU, 2, {
413       {"delete", "Delete this network"},
414       {"name", "Network's Name: "}
415     } },
416     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
417   }
418 };
419
420 Menu cname_menu = {
421   NULLFUNC,
422   NULLFUNC,
423   "Host Alias Menu",
424   4,
425   {
426     { ShowCname, NULLMENU, 3, {
427       {"show", "Get host alias information"},
428       {"alias", "Alias Name (Cname): "},
429       {"host", "Canonical Host Name: "}
430     } },
431     { AddCname, NULLMENU, 3, {
432       {"add", "Add a new host alias"},
433       {"alias", "Alias Name (Cname): "},
434       {"host", "Canonical Host Name: "}
435     } },
436     { DeleteCname, NULLMENU, 3, {
437       {"delete", "Delete this alias"},
438       {"alias", "Alias Name (Cname): "},
439       {"host", "Canonical Host Name: "}
440     } },
441     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
442   }
443 };
444
445 /*
446  * Machine Menu
447  */
448
449 Menu machine_menu = {
450   NULLFUNC,
451   NULLFUNC,
452   "Machine Menu",
453   7,
454   {
455     { ShowMachineInfo, NULLMENU, 2, {
456       {"show", "Get machine information"},
457       {"name", "Machine's Name: "}
458     } },
459     { ShowMachineQuery, NULLMENU, 5, {
460       {"query", "Lookup machines"},
461       {"name", "Machine Name (or leave empty to match any): "},
462       {"address", "Address in dotted notation (or leave empty to match any): "},
463       {"location", "Location (or leave empty to match any): "},
464       {"network", "Network (or leave empty to match any): "}
465     } },
466     { AddMachine, NULLMENU, 2, {
467       {"add", "Add a new machine"},
468       {"network", "Network assignment: "},
469     } },
470     { UpdateMachine, NULLMENU, 2, {
471       {"update", "Update machine information"},
472       {"name", "Machine's Name: "},
473     } },
474     { DeleteMachine, NULLMENU, 2, {
475       {"delete", "Delete this machine"},
476       {"name", "Machine's Name: "}
477     } },
478     SUBMENU("cnames", "Alias names for machines", &cname_menu),
479     SUBMENU("mappings", "Machine To Cluster Mappings Menu", &mappings_menu),
480   }
481 };
482
483 /*
484  * List Menu
485  */
486
487 Menu list_menu = {
488   NULLFUNC,
489   NULLFUNC,
490   "List Menu",
491   9,
492   {
493     { ShowListInfo, NULLMENU, 2, {
494       {"show", "Display information about a list"},
495       {"list name", "Name of list: "}
496     } },
497     { NULLFUNC, &list_member_menu, 2, {
498       {"add", "Create new List"},
499       {"list name", "Name of list: "}
500     } },
501     { UpdateList, NULLMENU, 2, {
502       {"update", "Update characteristics of a list"},
503       {"list name", "Name of list: "}
504     } },
505     { DeleteList, NULLMENU, 2, {
506       {"delete", "Delete a List"},
507       {"list name", "Name of list: "}
508     } },
509     SIMPLEFUNC("query_remove",
510                "Interactively remove an item from all lists",
511                InterRemoveItemFromLists),
512     { NULLFUNC, &list_member_menu, 2, {
513       {"members", "Member Menu - Change/Show Members of a List."},
514       {"list name", "Name of list: "}
515     } },
516     SUBMENU("list_info", "List Info Menu",
517             &list_info_menu),
518     SUBMENU("quotas", "Quota Menu", &quota_menu),
519 /*      SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
520     SIMPLEFUNC("help", "Print Help", ListHelp)
521   }
522 };
523
524 /*
525  * NFS Physical Menu
526  */
527
528 Menu nfsphys_menu = {
529   NULLFUNC,
530   NULLFUNC,
531   "NFS Physical Menu",
532   6,
533   {
534     { ShowNFSService, NULLMENU, 2, {
535       { "show", "Show an NFS server" },
536       { "machine", "Machine Name: "},
537     } },
538     { AddNFSService, NULLMENU, 2, {
539       { "add", "Add NFS server" },
540       { "machine", "Machine Name: "},
541     } },
542     { UpdateNFSService, NULLMENU, 2, {
543       { "update", "Update NFS server"},
544       { "machine", "Machine Name: "},
545     } },
546     { DeleteNFSService, NULLMENU, 2, {
547       { "delete", "Delete NFS server"},
548       {"machine", "Machine Name: "},
549     } },
550     SUBMENU("quotas", "Quota Menu", &quota_menu),
551     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
552 /*    SIMPLEFUNC("help", "Help", NFSHelp), */
553   }
554 };
555
556 Menu krbmap_menu = {
557   NULLFUNC,
558   NULLFUNC,
559   "User Kerberos Mapping Menu",
560   3,
561   {
562     { GetKrbmap, NULLMENU, 3, {
563       { "show", "Show Kerberos Mappings" },
564       { "user", "User login name: " },
565       { "principal", "Principal: " },
566     } },
567     { AddKrbmap, NULLMENU, 3, {
568       { "add", "Add Kerberos Mapping" },
569       { "user", "User login name: " },
570       { "principal", "Principal (this is case sensitive): " },
571     } },
572     { DeleteKrbmap, NULLMENU, 3, {
573       { "delete", "Delete Kerberos Mapping" },
574       { "user", "User login name: " },
575       { "principal", "Principal: " },
576     } },
577   }
578 };
579
580 /*
581  * User Menu
582  */
583
584 Menu user_menu = {
585   NULLFUNC,
586   NULLFUNC,
587   "User Menu",
588   11,
589   {
590     {ShowUserByLogin, NULLMENU, 2, {
591        {"login", "Show user information by login name"},
592        {"login name", "Desired login name: "}
593      } },
594     {ShowUserByName, NULLMENU, 3, {
595       {"name", "Show user information by name"},
596       {"first", "First name: "},
597       {"last", "Last name: "}
598     } },
599     {ShowUserByClass, NULLMENU, 2, {
600       {"class", "Show names of users in a given class"},
601       {"login name", "Desired class: "}
602     } },
603     {ShowUserById, NULLMENU, 2, {
604       {"id", "Show user information by ID number"},
605       {"ID number", "ID number: "}
606     } },
607     {UpdateUser, NULLMENU, 2, {
608       {"modify", "Change all user fields"},
609       {"login", "Login name: "}
610     } },
611     SIMPLEFUNC("adduser", "Add a new user to the database",
612                AddNewUser),
613     SIMPLEFUNC("register", "Register a user", RegisterUser),
614     {DeactivateUser, NULLMENU, 2, {
615       {"deactivate", "Deactivate user"},
616       {"login", "Login name: "},
617     } },
618     {DeleteUser, NULLMENU, 2, {
619       {"expunge", "Expunge user"},
620       {"login", "Login name: "}
621     } },
622     SUBMENU("pobox", "Post Office Box Menu", &pobox_menu),
623     SUBMENU("krbmap", "User Kerberos Mappings", &krbmap_menu),
624   }
625 };
626
627 Menu dcm_menu = {
628   NULLFUNC,
629   NULLFUNC,
630   "DCM Menu",
631   6,
632   {
633     SIMPLEFUNC("enable", "Enable/disable DCM", EnableDcm),
634     SUBMENU("service", "DCM Service Menu", &service_menu),
635     SUBMENU("host", "DCM Host Menu", &host_menu),
636     SIMPLEFUNC("active", "Display entries currently being updated",
637                InProgress),
638     SIMPLEFUNC("failed", "Display entries with errors to be reset", DcmFailed),
639     SIMPLEFUNC("dcm", "Invoke a DCM update now", Dcm),
640     }
641 };
642
643 Menu printserver_menu = {
644   NULLFUNC,
645   NULLFUNC,
646   "Print Server Menu",
647   4,
648   {
649     { GetPrintSrv, NULLMENU, 2, {
650       {"get", "Get Print Server Information"},
651       {"name", "Name of server: "}
652     } },
653     { AddPrintSrv, NULLMENU, 2, {
654       {"add", "Add a New Print Server"},
655       {"name", "Name of server: "}
656     } },
657     { ChangePrintSrv, NULLMENU, 2, {
658       {"change", "Modify a Print Server"},
659       {"name", "Name of server: "}
660     } },
661     { DelPrintSrv, NULLMENU, 2, {
662       {"delete", "Delete a Print Server"},
663       {"name", "Name of server: "}
664     } }
665   }
666 };
667
668 /*
669  * Printer Menu
670  */
671
672 Menu printer_menu = {
673   NULLFUNC,
674   NULLFUNC,
675   "Printer Menu",
676   11,
677   {
678     { GetPrn, NULLMENU, 2, {
679       {"get", "Get Printer Information"},
680       {"name", "Name of Printer: "}
681     } },
682     { GetPrnByHostname, NULLMENU, 2, {
683       {"hostname", "Look up Printer Information by Printer Hostname"},
684       {"name", "Hostname of Printer: "}
685     } },
686     { GetPrnByEthernet, NULLMENU, 2, {
687       {"ether", "Look up Printer Information by Ethernet address"},
688       {"hwaddr", "Ethernet address of Printer: "}
689     } },
690     { GetPrnByRM, NULLMENU, 2, {
691       {"rm", "Look up Printer Information by Print Spooler"},
692       {"name", "Hostname of spooler: "}
693     } },
694     { GetPrnByLocation, NULLMENU, 2, {
695       {"loc", "Look up Printer Information by Location"},
696       {"location", "Location: "}
697     } },
698     { GetPrnByContact, NULLMENU, 2, {
699       {"contact", "Look up Printer Information by Contact Info"},
700       {"contact", "Contact: "}
701     } },
702     { AddPrn, NULLMENU, 2, {
703       {"add", "Add New Printer to Database"},
704       {"name", "name: "},
705     } },
706     { ChngPrn, NULLMENU, 2, {
707       {"change", "Update Printer Information"},
708       {"name", "name: "},
709     } },
710     { DeletePrn, NULLMENU, 2, {
711       {"delete", "Delete Printer"},
712       {"name", "Printer Name: "}
713     } },
714     { UpdateHWAddr, NULLMENU, 2, {
715       {"hwaddr", "Update Printer Hardware Address"},
716       {"name", "Printer hostname: "}
717     } },
718     SUBMENU("server", "Print Servers Menu", &printserver_menu),
719   }
720 };
721
722 /*
723  * Zephyr Menu
724  */
725
726 Menu zephyr_menu = {
727   NULLFUNC,
728   NULLFUNC,
729   "Zephyr Menu",
730   5,
731   {
732     { GetZephyr, NULLMENU, 2, {
733       {"get", "Get Zephyr Class Information"},
734       {"name", "Name of class: "}
735     } },
736     { AddZephyr, NULLMENU, 2, {
737       {"add", "Add New Zephyr class restrictions"},
738       {"name", "Class name: "},
739     } },
740     { ChngZephyr, NULLMENU, 2, {
741       {"change", "Update Zephyr class restrictions"},
742       {"name", "Class name: "},
743     } },
744     { DeleteZephyr, NULLMENU, 2, {
745       {"delete", "Delete Zephyr class restriction"},
746       {"name", "Class Name: "}
747     } },
748     { NULLFUNC, &list_member_menu, 2, {
749       {"members", "Member Menu - Change/Show Members of a List."},
750       {"list name", "Name of list: "}
751     } },
752   }
753 };
754
755 /*
756  * ACL Menu
757  */
758
759 Menu acl_menu = {
760   NULLFUNC,
761   NULLFUNC,
762   "Generic ACL Menu",
763   3,
764   {
765     { GetACL, NULLMENU, 3, {
766       {"get", "Get ACL Information"},
767       {"host", "Machine: "},
768       {"target", "Target file: "}
769     } },
770     { AddACL, NULLMENU, 3, {
771       {"add", "Add New ACL"},
772       {"host", "Machine: "},
773       {"target", "Target file: "}
774     } },
775     { DeleteACL, NULLMENU, 3, {
776       {"delete", "Delete ACL"},
777       {"host", "Machine: "},
778       {"target", "Target file: "}
779     } },
780   }
781 };
782
783 /*
784  * Miscellaneous Menu
785  */
786
787 Menu misc_menu = {
788   NULLFUNC,
789   NULLFUNC,
790   "Miscellaneous Menu",
791   4,
792   {
793     SIMPLEFUNC("statistics", "Show database statistics", TableStats),
794     SIMPLEFUNC("clients", "Show active Moira clients", ShowClients),
795     { ShowValue, NULLMENU, 2, {
796       {"getval", "Show a database variable value"},
797       {"name", "variable name: "},
798     } },
799     { ShowAlias, NULLMENU, 3, {
800       {"getalias", "Show an alias relation"},
801       {"name", "Alias name: "},
802       {"type", "Alias type: "},
803     } },
804   }
805 };
806
807
808 /* ------------------------- Root Menu ------------------------- */
809
810 /*
811  * Moira top menu
812  */
813
814 Menu moira_top_menu = {
815   NULLFUNC,
816   NULLFUNC,
817   "Moira Database Manipulation",
818   11,
819   {
820     SUBMENU("cluster", "Cluster Menu", &cluster_menu),
821     SUBMENU("filesys", "Filesystem Menu", &filesys_menu),
822     SUBMENU("list", "Lists and Group Menu", &list_menu),
823     SUBMENU("machine", "Machine Menu", &machine_menu),
824     SUBMENU("network", "Network Menu", &subnet_menu),
825     SUBMENU("nfs", "NFS Physical Menu", &nfsphys_menu),
826     SUBMENU("printer", "Printer Menu", &printer_menu),
827     SUBMENU("user", "User Menu", &user_menu),
828     SUBMENU("zephyr", "Zephyr ACLS Menu", &zephyr_menu),
829     SUBMENU("dcm", "DCM Menu", &dcm_menu),
830     SUBMENU("acl", "Generic ACL Menu", &acl_menu),
831     SUBMENU("misc", "Miscellaneous Menu", &misc_menu)
832   }
833 };
This page took 0.112919 seconds and 5 git commands to generate.