Revision b46ba79c htools/Ganeti/OpParams.hs

b/htools/Ganeti/OpParams.hs
229 229
  , pNetworkRemoveRsvdIps
230 230
  , pNetworkMode
231 231
  , pNetworkLink
232
  , pDryRun
233
  , pDebugLevel
234
  , pOpPriority
235
  , pDependencies
236
  , pComment
232 237
  , dOldQuery
233 238
  , dOldQueryNoLocking
234 239
  ) where
......
1393 1398
pNetworkLink :: Field
1394 1399
pNetworkLink = simpleField "network_link" [t| NonEmptyString |]
1395 1400

  
1401
-- * Common opcode parameters
1402

  
1403
-- | Run checks only, don't execute.
1404
pDryRun :: Field
1405
pDryRun = optionalField $ booleanField "dry_run"
1406

  
1407
-- | Debug level.
1408
pDebugLevel :: Field
1409
pDebugLevel = optionalField $ simpleField "debug_level" [t| NonNegative Int |]
1410

  
1411
-- | Opcode priority. Note: python uses a separate constant, we're
1412
-- using the actual value we know it's the default.
1413
pOpPriority :: Field
1414
pOpPriority =
1415
  defaultField [| OpPrioNormal |] $
1416
  simpleField "priority" [t| OpSubmitPriority |]
1417

  
1418
-- | Job dependencies.
1419
pDependencies :: Field
1420
pDependencies = optionalField $ simpleField "depends" [t| [JobDependency] |]
1421

  
1422
-- | Comment field.
1423
pComment :: Field
1424
pComment = optionalField $ stringField "comment"
1425

  
1396 1426
-- * Entire opcode parameter list
1397 1427

  
1398 1428
-- | Old-style query opcode, with locking.

Also available in: Unified diff