Add a new opcode for node evacuation
authorIustin Pop <iustin@google.com>
Wed, 17 Feb 2010 09:28:45 +0000 (10:28 +0100)
committerIustin Pop <iustin@google.com>
Mon, 22 Feb 2010 12:50:40 +0000 (13:50 +0100)
We add this as a new opcode since we don't want to alter the behaviour
of current opcodes/lus.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/opcodes.py

index dc5ac6c..66698f5 100644 (file)
@@ -444,6 +444,13 @@ class OpMigrateNode(OpCode):
     ]
 
 
+class OpNodeEvacuationStrategy(OpCode):
+  """Compute the evacuation strategy for a list of nodes."""
+  OP_ID = "OP_NODE_EVAC_STRATEGY"
+  OP_DSC_FIELD = "nodes"
+  __slots__ = ["nodes", "iallocator", "remote_node"]
+
+
 # instance opcodes
 
 class OpCreateInstance(OpCode):