diff --git a/examples/keystone_auth.py b/examples/keystone_auth.py index 0d373cfe..345e330c 100644 --- a/examples/keystone_auth.py +++ b/examples/keystone_auth.py @@ -19,7 +19,9 @@ URL = 'http://localhost:8888' def create_post_delete(queue_name, messages): - """Creates a queue, posts messages to it and finally deletes it with + """Auth example + + Creates a queue, posts messages to it and finally deletes it with keystone auth strategy enabled on Zaqar server side. :params queue_name: The name of the queue diff --git a/examples/simple.py b/examples/simple.py index 9aec0d82..0b477a18 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -20,7 +20,9 @@ URL = 'http://localhost:8888' def create_post_delete(queue_name, messages): - """Creates a queue, posts messages to it + """Simple example + + Creates a queue, posts messages to it and finally deletes it. :params queue_name: The name of the queue diff --git a/requirements.txt b/requirements.txt index 2b590bef..3f3a3ebd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=0.6,!=0.7,<1.0 -requests>=2.2.0,!=2.4.0 -six>=1.7.0 -stevedore>=1.1.0 # Apache-2.0 -jsonschema>=2.0.0,<3.0.0 +pbr<2.0,>=1.6 +requests>=2.5.2 +six>=1.9.0 +stevedore>=1.5.0 # Apache-2.0 +jsonschema!=2.5.0,<3.0.0,>=2.0.0 # Oslo Packages -oslo.i18n>=1.0.0 # Apache-2.0 +oslo.i18n>=1.5.0 # Apache-2.0 -python-keystoneclient>=0.11.1 +python-keystoneclient>=1.6.0 diff --git a/setup.py b/setup.py index 73637574..d8080d05 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,5 +25,5 @@ except ImportError: pass setuptools.setup( - setup_requires=['pbr'], + setup_requires=['pbr>=1.3'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 11498f96..11f47bc9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,27 +2,27 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. # Hacking already pins down pep8, pyflakes and flake8 -hacking>=0.8.0,<0.9 +hacking>=0.10.2,<0.11 # Unit testing discover -fixtures>=0.3.14 -mock>=1.0 +fixtures>=1.3.1 +mock>=1.2 python-subunit>=0.0.18 testrepository>=0.0.18 -testtools>=0.9.36,!=1.2.0,!=1.4.0 +testtools>=1.4.0 # Test runner nose nose-exclude -openstack.nose_plugin>=0.7 +openstack.nose-plugin>=0.7 # Metrics and style coverage>=3.6 -ddt>=0.4.0 +ddt>=0.7.0 # Documentation -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 -oslosphinx>=2.2.0 # Apache-2.0 -openstack-doc-tools>=0.20 +sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 +oslosphinx>=2.5.0 # Apache-2.0 +openstack-doc-tools>=0.23 diff --git a/tests/__init__.py b/tests/__init__.py index b6273d41..e69de29b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/common/__init__.py b/tests/unit/common/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/common/__init__.py +++ b/tests/unit/common/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/openstack/__init__.py b/tests/unit/openstack/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/openstack/__init__.py +++ b/tests/unit/openstack/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/queues/transport/__init__.py b/tests/unit/queues/transport/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/queues/transport/__init__.py +++ b/tests/unit/queues/transport/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/queues/transport/http/__init__.py b/tests/unit/queues/transport/http/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/queues/transport/http/__init__.py +++ b/tests/unit/queues/transport/http/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/queues/transport/zmq/__init__.py b/tests/unit/queues/transport/zmq/__init__.py index 78f982ce..e69de29b 100644 --- a/tests/unit/queues/transport/zmq/__init__.py +++ b/tests/unit/queues/transport/zmq/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/queues/v1/test_message.py b/tests/unit/queues/v1/test_message.py index c89726ee..1d7a0b45 100644 --- a/tests/unit/queues/v1/test_message.py +++ b/tests/unit/queues/v1/test_message.py @@ -33,7 +33,7 @@ class TestMessageIterator(base.QueuesTestBase): 'ttl': 800, 'age': 790, 'body': {'event': 'ActivateAccount', - 'mode': 'active'} + 'mode': 'active'} }] } @@ -51,7 +51,7 @@ class TestMessageIterator(base.QueuesTestBase): 'ttl': 800, 'age': 790, 'body': {'event': 'ActivateAccount', - 'mode': 'active'} + 'mode': 'active'} }] } @@ -82,7 +82,7 @@ class TestMessageIterator(base.QueuesTestBase): 'ttl': 800, 'age': 790, 'body': {'event': 'ActivateAccount', - 'mode': 'active'} + 'mode': 'active'} }] } diff --git a/zaqarclient/auth/keystone.py b/zaqarclient/auth/keystone.py index 8b568f7a..030e8d5e 100644 --- a/zaqarclient/auth/keystone.py +++ b/zaqarclient/auth/keystone.py @@ -55,8 +55,7 @@ class KeystoneAuth(base.AuthBackend): return client.service_catalog.url_for(**extra) def authenticate(self, api_version, request): - """Get an authtenticated client, based on the credentials - in the keyword args. + """Get an authtenticated client using credentials in the keyword args. :param api_version: the API version to use ('1' or '2') :param request: The request spec instance to modify with diff --git a/zaqarclient/queues/v1/message.py b/zaqarclient/queues/v1/message.py index e1d37b8c..74aacc1d 100644 --- a/zaqarclient/queues/v1/message.py +++ b/zaqarclient/queues/v1/message.py @@ -19,6 +19,7 @@ from zaqarclient.queues.v1 import core class Message(object): """A handler for Zaqar server Message resources. + Attributes are only downloaded once - at creation time. """ def __init__(self, queue, ttl, age, body, href=None, id=None, diff --git a/zaqarclient/tests/__init__.py b/zaqarclient/tests/__init__.py index 78f982ce..e69de29b 100644 --- a/zaqarclient/tests/__init__.py +++ b/zaqarclient/tests/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/zaqarclient/tests/mock/__init__.py b/zaqarclient/tests/mock/__init__.py index 78f982ce..e69de29b 100644 --- a/zaqarclient/tests/mock/__init__.py +++ b/zaqarclient/tests/mock/__init__.py @@ -1,14 +0,0 @@ -# Copyright (c) 2013 Rackspace, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/zaqarclient/transport/errors.py b/zaqarclient/transport/errors.py index 8da10706..c6e18bb5 100644 --- a/zaqarclient/transport/errors.py +++ b/zaqarclient/transport/errors.py @@ -53,24 +53,21 @@ class UnauthorizedError(TransportError): class ForbiddenError(TransportError): - """Indicates that a request is forbidden - to access the particular resource + """Indicates that a request is forbidden to access the particular resource This error maps to HTTP's 403 """ class InternalServerError(TransportError): - """Indicates that the server encountered - an unexpected situation + """Indicates that the server encountered an unexpected situation This error maps to HTTP's 500 """ class ServiceUnavailableError(TransportError): - """Indicates that the server was unable - to service the request + """Indicates that the server was unable to service the request This error maps to HTTP's 503 """