ganeti

Safe HaskellNone

Ganeti.Luxi

Description

Implementation of the Ganeti LUXI interface.

Synopsis

Documentation

data LuxiOp Source

Currently supported Luxi operations and JSON serialization.

Constructors

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) 

Instances

Eq LuxiOp 
Show LuxiOp 
Arbitrary LuxiOp 
DictObject LuxiOp 

luxiReqFromRaw :: forall m. Monad m => String -> m LuxiReqSource

opToArgs :: LuxiOp -> JSValueSource

allLuxiCalls :: [String]Source

List of all defined Luxi calls.

strOfOp :: LuxiOp -> StringSource

The serialisation of LuxiOps into strings in messages.

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

Converts Luxi call arguments into a LuxiOp data structure. This is used for building a Luxi Handler.

This is currently hand-coded until we make it more uniform so that it can be generated using TH.

callMethod :: LuxiOp -> Client -> IO (ErrorResult JSValue)Source

Generic luxi method call

submitManyJobs :: Client -> [[MetaOpCode]] -> IO (ErrorResult [JobId])Source

Specialized submitManyJobs call.

queryJobsStatus :: Client -> [JobId] -> IO (ErrorResult [JobStatus])Source

Custom queryJobs call.