Merge branch 'devel-2.1'
[ganeti-local] / lib / objects.py
index 4e6874b..d4c3fd3 100644 (file)
@@ -48,6 +48,7 @@ __all__ = ["ConfigObject", "ConfigData", "NIC", "Disk", "Instance",
 _TIMESTAMPS = ["ctime", "mtime"]
 _UUID = ["uuid"]
 
+
 def FillDict(defaults_dict, custom_dict, skip_keys=None):
   """Basic function to apply settings on top a default dict.
 
@@ -865,6 +866,7 @@ class Cluster(TaggableObject):
     "modify_etc_hosts",
     "modify_ssh_setup",
     "maintain_node_health",
+    "uid_pool",
     ] + _TIMESTAMPS + _UUID
 
   def UpgradeConfig(self):
@@ -915,6 +917,9 @@ class Cluster(TaggableObject):
     if self.maintain_node_health is None:
       self.maintain_node_health = False
 
+    if self.uid_pool is None:
+      self.uid_pool = []
+
   def ToDict(self):
     """Custom function for cluster.
 
@@ -1006,6 +1011,17 @@ class BlockDevStatus(ConfigObject):
     ]
 
 
+class ImportExportStatus(ConfigObject):
+  """Config object representing the status of an import or export."""
+  __slots__ = [
+    "recent_output",
+    "listen_port",
+    "connected",
+    "exit_status",
+    "error_message",
+    ] + _TIMESTAMPS
+
+
 class ConfdRequest(ConfigObject):
   """Object holding a confd request.