Safe Haskell | None |
---|
The Ganeti WConfd client functions.
The client functions are automatically generated from Ganeti.WConfd.Core
Synopsis
- 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 ()
- 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
- waitLockConfig :: ClientId -> Bool -> RpcClientMonad ConfigData
- withLockedConfig :: ClientId -> Bool -> (ConfigData -> RpcClientMonad a) -> RpcClientMonad a
Generated client functions
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 Bool Source #
removeInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad Bool Source #
removeInstance :: InstanceUUID -> RpcClientMonad Bool Source #
detachInstanceDisk :: InstanceUUID -> DiskUUID -> RpcClientMonad Bool Source #
attachInstanceDisk :: InstanceUUID -> DiskUUID -> MaybeForJSON Int -> RpcClientMonad Bool Source #
allocatePort :: RpcClientMonad (MaybeForJSON Int) Source #
addTcpUdpPort :: Int -> RpcClientMonad Bool Source #
addInstanceDisk :: InstanceUUID -> Disk -> MaybeForJSON Int -> Bool -> RpcClientMonad Bool Source #
addInstance :: Instance -> ClientId -> Bool -> RpcClientMonad Bool Source #
hasPendingRequest :: ClientId -> RpcClientMonad Bool Source #
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 #
tryUpdateLocks :: ClientId -> 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 #
commitReleaseTemporaryIp :: NetworkUUID -> Ip4Address -> RpcClientMonad () Source #
commitTemporaryIps :: ClientId -> RpcClientMonad () Source #
generateIp :: ClientId -> NetworkUUID -> RpcClientMonad Ip4Address Source #
releaseIp :: ClientId -> NetworkUUID -> Ip4Address -> RpcClientMonad () Source #
reserveIp :: ClientId -> NetworkUUID -> Ip4Address -> Bool -> RpcClientMonad () Source #
reserveLV :: ClientId -> LogicalVolume -> RpcClientMonad () Source #
reserveMAC :: ClientId -> MAC -> RpcClientMonad () Source #
releaseDRBDMinors :: DiskUUID -> RpcClientMonad () Source #
allocateDRBDMinor :: DiskUUID -> [NodeUUID] -> RpcClientMonad [DRBDMinor] Source #
dropAllReservations :: ClientId -> RpcClientMonad () Source #
flushConfigGroup :: String -> RpcClientMonad () Source #
flushConfig :: RpcClientMonad () Source #
writeConfigAndUnlock :: ClientId -> ConfigData -> RpcClientMonad Bool Source #
unlockConfig :: ClientId -> RpcClientMonad () Source #
lockConfig :: ClientId -> Bool -> RpcClientMonad (MaybeForJSON ConfigData) Source #
verifyConfig :: RpcClientMonad () Source #
writeConfig :: ClientId -> ConfigData -> RpcClientMonad () Source #
cleanupLocks :: RpcClientMonad () Source #
echo :: String -> RpcClientMonad String Source #
Helper functions for creating the client
wconfdConnectConfig :: ConnectConfig Source #
The default WConfd client configuration
getWConfdClient :: FilePath -> IO Client Source #
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
.