Revision a52ba89d

b/scripts/gnt-backup
238 238
  cli_option("--no-wait-for-sync", dest="wait_for_sync", default=True,
239 239
             action="store_false", help="Don't wait for sync (DANGEROUS!)"),
240 240
  cli_option("--src-node", dest="src_node", help="Source node",
241
             metavar="<node>"),
241
             metavar="<node>",
242
             completion_suggest=OPT_COMPL_ONE_NODE),
242 243
  cli_option("--src-dir", dest="src_dir", help="Source directory",
243 244
             metavar="<dir>"),
244 245
  cli_option("--no-ip-check", dest="ip_check", default=True,
......
246 247
             " is alive"),
247 248
  cli_option("-I", "--iallocator", metavar="<NAME>",
248 249
             help="Select nodes for the instance automatically using the"
249
             " <NAME> iallocator plugin", default=None, type="string"),
250
             " <NAME> iallocator plugin", default=None, type="string",
251
             completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
250 252
  cli_option("--file-storage-dir", dest="file_storage_dir",
251 253
             help="Relative path under default cluster-wide file storage dir"
252 254
             " to store file-based disks", default=None,
......
265 267
           [DEBUG_OPT,
266 268
            cli_option("--node", dest="nodes", default=[], action="append",
267 269
                       help="List only backups stored on this node"
268
                            " (can be used multiple times)"),
270
                            " (can be used multiple times)",
271
                       completion_suggest=OPT_COMPL_ONE_NODE),
269 272
            ],
270 273
           "", "Lists instance exports available in the ganeti cluster"),
271 274
  'export': (ExportInstance, ARGS_ONE_INSTANCE,
272 275
             [DEBUG_OPT, FORCE_OPT,
273 276
              cli_option("-n", "--node", dest="node", help="Target node",
274
                         metavar="<node>"),
277
                         metavar="<node>",
278
                         completion_suggest=OPT_COMPL_ONE_NODE),
275 279
              cli_option("","--noshutdown", dest="shutdown",
276 280
                         action="store_false", default=True,
277 281
                         help="Don't shutdown the instance (unsafe)"), ],
b/scripts/gnt-debug
150 150
                            " results (out)"),
151 151
                 cli_option("--algorithm", dest="allocator",
152 152
                            default=None,
153
                            help="Allocator algorithm name"),
153
                            help="Allocator algorithm name",
154
                            completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
154 155
                 cli_option("-m", "--mode", default="relocate",
155 156
                            choices=["relocate", "allocate"],
156 157
                            help="Request mode, either allocate or"
......
167 168
                            " definition is of form mac/ip/bridge, if"
168 169
                            " missing values are replace by None"),
169 170
                 cli_option("-o", "--os-type", default=None,
170
                            help="Select os for the instance"),
171
                            help="Select os for the instance",
172
                            completion_suggest=OPT_COMPL_ONE_OS),
171 173
                 cli_option("-p", "--vcpus", default=1, type="int",
172 174
                            help="Select number of VCPUs for the instance"),
173 175
                 cli_option("--tags", default=None,
b/scripts/gnt-instance
1332 1332

  
1333 1333
# options used in more than one cmd
1334 1334
node_opt = cli_option("-n", "--node", dest="node", help="Target node",
1335
                      metavar="<node>")
1335
                      metavar="<node>",
1336
                      completion_suggest=OPT_COMPL_ONE_NODE)
1336 1337

  
1337 1338
os_opt = cli_option("-o", "--os-type", dest="os", help="What OS to run",
1338
                    metavar="<os>")
1339
                    metavar="<os>",
1340
                    completion_suggest=OPT_COMPL_ONE_OS)
1339 1341

  
1340 1342
# multi-instance selection options
1341 1343
m_force_multi = cli_option("--force-multiple", dest="force_multi",
......
1409 1411
             choices=list(constants.FILE_DRIVER)),
1410 1412
  cli_option("-I", "--iallocator", metavar="<NAME>",
1411 1413
             help="Select nodes for the instance automatically using the"
1412
             " <NAME> iallocator plugin", default=None, type="string"),
1414
             " <NAME> iallocator plugin", default=None, type="string",
1415
             completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
