Revision 4651c69f src/Ganeti/OpParams.hs
b/src/Ganeti/OpParams.hs | ||
---|---|---|
252 | 252 |
) where |
253 | 253 |
|
254 | 254 |
import Control.Monad (liftM) |
255 |
import Data.Set (Set) |
|
256 |
import qualified Data.Set as Set |
|
257 | 255 |
import Text.JSON (JSON, JSValue(..), JSObject (..), readJSON, showJSON, |
258 | 256 |
fromJSString, toJSObject) |
259 | 257 |
import qualified Text.JSON |
... | ... | |
266 | 264 |
import Ganeti.Types |
267 | 265 |
import qualified Ganeti.Query.Language as Qlang |
268 | 266 |
|
269 |
|
|
270 | 267 |
-- * Helper functions and types |
271 | 268 |
|
272 | 269 |
-- | Build a boolean field. |
... | ... | |
448 | 445 |
showJSON (ExportTargetRemote l) = showJSON l |
449 | 446 |
readJSON = readExportTarget |
450 | 447 |
|
451 |
|
|
452 | 448 |
-- * Common opcode parameters |
453 | 449 |
|
454 | 450 |
pDryRun :: Field |
... | ... | |
483 | 479 |
withDoc "Reason trail field" $ |
484 | 480 |
simpleField C.opcodeReason [t| ReasonTrail |] |
485 | 481 |
|
486 |
|
|
487 | 482 |
-- * Parameters |
488 | 483 |
|
489 | 484 |
pDebugSimulateErrors :: Field |
... | ... | |
499 | 494 |
pSkipChecks :: Field |
500 | 495 |
pSkipChecks = |
501 | 496 |
withDoc "Which checks to skip" . |
502 |
defaultField [| Set.empty |] $
|
|
503 |
simpleField "skip_checks" [t| Set VerifyOptionalChecks |] |
|
497 |
defaultField [| emptyListSet |] $
|
|
498 |
simpleField "skip_checks" [t| ListSet VerifyOptionalChecks |]
|
|
504 | 499 |
|
505 | 500 |
pIgnoreErrors :: Field |
506 | 501 |
pIgnoreErrors = |
507 | 502 |
withDoc "List of error codes that should be treated as warnings" . |
508 |
defaultField [| Set.empty |] $
|
|
509 |
simpleField "ignore_errors" [t| Set CVErrorCode |] |
|
503 |
defaultField [| emptyListSet |] $
|
|
504 |
simpleField "ignore_errors" [t| ListSet CVErrorCode |]
|
|
510 | 505 |
|
511 | 506 |
pVerbose :: Field |
512 | 507 |
pVerbose = |
Also available in: Unified diff