]> andersk Git - moira.git/blobdiff - clients/moira/menus.c
added hosttable stuff
[moira.git] / clients / moira / menus.c
index ba7ff93e6dbfc2912d815c84c337cd67ad21638f..a911fb7dc90dc5f855ea8effe8bdbe03d946c2a1 100644 (file)
@@ -1,10 +1,10 @@
-#ifndef lint
+#if (!defined(lint) && !defined(SABER))
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file menu.c for allmaint, the SMS client that allows
- *      a user to maintaint most important parts of the SMS database.
- *     It Contains: all menu definitions for allmaint.
+/*     This is the file menus.c for the MOIRA Client, which allows a nieve
+ *      user to quickly and easily maintain most parts of the MOIRA database.
+ *     It Contains: All menu definitions.
  *     
  *     Created:        4/11/88
  *     By:             Chris D. Peterson
@@ -13,7 +13,7 @@
  *      $Author$
  *      $Header$
  *     
- *     Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ *     Copyright 1988 by the Massachusetts Institute of Technology.
  *
  *     For further information on copyright and distribution 
  *     see the file mit-copyright.h
 #include <menu.h>
 
 #include "mit-copyright.h"
-#include "allmaint.h"
-#include "allmaint_funcs.h"
+#include "defs.h"
+#include "f_defs.h"
 #include "globals.h"
 
-/*
- * Attachmaint Menus
+
+/* ------------------------- Second Tier Menus ------------------------- */
+
+/* 
+ * Cluster Data Menu
  */
 
