ironic_inspector.common.locking module

class ironic_inspector.common.locking.BaseLock[source]

Bases: object

abstract acquire(blocking=True)[source]

Acquire lock.

abstract is_locked()[source]

Return lock status

abstract release()[source]

Release lock.

class ironic_inspector.common.locking.InternalLock(uuid)[source]

Bases: BaseLock

Locking mechanism based on threading.Semaphore.

acquire(blocking=True)[source]

Acquire lock.

is_locked()[source]

Return lock status

release()[source]

Release lock.

class ironic_inspector.common.locking.ToozLock(lock)[source]

Bases: BaseLock

Wrapper on tooz locks.

acquire(blocking=True)[source]

Acquire lock.

is_locked()[source]

Return lock status

release()[source]

Release lock.

ironic_inspector.common.locking.get_lock(uuid)[source]