LUInstanceCreate: Acquire node allocation lock
[ganeti-local] / lib / query.py
index 01a2a75..7efdaa4 100644 (file)
@@ -2481,6 +2481,8 @@ _NETWORK_SIMPLE_FIELDS = {
   "gateway6": ("IPv6Gateway", QFT_OTHER, 0, "The ipv6 gateway"),
   "mac_prefix": ("MacPrefix", QFT_OTHER, 0, "The mac prefix"),
   "network_type": ("NetworkType", QFT_OTHER, 0, "The network type"),
+  "serial_no": ("SerialNo", QFT_NUMBER, 0, _SERIAL_NO_DOC % "Network"),
+  "uuid": ("UUID", QFT_TEXT, 0, "Network UUID"),
   }
 
 
@@ -2494,7 +2496,7 @@ _NETWORK_STATS_FIELDS = {
   }
 
 
-def _GetNetworkStatsField(field, kind, ctx):
+def _GetNetworkStatsField(field, kind, ctx, _):
   """Gets the value of a "stats" field from L{NetworkQueryData}.
 
   @param field: Field name
@@ -2518,7 +2520,7 @@ def _GetNetworkStatsField(field, kind, ctx):
     return int(value)
   except (ValueError, TypeError):
     logging.exception("Failed to convert network field '%s' (value %r) to int",
-                      value, field)
+                      field, value)
     return _FS_UNAVAIL