The gnt-instance commands that have the multi-filter can take also zero
arguments, if the --all flag is passed. But they currently are declared
with min=1, and this is a regression due to the recent bash completion
changes.

There is also the problem that --primary/--secondary expect a node and
not an instance, but currently the completion doesn't support this
distinction, I think.
---
 scripts/gnt-instance |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/gnt-instance b/scripts/gnt-instance
index 3aa2eb9..779b948 100755
--- a/scripts/gnt-instance
+++ b/scripts/gnt-instance
@@ -1421,7 +1421,7 @@ commands = {
     " list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
     ),
   'reinstall': (
-    ReinstallInstance, [ArgInstance(min=1)],
+    ReinstallInstance, [ArgInstance()],
     [FORCE_OPT, OS_OPT, m_force_multi, m_node_opt, m_pri_node_opt,
      m_sec_node_opt, m_clust_opt, m_inst_opt, SELECT_OS_OPT, SUBMIT_OPT],
     "[-f] <instance>", "Reinstall a stopped instance"),
@@ -1445,18 +1445,18 @@ commands = {
     [BACKEND_OPT, DISK_OPT, FORCE_OPT, HVOPTS_OPT, NET_OPT, SUBMIT_OPT],
     "<instance>", "Alters the parameters of an instance"),
   'shutdown': (
-    ShutdownInstance, [ArgInstance(min=1)],
+    ShutdownInstance, [ArgInstance()],
     [m_node_opt, m_pri_node_opt, m_sec_node_opt, m_clust_opt,
      m_inst_opt, m_force_multi, SUBMIT_OPT],
     "<instance>", "Stops an instance"),
   'startup': (
-    StartupInstance, [ArgInstance(min=1)],
+    StartupInstance, [ArgInstance()],
     [FORCE_OPT, m_force_multi, m_node_opt, m_pri_node_opt,
      m_sec_node_opt, m_clust_opt, m_inst_opt, SUBMIT_OPT, HVOPTS_OPT,
      BACKEND_OPT],
     "<instance>", "Starts an instance"),
   'reboot': (
-    RebootInstance, [ArgInstance(min=1)],
+    RebootInstance, [ArgInstance()],
     [m_force_multi, REBOOT_TYPE_OPT, IGNORE_SECONDARIES_OPT, m_node_opt,
      m_pri_node_opt, m_sec_node_opt, m_clust_opt, m_inst_opt, SUBMIT_OPT],
     "<instance>", "Reboots an instance"),
-- 
1.6.3.3

Reply via email to