Adding new OpCode for OOB
authorRené Nussbaumer <rn@google.com>
Thu, 2 Dec 2010 13:50:57 +0000 (14:50 +0100)
committerRené Nussbaumer <rn@google.com>
Tue, 7 Dec 2010 14:51:58 +0000 (15:51 +0100)
Register OpCode and Logical Unit in mcpu.py

Signed-off-by: René Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

lib/mcpu.py
lib/opcodes.py

index a724eb9..65e52ee 100644 (file)
@@ -206,6 +206,8 @@ class Processor(object):
     opcodes.OpTestDelay: cmdlib.LUTestDelay,
     opcodes.OpTestAllocator: cmdlib.LUTestAllocator,
     opcodes.OpTestJobqueue: cmdlib.LUTestJobqueue,
+    # OOB lu
+    opcodes.OpOutOfBand: cmdlib.LUOutOfBand,
     }
 
   def __init__(self, context, ec_id):
index d119f45..f061c5a 100644 (file)
@@ -369,6 +369,16 @@ class OpQueryFields(OpCode):
     ]
 
 
+class OpOutOfBand(OpCode):
+  """Interact with OOB."""
+  OP_ID = "OP_OUT_OF_BAND"
+  __slots__ = [
+    "node_name",
+    "command",
+    "timeout",
+    ]
+
+
 # node opcodes
 
 class OpRemoveNode(OpCode):