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
- | 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
- | ChangeJobPriority JobId Int
- | SetDrainFlag Bool
- | SetWatcherPause (Maybe Double)
- data LuxiReq
- = ReqQuery
- | ReqQueryFields
- | ReqQueryNodes
- | ReqQueryGroups
- | ReqQueryNetworks
- | ReqQueryInstances
- | 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
- opToDict :: LuxiOp -> [(String, JSValue)]
- allLuxiCalls :: [String]
- strOfOp :: LuxiOp -> String
- luxiConnectConfig :: ConnectConfig
- getLuxiClient :: String -> IO Client
- getLuxiServer :: Bool -> FilePath -> IO Server
- buildCall :: LuxiOp -> String
- decodeLuxiCall :: JSValue -> JSValue -> Result LuxiOp
- validateResult :: String -> ErrorResult JSValue
- decodeError :: JSValue -> ErrorResult JSValue
- 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 | |
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 | |
ChangeJobPriority JobId Int | |
SetDrainFlag Bool | |
SetWatcherPause (Maybe Double) |
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
validateResult :: String -> ErrorResult JSValueSource
decodeError :: JSValue -> ErrorResult JSValueSource
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.