OpenStack Messaging (Zaqar) Client
Go to file
Eva Balycheva 8eaf813984 Do not catch ConflictError on subscription create
Currently 'Subscription' class catches ConflictError inside and prints
text 'The subscriber has been existed already.'.

This is not good for two reasons:
1. The library user(program) wants to handle this exception by himself
using convenient try/except mechanism along with many other exceptions
that can happen during subscription creation.
2. The library user might not want some text to be printed in this
situation by python-zaqarclient. For now this is the only situation when
python-zaqarclient prints something when it is used as library.

This patch makes "Subscription" class not to handle ConflictError
exception by itself. And creates functional and unit tests to assert
that this behavior is raised, when Zaqar returns 409 response code on
subscription creation.

In the future it would be good to list all exceptions that can be raised
by the "Client" class's methods in their docstrings. See
"zaqarclient/queues/v1/client.py" and "zaqarclient/queues/v2/client.py".

Also it would be good if "Pool" and "Flavor" classes would throw
ConflictError exception too.

Closes-Bug: 1542780
Change-Id: I17c0e32a3dabec8303b3055a0d97db857d947b34
2016-02-19 03:28:34 +03:00
doc Fixing the deprecated library function 2016-01-18 03:09:32 +00:00
examples Updated from global requirements 2015-08-27 13:19:58 +02:00
tests Add support for subscription create v2 2016-01-11 09:31:55 +13:00
zaqarclient Do not catch ConflictError on subscription create 2016-02-19 03:28:34 +03:00
.gitignore Ignore *.egg files. 2013-07-16 17:59:28 -04:00
.gitreview Fix .gitreview due to the repo rename/move 2014-08-16 21:33:03 +04:00
HACKING.rst Rename Marconi to Zaqar 2014-08-04 16:55:10 +02:00
LICENSE Lets get the party started :) 2013-05-07 17:09:55 +02:00
README.rst improve readme contents 2015-10-15 18:39:34 +08:00
requirements.txt Updated from global requirements 2016-01-24 20:54:22 +00:00
setup.cfg Support claims for v2 2016-02-05 14:02:12 +13:00
setup.py Updated from global requirements 2015-09-17 12:17:09 +00:00
test-requirements.txt Updated from global requirements 2016-01-19 13:53:11 +00:00
tox.ini Put py34 first in the env order of tox 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