Skip to contentSkip to conversation

xl: rename "list-vm" command to "vm-list"

PATCH In review Matt Wilson 2 participants 6 messages Jun 28, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: rename "list-vm" command to "vm-list"

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

tools/libxl/xl.h +1 -1
diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl.h
@@ -54,7 +54,7 @@ int main_destroy(int argc, char **argv);
 int main_shutdown(int argc, char **argv);
 int main_reboot(int argc, char **argv);
 int main_list(int argc, char **argv);
-int main_list_vm(int argc, char **argv);
+int main_vm_list(int argc, char **argv);
 int main_create(int argc, char **argv);
 int main_config_update(int argc, char **argv);
 int main_button_press(int argc, char **argv);
tools/libxl/xl_cmdimpl.c +2 -2
diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl_cmdimpl.c
@@ -3623,11 +3623,11 @@ int main_list(int argc, char **argv)
     return 0;
 }
 
-int main_list_vm(int argc, char **argv)
+int main_vm_list(int argc, char **argv)
 {
     int opt;
 
-    if ((opt = def_getopt(argc, argv, "", "list-vm", 0)) != -1)
+    if ((opt = def_getopt(argc, argv, "", "vm-list", 0)) != -1)
         return opt;
 
     list_vm();
tools/libxl/xl_cmdtable.c +3 -3
diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl_cmdtable.c
@@ -214,9 +214,9 @@ struct cmd_spec cmd_table[] = {
       "Set the number of active VCPUs allowed for the domain",
       "<Domain> <vCPUs>",
     },
-    { "list-vm",
-      &main_list_vm, 0, 0,
-      "List the VMs,without DOM0",
+    { "vm-list",
+      &main_vm_list, 0, 0,
+      "List the VMs, without DOM0",
       "",
     },
     { "info",
#1 lore raw
Quoted 5 lines · Matt Wilson

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

Which did xm have list-vm or vm-list (or neither?)

Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.

Quoted 48 lines

diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl.h

tools/libxl/xl.h +1 -1
@@ -54,7 +54,7 @@ int main_destroy(int argc, char **argv);
 int main_shutdown(int argc, char **argv);
 int main_reboot(int argc, char **argv);
 int main_list(int argc, char **argv);
-int main_list_vm(int argc, char **argv);
+int main_vm_list(int argc, char **argv);
 int main_create(int argc, char **argv);
 int main_config_update(int argc, char **argv);
 int main_button_press(int argc, char **argv);

diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl_cmdimpl.c

tools/libxl/xl_cmdimpl.c +2 -2
@@ -3623,11 +3623,11 @@ int main_list(int argc, char **argv)
     return 0;
 }
 
-int main_list_vm(int argc, char **argv)
+int main_vm_list(int argc, char **argv)
 {
     int opt;
 
-    if ((opt = def_getopt(argc, argv, "", "list-vm", 0)) != -1)
+    if ((opt = def_getopt(argc, argv, "", "vm-list", 0)) != -1)
         return opt;
 
     list_vm();

diff -r 32034d1914a6 -r 34e47ba2612e tools/libxl/xl_cmdtable.c

tools/libxl/xl_cmdtable.c +3 -3
@@ -214,9 +214,9 @@ struct cmd_spec cmd_table[] = {
       "Set the number of active VCPUs allowed for the domain",
       "<Domain> <vCPUs>",
     },
-    { "list-vm",
-      &main_list_vm, 0, 0,
-      "List the VMs,without DOM0",
+    { "vm-list",
+      &main_vm_list, 0, 0,
+      "List the VMs, without DOM0",
       "",
     },
     { "info",
#2 lore raw
Quoted 8 lines · Ian Campbell
Quoted 5 lines · Matt Wilson

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

Which did xm have list-vm or vm-list (or neither?)

Neither.

Quoted 4 lines

Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.

That would definitely be nice to have.

Matt

#3 lore raw
Quoted 11 lines · Matt Wilson
Quoted 8 lines · Ian Campbell
Quoted 5 lines · Matt Wilson

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

Which did xm have list-vm or vm-list (or neither?)

Neither.

In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)

Ian.

Quoted 9 lines
Quoted 5 lines

Aside: I'd love for someone to implement (for 4.3) a better error message than "command not implemented". At the least printing out the list of clashing options, or even git style "Did you mean" when you make a typo.

That would definitely be nice to have.

Matt

#4 lore raw
Quoted 7 lines · Ian Campbell
Quoted 7 lines
Quoted 7 lines · Matt Wilson
Quoted 5 lines

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Which did xm have list-vm or vm-list (or neither?)

Neither.

In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)

I grepped for list-vm in the whole xen source tree, trying to make sure that I updated any corresponding docs. I guess that means I didn't notice it not being documented at all. :-P

v2 in a moment.

Matt

#5 lore raw
Quoted 12 lines · Matt Wilson
Quoted 11 lines · Ian Campbell
Quoted 10 lines
Quoted 8 lines · Matt Wilson
Quoted 5 lines

All of the other "list" verbs are of the form "$noun-list". For
example: "pci-list", "vcpu-list", "network-list", "block-list", etc. Additionally, many people have well trained muscle memory from years of typing "xm li". "xl li" was ambiguous due to "xl list-vm" resulted in "command not implemented".

Which did xm have list-vm or vm-list (or neither?)

Neither.

Quoted 7 lines
Quoted 3 lines

In which case I would ack the patch except you forgot to update docs/man/xl*.pod.? (hrm, somehow list-vm isn't there -- can you add vm-list anyway?)

I grepped for list-vm in the whole xen source tree, trying to make sure that I updated any corresponding docs. I guess that means I didn't notice it not being documented at all. :-P

I only double checked because I'm pretty sure xl.pod.1 was started with a grep over xl_cmdtable.c so I can't see how we missed it...

Quoted 1 line

v2 in a moment.

Thanks!