From 1dbceab9ee16419e0104219ad14307fdfdf2e5d8 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 3 Dec 2012 13:53:01 +0100
Subject: [PATCH] Fix Haskell OpNetworkAdd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Commit 213076f (β€œFix locking in networks”) changed Python OpNetworkAdd
without corresponding Haskell definition changes.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 htest/Test/Ganeti/OpCodes.hs | 2 +-
 htools/Ganeti/OpCodes.hs     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/htest/Test/Ganeti/OpCodes.hs b/htest/Test/Ganeti/OpCodes.hs
index a0ce5d85c..46f35b1f6 100644
--- a/htest/Test/Ganeti/OpCodes.hs
+++ b/htest/Test/Ganeti/OpCodes.hs
@@ -317,7 +317,7 @@ instance Arbitrary OpCodes.OpCode where
         OpCodes.OpNetworkAdd <$> genNameNE <*> arbitrary <*> genIp4Net <*>
           genMaybe genIp4Addr <*> pure Nothing <*> pure Nothing <*>
           genMaybe genMacPrefix <*> genMaybe (listOf genIp4Addr) <*>
-          (genTags >>= mapM mkNonEmpty)
+          arbitrary <*> (genTags >>= mapM mkNonEmpty)
       "OP_NETWORK_REMOVE" ->
         OpCodes.OpNetworkRemove <$> genNameNE <*> arbitrary
       "OP_NETWORK_SET_PARAMS" ->
diff --git a/htools/Ganeti/OpCodes.hs b/htools/Ganeti/OpCodes.hs
index 51fa1b987..520662c62 100644
--- a/htools/Ganeti/OpCodes.hs
+++ b/htools/Ganeti/OpCodes.hs
@@ -492,6 +492,7 @@ $(genOpCode "OpCode"
      , pNetworkGateway6
      , pNetworkMacPrefix
      , pNetworkAddRsvdIps
+     , pIpConflictsCheck
      , pInstTags
      ])
   , ("OpNetworkRemove",
-- 
GitLab