From aa12a89122f27e2da193d5dc2e6164ab90d20e5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Nussbaumer?= <rn@google.com>
Date: Mon, 20 Feb 2012 11:35:11 +0100
Subject: [PATCH] opcodes: Fix OP_RESULT for OobCommand
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The result is a list of a list with elements with size of 2.

Signed-off-by: RenΓ© Nussbaumer <rn@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/opcodes.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/opcodes.py b/lib/opcodes.py
index 30f0c1653..bdcddc50e 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -193,6 +193,11 @@ _TDiskParams = \
   ht.Comment("Disk parameters")(ht.TDictOf(ht.TElemOf(constants.IDISK_PARAMS),
                                            ht.TOr(ht.TNonEmptyString, ht.TInt)))
 
+_TQueryRow = \
+  ht.TListOf(ht.TAnd(ht.TIsLength(2),
+                     ht.TItems([ht.TElemOf(constants.RS_ALL),
+                                ht.TAny])))
+
 _SUMMARY_PREFIX = {
   "CLUSTER_": "C_",
   "GROUP_": "G_",
@@ -914,9 +919,7 @@ class OpOobCommand(OpCode):
      "Time in seconds to wait between powering on nodes"),
     ]
   # Fixme: Make it more specific with all the special cases in LUOobCommand
-  OP_RESULT = ht.TListOf(ht.TAnd(ht.TIsLength(2),
-                                 ht.TItems([ht.TElemOf(constants.RS_ALL),
-                                            ht.TAny])))
+  OP_RESULT = ht.TListOf(_TQueryRow)
 
 
 # node opcodes
-- 
GitLab