Implements the DriverBase abstract class for Zaqar storage drivers.
Bases: enum.IntEnum
Enum of storage capabilities.
Bases: zaqar.storage.base.ControllerBase
A controller for managing the catalogue.
The catalogue is responsible for maintaining a mapping between project.queue entries to their pool.
Removes this entry from the catalogue.
Parameters: |
|
---|
Drops all catalogue entries from storage.
Determines whether the given queue exists under project.
Parameters: |
|
---|---|
Returns: | True if the queue exists under this project |
Return type: | bool |
Returns the pool identifier for the given queue.
Parameters: |
|
---|---|
Returns: | {‘pool’: ...} |
Return type: | dict |
Raises: | QueueNotMapped |
Creates a new catalogue entry, or updates it if it already exists.
Parameters: |
|
---|
Get a list of queues from the catalogue.
Parameters: | project (six.text_type) – The project to use when filtering through queue entries. |
---|---|
Returns: | [{‘project’: ..., ‘queue’: ..., ‘pool’: ...},] |
Return type: | [dict] |
Updates the pool identifier for this queue.
Parameters: |
|
---|---|
Raises: | QueueNotMapped |
Bases: zaqar.storage.base.ControllerBase
Base method for creating a claim.
Parameters: |
|
---|---|
Returns: | (Claim ID, claimed messages) |
Base method for deleting a claim.
Parameters: |
|
---|
Base method for getting a claim.
Parameters: |
|
---|---|
Returns: | (Claim’s metadata, claimed messages) |
Raises: | DoesNotExist |
Base method for updating a claim.
Parameters: |
|
---|
Bases: zaqar.storage.base.DriverBase
Interface definition for control plane storage drivers.
Storage drivers that work at the control plane layer allow one to modify aspects of the functionality of the system. This is ideal for administrative purposes.
Allows access to the pool registry through a catalogue and a pool controller.
Parameters: |
|
---|
Returns the driver’s catalogue controller.
Close connections to the backend.
Returns storage’s flavor management controller.
Returns storage’s pool management controller.
Returns the driver’s queue controller.
Bases: object
Top-level class for controllers.
Parameters: | driver – Instance of the driver instantiating this controller. |
---|
Bases: zaqar.storage.base.DriverBase
Interface definition for storage drivers.
Data plane storage drivers are responsible for implementing the core functionality of the system.
Connection information and driver-specific options are loaded from the config file or the pool catalog.
Parameters: |
|
---|
Returns storage’s capabilities.
Returns the driver’s claim controller.
Close connections to the backend.
Perform manual garbage collection of claims and messages.
This method can be overridden in order to provide a trigger that can be called by so-called “garbage collection” scripts that are required by some drivers.
By default, this method does nothing.
Return the health status of service.
Check whether the storage is ready.
Returns the driver’s message controller.
Returns the driver’s subscription controller.
Bases: object
Base class for both data and control plane drivers
Parameters: |
|
---|
Bases: zaqar.storage.base.ControllerBase
A controller for managing flavors.
Registers a flavor entry.
Parameters: |
|
---|
Removes a flavor entry.
Parameters: |
|
---|---|
Return type: | None |
Deletes all flavors from storage.
Verifies whether the flavor exists.
Parameters: |
|
---|---|
Returns: | True if the flavor exists |
Return type: | bool |
Returns a single flavor entry.
Parameters: |
|
---|---|
Return type: | {} |
Raises: | FlavorDoesNotExist if not found |
Lists all registered flavors.
Parameters: |
|
---|---|
Returns: | A list of flavors - name, project, flavor |
Return type: | [{}] |
Updates the flavor and/or capabilities of this flavor
Parameters: |
|
---|---|
Raises: | FlavorDoesNotExist |
Bases: zaqar.storage.base.ControllerBase
This class is responsible for managing message CRUD.
Base method for deleting multiple messages.
Parameters: |
|
---|
Base method for getting multiple messages.
Parameters: |
|
---|---|
Returns: | An iterable, yielding dicts containing message details |
Base method for deleting a single message.
Parameters: |
|
---|
Get first message in the queue (including claimed).
Parameters: |
|
---|---|
Returns: | First message in the queue, or None if the queue is empty |
Base method for getting a message.
Parameters: |
|
---|---|
Returns: | Dictionary containing message data |
Raises: | DoesNotExist |
Base method for listing messages.
Parameters: |
|
---|---|
Returns: | An iterator giving a sequence of messages and the marker of the next page. |
Base method for popping messages.
Parameters: |
|
---|
Base method for posting one or more messages.
Implementations of this method should guarantee and preserve the order, in the returned list, of incoming messages.
Parameters: |
|
---|---|
Returns: | List of message ids |
Bases: zaqar.storage.base.ControllerBase
A controller for managing pools.
Gets the set of capabilities for this group/name
Parameters: |
|
---|
Registers a pool entry.
Parameters: |
|
---|
Removes a pool entry.
Parameters: | name (six.text_type) – The name of this pool |
---|---|
Return type: | None |
Deletes all pools from storage.
Returns a single pool entry.
Parameters: | name (six.text_type) – The name of this pool |
---|---|
Returns: | True if the pool exists |
Return type: | bool |
Returns a single pool entry.
Parameters: |
|
---|---|
Returns: | weight, uri, and options for this pool |
Return type: | {} |
Raises: | PoolDoesNotExist if not found |
Returns a pool list filtered by given pool group.
Parameters: |
|
---|---|
Returns: | weight, uri, and options for this pool |
Return type: | {} |
Raises: | PoolDoesNotExist if not found |
Lists all registered pools.
Parameters: |
|
---|---|
Returns: | A list of pools - name, weight, uri |
Return type: | [{}] |
Updates the weight, uris, and/or options of this pool
Parameters: |
|
---|---|
Raises: | PoolDoesNotExist |
Bases: zaqar.storage.base.ControllerBase
This class is responsible for managing queues.
Queue operations include CRUD, monitoring, etc.
Storage driver implementations of this class should be capable of handling high workloads and huge numbers of queues.
Base method for queue creation.
Parameters: |
|
---|---|
Returns: | True if a queue was created and False if it was updated. |
Base method for deleting a queue.
Parameters: |
|
---|
Base method for testing queue existence.
Parameters: |
|
---|---|
Returns: | True if a queue exists and False if it does not. |
Base method for queue metadata retrieval.
Parameters: |
|
---|---|
Returns: | Dictionary containing queue metadata |
Raises: | DoesNotExist |
Base method for queue metadata retrieval.
Parameters: |
|
---|---|
Returns: | Dictionary containing queue metadata |
Raises: | DoesNotExist |
Base method for listing queues.
Parameters: |
|
---|---|
Returns: | An iterator giving a sequence of queues and the marker of the next page. |
Base method for updating a queue metadata.
Parameters: |
|
---|---|
Raises: | DoesNotExist |
Base method for queue stats.
Parameters: |
|
---|---|
Returns: | Dictionary with the queue stats |
Bases: zaqar.storage.base.ControllerBase
This class is responsible for managing subscriptions of notification.
Create a new subscription.
:param queue:The source queue for notifications :type queue: six.text_type :param subscriber: The subscriber URI :type subscriber: six.text_type :param ttl: time to live for this subscription :type ttl: int :param options: Options used to configure this subscription :type options: dict :param project: Project id :type project: six.text_type :returns: True if a subscription was created and False if it is failed. :rtype: boolean
Base method for deleting a subscription.
Parameters: |
|
---|
Base method for testing subscription existence.
Parameters: |
|
---|---|
Returns: | True if a subscription exists and False if it does not. |
Returns a single subscription entry.
Parameters: |
|
---|---|
Returns: | Dictionary containing subscription data |
Return type: | {} |
Raises: | SubscriptionDoesNotExist if not found |
Base method for listing subscriptions.
Parameters: |
|
---|---|
Returns: | An iterator giving a sequence of subscriptions and the marker of the next page. |
Return type: | [{}] |
Updates the weight, uris, and/or options of this subscription
Parameters: |
|
---|---|
Raises: | SubscriptionDoesNotExist if not found |
Raises: | SubscriptionAlreadyExists on attempt to update in a way to create duplicate subscription |