Go to file
Eva Balycheva f24a7e9fa3 Improve subscription listing
The way subscriptions are listed by Client.subscriptions method is not
very good. Besides doing nice work, this method modifies subscription
list response body from Zaqar by adding redundant 'queue_name' key to
each subscription dictionary in the response body, while there is
already 'source' key containing queue name.

Because of that it's possible to write a unit test, where queue list
response body from Zaqar does not represent real response that could
come from Zaqar. As example see
zaqarclient.tests.queues.subscriptions.QueuesV2SubscriptionUnitTest.
test_subscription_list. This test is missing 'source' keys in response
body.

This patch makes subscription listing code stop modifying responses from
Zaqar. As expected, the example unit test fails after that. This patch
fixes the test also and checks more subscription object's fields.

Also this patch improves subscription listing functional test to check
all fields of subscription object that was deserialized from Zaqar
response, i.e. checks zaqarclient.queues.v2.subscription.create_object
method. It is also needed, because before this patch, subscription's
queue name field wasn't checked by any of the tests, making a recent bug
like https://bugs.launchpad.net/python-zaqarclient/+bug/1538367
possible.

Change-Id: Iae5bffb296efd655a34584c7f2162adbe6d029e2
Closes-Bug: 1538366
2016-01-27 21:33:19 +03:00
2015-08-27 13:19:58 +02:00
2016-01-27 21:33:19 +03:00
2013-07-16 17:59:28 -04:00
2014-08-04 16:55:10 +02:00
2013-05-07 17:09:55 +02:00
2015-10-15 18:39:34 +08:00
2016-01-15 15:49:06 +13:00
2015-09-17 12:17:09 +00:00
2015-12-26 16:42:40 +05:30

Python Zaqar Client

Latest Version

Downloads

version

0.1.0

Wiki

Zaqar Wiki

Launchpad

Zaqar Launchpad

Review

Code Review

Design

Client Wiki

IRC

#openstack-zaqar @ freenode

Welcome to the Zaqar Python Client project!

Table of Contents

Installation

The latest stable release can be installed from PyPI:

pip install --upgrade python-zaqarclient

For the adventurous, you may also install the latest code directly from GitHub:

pip install git+https://github.com/openstack/python-zaqarclient.git

What's in the box

By installing python-zaqarclient you get programmatic access to the Zaqar v1.0 API library. Plus, it installs a plugin to python-openstackclient that allows you to perform simple queue operations.

How to use

Python client

Details about design, features, usage and workflow can be found in the Python Client Wiki.

Command line interface

Zaqar bases its client implementation in the OpenStack Client. It can be installed and configured by following the instructions in Getting Started and Configuration in the OpenStack Client readme respectively.

The CLI currently allows creation, removal and listing of queues. Some examples are:

$  openstack queue list --limit 3
$  openstack queue create myqueue
$  openstack queue delete myqueue

Contributing

Be sure to reference the HACKING file for details on coding style. You may also wish to read through Zaqar's Contributor Guide before contributing your first patch.

  • License: Apache License, Version 2.0
  • PyPi - package installation
  • Bugs - issue tracking
  • Source
Description
OpenStack Messaging (Zaqar) Client
Readme 7 MiB
Languages
Python 100%