]> andersk Git - moira.git/blobdiff - clients/moira/menus.c
Enlarge magic constant. Fix this a better way at some point.
[moira.git] / clients / moira / menus.c
index 0733dc0730bbf3e0c4c2866464a775a8c1ee21e0..22fc7e074ebcfe12cee869894b130db15818c31f 100644 (file)
@@ -143,6 +143,38 @@ Menu mappings_menu = {
   }
 };
 
+/*
+ * Machine to Container Mappings Menu
+ */
+
+Menu cmappings_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Machine to Container Mappings Menu",
+  5,
+  {
+    { MachineToContainerMap, NULLMENU, 2, {
+      {"map", "Show Machine to container mapping"},
+      {"name", "Machine's Name: "}
+    } },
+    { AddMachineToContainer, NULLMENU, 3, {
+      {"addcontainer", "Add machine to a container"},
+      {"name", "Machine's Name: "},
+      {"container", "Container's Name: "},
+    } },
+    { RemoveMachineFromContainer, NULLMENU, 3, {
+      {"remcontainer", "Remove machine from a container"},
+      {"name", "Machine's Name: "},
+      {"container", "Container's Name: "},
+    } },
+    { GetMachinesOfContainer, NULLMENU, 2, {
+      {"machofcont", "Show all machines in a container"},
+      {"name", "Container's Name: "},
+    } },
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode),
+  }
+};
+
 /*
  * Post Office Box Menu
  */
@@ -478,7 +510,7 @@ Menu machine_menu = {
   NULLFUNC,
   NULLFUNC,
   "Machine Menu",
-  8,
+  9,
   {
     { ShowMachineInfo, NULLMENU, 2, {
       {"show", "Get machine information"},
@@ -492,6 +524,8 @@ Menu machine_menu = {
       {"network", "Network (or leave empty to match any): "}
     } },
     SIMPLEFUNC("owner", "Lookup machines by owner", MachineByOwner),
+    SIMPLEFUNC("acctnumber", "Lookup machines by account number",
+              MachineByAcctNumber),
     { AddMachine, NULLMENU, 2, {
       {"add", "Add a new machine"},
       {"network", "Network assignment: "},
@@ -633,6 +667,7 @@ Menu user_menu = {
       {"id", "Show user information by ID number"},
       {"ID number", "ID number: "}
     } },
+    SIMPLEFUNC("sponsor", "Lookup users by sponsor", UserBySponsor),
     {UpdateUser, NULLMENU, 2, {
       {"modify", "Change all user fields"},
       {"login", "Login name: "}
@@ -810,6 +845,42 @@ Menu acl_menu = {
   }
 };
 
+/*
+ * Container Menu
+ */
+
+Menu container_menu = {
+  NULLFUNC,
+  NULLFUNC,
+  "Container Menu",
+  8,
+  {
+    { ShowContainerInfo, NULLMENU, 2, {
+      {"show", "Get container information"},
+      {"name", "Container's Name: "}
+    } },
+    { AddContainer, NULLMENU, 2, {
+      {"add", "Add a new container"},
+      {"name", "Container's Name: "}
+    } },
+    { UpdateContainer, NULLMENU, 2, {
+      {"update", "Update container information"},
+      {"name", "Container's Name: "}
+    } },
+    { DeleteContainer, NULLMENU, 2, {
+      {"delete", "Delete this container"},
+      {"name", "Container's Name: "}
+    } },
+    { GetSubContainers, NULLMENU, 2, {
+      {"subcont", "Get subcontainers of container"},
+      {"name", "Container's Name: "}
+    } },
+    SIMPLEFUNC("toplevel", "Get all top level containers", GetTopLevelCont),
+    SUBMENU("mappings", "Machine to Container Mappings Menu", &cmappings_menu),
+    SIMPLEFUNC("verbose", "Toggle Verbosity of Delete", ToggleVerboseMode)
+  }
+};
+
 /*
  * Miscellaneous Menu
  */
@@ -845,7 +916,7 @@ Menu moira_top_menu = {
   NULLFUNC,
   NULLFUNC,
   "Moira Database Manipulation",
-  11,
+  13,
   {
     SUBMENU("cluster", "Cluster Menu", &cluster_menu),
     SUBMENU("filesys", "Filesystem Menu", &filesys_menu),
@@ -858,6 +929,7 @@ Menu moira_top_menu = {
     SUBMENU("zephyr", "Zephyr ACLS Menu", &zephyr_menu),
     SUBMENU("dcm", "DCM Menu", &dcm_menu),
     SUBMENU("acl", "Generic ACL Menu", &acl_menu),
+    SUBMENU("container", "Container Menu", &container_menu),
     SUBMENU("misc", "Miscellaneous Menu", &misc_menu)
   }
 };
This page took 0.038284 seconds and 4 git commands to generate.