Merge branch 'stable-2.9' into stable-2.10
[ganeti-local] / lib / query.py
index 5cc60ac..58278d5 100644 (file)
@@ -1154,6 +1154,8 @@ _NODE_LIVE_FIELDS = {
              " for detecting reboots by tracking changes"),
   "cnodes": ("CNodes", QFT_NUMBER, "cpu_nodes",
              "Number of NUMA domains on node (if exported by hypervisor)"),
+  "cnos": ("CNOs", QFT_NUMBER, "cpu_dom0",
+            "Number of logical processors used by the node OS (dom0 for Xen)"),
   "csockets": ("CSockets", QFT_NUMBER, "cpu_sockets",
                "Number of physical CPU sockets (if exported by hypervisor)"),
   "ctotal": ("CTotal", QFT_NUMBER, "cpu_total", "Number of logical processors"),
@@ -1943,16 +1945,16 @@ def _GetInstanceDiskFields():
     fields.extend([
         (_MakeField("disk.size/%s" % i, "Disk/%s" % i, QFT_UNIT,
                     "Disk size of %s disk" % numtext),
-        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
+         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSize)),
         (_MakeField("disk.spindles/%s" % i, "DiskSpindles/%s" % i, QFT_NUMBER,
                     "Spindles of %s disk" % numtext),
          IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDiskSpindles)),
         (_MakeField("disk.name/%s" % i, "DiskName/%s" % i, QFT_TEXT,
                     "Name of %s disk" % numtext),
-        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
+         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceName)),
         (_MakeField("disk.uuid/%s" % i, "DiskUUID/%s" % i, QFT_TEXT,
                     "UUID of %s disk" % numtext),
-        IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
+         IQ_CONFIG, 0, _GetInstDisk(i, _GetInstDeviceUUID))])
 
   return fields
 
@@ -2598,6 +2600,8 @@ _CLUSTER_VERSION_FIELDS = {
                      "API version for OS template scripts"),
   "export_version": ("ExportVersion", QFT_NUMBER, constants.EXPORT_VERSION,
                      "Import/export file format version"),
+  "vcs_version": ("VCSVersion", QFT_TEXT, constants.VCS_VERSION,
+                     "VCS version"),
   }
 
 
@@ -2790,9 +2794,12 @@ def _BuildNetworkFields():
   # Add fields for usage statistics
   fields.extend([
     (_MakeField(name, title, kind, doc), NETQ_STATS, 0,
-    compat.partial(_GetNetworkStatsField, name, kind))
+     compat.partial(_GetNetworkStatsField, name, kind))
     for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()])
 
+  # Add timestamps
+  fields.extend(_GetItemTimestampFields(IQ_NETWORKS))
+
   return _PrepareFieldList(fields, [])
 
 #: Fields for cluster information