Export new lock_status field to gnt-job
[ganeti-local] / scripts / gnt-backup
index 4bd6bc1..12a667d 100755 (executable)
@@ -213,7 +213,8 @@ import_opts = [
   DEBUG_OPT,
   cli_option("-n", "--node", dest="node",
              help="Target node and optional secondary node",
-             metavar="<pnode>[:<snode>]"),
+             metavar="<pnode>[:<snode>]",
+             completion_suggest=OPT_COMPL_INST_ADD_NODES),
   cli_option("-B", "--backend", dest="beparams",
              type="keyval", default={},
              help="Backend parameters"),
@@ -238,7 +239,8 @@ import_opts = [
   cli_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
              action="store_false", help="Don't wait for sync (DANGEROUS!)"),
   cli_option("--src-node", dest="src_node", help="Source node",
-             metavar="<node>"),
+             metavar="<node>",
+             completion_suggest=OPT_COMPL_ONE_NODE),
   cli_option("--src-dir", dest="src_dir", help="Source directory",
              metavar="<dir>"),
   cli_option("--no-ip-check", dest="ip_check", default=True,
@@ -246,7 +248,8 @@ import_opts = [
              " is alive"),
   cli_option("-I", "--iallocator", metavar="<NAME>",
              help="Select nodes for the instance automatically using the"
-             " <NAME> iallocator plugin", default=None, type="string"),
+             " <NAME> iallocator plugin", default=None, type="string",
+             completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
   cli_option("--file-storage-dir", dest="file_storage_dir",
              help="Relative path under default cluster-wide file storage dir"
              " to store file-based disks", default=None,
@@ -265,13 +268,15 @@ commands = {
            [DEBUG_OPT,
             cli_option("--node", dest="nodes", default=[], action="append",
                        help="List only backups stored on this node"
-                            " (can be used multiple times)"),
+                            " (can be used multiple times)",
+                       completion_suggest=OPT_COMPL_ONE_NODE),
             ],
            "", "Lists instance exports available in the ganeti cluster"),
   'export': (ExportInstance, ARGS_ONE_INSTANCE,
              [DEBUG_OPT, FORCE_OPT,
               cli_option("-n", "--node", dest="node", help="Target node",
-                         metavar="<node>"),
+                         metavar="<node>",
+                         completion_suggest=OPT_COMPL_ONE_NODE),
               cli_option("","--noshutdown", dest="shutdown",
                          action="store_false", default=True,
                          help="Don't shutdown the instance (unsafe)"), ],