# Path: zaqarclient/queues/v1/core.py
# def _common_queue_ops(operation, transport, request, name, callback=None):
# def queue_create(transport, request, name,
#                  metadata=None, callback=None):
# def queue_update(transport, request, name, metadata, callback=None):
# def queue_exists(transport, request, name, callback=None):
# def queue_get(transport, request, name, callback=None):
# def queue_get_metadata(transport, request, name, callback=None):
# def queue_set_metadata(transport, request, name, metadata, callback=None):
# def queue_get_stats(transport, request, name):
# def queue_delete(transport, request, name, callback=None):
# def queue_list(transport, request, callback=None, **kwargs):
# def message_list(transport, request, queue_name, callback=None, **kwargs):
# def message_post(transport, request, queue_name, messages, callback=None):
# def message_get(transport, request, queue_name, message_id, callback=None):
# def message_get_many(transport, request, queue_name, messages, callback=None):
# def message_delete(transport, request, queue_name, message_id,
#                    claim_id=None, callback=None):
# def message_delete_many(transport, request, queue_name,
#                         ids, callback=None):
# def message_pop(transport, request, queue_name,
#                 count, callback=None):
# def claim_create(transport, request, queue_name, **kwargs):
# def claim_get(transport, request, queue_name, claim_id):
# def claim_update(transport, request, queue_name, claim_id, **kwargs):
# def claim_delete(transport, request, queue_name, claim_id):
# def pool_get(transport, request, pool_name, callback=None):
# def pool_create(transport, request, pool_name, pool_data):
# def pool_update(transport, request, pool_name, pool_data):
# def pool_list(transport, request, **kwargs):
# def pool_delete(transport, request, pool_name):
# def flavor_create(transport, request, name, flavor_data):
# def flavor_get(transport, request, flavor_name, callback=None):
# def flavor_update(transport, request, flavor_name, flavor_data):
# def flavor_list(transport, request, **kwargs):
# def flavor_delete(transport, request, name):
# def health(transport, request, callback=None):


from zaqarclient.queues.v1 import core
        the pool could've been deleted
        right after it was called.
        """
        req, trans = self.client._request_and_transport()
        # As of now on PUT, zaqar server updates flavor if it is already
        # exists else it will create a new one. The zaqar client should
        # maitain symmetry with zaqar server.
        # TBD(mdnadeem): Have to change this code when zaqar server
        # behaviour change for PUT operation.

        data = {'pool_list': self.pool_list}
        if self.client.api_version <= 1.1:
            data['capabilities'] = self.capabilities

        req, trans = self.client._request_and_transport()
        core.flavor_create(trans, req, self.name, data)

    def update(self, flavor_data):
        req, trans = self.client._request_and_transport()
        core.flavor_update(trans, req, self.name, flavor_data)

        for key, value in flavor_data.items():
            setattr(self, key, value)

    def delete(self):
        req, trans = self.client._request_and_transport()
        core.flavor_delete(trans, req, self.name)

    def get(self):
        req, trans = self.client._request_and_transport()

# Path: zaqarclient/queues/v1/core.py
# def _common_queue_ops(operation, transport, request, name, callback=None):
# def queue_create(transport, request, name,
#                  metadata=None, callback=None):
# def queue_update(transport, request, name, metadata, callback=None):
# def queue_exists(transport, request, name, callback=None):
# def queue_get(transport, request, name, callback=None):
# def queue_get_metadata(transport, request, name, callback=None):
# def queue_set_metadata(transport, request, name, metadata, callback=None):
# def queue_get_stats(transport, request, name):
# def queue_delete(transport, request, name, callback=None):
# def queue_list(transport, request, callback=None, **kwargs):
# def message_list(transport, request, queue_name, callback=None, **kwargs):
# def message_post(transport, request, queue_name, messages, callback=None):
# def message_get(transport, request, queue_name, message_id, callback=None):
# def message_get_many(transport, request, queue_name, messages, callback=None):
# def message_delete(transport, request, queue_name, message_id,
#                    claim_id=None, callback=None):
# def message_delete_many(transport, request, queue_name,
#                         ids, callback=None):
# def message_pop(transport, request, queue_name,
#                 count, callback=None):
# def claim_create(transport, request, queue_name, **kwargs):
# def claim_get(transport, request, queue_name, claim_id):
# def claim_update(transport, request, queue_name, claim_id, **kwargs):
# def claim_delete(transport, request, queue_name, claim_id):
# def pool_get(transport, request, pool_name, callback=None):
# def pool_create(transport, request, pool_name, pool_data):
# def pool_update(transport, request, pool_name, pool_data):
# def pool_list(transport, request, **kwargs):
# def pool_delete(transport, request, pool_name):
# def flavor_create(transport, request, name, flavor_data):
# def flavor_get(transport, request, flavor_name, callback=None):
# def flavor_update(transport, request, flavor_name, flavor_data):
# def flavor_list(transport, request, **kwargs):
# def flavor_delete(transport, request, name):
# def health(transport, request, callback=None):


# Path: zaqarclient/queues/v1/flavor.py
from zaqarclient.queues.v1 import core

        the pool could've been deleted
        right after it was called.
        """
        req, trans = self.client._request_and_transport()
        # As of now on PUT, zaqar server updates flavor if it is already
        # exists else it will create a new one. The zaqar client should
        # maitain symmetry with zaqar server.
        # TBD(mdnadeem): Have to change this code when zaqar server
        # behaviour change for PUT operation.

        data = {'pool_list': self.pool_list}
        if self.client.api_version <= 1.1:
            data['capabilities'] = self.capabilities

        req, trans = self.client._request_and_transport()
        core.flavor_create(trans, req, self.name, data)

    def update(self, flavor_data):
        req, trans = self.client._request_and_transport()
        core.flavor_update(trans, req, self.name, flavor_data)

        for key, value in flavor_data.items():
            setattr(self, key, value)

    def delete(self):
        req, trans = self.client._request_and_transport()
        core.flavor_delete(trans, req, self.name)

    def get(self):
        req, trans = self.client._request_and_transport()

        return core.flavor_get(trans, req, self.name, callback=None)