Commit 0a4c8808 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Expose listAllLocks on WConfD



Make wconfd provide information about the list of all locks currently
in use.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 447d582c
......@@ -107,6 +107,10 @@ unlockConfig cid = freeLocksLevel cid LevelConfig
listLocks :: ClientId -> WConfdMonad [(GanetiLocks, L.OwnerState)]
listLocks cid = liftM (M.toList . L.listLocks cid) readLockAllocation
-- | List all active locks.
listAllLocks :: WConfdMonad [GanetiLocks]
listAllLocks = liftM L.listAllLocks readLockAllocation
-- | Try to update the locks of a given owner (i.e., a job-id lockfile pair).
-- This function always returns immediately. If the lock update was possible,
-- the empty list is returned; otherwise, the lock status is left completly
......@@ -158,6 +162,7 @@ exportedFunctions = [ 'echo
, 'lockConfig
, 'unlockConfig
, 'listLocks
, 'listAllLocks
, 'tryUpdateLocks
, 'freeLocks
, 'freeLocksLevel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment