Add "get_workers" method to "QuotaDriverAPI" class
This method returns the quota driver workers that needs to be spawned during the plugin initialization. Change-Id: Id9840912b9d0018d008b6961d24dadbfaafc9f8e Related-Bug: #1954662
This commit is contained in:
parent
76b9a09591
commit
04a87664c2
@ -167,3 +167,16 @@ class QuotaDriverAPI(object, metaclass=abc.ABCMeta):
|
||||
:return: None if passed; ``OverQuota`` if quota limits are exceeded,
|
||||
``InvalidQuotaValue`` if delta values are invalid.
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
@abc.abstractmethod
|
||||
def get_workers():
|
||||
"""Return the quota driver workers to be spawned during initialization
|
||||
|
||||
This method returns the quota driver workers that needs to be spawned
|
||||
during the plugin initialization. For example, ``DbQuotaNoLockDriver``
|
||||
requires a ``PeriodicWorker`` to clean up the expired reservations left
|
||||
in the database.
|
||||
|
||||
:return: list of ``worker.BaseWorker`` or derived instances.
|
||||
"""
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
other:
|
||||
- |
|
||||
Added abstract method ``get_workers`` to ``QuotaDriverAPI`` metaclass. This
|
||||
method returns the quota driver workers that needs to be spawned during the
|
||||
plugin initialization.
|
Loading…
x
Reference in New Issue
Block a user