)]}'
{"swiftclient/client.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ec83d350040f86089c4572ef42bc1869d701bcae","unresolved":false,"context_lines":[{"line_number":526,"context_line":"    # the attempted imports are encapsulated in this function to allow"},{"line_number":527,"context_line":"    # mocking for tests"},{"line_number":528,"context_line":"    try:"},{"line_number":529,"context_line":"        from keystoneclient import client as ksclient"},{"line_number":530,"context_line":"        from keystoneclient import exceptions"},{"line_number":531,"context_line":"        # prevent keystoneclient warning us that it has no log handlers"},{"line_number":532,"context_line":"        logging.getLogger(\u0027keystoneclient\u0027).addHandler(NullHandler())"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_ac35ccaa","line":529,"updated":"2017-03-30 12:14:39.000000000","message":"IIRC this introduces an extra request to keystone for each auth, at least that was my observation back when we introduced v3 support [1]. Is that still the case?\n\nIn [1] the explicit import of client by api version was a deliberate choice\n\n[1] https://review.openstack.org/#/c/91788/4/swiftclient/client.py@293","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c73b347bca3f4aad9efe6d77eaf3309e48436fec","unresolved":false,"context_lines":[{"line_number":526,"context_line":"    # the attempted imports are encapsulated in this function to allow"},{"line_number":527,"context_line":"    # mocking for tests"},{"line_number":528,"context_line":"    try:"},{"line_number":529,"context_line":"        from keystoneclient import client as ksclient"},{"line_number":530,"context_line":"        from keystoneclient import exceptions"},{"line_number":531,"context_line":"        # prevent keystoneclient warning us that it has no log handlers"},{"line_number":532,"context_line":"        logging.getLogger(\u0027keystoneclient\u0027).addHandler(NullHandler())"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_cc02500c","line":529,"in_reply_to":"ffe62b97_ac35ccaa","updated":"2017-03-30 12:20:14.000000000","message":"This is the case if you configured an unversioned endpoint; that\u0027s how it\u0027ll figure out what version to use. If you\u0027re endpoint is versioned then you shouldn\u0027t have this problem AFAIK, as the first call to keystone will already retrieve the relevant version info.","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ec83d350040f86089c4572ef42bc1869d701bcae","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    auth_version \u003d kwargs.get(\u0027auth_version\u0027, \u00272.0\u0027)"},{"line_number":551,"context_line":"    debug \u003d logger.isEnabledFor(logging.DEBUG)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    ksclient, exceptions \u003d _import_keystone_client()"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    try:"},{"line_number":556,"context_line":"        _ksclient \u003d ksclient.Client("}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_4c876011","line":553,"updated":"2017-03-30 12:14:39.000000000","message":"so what effect does auth_version now have? the CLI requires auth_version \u003d 2.0 or 3 for keystone to be used [1], but it seems that setting 2.0 vs 3 now makes no difference to the API you actually use? If so, do we need to change docs to reflect that?\n\n[1] https://docs.openstack.org/developer/python-swiftclient/cli.html","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c73b347bca3f4aad9efe6d77eaf3309e48436fec","unresolved":false,"context_lines":[{"line_number":550,"context_line":"    auth_version \u003d kwargs.get(\u0027auth_version\u0027, \u00272.0\u0027)"},{"line_number":551,"context_line":"    debug \u003d logger.isEnabledFor(logging.DEBUG)"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    ksclient, exceptions \u003d _import_keystone_client()"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    try:"},{"line_number":556,"context_line":"        _ksclient \u003d ksclient.Client("}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_bf3050ea","line":553,"in_reply_to":"ffe62b97_4c876011","updated":"2017-03-30 12:20:14.000000000","message":"that\u0027s correct. I can change that in a subsequent commit.","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ec83d350040f86089c4572ef42bc1869d701bcae","unresolved":false,"context_lines":[{"line_number":570,"context_line":"            cacert\u003dkwargs.get(\u0027cacert\u0027),"},{"line_number":571,"context_line":"            cert\u003dkwargs.get(\u0027cert\u0027),"},{"line_number":572,"context_line":"            key\u003dkwargs.get(\u0027cert_key\u0027),"},{"line_number":573,"context_line":"            auth_url\u003dauth_url, insecure\u003dinsecure, timeout\u003dtimeout)"},{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_6ce8e47b","line":573,"range":{"start_line":573,"start_character":12,"end_line":573,"end_character":29},"updated":"2017-03-30 12:14:39.000000000","message":"auth_url includes the api version - is that still correct?\n\n[1] https://docs.openstack.org/developer/python-swiftclient/client-api.html","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c73b347bca3f4aad9efe6d77eaf3309e48436fec","unresolved":false,"context_lines":[{"line_number":570,"context_line":"            cacert\u003dkwargs.get(\u0027cacert\u0027),"},{"line_number":571,"context_line":"            cert\u003dkwargs.get(\u0027cert\u0027),"},{"line_number":572,"context_line":"            key\u003dkwargs.get(\u0027cert_key\u0027),"},{"line_number":573,"context_line":"            auth_url\u003dauth_url, insecure\u003dinsecure, timeout\u003dtimeout)"},{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_7f79a891","line":573,"range":{"start_line":573,"start_character":12,"end_line":573,"end_character":29},"in_reply_to":"ffe62b97_6ce8e47b","updated":"2017-03-30 12:20:14.000000000","message":"not necessarily. One can use an unversioned endpoint and discovery will figure out which appropriate version to use. However, you can still configure it using a versioned endpoint as before, and that will save one keystone call.","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"0c61bb99549fefa11b94fd100e1e0ec6c0f9acd3","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            cert\u003dkwargs.get(\u0027cert\u0027),"},{"line_number":572,"context_line":"            key\u003dkwargs.get(\u0027cert_key\u0027),"},{"line_number":573,"context_line":"            auth_url\u003dauth_url, insecure\u003dinsecure, timeout\u003dtimeout)"},{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"},{"line_number":577,"context_line":"        if auth_version in AUTH_VERSIONS_V3:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_7cb48ad0","line":574,"updated":"2017-03-09 09:21:26.000000000","message":"This is interesting. Why is this needed now? Or is this just a way to catch an auth exception early on (which would be raised later on otherwise)?","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c15cf27e3aae7bd2ed19aeb60160fa001c7ac57a","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            cert\u003dkwargs.get(\u0027cert\u0027),"},{"line_number":572,"context_line":"            key\u003dkwargs.get(\u0027cert_key\u0027),"},{"line_number":573,"context_line":"            auth_url\u003dauth_url, insecure\u003dinsecure, timeout\u003dtimeout)"},{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"},{"line_number":577,"context_line":"        if auth_version in AUTH_VERSIONS_V3:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_9514b144","line":574,"in_reply_to":"9a30ddce_7cb48ad0","updated":"2017-03-09 10:25:23.000000000","message":"So, when using the v2 or v3 clients directly, this call is done automatically for you (though it\u0027s supposed to be deprecated) https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v3/client.py#L245\n\nAnd that\u0027s because you were not using the session object. Now in this case, this call uses keystone discovery and creates a session from these arguments, so that authenticate call is not made anymore. So now here I do it explicitly.","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ec83d350040f86089c4572ef42bc1869d701bcae","unresolved":false,"context_lines":[{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"},{"line_number":577,"context_line":"        if auth_version in AUTH_VERSIONS_V3:"},{"line_number":578,"context_line":"            msg \u003d (\u0027Unauthorized. Check username/id, password, \u0027"},{"line_number":579,"context_line":"                   \u0027tenant name/id and user/tenant domain name/id.\u0027)"},{"line_number":580,"context_line":"        raise ClientException(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_cca7f0a7","line":577,"updated":"2017-03-30 12:14:39.000000000","message":"does this distinction still make sense?","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"c73b347bca3f4aad9efe6d77eaf3309e48436fec","unresolved":false,"context_lines":[{"line_number":574,"context_line":"        _ksclient.authenticate()"},{"line_number":575,"context_line":"    except exceptions.Unauthorized:"},{"line_number":576,"context_line":"        msg \u003d \u0027Unauthorized. Check username, password and tenant name/id.\u0027"},{"line_number":577,"context_line":"        if auth_version in AUTH_VERSIONS_V3:"},{"line_number":578,"context_line":"            msg \u003d (\u0027Unauthorized. Check username/id, password, \u0027"},{"line_number":579,"context_line":"                   \u0027tenant name/id and user/tenant domain name/id.\u0027)"},{"line_number":580,"context_line":"        raise ClientException(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_9f990cd2","line":577,"in_reply_to":"ffe62b97_cca7f0a7","updated":"2017-03-30 12:20:14.000000000","message":"I left it there since it gives that extra bit of debugging info","commit_id":"bfc041a9f0376e8fdc52db84b426fa9bccb31dc3"}]}