1413 1416
  cli_option("-H", "--hypervisor", dest="hypervisor",
1414 1417
             help="Hypervisor and hypervisor options, in the format"
1415 1418
             " hypervisor:option=value,option=value,...", default=None,
......
1467 1470
           [DEBUG_OPT, FORCE_OPT, SUBMIT_OPT,
1468 1471
            cli_option("-n", "--new-node", dest="target_node",
1469 1472
                       help="Destinattion node", metavar="NODE",
1470
                       default=None),
1473
                       default=None,
1474
                       completion_suggest=OPT_COMPL_ONE_NODE),
1471 1475
            ],
1472 1476
           "[-f] <instance>",
1473 1477
           "Move instance to an arbitrary node"
......
1531 1535
                     cli_option("-n", "--new-secondary", dest="new_secondary",
1532 1536
                                help=("New secondary node (for secondary"
1533 1537
                                      " node change)"), metavar="NODE",
1534
                                default=None),
1538
                                default=None,
1539
                                completion_suggest=OPT_COMPL_ONE_NODE),
1535 1540
                     cli_option("-p", "--on-primary", dest="on_primary",
1536 1541
                                default=False, action="store_true",
1537 1542
                                help=("Replace the disk(s) on the primary"
......
1553 1558
                                " automatically using the"
1554 1559
                                " <NAME> iallocator plugin (enables"
1555 1560
                                " secondary node replacement)",
1556
                                default=None, type="string"),
1561
                                default=None, type="string",
1562
                                completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
1557 1563
                     SUBMIT_OPT,
1558 1564
                     ],
1559 1565
                    "[-s|-p|-n NODE|-I NAME] <instance>",
......
1601 1607
               cli_option("-t", "--type", dest="reboot_type",
1602 1608
                          help="Type of reboot: soft/hard/full",
1603 1609
                          default=constants.INSTANCE_REBOOT_HARD,
1604
                          type="string", metavar="<REBOOT>"),
1610
                          metavar="<REBOOT>",
1611
                          choices=list(constants.REBOOT_TYPES)),
1605 1612
               cli_option("--ignore-secondaries", dest="ignore_secondaries",
1606 1613
                          default=False, action="store_true",
1607 1614
                          help="Ignore errors from secondaries"),
b/scripts/gnt-node
640 640
               [DEBUG_OPT, FORCE_OPT,
641 641
                cli_option("-n", "--new-secondary", dest="dst_node",
642 642
                           help="New secondary node", metavar="NODE",
643
                           default=None),
643
                           default=None,
644
                           completion_suggest=OPT_COMPL_ONE_NODE),
644 645
                cli_option("-I", "--iallocator", metavar="<NAME>",
645 646
                           help="Select new secondary for the instance"
646 647
                           " automatically using the"
647 648
                           " <NAME> iallocator plugin",
648
                           default=None, type="string"),
649
                           default=None, type="string",
650
                           completion_suggest=OPT_COMPL_ONE_IALLOCATOR),
649 651
                ],
650 652
               "[-f] {-I <iallocator> | -n <dst>} <node>",
651 653
               "Relocate the secondary instances from a node"
b/tools/burnin
101 101
OPTIONS = [
102 102
  cli.cli_option("-o", "--os", dest="os", default=None,
103 103
                 help="OS to use during burnin",
104
                 metavar="<OS>"),
104
                 metavar="<OS>",
105
                 completion_suggest=cli.OPT_COMPL_ONE_OS),
105 106
  cli.cli_option("--disk-size", dest="disk_size",
106 107
                 help="Disk size (determines disk count)",
107 108
                 default="128m", type="string", metavar="<size,size,...>",
......
165 166
                 help="Disk template (diskless, file, plain or drbd) [drbd]"),
166 167
  cli.cli_option("-n", "--nodes", dest="nodes", default="",
167 168
                 help=("Comma separated list of nodes to perform"
168
                       " the burnin on (defaults to all nodes)")),
169
                       " the burnin on (defaults to all nodes)"),
170
                 completion_suggest=cli.OPT_COMPL_MANY_NODES),
169 171
  cli.cli_option("-I", "--iallocator", dest="iallocator",
170 172
                 default=None, type="string",
171 173
                 help=("Perform the allocation using an iallocator"
172 174
                       " instead of fixed node spread (node restrictions no"
173 175
                       " longer apply, therefore -n/--nodes must not be"
174
                       " used")),
176
                       " used"),
177
                 completion_suggest=cli.OPT_COMPL_ONE_IALLOCATOR),
175 178
  cli.cli_option("-p", "--parallel", default=False, action="store_true",
176 179
                 dest="parallel",
177 180
                 help=("Enable parallelization of some operations in"

Also available in: Unified diff