Revision 5b11f8db htools/Ganeti/Objects.hs

b/htools/Ganeti/Objects.hs
276 276
          mB' <- readJSON mB
277 277
          k'  <- readJSON k
278 278
          return $ LIDDrbd8 nA' nB' p' mA' mB' k'
279
        _ -> fail $ "Can't read logical_id for DRBD8 type"
279
        _ -> fail "Can't read logical_id for DRBD8 type"
280 280
    LD_LV ->
281 281
      case lid of
282 282
        JSArray [vg, lv] -> do
283 283
          vg' <- readJSON vg
284 284
          lv' <- readJSON lv
285 285
          return $ LIDPlain vg' lv'
286
        _ -> fail $ "Can't read logical_id for plain type"
286
        _ -> fail "Can't read logical_id for plain type"
287 287
    LD_FILE ->
288 288
      case lid of
289 289
        JSArray [driver, path] -> do
290 290
          driver' <- readJSON driver
291 291
          path'   <- readJSON path
292 292
          return $ LIDFile driver' path'
293
        _ -> fail $ "Can't read logical_id for file type"
293
        _ -> fail "Can't read logical_id for file type"
294 294
    LD_BLOCKDEV ->
295 295
      case lid of
296 296
        JSArray [driver, path] -> do
297 297
          driver' <- readJSON driver
298 298
          path'   <- readJSON path
299 299
          return $ LIDBlockDev driver' path'
300
        _ -> fail $ "Can't read logical_id for blockdev type"
300
        _ -> fail "Can't read logical_id for blockdev type"
301 301
    LD_RADOS ->
302 302
      case lid of
303 303
        JSArray [driver, path] -> do
304 304
          driver' <- readJSON driver
305 305
          path'   <- readJSON path
306 306
          return $ LIDRados driver' path'
307
        _ -> fail $ "Can't read logical_id for rdb type"
307
        _ -> fail "Can't read logical_id for rdb type"
308 308

  
309 309
-- | Disk data structure.
310 310
--
......
363 363
  ])
364 364
$(makeJSONInstance ''AdminState)
365 365

  
366
$(buildParam "Be" "bep" $
366
$(buildParam "Be" "bep"
367 367
  [ simpleField "minmem"       [t| Int  |]
368 368
  , simpleField "maxmem"       [t| Int  |]
369 369
  , simpleField "vcpus"        [t| Int  |]
......
404 404

  
405 405
-- * IPolicy definitions
406 406

  
407
$(buildParam "ISpec" "ispec" $
407
$(buildParam "ISpec" "ispec"
408 408
  [ simpleField C.ispecMemSize     [t| Int |]
409 409
  , simpleField C.ispecDiskSize    [t| Int |]
410 410
  , simpleField C.ispecDiskCount   [t| Int |]
......
414 414

  
415 415
-- | Custom partial ipolicy. This is not built via buildParam since it
416 416
-- has a special 2-level inheritance mode.
417
$(buildObject "PartialIPolicy" "ipolicy" $
417
$(buildObject "PartialIPolicy" "ipolicy"
418 418
  [ renameField "MinSpecP" $ simpleField "min" [t| PartialISpecParams |]
419 419
  , renameField "MaxSpecP" $ simpleField "max" [t| PartialISpecParams |]
420 420
  , renameField "StdSpecP" $ simpleField "std" [t| PartialISpecParams |]
......
428 428

  
429 429
-- | Custom filled ipolicy. This is not built via buildParam since it
430 430
-- has a special 2-level inheritance mode.
431
$(buildObject "FilledIPolicy" "ipolicy" $
431
$(buildObject "FilledIPolicy" "ipolicy"
432 432
  [ renameField "MinSpec" $ simpleField "min" [t| FilledISpecParams |]
433 433
  , renameField "MaxSpec" $ simpleField "max" [t| FilledISpecParams |]
434 434
  , renameField "StdSpec" $ simpleField "std" [t| FilledISpecParams |]
......
461 461
                }
462 462
-- * Node definitions
463 463

  
464
$(buildParam "ND" "ndp" $
464
$(buildParam "ND" "ndp"
465 465
  [ simpleField "oob_program"   [t| String |]
466 466
  , simpleField "spindle_count" [t| Int    |]
467 467
  ])

Also available in: Unified diff