From ce003543deac594fa169983adde3024d50994223 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 21 Dec 2012 19:25:46 +0100
Subject: [PATCH] Fix build breakage after exclusive storage commits
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This fixes:

htest/Test/Ganeti/Rpc.hs:50:14:
    Couldn't match expected type `Rpc.RpcCallNodeInfo'
           against inferred type `Data.Map.Map String Bool
                                  -> Rpc.RpcCallNodeInfo'
    In the first argument of `(<$>)', namely `Rpc.RpcCallNodeInfo'
    In the first argument of `(<*>)', namely
        `Rpc.RpcCallNodeInfo <$> arbitrary'

by adding the new parameter (empty map for now), and also:

ganeti/constants.py:432:5: E123 closing bracket does not match
   indentation of opening bracket's line

By switching to 2-char indentation and (for consistency) also replaces
frozenset(…) with our unique checker (UniqueFrozenset).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>
---
 htest/Test/Ganeti/Rpc.hs |  4 +++-
 lib/constants.py         | 12 ++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/htest/Test/Ganeti/Rpc.hs b/htest/Test/Ganeti/Rpc.hs
index 34e8e6142..6e6d74f50 100644
--- a/htest/Test/Ganeti/Rpc.hs
+++ b/htest/Test/Ganeti/Rpc.hs
@@ -32,6 +32,7 @@ import Test.QuickCheck
 import Test.QuickCheck.Monadic (monadicIO, run, stop)
 
 import Control.Applicative
+import qualified Data.Map as Map
 
 import Test.Ganeti.TestHelper
 import Test.Ganeti.TestCommon
@@ -47,7 +48,8 @@ instance Arbitrary Rpc.RpcCallInstanceList where
   arbitrary = Rpc.RpcCallInstanceList <$> arbitrary
 
 instance Arbitrary Rpc.RpcCallNodeInfo where
-  arbitrary = Rpc.RpcCallNodeInfo <$> arbitrary <*> arbitrary
+  arbitrary = Rpc.RpcCallNodeInfo <$> arbitrary <*> arbitrary <*>
+                pure Map.empty
 
 -- | Monadic check that, for an offline node and a call that does not
 -- offline nodes, we get a OfflineNodeError response.
diff --git a/lib/constants.py b/lib/constants.py
index 5bc6cf36c..49757669d 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -424,12 +424,12 @@ DTS_FILEBASED = compat.UniqueFrozenset([
 DTS_EXCL_STORAGE = frozenset([DT_PLAIN])
 
 # templates for which we don't perform checks on free space
-DTS_NO_FREE_SPACE_CHECK = frozenset([
-    DT_FILE,
-    DT_SHARED_FILE,
-    DT_RBD,
-    DT_EXT,
-    ])
+DTS_NO_FREE_SPACE_CHECK = compat.UniqueFrozenset([
+  DT_FILE,
+  DT_SHARED_FILE,
+  DT_RBD,
+  DT_EXT,
+  ])
 
 # logical disk types
 LD_LV = "lvm"
-- 
GitLab