From 7d0cb04e6d26fa2203bb4ea18737840cbc170a37 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Fri, 15 Apr 2016 10:58:40 -0700 Subject: [PATCH] Fix documentation example again In d0617885 the example in the Service Discovery section was changed to include the full URL of the endpoint. On closer inspection, it turns out that the example is deliberately pointing out that you don't need the full URL when using endpoint filtering, since the endpoint filter is supposed to look up the endpoint in the catalog. The reason it wasn't working out of the box, as pointed out in the bug[1], was that devstack sets up v2.0 endpoints, so the example path was appending /v3 to a v2.0 endpoint and failing. This patch reverts the example back to using just a path, but omits the '/v3' part of the path and uses the admin interface so that it will work on v2.0. This will work out of the box on devstack and will still work if the user has set up endpoints with '/v3' in them. [1] https://bugs.launchpad.net/keystoneauth/+bug/1519054/comments/2 Change-Id: I11637aaa1939327eb6d1819c1b740a99e0f21e83 --- doc/source/using-sessions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/using-sessions.rst b/doc/source/using-sessions.rst index 3e84b3e5..08866c56 100644 --- a/doc/source/using-sessions.rst +++ b/doc/source/using-sessions.rst @@ -135,9 +135,9 @@ contains all the information an authentication plugin requires to determine the correct URL to which to send a request. When using this mode only the path for the request needs to be specified:: - >>> resp = session.get('https://my.keystone.com:5000/v3/users', + >>> resp = session.get('/users', endpoint_filter={'service_type': 'identity', - 'interface': 'public', + 'interface': 'admin', 'region_name': 'myregion'}) `endpoint_filter` accepts a number of arguments with which it can determine an