Add a function for determining if a client holds a lock
Add a function for determining if a client holds a lock

This convenience function examines 'listLocks' for a particular owner
and checks, if it holds a given lock at a given ownership level (or
higher). Therefore checking for a shared locks returns 'True' if the
owner holds a shared or exclusive lock.

Signed-off-by: Petr Pudlak <9d19625f8ee825a2c398462ed335cbcf98f79c32@google.com>
Reviewed-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>

apyrgio/ganeti,andir/ganeti,bitemyapp/ganeti,yiannist/ganeti,mbakke/ganeti,leshchevds/ganeti,leshchevds/ganeti,dimara/ganeti,andir/ganeti,leshchevds/ganeti,dimara/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,mbakke/ganeti,mbakke/ganeti,grnet/snf-ganeti,andir/ganeti,yiannist/ganeti,bitemyapp/ganeti,ganeti/ganeti,onponomarev/ganeti,grnet/snf-ganeti,ganeti/ganeti,yiannist/ganeti,ganeti-github-testing/ganeti-test-1,onponomarev/ganeti,apyrgio/ganeti