RAPI: fix evacuate node resource
[ganeti-local] / lib / objects.py
index bf1b6bd..5d1b78f 100644 (file)
@@ -939,9 +939,23 @@ class Node(TaggableObject):
     "master_candidate",
     "offline",
     "drained",
-    "nodegroup",
+    "group",
+    "master_capable",
+    "vm_capable",
     ] + _TIMESTAMPS + _UUID
 
+  def UpgradeConfig(self):
+    """Fill defaults for missing configuration values.
+
+    """
+    # pylint: disable-msg=E0203
+    # because these are "defined" via slots, not manually
+    if self.master_capable is None:
+      self.master_capable = True
+
+    if self.vm_capable is None:
+      self.vm_capable = True
+
 
 class NodeGroup(ConfigObject):
   """Config object representing a node group."""
@@ -1258,6 +1272,7 @@ class ImportExportOptions(ConfigObject):
   @ivar ca_pem: Remote peer CA in PEM format (None for cluster certificate)
   @ivar compress: Compression method (one of L{constants.IEC_ALL})
   @ivar magic: Used to ensure the connection goes to the right disk
+  @ivar connect_timeout: Number of seconds for establishing connection
 
   """
   __slots__ = [
@@ -1265,6 +1280,7 @@ class ImportExportOptions(ConfigObject):
     "ca_pem",
     "compress",
     "magic",
+    "connect_timeout",
     ]