Safe Haskell | None |
---|
Implementation of the Ganeti LUXI interface.
- 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 => 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) |
Eq LuxiOp | |
Show LuxiOp | |
Arbitrary LuxiOp | |
DictObject LuxiOp |
luxiReqFromRaw :: forall m. Monad m => String -> m LuxiReqSource
luxiReqToRaw :: LuxiReq -> StringSource
allLuxiCalls :: [String]Source
List of all defined Luxi calls.
getLuxiClient :: String -> IO ClientSource
Connects to the master daemon and returns a luxi Client.
getLuxiServer :: Bool -> FilePath -> IO ServerSource
Creates and returns a server endpoint.
decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOpSource
callMethod :: LuxiOp -> Client -> IO (ErrorResult JSValue)Source
Generic luxi method call
parseSubmitJobResult :: JSValue -> ErrorResult JobIdSource
submitManyJobs :: Client -> [[MetaOpCode]] -> IO (ErrorResult [JobId])Source
Specialized submitManyJobs call.
queryJobsStatus :: Client -> [JobId] -> IO (ErrorResult [JobStatus])Source
Custom queryJobs call.