]> andersk Git - moira.git/blobdiff - clients/moira/menus.c
added hosttable stuff
[moira.git] / clients / moira / menus.c
index d6bbba3a7b833a9f36d2e6bf822c1dfd9aab3fef..a911fb7dc90dc5f855ea8effe8bdbe03d946c2a1 100644 (file)
@@ -2,8 +2,8 @@
   static char rcsid_module_c[] = "$Header$";
 #endif lint
 
-/*     This is the file menus.c for the SMS Client, which allows a nieve
- *      user to quickly and easily maintain most parts of the SMS database.
+/*     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
@@ -52,7 +52,7 @@ Menu cluster_data_menu = {
       {"data", "The data to be added: "},
     } },
     { RemoveClusterData, NULLMENU, 3, {
-      {"delete", "Remove Data to a given Cluster"},
+      {"delete", "Remove Data from a given Cluster"},
       {"clus", "Cluster's Name: "},
       {"label", "Label Identifing the data: "},
     } }, 
@@ -68,7 +68,7 @@ Menu list_info_menu = {
     NULLFUNC,
     NULLFUNC,
     "List Information Menu",
-    5,
+    3,
     {
         SIMPLEFUNC("member",
                   "Show all lists to which a given member belongs",
@@ -76,12 +76,8 @@ Menu list_info_menu = {
        SIMPLEFUNC("admin",
                   "Show all items which a given member can administer",
                   ListByAdministrator),
-       SIMPLEFUNC("groups", "Show all lists which are groups",
-                  ListAllGroups),
        SIMPLEFUNC("public", "Show all public mailing lists",
                   ListAllPublicMailLists),
-       SIMPLEFUNC("maillists", "Show all mailing lists",
-                  ListAllMailLists)
     }
 };
 
@@ -122,7 +118,7 @@ Menu mappings_menu = {
       {"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: "},
     } },
@@ -169,25 +165,56 @@ Menu quota_menu = {
   NULLFUNC,
   NULLFUNC,
   "Quota Menu",
-  7,
+  8,
   {
     SIMPLEFUNC("shdef", "Show default user quota (in KB)", ShowDefaultQuota),
     {ChangeDefaultQuota, NULLMENU, 2, {
       {"chdef", "Change default user quota"},
       {"quota", "New quota (in KB): "}
     } },
-    SIMPLEFUNC("shquota", "Show a user's disk quota on a filesytem",
-              ShowUserQuota),
-    SIMPLEFUNC("addquota", "Add a new disk quota for user on a filesytem",
-              AddUserQuota),
-    SIMPLEFUNC("chquota", "Change a user's disk quota on a filesytem",
-              ChangeUserQuota),
-    SIMPLEFUNC("rmquota", "Remove a user's disk quota on a filesytem",
-              RemoveUserQuota),
+    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 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,
@@ -313,6 +340,10 @@ Menu filesys_menu = {
       {"get", "Get Filesystem Name Information"},
       {"name", "Name of Filesystem: "}
     } },
+    { GetFSM, NULLMENU, 2, {
+      {"getmach", "Get Filesystems by Machine"},
+      {"name", "Name of Server: "}
+    } },
     { AddFS, NULLMENU, 2, {
       {"add", "Add New Filesystem to Database"},
       {"name", "name: "},
@@ -325,6 +356,7 @@ Menu filesys_menu = {
       {"delete", "Delete Filesystem"},
       {"name", "Filesystem Name: "}
     } },
+    SUBMENU("fsgroups", "File System Groups Menu", &fsgroup_menu),
     { GetFSAlias, NULLMENU, 2, {
       {"check", "Check An Association"},
       {"name", "alias name : "}
@@ -338,8 +370,59 @@ Menu filesys_menu = {
       {"name", "alias name : "},
     } },
     SUBMENU("quotas","Quota Menu", &quota_menu),
-    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
-    SIMPLEFUNC("help", "Help ..", AttachHelp)
+/*    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
+/*    SIMPLEFUNC("help", "Help ..", AttachHelp) */
+  }
+};
+
+Menu subnet_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Subnet Menu",
+  5,
+  {
+    { 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 Verbosity of Delete", ToggleVerboseMode)
+  }
+};
+
+Menu cname_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Host Alias Menu",
+  4,
+  {
+    { 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)
   }
 };
 
