The 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: ironic_inspector.common.locking.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: ironic_inspector.common.locking.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]