diff --git a/examples/claims.py b/examples/claims.py index 4069418..5925fc4 100644 --- a/examples/claims.py +++ b/examples/claims.py @@ -15,10 +15,13 @@ import time -from zaqarclient.queues.v1 import client +from zaqarclient.queues.v2 import client URL = 'http://localhost:8888' +# Note: credential information should be provided using `conf` +# keyword argument if authentication is enabled at server side. +# Please refer to keystone_auth.py for more information. cli = client.Client(URL) queue = cli.queue('worker-jobs') diff --git a/examples/keystone_auth.py b/examples/keystone_auth.py index 345e330..16a5b8c 100644 --- a/examples/keystone_auth.py +++ b/examples/keystone_auth.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -from zaqarclient.queues.v1 import client +from zaqarclient.queues.v2 import client URL = 'http://localhost:8888' diff --git a/examples/management.py b/examples/management.py index 7e66242..e25d3cb 100644 --- a/examples/management.py +++ b/examples/management.py @@ -18,7 +18,11 @@ URL = 'http://localhost:8888' def healthy(): - cli = client.Client(url=URL, version=1) + # Note: credential information should be provided + # using `conf` keyword argument if authentication + # is enabled at server side. Please refer to + # keystone_auth.py for more information. + cli = client.Client(url=URL, version=2) return True if cli.health() else False if __name__ == '__main__': diff --git a/examples/simple.py b/examples/simple.py index 0b477a1..8213f71 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -14,7 +14,7 @@ # NOTE(flaper87): Client should be moved to # an upper package. It's version agnostic. -from zaqarclient.queues.v1 import client +from zaqarclient.queues.v2 import client URL = 'http://localhost:8888' @@ -30,7 +30,11 @@ def create_post_delete(queue_name, messages): :params messages: Messages to post. :type messages: list """ - cli = client.Client(URL, version=1.1) + # Note: credential information should be provided + # using `conf` keyword argument if authentication + # is enabled at server side. Please refer to + # keystone_auth.py for more information. + cli = client.Client(URL, version=2) queue = cli.queue(queue_name) queue.post(messages)