Don't remove master's hostname from /etc/hosts on cluster destroy.
[ganeti-local] / lib / opcodes.py
index d5b06ad..99f4439 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#
 #
 
 # Copyright (C) 2006, 2007 Google Inc.
@@ -138,7 +138,7 @@ class OpCreateInstance(OpCode):
   __slots__ = ["instance_name", "mem_size", "disk_size", "os_type", "pnode",
                "disk_template", "snode", "swap_size", "mode",
                "vcpus", "ip", "bridge", "src_node", "src_path", "start",
-               "wait_for_sync"]
+               "wait_for_sync", "ip_check"]
 
 
 class OpReinstallInstance(OpCode):
@@ -150,7 +150,7 @@ class OpReinstallInstance(OpCode):
 class OpRemoveInstance(OpCode):
   """Remove an instance."""
   OP_ID = "OP_INSTANCE_REMOVE"
-  __slots__ = ["instance_name"]
+  __slots__ = ["instance_name", "ignore_failures"]
 
 
 class OpRenameInstance(OpCode):
@@ -171,6 +171,13 @@ class OpShutdownInstance(OpCode):
   __slots__ = ["instance_name"]
 
 
+class OpRebootInstance(OpCode):
+  """Reboot an instance."""
+  OP_ID = "OP_INSTANCE_STARTUP"
+  __slots__ = ["instance_name", "reboot_type", "extra_args",
+               "ignore_secondaries" ]
+
+
 class OpAddMDDRBDComponent(OpCode):
   """Add a MD-DRBD component."""
   OP_ID = "OP_INSTANCE_ADD_MDDRBD"
@@ -186,7 +193,7 @@ class OpRemoveMDDRBDComponent(OpCode):
 class OpReplaceDisks(OpCode):
   """Replace the disks of an instance."""
   OP_ID = "OP_INSTANCE_REPLACE_DISKS"
-  __slots__ = ["instance_name", "remote_node"]
+  __slots__ = ["instance_name", "remote_node", "mode", "disks"]
 
 
 class OpFailoverInstance(OpCode):
@@ -256,13 +263,19 @@ class OpGetTags(OpCode):
   __slots__ = ["kind", "name"]
 
 
-class OpSetTag(OpCode):
-  """Sets the value of a tag on a given object."""
+class OpSearchTags(OpCode):
+  """Searches the tags in the cluster for a given pattern."""
+  OP_ID = "OP_TAGS_SEARCH"
+  __slots__ = ["pattern"]
+
+
+class OpAddTags(OpCode):
+  """Add a list of tags on a given object."""
   OP_ID = "OP_TAGS_SET"
-  __slots__ = ["kind", "name", "tag"]
+  __slots__ = ["kind", "name", "tags"]
 
 
-class OpDelTag(OpCode):
-  """Remove a tag from a given object."""
+class OpDelTags(OpCode):
+  """Remove a list of tags from a given object."""
   OP_ID = "OP_TAGS_DEL"
-  __slots__ = ["kind", "name", "tag"]
+  __slots__ = ["kind", "name", "tags"]