-Menu attachmaint_filemenu = {
-  NULLFUNC, 
-  NULLFUNC, 
-  "Filesystem Maintenance",
+Menu cluster_data_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Cluster Data Menu",
   4,
   {
-    { GetFS, NULLMENU, 2, {
-      {"get", "Get Filesystem Name Information"},
-      {"name", "Name of Filesystem: "}
-    } },
-    { AddFS, NULLMENU, 2, {
-      {"add", "Add New Filesystem to Database"},
-      {"name", "name: "},
+    { ShowClusterData, NULLMENU, 3, {
+      {"show", "Show Data on a given Cluster"},
+      {"clus", "Cluster's Name: "},
+      {"label", "Label Identifing the data: "},
     } },
-    { ChangeFS, NULLMENU, 2, {
-      {"change", "Update Filesystem Information"},
-      {"name", "name: "},
+    { AddClusterData, NULLMENU, 4, {
+      {"add", "Add Data to a given Cluster"},
+      {"clus", "Cluster Name: "},
+      {"label", "Label Identifing the data: "},
+      {"data", "The data to be added: "},
     } },
-    { DeleteFS, NULLMENU, 2, {
-      {"delete", "Delete Filesystem"},
-      {"name", "Filesystem Name: "}
-    } } 
+    { RemoveClusterData, NULLMENU, 3, {
+      {"delete", "Remove Data from a given Cluster"},
+      {"clus", "Cluster's Name: "},
+      {"label", "Label Identifing the data: "},
+    } }, 
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
 
-Menu attachmaint_top_menu = {
-  NULLFUNC, 
-  NULLFUNC, 
-  "Attach/Filesystem Maintenance", 
-  6,
-  {
-    SUBMENU("filesystem", "Filesystem Work", &attachmaint_filemenu),
-    { GetFSAlias, NULLMENU, 2, {
-      {"check", "Check An Association"},
-      {"name", "alias name : "}
-    } },
-    { CreateFSAlias, NULLMENU, 2, {
-      {"alias", "Associate with a Filesystem"},
-      {"name", "alias name : "},
-    } },
-    { DeleteFSAlias, NULLMENU, 2, {
-      {"unalias", "Disassociate from a Filesystem"},
-      {"name", "alias name : "},
-    } },
-    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
-    SIMPLEFUNC("help", "Help ..", AttachHelp)
-  }
+/*
+ * List Information Menu
+ */
+
+Menu list_info_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "List Information Menu",
+    3,
+    {
+        SIMPLEFUNC("member",
+                  "Show all lists to which a given member belongs",
+                  ListByMember),
+       SIMPLEFUNC("admin",
+                  "Show all items which a given member can administer",
+                  ListByAdministrator),
+       SIMPLEFUNC("public", "Show all public mailing lists",
+                  ListAllPublicMailLists),
+    }
 };
 
 /*
- * Clustermaint Menus
+ * List Member Menu
  */
 
-Menu clustermaint_machine_menu = {
+Menu list_member_menu = {
+    ListmaintMemberMenuEntry,
+    ListmaintMemberMenuExit,
+    NULL,
+    7,
+    {
+       SIMPLEFUNC("add", "Add a member to this list", AddMember),
+       SIMPLEFUNC("remove", "Remove a member from this list", DeleteMember),
+       SIMPLEFUNC("all", "Show the members of this list", ListAllMembers),
+       SIMPLEFUNC("user", "Show the members of type USER", ListUserMembers),
+       SIMPLEFUNC("list", "Show the members of type LIST", ListListMembers),
+       SIMPLEFUNC("string", "Show the members of type STRING", 
+                  ListStringMembers),
+       SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
+    } 
+};
+
+/*
+ *  Machine To Cluster Mappings Menu
+ */
+
+Menu mappings_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Machine Maintenence",
-  7,
+  "Machine To Cluster Mappings Menu",
+  4,
   {
-    { ShowMachineInfo, NULLMENU, 2, {
-      {"show","Get machine information"},
-      {"name","Machine's Name: "}
-    } },
-    { AddMachine, NULLMENU, 2, {
-      {"add","Add a new machine"},
-      {"name","Machine's Name: "},
-    } },
-    { UpdateMachine, NULLMENU, 2, {
-      {"update","Update machine information"},
-      {"name","Machine's Name: "},
-    } },
-    { DeleteMachine, NULLMENU, 2, {
-      {"delete","Delete this machine"},
-      {"name","Machine's Name: "}
-    } },
     { MachineToClusterMap, NULLMENU, 3, {
       {"map", "Show Machine to cluster mapping"},
       {"name", "Machine's Name: "},
       {"cluster", "Cluster's Name: "},
     } },
     { AddMachineToCluster, NULLMENU, 3, {
-      {"addcluster","Add machines to a clusters"},
+      {"addcluster","Add machine to a cluster"},
       {"name","Machine's Name: "},
       {"cluster", "Cluster's Name: "},
     } },
@@ -121,23 +127,187 @@ Menu clustermaint_machine_menu = {
       {"name","Machine's Name: "},
       {"cluster", "Cluster's Name: "},
     } },
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
+  }
+};
+
+/* 
+ * Post Office Box Menu
+ */
+
+Menu pobox_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Post Office Box Menu",
+  4,
+  {
+    {GetUserPOBox, NULLMENU, 2, {
+      {"show", "Show a user's post office box"},
+      {"login name", "login name: "}
+    } },
+    {SetUserPOBox, NULLMENU, 2, {
+      {"set", "Set (Add or Change) a user's post office box"},
+      {"login name", "login name: "}
+    } },
+    {RemoveUserPOBox, NULLMENU, 2, {
+      {"remove", "Remove a user's post office box"},
+      {"login name", "login name: "}
+    } },
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
+   
+/*
+ * Quota Menu
+ */
+Menu quota_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Quota Menu",
+  8,
+  {
+    SIMPLEFUNC("shdef", "Show default user quota (in KB)", ShowDefaultQuota),
+    {ChangeDefaultQuota, NULLMENU, 2, {
+      {"chdef", "Change default user quota"},
+      {"quota", "New quota (in KB): "}
+    } },
+    SIMPLEFUNC("getquota", "Show a quota on a filesystem",
+              GetQuota),
+    SIMPLEFUNC("getfsquotas", "Show all quotas on a filesystem",
+              GetQuotaByFilesys),
+    SIMPLEFUNC("addquota", "Add a new disk quota on a filesystem",
+              AddQuota),
+    SIMPLEFUNC("upquota", "Change a quota on a filesystem",
+              UpdateQuota),
+    SIMPLEFUNC("delquota", "Delete a quota on a filesystem",
+              DeleteQuota),
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
+  } 
+};
 
-Menu clustermaint_cluster_menu = {
+Menu fsgroup_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "Filesystem Group Menu",
+    6,
+    {
+       { GetFS, NULLMENU, 2, {
+           {"get", "Get individual or group filesystem information"},
+           {"name", "Name of Filesystem: "}
+       } },
+       { AddFSToGroup, NULLMENU, 3, {
+           {"add", "Add a new filesystem to an FS group"},
+           {"group", "FS Group name: "},
+           {"filsys", "Filesystem name: "}
+       } },
+       { RemoveFSFromGroup, NULLMENU, 3, {
+           {"remove", "Remove a filesystem from an FS group"},
+           {"group", "FS Group name: "},
+           {"filsys", "Filesystem name: "}
+       } },
+       { ChangeFSGroupOrder, NULLMENU, 2, {
+           {"order", "Change the order of filesystems in a group"},
+           {"group", "FS Group name: "}
+       } },
+       SIMPLEFUNC("help", "Info on Filesystem Groups", FSGroupHelp),
+       SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
+    }
+};
+
+Menu service_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "DCM Service Menu",
+    6,
+    {
+       { showserv, NULLMENU, 2, {
+           { "showserv", "Show service information" },
+           { "service name", "Name of service: " },
+       } },
+       { addserv, NULLMENU, 2, {
+           { "addserv", "Add a new service" },
+           { "service name", "Name of service: " },
+       } },
+       { updateserv, NULLMENU, 2, {
+           { "updateserv", "Update service information" },
+           { "service name", "Name of service: " },
+       } },
+       { resetsrverr, NULLMENU, 2, {
+           { "resetsrverr", "Reset service error" },
+           { "service name", "Name of service: " },
+       } },
+       { resetsrvc, NULLMENU, 2, {
+           { "resetsrvc", "Reset service state" },
+           { "service name", "Name of service: " },
+       } },
+       { delserv, NULLMENU, 2, {
+           { "delserv", "Delete service info" },
+           { "service name", "Name of service: " },
+       } },
+    }
+};
+
+Menu host_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "DCM Host Menu",
+    7,
+    {
+       { showhost, NULLMENU, 3, {
+           { "showhost", "Show service/host tuple information" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { addhost, NULLMENU, 3, {
+           { "addhost", "Add a new service/host tuple" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { updatehost, NULLMENU, 3, {
+           { "updatehost", "Update a service/host tuple" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { resethosterr, NULLMENU, 3, {
+           { "resethosterr", "Reset service/host error" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { resethost, NULLMENU, 3, {
+           { "resethost", "Reset service/host state" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { sethostor, NULLMENU, 3, {
+           { "override", "Set service/host override" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+       { delhost, NULLMENU, 3, {
+           { "delhost", "Delete service/host tuple" },
+           { "service name", "Name of service: " },
+           { "host name", "Name of machine: " },
+       } },
+    }
+};
+
+/* ------------------------- First Tier Menus ------------------------- */
+
+/* 
+ * Cluster Menu
+ */
+
+Menu cluster_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Cluster Information",
+  "Cluster Menu",
   7,
   {
     { ShowClusterInfo, NULLMENU, 2, {
       {"show", "Get cluster information"},
       {"name", "Cluster's Name: "}
     } },
-    { MachinesInCluster, NULLMENU, 2, {
-      {"machines", "List all machines in a cluster"},
-      {"clus", "Cluster's Name: "}
-    } },
     { AddCluster, NULLMENU, 2, {
       {"add", "Add a new cluster"},
       {"name","Cluster's Name: "},
@@ -150,185 +320,167 @@ Menu clustermaint_cluster_menu = {
       {"delete", "Delete this cluster"},
       {"name", "Cluster's Name: "}
     } },
-    { AddMachineToCluster, NULLMENU, 3, {
-      {"addcluster","Add machines to a clusters"},
-      {"name","Machine's Name: "},
-      {"cluster", "Cluster's Name: "},
-    } },
-    { RemoveMachineFromCluster, NULLMENU, 3, {
-      {"remcluster", "Remove machines from clusters"},
-      {"name","Machine's Name: "},
-      {"cluster", "Cluster's Name: "},
-    } },
+    SUBMENU("mappings","Machine To Cluster Mappings Menu", &mappings_menu),
+    SUBMENU("c_data","Cluster Data Menu", &cluster_data_menu),
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
 
-Menu clustermaint_data_menu = {
-  NULLFUNC,
-  NULLFUNC,
-  "Cluster Data Maintenence",
-  3,
+/* 
+ * Filesystem Menu
+ */
+
+Menu filesys_menu = {
+  NULLFUNC, 
+  NULLFUNC, 
+  "Filesystem Menu",
+  10,
   {
-    { ShowClusterData, NULLMENU, 3, {
-      {"show", "Show Data on a given Cluster"},
-      {"clus", "Cluster's Name: "},
-      {"label", "Label Identifing the data: "},
+    { GetFS, NULLMENU, 2, {
+      {"get", "Get Filesystem Name Information"},
+      {"name", "Name of Filesystem: "}
     } },
-    { AddClusterData, NULLMENU, 4, {
-      {"add", "Add Data to a given Cluster"},
-      {"clus", "Cluster Name: "},
-      {"label", "Label Identifing the data: "},
-      {"data", "The data to be added: "},
+    { GetFSM, NULLMENU, 2, {
+      {"getmach", "Get Filesystems by Machine"},
+      {"name", "Name of Server: "}
     } },
-    { RemoveClusterData, NULLMENU, 4, {
-      {"delete", "Remove Data to a given Cluster"},
-      {"clus", "Cluster's Name: "},
-      {"label", "Label Identifing the data: "},
-      {"data", "The data to be removed: "},
-    } } 
+    { AddFS, NULLMENU, 2, {
+      {"add", "Add New Filesystem to Database"},
+      {"name", "name: "},
+    } },
+    { ChangeFS, NULLMENU, 2, {
+      {"change", "Update Filesystem Information"},
+      {"name", "name: "},
+    } },
+    { DeleteFS, NULLMENU, 2, {
+      {"delete", "Delete Filesystem"},
+      {"name", "Filesystem Name: "}
+    } },
+    SUBMENU("fsgroups", "File System Groups Menu", &fsgroup_menu),
+    { GetFSAlias, NULLMENU, 2, {
+      {"check", "Check An Association"},
+      {"name", "alias name : "}
+    } },
+    { CreateFSAlias, NULLMENU, 2, {
+      {"alias", "Associate with a Filesystem"},
+      {"name", "alias name : "},
+    } },
+    { DeleteFSAlias, NULLMENU, 2, {
+      {"unalias", "Disassociate from a Filesystem"},
+      {"name", "alias name : "},
+    } },
+    SUBMENU("quotas","Quota Menu", &quota_menu),
+/*    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
+/*    SIMPLEFUNC("help", "Help ..", AttachHelp) */
   }
 };
 
-Menu clustermaint_top_menu = {
+Menu subnet_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Cluster Maintenence",
+  "Subnet Menu",
   5,
   {
-    SUBMENU("machine", "Work on Machines", &clustermaint_machine_menu),
-    SUBMENU("cluster", "Work on Clusters", &clustermaint_cluster_menu),
-    SUBMENU("data", "Work with cluster data", &clustermaint_data_menu),
-    {MachineToClusterMap, NULLMENU, 3, {
-      {"map", "Machine to Cluster Mapping"},
-      {"machine", "Machine Name: "},
-      {"clus", "Cluster Name: "}
+    { ShowSubnetInfo, NULLMENU, 2, {
+      {"show","Get subnet information"},
+      {"name","Subnet's Name: "}
+    } },
+    { AddSubnet, NULLMENU, 2, {
+      {"add","Add a new subnet"},
+      {"name","Subnet's Name: "},
+    } },
+    { UpdateSubnet, NULLMENU, 2, {
+      {"update","Update subnet information"},
+      {"name","Subnet's Name: "},
+    } },
+    { DeleteSubnet, NULLMENU, 2, {
+      {"delete","Delete this subnet"},
+      {"name","Subnet's Name: "}
     } },
-    SIMPLEFUNC("verbose", "Toggle Delete Confirmation", ToggleVerboseMode),
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
 
-/*
- * Dcmmaint menus
- */
-
-/* Commenting out all DCM maint stuff. 
-
-Menu dcmmaint_service_menu = {
-  dcmmaint_service_menu_entry,
-  dcmmaint_service_menu_exit,
-  NULL,
-  5,
+Menu cname_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Host Alias Menu",
+  4,
   {
-    SIMPLEFUNC("show", "Show fields of service", show_service),
-    SIMPLEFUNC("interval", "Change the interval field", change_interval),
-    SIMPLEFUNC("target_path", "Change the target_path field",
-              change_target_path),
-    SIMPLEFUNC("script", "Change the script field", change_script),
-    SIMPLEFUNC("dfgen",
-              "Change the date of the latest generation of the db file", 
-              change_dfgen)
+    { ShowCname, NULLMENU, 3, {
+      {"show","Get host alias information"},
+      {"alias","Alias Name (Cname): "},
+      {"host","Canonical Host Name: "}
+    } },
+    { AddCname, NULLMENU, 3, {
+      {"add","Add a new host alias"},
+      {"alias","Alias Name (Cname): "},
+      {"host","Canonical Host Name: "}
+    } },
+    { DeleteCname, NULLMENU, 3, {
+      {"delete","Delete this alias"},
+      {"alias","Alias Name (Cname): "},
+      {"host","Canonical Host Name: "}
+    } },
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
 
-Menu dcmmaint_host_info_menu = {
-  dcmmaint_host_info_menu_entry,
-  dcmmaint_host_info_menu_exit,
-  NULL,
-  8,
-  {
-    SIMPLEFUNC("show", "Show values of entry", show_host_info),
-    SIMPLEFUNC("last_time", "Change the last_time field", change_last_time),
-    SIMPLEFUNC("success", "Change the success field", change_success),
-    SIMPLEFUNC("override", "Change the override field", change_override),
-    SIMPLEFUNC("enable", "Change the enable field", change_enable),
-    SIMPLEFUNC("value1", "Change the value1 field", change_value1),
-    SIMPLEFUNC("value2", "Change the value2 field", change_value2),
-    SIMPLEFUNC("rvdacls", "Change the RVD ACLs (for RVD servers only)",
-              update_rvd_server)
-  }
-};
+/*
+ * Machine Menu
+ */
 
-Menu dcmmaint_top_menu = {
+Menu machine_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Data Control Manager Maintenance",
-  9,
+  "Machine Menu",
+  7,
   {
-    SUBMENU("hi_change", "Modify a service-host entry", 
-           &dcmmaint_host_info_menu),
-    SIMPLEFUNC("hi_add", "Create new service-host entry", do_host_info),
-    SIMPLEFUNC("hi_delete", "Remove a service-host entry", do_host_info),
-    SIMPLEFUNC("hi_list", "List service-host entries", do_host_info),
-    SUBMENU("s_change", "Modify info for an existing service",
-           &dcmmaint_service_menu),
-    SIMPLEFUNC("s_add", "Create new service", do_service),
-    SIMPLEFUNC("s_delete", "Remove a service", do_service),
-    SIMPLEFUNC("s_list", "List services", do_service),
-    SIMPLEFUNC("help", "How to use this program", instructions)
+    { ShowMachineInfo, NULLMENU, 2, {
+      {"show","Get machine information"},
+      {"name","Machine's Name: "}
+    } },
+    { ShowMachineQuery, NULLMENU, 5, {
+       {"query", "Lookup machines"},
+       {"name", "Machine Name (or leave empty to match any): "},
+       {"address", "Address in dotted notation (or leave empty to match any): "},
+       {"location", "Location (or leave empty to match any): "},
+       {"contact", "Contact person (or leave empty to match any): "}
+    } },
+    { AddMachine, NULLMENU, 2, {
+      {"add","Add a new machine"},
+      {"name","Machine's Name: "},
+    } },
+    { UpdateMachine, NULLMENU, 2, {
+      {"update","Update machine information"},
+      {"name","Machine's Name: "},
+    } },
+    { DeleteMachine, NULLMENU, 2, {
+      {"delete","Delete this machine"},
+      {"name","Machine's Name: "}
+    } },
+    SUBMENU("cnames","Alias names for machines", &cname_menu),
+    SUBMENU("mappings","Machine To Cluster Mappings Menu", &mappings_menu),
   }
 };
 
-Commenting out all DCM maint stuff. */
-
 /*
- * Listmaint Menus 
+ * List Menu
  */
 
-Menu listmaint_list_menu = {
-    NULLFUNC,
-    NULLFUNC,
-    "Lists",
-    5,
-    {
-        SIMPLEFUNC("member",
-                  "List all lists to which a given member belongs",
-                  ListByMember),
-       SIMPLEFUNC("administrator",
-                  "List all lists which a given user can administer",
-                  ListByAdministrator),
-       SIMPLEFUNC("groups", "List all lists which are groups",
-                  ListAllGroups),
-       SIMPLEFUNC("public", "List all public mailing lists",
-                  ListAllPublicMailLists),
-       SIMPLEFUNC("maillists", "List all mailing lists",
-                  ListAllMailLists)
-    }
-};
-
-Menu listmaint_member_menu = {
-    ListmaintMemberMenuEntry,
-    ListmaintMemberMenuExit,
-    NULL,
-    6,
-    {
-       SIMPLEFUNC("add", "Add a member to the list",
-                  AddMember),
-       SIMPLEFUNC("delete", "Delete a member from the list",
-                  DeleteMember),
-       SIMPLEFUNC("all", "Show the members of the list",
-                  ListAllMembers),
-       SIMPLEFUNC("user", "Show the members of type USER",
-                  ListUserMembers),
-       SIMPLEFUNC("list", "Show the members of type LIST",
-                  ListListMembers),
-       SIMPLEFUNC("string", "Show the members of type STRING",
-                  ListStringMembers)
-    } 
-};
-    
-Menu listmaint_top_menu = {
+Menu list_menu = {
     NULLFUNC,
     NULLFUNC,
-    "List Maintenance Menu",
-    8,
+    "List Menu",
+    9,
     {
        { ShowListInfo, NULLMENU, 2, {
            {"show", "Display information about a list"},
            {"list name", "Name of list: "}
        } },
-        { NULLFUNC, &listmaint_member_menu, 2, {
+        { NULLFUNC, &list_member_menu, 2, {
            {"add", "Create new List"},
-           {"list name", "Name of list (do not use wildcards): "}
+           {"list name", "Name of list: "}
        } },
        { UpdateList, NULLMENU, 2, {
            {"update", "Update characteristics of a list"},
@@ -338,224 +490,299 @@ Menu listmaint_top_menu = {
            {"delete", "Delete a List"},
            {"list name", "Name of list: "}
        } },
-       { NULLFUNC, &listmaint_member_menu, 2, {
-           {"members", "Change/Display the membership of a list"},
-           {"list name", "Name of list (do not use wildcards): "}
-       } },
        SIMPLEFUNC("query_remove",
                   "Interactively remove an item from all lists",
                   InterRemoveItemFromLists),
-       SUBMENU("list_lists", "Display inventory of lists",
-               &listmaint_list_menu),
-       SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", 
-                  ToggleVerboseMode),
-       SIMPLEFUNC("help", "How to use this program", ListHelp)
+       { NULLFUNC, &list_member_menu, 2, {
+           {"members", "Member Menu - Change/Show Members of a List."},
+           {"list name", "Name of list: "}
+       } },
+       SUBMENU("list_info", "List Info Menu",
+               &list_info_menu),
+       SUBMENU("quotas","Quota Menu", &quota_menu),    
+/*     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
+       SIMPLEFUNC("help", "Print Help", ListHelp)
     } 
 };
 
 /*
- * NFSmaint menus.
+ * NFS Physical Menu
  */
 
-Menu nfsmaint_top_menu = {
+Menu nfsphys_menu = {
   NULLFUNC,
   NULLFUNC,
-  "NFS Maintenence",
-  5,
+  "NFS Physical Menu",
+  6,
   {
-    { ShowNFSService, NULLMENU, 3, {
+    { ShowNFSService, NULLMENU, 2, {
       { "show", "Show an NFS server" },
       { "machine", "Machine Name: "},
-      { "device", "Directory: "}
     } },
-    { AddNFSService, NULLMENU, 3, {
+    { AddNFSService, NULLMENU, 2, {
       { "add", "Add NFS server" },
       { "machine", "Machine Name: "},
-      { "device", "Directory: "}
     } },
-    { UpdateNFSService, NULLMENU, 3, {
+    { UpdateNFSService, NULLMENU, 2, {
       { "update", "Update NFS server"},
       { "machine", "Machine Name: "},
-      { "device", "Directory: "}
     } },
-    { DeleteNFSService, NULLMENU, 3, {
+    { DeleteNFSService, NULLMENU, 2, {
       { "delete", "Delete NFS server"},
       {"machine", "Machine Name: "},
-      {"device", "Directory: "}
     } },
+    SUBMENU("quotas","Quota Menu", &quota_menu),
     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
 /*    SIMPLEFUNC("help", "Help", NFSHelp), */
   }
 };
 
+Menu krbmap_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "User Kerberos Mapping Menu",
+    3,
+    {
+       { GetKrbmap, NULLMENU, 3, {
+           { "show", "Show Kerberos Mappings" },
+           { "user", "User login name: " },
+           { "principal", "Principal: " },
+       } },
+       { AddKrbmap, NULLMENU, 3, {
+           { "add", "Add Kerberos Mapping" },
+           { "user", "User login name: " },
+           { "principal", "Principal (this is case sensitive): " },
+       } },
+       { DeleteKrbmap, NULLMENU, 3, {
+           { "delete", "Delete Kerberos Mapping" },
+           { "user", "User login name: " },
+           { "principal", "Principal: " },
+       } },
+    }
+};
+
 /*
- * Portmaint menus.
+ * User Menu
  */
 
-/* Queries have not been implemented yet :-( 
-
-Menu servmenu = {
+Menu user_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Server Maintenence",
-  8,
+  "User Menu",
+  11,
   {
-    { getserv, NULLMENU, 2, {
-      {"get", "Services Info"},
-      {"serv", "Service Name: "}
-    } },
-    { addserv, NULLMENU, 4, {
-      {"add", "Add Service"},
-      {"srv", "Name: "},
-      {"proto", "Protocol: "},
-      {"port", "Port: "}
-    } },
-    { updserv, NULLMENU, 4, {
-      {"update", "Update Service"},
-      {"srv", "Name: "},
-      {"proto", "Protocol: "},
-      {"port", "Port: "}
-    } },
-    {delserv, NULLMENU, 3, {
-      {"delete", "Delete Service"},
-      {"serv", "Service Name: "},
-      {"proto", "Protocol: "}
-    } },
-    {  getassc, NULLMENU, 2, {
-      {"get_alias", "Get All Aliases for Service"},
-      {"srv", "Service Name: "}
-    } },
-    { alas, NULLMENU, 3, {
-      {"+", "Add Alias"},
-      {"srv", "Service Name: "},
-      {"als", "Alias: "}
-    } },
-    { alas, NULLMENU, 3, {
-      {"-", "Delete Alias"},
-      {"srv", "Service Name: "},
-      {"als", "Alias: "}
-    } },
-    SIMPLEFUNC("toggle", "Toggle Verbosity of Delete", toggle_verb)
+    {ShowUserByLogin, NULLMENU, 2, {
+       {"login", "Show user information by login name"},
+       {"login name", "Desired login name: "}
+     } },
+    {ShowUserByName, NULLMENU, 3, {
+      {"name", "Show user information by name"},
+      {"first", "First name: "},
+      {"last", "Last name: "}
+    } },
+    {ShowUserByClass, NULLMENU, 2, {
+       {"class", "Show names of users in a given class"},
+       {"login name", "Desired class: "}
+    } },    
+    {ShowUserById, NULLMENU, 2, {
+       {"id", "Show user information by ID number"},
+       {"ID number", "ID number: "}
+    } },
+    {UpdateUser, NULLMENU, 2, {
+      {"modify", "Change all user fields"},
+      {"login", "Login name: "}
+    } },
+    SIMPLEFUNC("adduser", "Add a new user to the database", 
+              AddNewUser),
+    SIMPLEFUNC("register", "Register a user", RegisterUser),
+    {DeactivateUser, NULLMENU, 2, {
+      {"deactivate", "Deactivate user"},
+      {"login", "Login name: "},
+    } },
+    {DeleteUser, NULLMENU, 2, {
+      {"expunge", "Expunge user"},
+      {"login", "Login name: "}
+    } },
+    SUBMENU("pobox", "Post Office Box Menu", &pobox_menu),
+    SUBMENU("krbmap", "User Kerberos Mappings", &krbmap_menu),
   }
 };
 
-*/
-/*
- * smsmaint - TBS
- */
+Menu dcm_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "DCM Menu",
+    6,
+    {
+       SIMPLEFUNC("enable", "Enable/disable DCM", EnableDcm),
+       SUBMENU("service", "DCM Service Menu", &service_menu),
+       SUBMENU("host", "DCM Host Menu", &host_menu),
+       SIMPLEFUNC("active", "Display entries currently being updated",
+                  InProgress),
+       SIMPLEFUNC("failed", "Display entries with errors to be reset",
+                  DcmFailed),
+       SIMPLEFUNC("dcm", "Invoke a DCM update now", Dcm),
+    }
+};
 
 /* 
- * Usermaint menu.
+ * Printcap Printer Menu
  */
 
-Menu usermaint_quota_menu = {
-  NULLFUNC,
-  NULLFUNC,
-  "Edit User Quotas and Server Machines",
-  6,
+Menu printer_menu = {
+  NULLFUNC, 
+  NULLFUNC, 
+  "Printer Menu",
+  4,
   {
-    SIMPLEFUNC("shdef", "Show default user quota (in KB)", ShowDefaultQuota),
-    {ShowUserQuota, NULLMENU, 2, {
-       {"shquota", "Show a user's quota (in KB)"},
-       {"login", "Login name: "}
-     } },
-    {ChangeDefaultQuota, NULLMENU, 2, {
-      {"chdef", "Change default user quota"},
-      {"quota", "New quota (in KB): "}
+    { GetPcap, NULLMENU, 2, {
+      {"get", "Get Printcap Entry Information"},
+      {"name", "Name of Printer: "}
     } },
-    {ChangeUserQuota, NULLMENU, 2, {
-      {"chquota", "Change a user's disk quota"},
-      {"user", "Login name: "}
+    { AddPcap, NULLMENU, 2, {
+      {"add", "Add New Printcap Entry to Database"},
+      {"name", "name: "},
     } },
-    {AddUserLocker, NULLMENU, 5, {
-      {"create", "Create a quota & locker for a user"},
-      {"login", "User's login name: "},
-      {"machine", "Server host name: "},
-      {"device", "Directory on host: /[dir]/[login] "},
-      {"quota", "Quota in KB: "}
+    { ChngPcap, NULLMENU, 2, {
+      {"change", "Update Printer Information"},
+      {"name", "name: "},
     } },
-    {DeleteUserLocker, NULLMENU, 2, {
-      {"del", "Delete a user's quota & locker - BROKEN 6/10/88 CDP"},
-      {"login", "User's login: "}
+    { DeletePcap, NULLMENU, 2, {
+      {"delete", "Delete Printcap Entry"},
+      {"name", "Printer Name: "}
     } }
-  } 
+  }
 };
 
-Menu usermaint_top_menu = {
-  NULLFUNC,
-  NULLFUNC,
-  "SMS User Maintenance",
-  8,
+
+/* 
+ * Palladium Printer Menu
+ */
+
+Menu palladium_menu = {
+  NULLFUNC, 
+  NULLFUNC, 
+  "Printer Menu",
+  7,
   {
-    {ShowUserByLogin, NULLMENU, 2, {
-       {"login", "Show user information by login name"},
-       {"login name", "Desired login name: "}
-     } },
-    {ShowUserByName, NULLMENU, 3, {
-      {"full", "Show user information by name"},
-      {"first", "First name: "},
-      {"last", "Last name: "}
+    { GetPalladium, NULLMENU, 2, {
+      {"get", "Get Palladium Server/Supervisor Information"},
+      {"name", "Name of Printer: "}
     } },
-    {ShowUserByClass, NULLMENU, 2, {
-       {"login", "Show names of users in a given class"},
-       {"login name", "Desired class: "}
-     } },    
-    {ModifyUser, NULLMENU, 2, {
-      {"modify", "Change all user fields"},
-      {"login", "Login name: "}
+    { AddPalladium, NULLMENU, 2, {
+      {"add", "Add New Palladium Server/Supervisor to Database"},
+      {"name", "Supervisor/server name: "},
     } },
-/*    SIMPLEFUNC("chpw", "Change a user's password", change_user_password), */
-    {ChangeUserPOBox, NULLMENU, 2, {
-      {"chpobox", "Change a user's post office box"},
-      {"login name", "login name: "}
+    { ChngPalladium, NULLMENU, 2, {
+      {"change", "Update Palladium Server/Supervisor Information"},
+      {"name", "name: "},
     } },
-/*    {enter_user, NULLMENU, 6, {
-      {"enter", "Enter unregistered user"},
-      {"first", "User's first name: "},
-      {"middle", "User's middle initial: "},
-      {"last", "User's last name: "},
-      {"mit_id", "User's MIT ID: "},
-      {"mit_year", "User's MIT year: "}
-    } },
-    {reg_user, NULLMENU, 5, {
-      {"register", "Register unregistered user"},
-      {"first", "User's first name: "},
-      {"last", "User's last name: "},
-      {"mit_id", "User's MIT ID: "},
-      {"login", "Login name to assign: "}
+    { DeletePalladium, NULLMENU, 2, {
+      {"delete", "Delete Palladium Server/Supervisor Entry"},
+      {"name", "Printer Name: "}
     } },
- */
-    {DeleteUser, NULLMENU, 2, {
-      {"delete", "Delete user"},
-      {"login", "Login name: "}
+    { ShowPalladiumAlias, NULLMENU, 3, {
+      {"getprinter", "Show Logical Printers"},
+      {"newname", "Printer name: "},
+      {"server", "Supervisor or Server name: "},
+    } },
+    { AddPalladiumAlias, NULLMENU, 3, {
+      {"addprinter", "Add Logical Printer"},
+      {"newname", "New printer: "},
+      {"server", "Supervisor or Server name: "},
     } },
-    {DeleteUserByUid, NULLMENU, 2, {
-      {"udelete", "Delete user by uid"},
-      {"uid", "User ID (not MIT ID!): "}
+    { DeletePalladiumAlias, NULLMENU, 3, {
+      {"delprinter", "Remove Logical Printer"},
+      {"newname", "Printer name: "},
+      {"server", "Supervisor or Server name: "},
     } },
-    SUBMENU("quota", "User Quotas", &usermaint_quota_menu),
   }
 };
 
+
+
+/*
+ * Zephyr Menu
+ */
+
+Menu zephyr_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "Zephyr Menu",
+    5,
+    {
+       { GetZephyr, NULLMENU, 2, {
+           {"get", "Get Zephyr Class Information"},
+           {"name", "Name of class: "}
+       } },
+       { AddZephyr, NULLMENU, 2, {
+           {"add", "Add New Zephyr class restrictions"},
+           {"name", "Class name: "},
+       } },
+       { ChngZephyr, NULLMENU, 2, {
+           {"change", "Update Zephyr class restrictions"},
+           {"name", "Class name: "},
+       } },
+       { DeleteZephyr, NULLMENU, 2, {
+           {"delete", "Delete Zephyr class restriction"},
+           {"name", "Class Name: "}
+       } },
+       { NULLFUNC, &list_member_menu, 2, {
+           {"members", "Member Menu - Change/Show Members of a List."},
+           {"list name", "Name of list: "}
+       } },
+    }
+};
+
+
+/*
+ * Miscellaneous Menu
+ */
+
+Menu misc_menu = {
+    NULLFUNC,
+    NULLFUNC,
+    "Miscellaneous Menu",
+    4,
+    {
+       SIMPLEFUNC("statistics", "Show database statistics", TableStats),
+       SIMPLEFUNC("clients", "Show active Moira clients", ShowClients),
+       { ShowValue, NULLMENU, 2, {
+           {"getval", "Show a database variable value"},
+           {"name", "variable name: "},
+       } },
+       { ShowAlias, NULLMENU, 3, {
+           {"getalias", "Show an alias relation"},
+           {"name", "Alias name: "},
+           {"type", "Alias type: "},
+       } },
+    }
+};
+
+
+/* ------------------------- Root Menu ------------------------- */
+
 /* 
- * Sms top menu
+ * Moira top menu
  */
 
-Menu sms_top_menu = {
+Menu moira_top_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Sms Database Manipulation",
-  5,
+  "Moira Database Manipulation",
+  12,
   {
-    SUBMENU("attachmaint","open the attachmaint menu",&attachmaint_top_menu),
-    SUBMENU("clustermaint","open the clustermaint menu",
-           &clustermaint_top_menu),
-/*    SUBMENU("dcmmaint","open the dcmmaint menu",&dcmmaint_top_menu), */
-    SUBMENU("listmaint","open the listmaint menu",&listmaint_top_menu),
-    SUBMENU("nfsmaint","open the nfsmaint menu",&nfsmaint_top_menu),
-/*    SUBMENU("portmaint","open the portmaint menu",&portmaint_top_menu), */
-/*    SUBMENU("smsmaint","open the smsmaint menu",&smsmaint_top_menu), */
-    SUBMENU("usermaint","open the usermaint menu",&usermaint_top_menu)
+    SUBMENU("cluster","Cluster Menu",&cluster_menu),
+    SUBMENU("filesys","Filesystem Menu", &filesys_menu),
+    SUBMENU("list","Lists and Group Menu", &list_menu),
+    SUBMENU("machine","Machine Menu",&machine_menu),
+    SUBMENU("subnet", "Subnet Menu", &subnet_menu),
+    SUBMENU("nfs","NFS Physical Menu", &nfsphys_menu),
+    SUBMENU("user","User Menu", &user_menu),
+    SUBMENU("printcap", "Printcap Printer Menu", &printer_menu),
+    SUBMENU("palladium", "Palladium Printer Menu", &palladium_menu),
+    SUBMENU("zephyr", "Zephyr ACLS Menu", &zephyr_menu),
+    SUBMENU("dcm", "DCM Menu", &dcm_menu),
+    SUBMENU("misc", "Miscellaneous Menu", &misc_menu)
   }
 };  
-       
This page took 0.078333 seconds and 4 git commands to generate.