Revision 38d7239a

b/lib/cmdlib.py
1423 1423
      "name", "pinst_cnt", "sinst_cnt",
1424 1424
      "pinst_list", "sinst_list",
1425 1425
      "pip", "sip", "tags",
1426
      "serial_no",
1426 1427
      ])
1427 1428

  
1428 1429
    _CheckOutputFields(static=self.static_fields,
......
1528 1529
          val = node.secondary_ip
1529 1530
        elif field == "tags":
1530 1531
          val = list(node.GetTags())
1532
        elif field == "serial_no":
1533
          val = node.serial_no
1531 1534
        elif field in self.dynamic_fields:
1532 1535
          val = live_data[node.name].get(field, None)
1533 1536
        else:
......
2576 2579
      "hvm_boot_order", "hvm_acpi", "hvm_pae",
2577 2580
      "hvm_cdrom_image_path", "hvm_nic_type",
2578 2581
      "hvm_disk_type", "vnc_bind_address",
2582
      "serial_no",
2579 2583
      ])
2580 2584
    _CheckOutputFields(static=self.static_fields,
2581 2585
                       dynamic=self.dynamic_fields,
......
2705 2709
          val = instance.vcpus
2706 2710
        elif field == "tags":
2707 2711
          val = list(instance.GetTags())
2712
        elif field == "serial_no":
2713
          val = instance.serial_no
2708 2714
        elif field in ("network_port", "kernel_path", "initrd_path",
2709 2715
                       "hvm_boot_order", "hvm_acpi", "hvm_pae",
2710 2716
                       "hvm_cdrom_image_path", "hvm_nic_type",
b/man/gnt-instance.sgml
612 612
                tags</simpara>
613 613
              </listitem>
614 614
            </varlistentry>
615
            <varlistentry>
616
              <term>serial_no</term>
617
              <listitem>
618
                <simpara>the so called 'serial number' of the
619
                instance; this is a numeric field that is incremented
620
                each time the instance is modified, and it can be used
621
                to detect modifications</simpara>
622
              </listitem>
623
            </varlistentry>
615 624
          </variablelist>
616 625
        </para>
617 626

  
b/man/gnt-node.sgml
333 333
              tags</simpara>
334 334
            </listitem>
335 335
          </varlistentry>
336
          <varlistentry>
337
            <term>serial_no</term>
338
            <listitem>
339
              <simpara>the so called 'serial number' of the instance;
340
              this is a numeric field that is incremented each time
341
              the instance is modified, and it can be used to detect
342
              modifications</simpara>
343
            </listitem>
344
          </varlistentry>
336 345
        </variablelist>
337 346
      </para>
338 347

  
b/scripts/gnt-instance
197 197
      "hvm_nic_type": "HVM_NIC_type",
198 198
      "hvm_disk_type": "HVM_disk_type",
199 199
      "vnc_bind_address": "VNC_bind_address",
200
      "serial_no": "SerialNo",
200 201
      }
201 202
  else:
202 203
    headers = None
......
206 207
  else:
207 208
    unitfields = None
208 209

  
209
  numfields = ["admin_ram", "oper_ram", "sda_size", "sdb_size", "vcpus"]
210
  numfields = ["admin_ram", "oper_ram", "sda_size", "sdb_size", "vcpus",
211
               "serial_no"]
210 212

  
211 213
  list_type_fields = ("tags",)
212 214
  # change raw values to nicer strings
......
972 974
           "Lists the instances and their status. The available fields are"
973 975
           " (see the man page for details): status, oper_state, oper_ram,"
974 976
           " name, os, pnode, snodes, admin_state, admin_ram, disk_template,"
975
           " ip, mac, bridge, sda_size, sdb_size, vcpus. The default field"
977
           " ip, mac, bridge, sda_size, sdb_size, vcpus, serial_no."
978
           " The default field"
976 979
           " list is (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
977 980
           ),
978 981
  'reinstall': (ReinstallInstance, ARGS_ONE,
b/scripts/gnt-node
91 91
      "bootid": "BootID",
92 92
      "ctotal": "CTotal",
93 93
      "tags": "Tags",
94
      "serial_no": "SerialNo",
94 95
      }
95 96
  else:
96 97
    headers = None
......
103 104
  numfields = ["dtotal", "dfree",
104 105
               "mtotal", "mnode", "mfree",
105 106
               "pinst_cnt", "sinst_cnt",
106
               "ctotal"]
107
               "ctotal", "serial_no"]
107 108

  
108 109
  list_type_fields = ("pinst_list", "sinst_list", "tags")
109 110
  # change raw values to nicer strings
......
344 345
           "", "Lists the nodes in the cluster. The available fields"
345 346
           " are (see the man page for details): name, pinst_cnt, pinst_list,"
346 347
           " sinst_cnt, sinst_list, pip, sip, dtotal, dfree, mtotal, mnode,"
347
           " mfree, bootid, cpu_count. The default field list is"
348
           " mfree, bootid, cpu_count, serial_no."
349
           " The default field list is"
348 350
           " (in order): %s." % ", ".join(_LIST_DEF_FIELDS),
349 351
           ),
350 352
  'remove': (RemoveNode, ARGS_ONE, [DEBUG_OPT],

Also available in: Unified diff