Safe Haskell | None |
---|
Implementation of the Ganeti LUXI interface.
Synopsis
- data LuxiOp
- = Query ItemType [String] (Filter FilterField)
- | QueryFields ItemType [String]
- | QueryNodes [String] [String] Bool
- | QueryGroups [String] [String] Bool
- | QueryNetworks [String] [String] Bool
- | QueryInstances [String] [String] Bool
- | QueryFilters [String] [String]
- | ReplaceFilter (Maybe String) (NonNegative Int) [FilterPredicate] FilterAction ReasonTrail
- | DeleteFilter String
- | QueryJobs [JobId] [String]
- | QueryExports [String] Bool
- | QueryConfigValues [String]
- | QueryClusterInfo
- | QueryTags TagKind String
- | SubmitJob [MetaOpCode]
- | SubmitJobToDrainedQueue [MetaOpCode]
- | SubmitManyJobs [[MetaOpCode]]
- | WaitForJobChange JobId [String] JSValue JSValue Int
- | PickupJob JobId
- | ArchiveJob JobId
- | AutoArchiveJobs Int Int
- | CancelJob JobId Bool
- | ChangeJobPriority JobId Int
- | SetDrainFlag Bool
- | SetWatcherPause (Maybe ClockTime)
- data LuxiReq
- = ReqQuery
- | ReqQueryFields
- | ReqQueryNodes
- | ReqQueryGroups
- | ReqQueryNetworks
- | ReqQueryInstances
- | ReqQueryFilters
- | ReqReplaceFilter
- | ReqDeleteFilter
- | ReqQueryJobs
- | ReqQueryExports
- | ReqQueryConfigValues
- | ReqQueryClusterInfo
- | ReqQueryTags
- | ReqSubmitJob
- | ReqSubmitJobToDrainedQueue
- | ReqSubmitManyJobs
- | ReqWaitForJobChange
- | ReqPickupJob
- | ReqArchiveJob
- | ReqAutoArchiveJobs
- | ReqCancelJob
- | ReqChangeJobPriority
- | ReqSetDrainFlag
- | ReqSetWatcherPause
- luxiReqFromRaw :: forall m. (Monad m, MonadFail m) => String -> m LuxiReq
- luxiReqToRaw :: LuxiReq -> String
- opToArgs :: LuxiOp -> JSValue
- allLuxiCalls :: [String]
- strOfOp :: LuxiOp -> String
- luxiConnectConfig :: ServerConfig
- getLuxiClient :: String -> IO Client
- getLuxiServer :: Bool -> FilePath -> IO Server
- decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOp
- callMethod :: LuxiOp -> Client -> IO (ErrorResult JSValue)
- parseSubmitJobResult :: JSValue -> ErrorResult JobId
- submitManyJobs :: Client -> [[MetaOpCode]] -> IO (ErrorResult [JobId])
- queryJobsStatus :: Client -> [JobId] -> IO (ErrorResult [JobStatus])
Documentation
Currently supported Luxi operations and JSON serialization.
Query ItemType [String] (Filter FilterField) | |
QueryFields ItemType [String] | |
QueryNodes [String] [String] Bool | |
QueryGroups [String] [String] Bool | |
QueryNetworks [String] [String] Bool | |
QueryInstances [String] [String] Bool | |
QueryFilters [String] [String] | |
ReplaceFilter (Maybe String) (NonNegative Int) [FilterPredicate] FilterAction ReasonTrail | |
DeleteFilter String | |
QueryJobs [JobId] [String] | |
QueryExports [String] Bool | |
QueryConfigValues [String] | |
QueryClusterInfo | |
QueryTags TagKind String | |
SubmitJob [MetaOpCode] | |
SubmitJobToDrainedQueue [MetaOpCode] | |
SubmitManyJobs [[MetaOpCode]] | |
WaitForJobChange JobId [String] JSValue JSValue Int | |
PickupJob JobId | |
ArchiveJob JobId | |
AutoArchiveJobs Int Int | |
CancelJob JobId Bool | |
ChangeJobPriority JobId Int | |
SetDrainFlag Bool | |
SetWatcherPause (Maybe ClockTime) |
luxiReqFromRaw :: forall m. (Monad m, MonadFail m) => String -> m LuxiReq Source #
luxiReqToRaw :: LuxiReq -> String Source #
allLuxiCalls :: [String] Source #
List of all defined Luxi calls.
getLuxiClient :: String -> IO Client Source #
Connects to the master daemon and returns a luxi Client.
getLuxiServer :: Bool -> FilePath -> IO Server Source #
Creates and returns a server endpoint.
decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOp Source #
callMethod :: LuxiOp -> Client -> IO (ErrorResult JSValue) Source #
Generic luxi method call
parseSubmitJobResult :: JSValue -> ErrorResult JobId Source #
Parse job submission result.
submitManyJobs :: Client -> [[MetaOpCode]] -> IO (ErrorResult [JobId]) Source #
Specialized submitManyJobs call.
queryJobsStatus :: Client -> [JobId] -> IO (ErrorResult [JobStatus]) Source #
Custom queryJobs call.