From d6aaa5987142fb5e9685c350d7ce8fb8c58530a6 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 17 Feb 2010 10:28:45 +0100
Subject: [PATCH] Add a new opcode for node evacuation

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 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/opcodes.py b/lib/opcodes.py
index dc5ac6c27..66698f5fc 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -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):
-- 
GitLab