From 649467751197bf97927f2a15553fc7ad8aab3101 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Wed, 7 Mar 2012 01:29:49 +0200 Subject: [PATCH] Enable all disk templates in unit-tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the many patches implementing the shared storage functionality in iallocator, balances, etc., and after the patches preparing the unit-tests to do the right thing for shared storage, we can finally flip the bits that make instances have "random" disk templates as opposed to just DRBD. Yes, the unit-tests still pass βΊ We also need to enable all disk templates in the IPolicy (for allocation/relocation). Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- htools/Ganeti/HTools/QC.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htools/Ganeti/HTools/QC.hs b/htools/Ganeti/HTools/QC.hs index c90b63686..a57ed4bd9 100644 --- a/htools/Ganeti/HTools/QC.hs +++ b/htools/Ganeti/HTools/QC.hs @@ -132,7 +132,7 @@ nullIPolicy = Types.IPolicy , Types.iSpecNicCount = 1 , Types.iSpecSpindleUse = 1 } - , Types.iPolicyDiskTemplates = [Types.DTDrbd8, Types.DTPlain] + , Types.iPolicyDiskTemplates = [minBound..maxBound] , Types.iPolicyVcpuRatio = maxVcpuRatio -- somewhat random value, high -- enough to not impact us , Types.iPolicySpindleRatio = maxSpindleRatio @@ -315,8 +315,8 @@ genInstanceSmallerThan lim_mem lim_dsk lim_cpu = do pn <- arbitrary sn <- arbitrary vcpus <- choose (0, lim_cpu) - return $ Instance.create name mem dsk vcpus run_st [] True pn sn - Types.DTDrbd8 1 + dt <- arbitrary + return $ Instance.create name mem dsk vcpus run_st [] True pn sn dt 1 -- | Generates an instance smaller than a node. genInstanceSmallerThanNode :: Node.Node -> Gen Instance.Instance -- GitLab