Revision 220cde0b scripts/gnt-instance

b/scripts/gnt-instance
1084 1084
  @return: the desired exit code
1085 1085

  
1086 1086
  """
1087
  if not args and not opts.show_all:
1088
    ToStderr("No instance selected."
1089
             " Please pass in --all if you want to query all instances.\n"
1090
             "Note that this can take a long time on a big cluster.")
1091
    return 1
1092
  elif args and opts.show_all:
1093
    ToStderr("Cannot use --all if you specify instance names.")
1094
    return 1
1095

  
1087 1096
  retcode = 0
1088 1097
  op = opcodes.OpQueryInstanceData(instances=args, static=opts.static)
1089 1098
  result = SubmitOpCode(op)
......
1360 1369
            make_option("-s", "--static", dest="static",
1361 1370
                        action="store_true", default=False,
1362 1371
                        help="Only show configuration data, not runtime data"),
1363
            ], "[-s] [<instance>...]",
1372
            make_option("--all", dest="show_all",
1373
                        default=False, action="store_true",
1374
                        help="Show info on all instances on the cluster."
1375
                        " This can take a long time to run, use wisely."),
1376
            ], "[-s] {--all | <instance>...}",
1364 1377
           "Show information on the specified instance(s)"),
1365 1378
  'list': (ListInstances, ARGS_ANY,
1366 1379
           [DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT],

Also available in: Unified diff