@@ -351,12 +434,19 @@ Menu machine_menu = {
   NULLFUNC,
   NULLFUNC,
   "Machine Menu",
-  6,
+  7,
   {
     { 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: "},
@@ -369,8 +459,8 @@ Menu machine_menu = {
       {"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),
-    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
   }
 };
 
@@ -382,7 +472,7 @@ Menu list_menu = {
     NULLFUNC,
     NULLFUNC,
     "List Menu",
-    10,
+    9,
     {
        { ShowListInfo, NULLMENU, 2, {
            {"show", "Display information about a list"},
@@ -410,7 +500,7 @@ Menu list_menu = {
        SUBMENU("list_info", "List Info Menu",
                &list_info_menu),
        SUBMENU("quotas","Quota Menu", &quota_menu),    
-       SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
+/*     SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode), */
        SIMPLEFUNC("help", "Print Help", ListHelp)
     } 
 };
@@ -447,6 +537,30 @@ Menu nfsphys_menu = {
   }
 };
 
+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: " },
+       } },
+    }
+};
+
 /*
  * User Menu
  */
@@ -469,12 +583,15 @@ Menu user_menu = {
     {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("chpw", "Change a user's password", change_user_password), */
     SIMPLEFUNC("adduser", "Add a new user to the database", 
               AddNewUser),
     SIMPLEFUNC("register", "Register a user", RegisterUser),
@@ -486,13 +603,8 @@ Menu user_menu = {
       {"expunge", "Expunge user"},
       {"login", "Login name: "}
     } },
-/*    {DeleteUserByUid, NULLMENU, 2, {
-      {"udelete", "Delete user by uid"},
-      {"uid", "User ID (not MIT ID!): "}
-    } }, */
     SUBMENU("pobox", "Post Office Box Menu", &pobox_menu),
-    SUBMENU("quota", "Quota Menu", &quota_menu),
-    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
+    SUBMENU("krbmap", "User Kerberos Mappings", &krbmap_menu),
   }
 };
 
@@ -514,7 +626,7 @@ Menu dcm_menu = {
 };
 
 /* 
- * Printer Menu
+ * Printcap Printer Menu
  */
 
 Menu printer_menu = {
@@ -543,6 +655,86 @@ Menu printer_menu = {
 };
 
 
+/* 
+ * Palladium Printer Menu
+ */
+
+Menu palladium_menu = {
+  NULLFUNC, 
+  NULLFUNC, 
+  "Printer Menu",
+  7,
+  {
+    { GetPalladium, NULLMENU, 2, {
+      {"get", "Get Palladium Server/Supervisor Information"},
+      {"name", "Name of Printer: "}
+    } },
+    { AddPalladium, NULLMENU, 2, {
+      {"add", "Add New Palladium Server/Supervisor to Database"},
+      {"name", "Supervisor/server name: "},
+    } },
+    { ChngPalladium, NULLMENU, 2, {
+      {"change", "Update Palladium Server/Supervisor Information"},
+      {"name", "name: "},
+    } },
+    { DeletePalladium, NULLMENU, 2, {
+      {"delete", "Delete Palladium Server/Supervisor Entry"},
+      {"name", "Printer 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: "},
+    } },
+    { DeletePalladiumAlias, NULLMENU, 3, {
+      {"delprinter", "Remove Logical Printer"},
+      {"newname", "Printer name: "},
+      {"server", "Supervisor or Server name: "},
+    } },
+  }
+};
+
+
+
+/*
+ * 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
  */
@@ -554,7 +746,7 @@ Menu misc_menu = {
     4,
     {
        SIMPLEFUNC("statistics", "Show database statistics", TableStats),
-       SIMPLEFUNC("clients", "Show active SMS clients", ShowClients),
+       SIMPLEFUNC("clients", "Show active Moira clients", ShowClients),
        { ShowValue, NULLMENU, 2, {
            {"getval", "Show a database variable value"},
            {"name", "variable name: "},
@@ -571,22 +763,25 @@ Menu misc_menu = {
 /* ------------------------- Root Menu ------------------------- */
 
 /* 
- * Sms top menu
+ * Moira top menu
  */
 
-Menu sms_top_menu = {
+Menu moira_top_menu = {
   NULLFUNC,
   NULLFUNC,
-  "Sms Database Manipulation",
-  9,
+  "Moira Database Manipulation",
+  12,
   {
     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("printer", "Printer Menu", &printer_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.058164 seconds and 4 git commands to generate.