Revision e1bf27bb
b/htools/Ganeti/HTools/QC.hs | ||
---|---|---|
188 | 188 |
return (felem ++ "." ++ intercalate "." frest') |
189 | 189 |
|
190 | 190 |
instance Arbitrary Types.InstanceStatus where |
191 |
arbitrary = elements [ Types.AdminDown |
|
192 |
, Types.AdminOffline |
|
193 |
, Types.ErrorDown |
|
194 |
, Types.ErrorUp |
|
195 |
, Types.NodeDown |
|
196 |
, Types.NodeOffline |
|
197 |
, Types.Running |
|
198 |
, Types.WrongNode] |
|
191 |
arbitrary = elements [minBound..maxBound] |
|
199 | 192 |
|
200 | 193 |
-- let's generate a random instance |
201 | 194 |
instance Arbitrary Instance.Instance where |
... | ... | |
246 | 239 |
|
247 | 240 |
-- replace disks |
248 | 241 |
instance Arbitrary OpCodes.ReplaceDisksMode where |
249 |
arbitrary = elements [ OpCodes.ReplaceOnPrimary |
|
250 |
, OpCodes.ReplaceOnSecondary |
|
251 |
, OpCodes.ReplaceNewSecondary |
|
252 |
, OpCodes.ReplaceAuto |
|
253 |
] |
|
242 |
arbitrary = elements [minBound..maxBound] |
|
254 | 243 |
|
255 | 244 |
instance Arbitrary OpCodes.OpCode where |
256 | 245 |
arbitrary = do |
Also available in: Unified diff