Safe Haskell | None |
---|
The Ganeti WConfd client functions.
The client functions are automatically generated from Ganeti.WConfd.Core
- 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 :: InstanceUUID -> RpcClientMonad ()
- allocateDRBDMinor :: InstanceUUID -> [NodeUUID] -> RpcClientMonad [DRBDMinor]
- computeDRBDMap :: RpcClientMonad DRBDMap
- dropAllReservations :: ClientId -> RpcClientMonad ()
- flushConfig :: RpcClientMonad ()
- 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
- waitLockConfig :: ClientId -> Bool -> RpcClientMonad ConfigData
- withLockedConfig :: ClientId -> Bool -> (ConfigData -> RpcClientMonad a) -> RpcClientMonad a
Generated client functions
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 :: InstanceUUID -> [NodeUUID] -> RpcClientMonad [DRBDMinor]Source
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.
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
.