Safe Haskell | None |
---|
The Ganeti WConfd client functions.
The client functions are automatically generated from Ganeti.WConfd.Core
- rmMaintdIncident :: String -> RpcClientMonad Bool
- updateMaintdIncident :: Incident -> RpcClientMonad Bool
- rmMaintdEvacuated :: String -> RpcClientMonad Bool
- addMaintdEvacuated :: [String] -> RpcClientMonad Bool
- setMaintdBalanceThreshold :: Double -> RpcClientMonad Bool
- setMaintdBalance :: Bool -> RpcClientMonad Bool
- appendMaintdJobs :: [JobId] -> RpcClientMonad Bool
- clearMaintdJobs :: RpcClientMonad Bool
- setMaintdRoundDelay :: Int -> RpcClientMonad Bool
- updateNodeGroup :: NodeGroup -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- updateNode :: Node -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- updateNetwork :: Network -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- updateInstance :: Instance -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- updateDisk :: Disk -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- updateCluster :: Cluster -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))
- setInstanceStatus :: InstanceUUID -> MaybeForJSON AdminState -> MaybeForJSON Bool -> MaybeForJSON AdminStateSource -> RpcClientMonad (MaybeForJSON Instance)
- setInstancePrimaryNode :: InstanceUUID -> NodeUUID -> RpcClientMonad Bool
- removeInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad Bool
- removeInstance :: InstanceUUID -> RpcClientMonad Bool
- detachInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad Bool
- attachInstanceDisk :: InstanceUUID -> DiskUUID -> MaybeForJSON Int -> RpcClientMonad Bool
- allocatePort :: RpcClientMonad (MaybeForJSON Int)
- addTcpUdpPort :: Int -> RpcClientMonad Bool
- addInstanceDisk :: InstanceUUID -> Disk -> MaybeForJSON Int -> Bool -> RpcClientMonad Bool
- addInstance :: Instance -> ClientId -> Bool -> RpcClientMonad Bool
- hasPendingRequest :: ClientId -> RpcClientMonad Bool
- guardedOpportunisticLockUnion :: Int -> ClientId -> [(GanetiLocks, OwnerState)] -> RpcClientMonad [GanetiLocks]
- opportunisticLockUnion :: ClientId -> [(GanetiLocks, OwnerState)] -> RpcClientMonad [GanetiLocks]
- intersectLocks :: ClientId -> [GanetiLocks] -> RpcClientMonad ()
- downGradeLocksLevel :: ClientId -> LockLevel -> RpcClientMonad ()
- freeLocksLevel :: ClientId -> LockLevel -> RpcClientMonad ()
- freeLocks :: ClientId -> RpcClientMonad ()
- updateLocksWaiting :: ClientId -> Integer -> GanetiLockRequest -> RpcClientMonad [ClientId]
- tryUpdateLocks :: ClientId -> GanetiLockRequest -> RpcClientMonad [ClientId]
- listLocksWaitingStatus :: RpcClientMonad ([(GanetiLocks, [(ClientId, OwnerState)])], [(Integer, ClientId, [LockRequest GanetiLocks])])
- listAllLocksOwners :: RpcClientMonad [(GanetiLocks, [(ClientId, OwnerState)])]
- listAllLocks :: RpcClientMonad [GanetiLocks]
- listLocks :: ClientId -> RpcClientMonad [(GanetiLocks, OwnerState)]
- listReservedIps :: ClientId -> RpcClientMonad [IPv4Reservation]
- commitReleaseTemporaryIp :: NetworkUUID -> Ip4Address -> RpcClientMonad ()
- commitTemporaryIps :: ClientId -> RpcClientMonad ()
- generateIp :: ClientId -> NetworkUUID -> RpcClientMonad Ip4Address
- releaseIp :: ClientId -> NetworkUUID -> Ip4Address -> RpcClientMonad ()
- reserveIp :: ClientId -> NetworkUUID -> Ip4Address -> Bool -> RpcClientMonad ()
- reserveLV :: ClientId -> LogicalVolume -> RpcClientMonad ()
- generateDRBDSecret :: ClientId -> RpcClientMonad DRBDSecret
- generateMAC :: ClientId -> MaybeForJSON NetworkUUID -> RpcClientMonad MAC
- reserveMAC :: ClientId -> MAC -> RpcClientMonad ()
- releaseDRBDMinors :: DiskUUID -> RpcClientMonad ()
- allocateDRBDMinor :: DiskUUID -> [NodeUUID] -> RpcClientMonad [DRBDMinor]
- computeDRBDMap :: RpcClientMonad DRBDMap
- dropAllReservations :: ClientId -> RpcClientMonad ()
- maintenanceIncidents :: RpcClientMonad [Incident]
- maintenanceEvacuated :: RpcClientMonad [String]
- maintenanceBalancing :: RpcClientMonad (Bool, Double)
- maintenanceJobs :: RpcClientMonad [JobId]
- maintenanceRoundDelay :: RpcClientMonad Int
- flushConfigGroup :: String -> RpcClientMonad ()
- flushConfig :: RpcClientMonad ()
- writeConfigAndUnlock :: ClientId -> ConfigData -> RpcClientMonad Bool
- unlockConfig :: ClientId -> RpcClientMonad ()
- lockConfig :: ClientId -> Bool -> RpcClientMonad (MaybeForJSON ConfigData)
- verifyConfig :: RpcClientMonad ()
- writeConfig :: ClientId -> ConfigData -> RpcClientMonad ()
- readConfig :: RpcClientMonad ConfigData
- prepareClusterDestruction :: ClientId -> RpcClientMonad ()
- cleanupLocks :: RpcClientMonad ()
- echo :: String -> RpcClientMonad String
- wconfdConnectConfig :: ConnectConfig
- getWConfdClient :: FilePath -> IO Client
- runNewWConfdClient :: (MonadBase IO m, MonadBaseControl IO m, MonadError GanetiException m) => RpcClientMonad a -> m a
- waitLockConfig :: ClientId -> Bool -> RpcClientMonad ConfigData
- withLockedConfig :: ClientId -> Bool -> (ConfigData -> RpcClientMonad a) -> RpcClientMonad a
- runModifyRpc :: RpcClientMonad Bool -> IO ()
Generated client functions
rmMaintdIncident :: String -> RpcClientMonad BoolSource
updateMaintdIncident :: Incident -> RpcClientMonad BoolSource
rmMaintdEvacuated :: String -> RpcClientMonad BoolSource
addMaintdEvacuated :: [String] -> RpcClientMonad BoolSource
setMaintdBalanceThreshold :: Double -> RpcClientMonad BoolSource
setMaintdBalance :: Bool -> RpcClientMonad BoolSource
appendMaintdJobs :: [JobId] -> RpcClientMonad BoolSource
clearMaintdJobs :: RpcClientMonad BoolSource
setMaintdRoundDelay :: Int -> RpcClientMonad BoolSource
updateNodeGroup :: NodeGroup -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
updateNode :: Node -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
updateNetwork :: Network -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
updateInstance :: Instance -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
updateDisk :: Disk -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
updateCluster :: Cluster -> RpcClientMonad (MaybeForJSON (Int, TimeAsDoubleJSON))Source
setInstanceStatus :: InstanceUUID -> MaybeForJSON AdminState -> MaybeForJSON Bool -> MaybeForJSON AdminStateSource -> RpcClientMonad (MaybeForJSON Instance)Source
setInstancePrimaryNode :: InstanceUUID -> NodeUUID -> RpcClientMonad BoolSource
removeInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad BoolSource
removeInstance :: InstanceUUID -> RpcClientMonad BoolSource
detachInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad BoolSource
attachInstanceDisk :: InstanceUUID -> DiskUUID -> MaybeForJSON Int -> RpcClientMonad BoolSource
allocatePort :: RpcClientMonad (MaybeForJSON Int)Source
addTcpUdpPort :: Int -> RpcClientMonad BoolSource
addInstanceDisk :: InstanceUUID -> Disk -> MaybeForJSON Int -> Bool -> RpcClientMonad BoolSource
addInstance :: Instance -> ClientId -> Bool -> RpcClientMonad BoolSource
hasPendingRequest :: ClientId -> RpcClientMonad BoolSource
guardedOpportunisticLockUnion :: Int -> ClientId -> [(GanetiLocks, OwnerState)] -> RpcClientMonad [GanetiLocks]Source
opportunisticLockUnion :: ClientId -> [(GanetiLocks, OwnerState)] -> RpcClientMonad [GanetiLocks]Source
intersectLocks :: ClientId -> [GanetiLocks] -> RpcClientMonad ()Source
downGradeLocksLevel :: ClientId -> LockLevel -> RpcClientMonad ()Source
freeLocksLevel :: ClientId -> LockLevel -> RpcClientMonad ()Source
freeLocks :: ClientId -> RpcClientMonad ()Source
updateLocksWaiting :: ClientId -> Integer -> GanetiLockRequest -> RpcClientMonad [ClientId]Source
listLocksWaitingStatus :: RpcClientMonad ([(GanetiLocks, [(ClientId, OwnerState)])], [(Integer, ClientId, [LockRequest GanetiLocks])])Source
listAllLocksOwners :: RpcClientMonad [(GanetiLocks, [(ClientId, OwnerState)])]Source
listLocks :: ClientId -> RpcClientMonad [(GanetiLocks, OwnerState)]Source
releaseIp :: ClientId -> NetworkUUID -> Ip4Address -> RpcClientMonad ()Source
reserveIp :: ClientId -> NetworkUUID -> Ip4Address -> Bool -> RpcClientMonad ()Source
reserveLV :: ClientId -> LogicalVolume -> RpcClientMonad ()Source
reserveMAC :: ClientId -> MAC -> RpcClientMonad ()Source
allocateDRBDMinor :: DiskUUID -> [NodeUUID] -> RpcClientMonad [DRBDMinor]Source
maintenanceEvacuated :: RpcClientMonad [String]Source
maintenanceBalancing :: RpcClientMonad (Bool, Double)Source
flushConfigGroup :: String -> RpcClientMonad ()Source
writeConfigAndUnlock :: ClientId -> ConfigData -> RpcClientMonad BoolSource
unlockConfig :: ClientId -> RpcClientMonad ()Source
lockConfig :: ClientId -> Bool -> RpcClientMonad (MaybeForJSON ConfigData)Source
writeConfig :: ClientId -> ConfigData -> RpcClientMonad ()Source
echo :: String -> RpcClientMonad StringSource
Helper functions for creating the client
wconfdConnectConfig :: ConnectConfigSource
The default WConfd client configuration
getWConfdClient :: FilePath -> IO ClientSource
Given a socket path, creates a WConfd client with the default configuration and timeout.
runNewWConfdClient :: (MonadBase IO m, MonadBaseControl IO m, MonadError GanetiException m) => RpcClientMonad a -> m aSource
Run an Rpc with a fresh client.
Helper functions for getting a remote lock
:: ClientId | |
-> Bool | whether the lock shall be in shared mode |
-> RpcClientMonad ConfigData |
Calls the lockConfig
RPC until the lock is obtained.
:: ClientId | |
-> Bool | whether the lock shall be in shared mode |
-> (ConfigData -> RpcClientMonad a) | action to run |
-> RpcClientMonad a |
Calls the lockConfig
RPC until the lock is obtained,
runs a function on the obtained config, and calls unlockConfig
.
Other functions
runModifyRpc :: RpcClientMonad Bool -> IO ()Source
Try an RPC until no errors occur and the result is true.