Revision 48c4dfa8 scripts/gnt-instance

b/scripts/gnt-instance
40 40
_SHUTDOWN_INSTANCES = "instances"
41 41

  
42 42

  
43
_LIST_DEF_FIELDS = [
44
  "name", "os", "pnode", "status", "oper_ram",
45
  ]
46

  
43 47
def _ExpandMultiNames(mode, names):
44 48
  """Expand the given names using the passed mode.
45 49

  
......
163 167

  
164 168
  """
165 169
  if opts.output is None:
166
    selected_fields = ["name", "os", "pnode", "status", "oper_ram"]
170
    selected_fields = _LIST_DEF_FIELDS
171
  elif opts.output.startswith("+"):
172
    selected_fields = _LIST_DEF_FIELDS + opts.output[1:].split(",")
167 173
  else:
168 174
    selected_fields = opts.output.split(",")
169 175

  
......
816 822
           " (see the man page for details): status, oper_state, oper_ram,"
817 823
           " name, os, pnode, snodes, admin_state, admin_ram, disk_template,"
818 824
           " ip, mac, bridge, sda_size, sdb_size, vcpus. The default field"
819
           " list is (in order): name, os, pnode, status,"
820
           " oper_ram."),
825
           " list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
826
           ),
821 827
  'reinstall': (ReinstallInstance, ARGS_ONE, [DEBUG_OPT, FORCE_OPT, os_opt],
822 828
                "[-f] <instance>", "Reinstall a stopped instance"),
823 829
  'remove': (RemoveInstance, ARGS_ONE,

Also available in: Unified diff