Commit 64946775 authored by Iustin Pop's avatar Iustin Pop
Browse files

Enable all disk templates in unit-tests

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: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent f9f6480e
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment