)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8f2613c98b9b47343932f6a0df9493d693478a60","unresolved":false,"context_lines":[{"line_number":11,"context_line":"That means if someone does:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  a \u003d adapter.Adapter("},{"line_number":14,"context_line":"      auth_type\u003d\u0027none\u0027,"},{"line_number":15,"context_line":"      endpoint_override\u003d\u0027https://example.com\u0027)"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"to get an Adapter on an endpoint using the none plugin, then does"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_f8366cb4","line":14,"updated":"2017-09-06 15:01:44.000000000","message":"This example is not valid, auth_type really only applies to the loading modules.","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8f2613c98b9b47343932f6a0df9493d693478a60","unresolved":false,"context_lines":[{"line_number":17,"context_line":"to get an Adapter on an endpoint using the none plugin, then does"},{"line_number":18,"context_line":"either:"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"  a.get_api_major_version()"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"or:"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_93a7490c","line":20,"updated":"2017-09-06 15:01:44.000000000","message":"This example doesn\u0027t work and isn\u0027t in the tests:\n\n\u003e\u003e\u003e from keystoneauth1 import adapter\n\u003e\u003e\u003e from keystoneauth1 import session\n\u003e\u003e\u003e from keystoneauth1 import noauth\n\u003e\u003e\u003e auth \u003d noauth.NoAuth()\n\u003e\u003e\u003e s \u003d session.Session(auth)\n\u003e\u003e\u003e a \u003d adapter.Adapter(session\u003ds, endpoint_override\u003d\u0027http://192.168.122.29/compute/v2.1\u0027)\n\u003e\u003e\u003e print(a.get_api_major_version())\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py\", line 263, in get_api_major_version\n    return self.session.get_api_major_version(auth or self.auth, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py\", line 975, in get_api_major_version\n    return auth.get_api_major_version(self, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/plugin.py\", line 151, in get_api_major_version\n    return endpoint_data.api_version\nAttributeError: \u0027NoneType\u0027 object has no attribute \u0027api_version\u0027","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8f2613c98b9b47343932f6a0df9493d693478a60","unresolved":false,"context_lines":[{"line_number":26,"context_line":"it will fail because the none plugin doesn\u0027t have those methods."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"There is, however, nothing about those methods that needs authentication"},{"line_number":29,"context_line":"- they work just fine in an endpoint_override workflow. Asking for the"},{"line_number":30,"context_line":"major API version, or the rest of the EndpointData is still a valid"},{"line_number":31,"context_line":"thing to do. Ironic/Bifrost is specifically a usecase here, as"},{"line_number":32,"context_line":"standalone Ironic wants to use the \u0027none\u0027 plugin, but consuming the API"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7f287b81_33f095c9","line":29,"updated":"2017-09-06 15:01:44.000000000","message":"That\u0027s not really true. For example this works:\n\n \u003e\u003e\u003e from keystoneauth1 import adapter\n \u003e\u003e\u003e from keystoneauth1 import session\n \u003e\u003e\u003e from keystoneauth1 import identity\n \u003e\u003e\u003e auth \u003d identity.Password(...)\n \u003e\u003e\u003e s \u003d session.Session(auth)\n \u003e\u003e\u003e a \u003d adapter.Adapter(session\u003ds, endpoint_override\u003d\u0027http://192.168.122.29/compute/v2.1/\u0027)\n \u003e\u003e\u003e print(a.get_endpoint_data())\n \u003ckeystoneauth1.discover.EndpointData object at 0x7f365bb1ba50\u003e\n\nbut this doesn\u0027t:\n\n \u003e\u003e\u003e from keystoneauth1 import noauth\n \u003e\u003e\u003e auth \u003d noauth.NoAuth()\n \u003e\u003e\u003e s \u003d session.Session(auth)\n \u003e\u003e\u003e a \u003d adapter.Adapter(session\u003ds, endpoint_override\u003d\u0027http://192.168.122.29/compute/v2.1/\u0027)\n \u003e\u003e\u003e print(a.get_endpoint_data())\n Traceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py\", line 244, in get_endpoint_data\n    return self.session.get_endpoint_data(auth or self.auth, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py\", line 959, in get_endpoint_data\n    return auth.get_endpoint_data(self, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/plugin.py\", line 133, in get_endpoint_data\n    discover_versions\u003ddiscover_versions)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/discover.py\", line 836, in get_versioned_data\n    max_version\u003dmax_version)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/discover.py\", line 871, in _set_version_info\n    discover_versions\u003ddiscover_versions)\n  File \"/usr/local/lib/python2.7/dist-packages/keystoneauth1/discover.py\", line 977, in _run_discovery\n    \"Version requested but version discovery document was not\"\n keystoneauth1.exceptions.discovery.DiscoveryFailure: Version requested but version discovery document was not found and allow_version_hack was False","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"4ce9df0f6a64a15aedd3f6ebff87312657d2a838","unresolved":false,"context_lines":[{"line_number":25,"context_line":"it will fail because the none plugin doesn\u0027t have those methods."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"There is, however, nothing about those methods that necessarily needs"},{"line_number":28,"context_line":"authentication. That is, they can work just fine in contexts without"},{"line_number":29,"context_line":"a keystone token or without authentication of any sort."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Ironic/Bifrost is specifically a usecase here, as standalone Ironic"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f287b81_69c85021","line":28,"updated":"2017-09-07 11:31:39.000000000","message":"I\u0027m still wondering about cases where you do in fact need to be authenticated in order to reach e.g. /v2.1, so giving the adapter an endpoint_override value of \u0027http://example.com/compute/v2.1/\u0027 without an authenticated session doesn\u0027t work. Is this not a problem in practice?","commit_id":"46286b1cf9e647d69e639873a27c63c2f7ba10ad"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"8c243219c0486f9f8fb9113323e9d7bbec121aee","unresolved":false,"context_lines":[{"line_number":25,"context_line":"it will fail because the none plugin doesn\u0027t have those methods."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"There is, however, nothing about those methods that necessarily needs"},{"line_number":28,"context_line":"authentication. That is, they can work just fine in contexts without"},{"line_number":29,"context_line":"a keystone token or without authentication of any sort."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Ironic/Bifrost is specifically a usecase here, as standalone Ironic"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7f287b81_387f30e1","line":28,"in_reply_to":"7f287b81_69c85021","updated":"2017-09-07 14:09:12.000000000","message":"I do not think so - because you\u0027re not going to be attempting to use the NoAuth auth plugin to talk to nova, since nova doesn\u0027t support that.","commit_id":"46286b1cf9e647d69e639873a27c63c2f7ba10ad"}],"keystoneauth1/plugin.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"adce6d87b7bc82d777e11c46a57cb10baa0fd88d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        self._discovery_cache \u003d {}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def get_token(self, session, **kwargs):"},{"line_number":36,"context_line":"        \"\"\"Obtain a token."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_9091989c","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":34},"updated":"2017-09-05 19:31:30.000000000","message":"ew ew.  This means the cache model in BaseIdentityPlugin is broken.","commit_id":"c6c285dd589b8966ffc936936ad4ab29ae1f0af5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"adce6d87b7bc82d777e11c46a57cb10baa0fd88d","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        :return: Valid EndpointData or None if not available."},{"line_number":119,"context_line":"        :rtype: `keystoneauth1.discover.EndpointData` or None"},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        # Pull these from kwargs so that we don\u0027t accidentally introduce"},{"line_number":122,"context_line":"        # positional argument incompatibility with subclasses."},{"line_number":123,"context_line":"        endpoint_override \u003d kwargs.get(\u0027endpoint_override\u0027)"},{"line_number":124,"context_line":"        discover_versions \u003d kwargs.get(\u0027discover_versions\u0027, True)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        if not endpoint_override:"},{"line_number":127,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_903518dd","line":124,"range":{"start_line":121,"start_character":0,"end_line":124,"end_character":65},"updated":"2017-09-05 19:31:30.000000000","message":"Is that really a thing?  If so, remove \u0027em from the docstring, and take out the bit about kwargs being ignored.","commit_id":"c6c285dd589b8966ffc936936ad4ab29ae1f0af5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"adce6d87b7bc82d777e11c46a57cb10baa0fd88d","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param session: A session object that can be used for communication."},{"line_number":141,"context_line":"        :type session: keystoneauth1.session.Session"},{"line_number":142,"context_line":"        :param str endpoint_override: URL to use for version discovery."},{"line_number":143,"context_line":"        :param bool discover_versions: Whether to get version metadata from"},{"line_number":144,"context_line":"                                       the version discovery document even"},{"line_number":145,"context_line":"                                       if it major api version info can be"},{"line_number":146,"context_line":"                                       inferred from the url."},{"line_number":147,"context_line":"                                       (optional, defaults to True)"},{"line_number":148,"context_line":"        :param kwargs: Ignored."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        :raises keystoneauth1.exceptions.http.HttpError: An error from an"},{"line_number":151,"context_line":"                                                         invalid HTTP response."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_f059fc34","line":148,"range":{"start_line":142,"start_character":0,"end_line":148,"end_character":31},"updated":"2017-09-05 19:31:30.000000000","message":"ditto","commit_id":"c6c285dd589b8966ffc936936ad4ab29ae1f0af5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9db9a0ae1b45be692afed29f7445f86851da587a","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        :rtype: `keystoneauth1.discover.EndpointData` or None"},{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        endpoint_data \u003d self.get_endpoint_data("},{"line_number":150,"context_line":"            session, discover_versions\u003dFalse, **kwargs)"},{"line_number":151,"context_line":"        return endpoint_data.api_version"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def get_endpoint(self, session, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_9fa19249","line":150,"range":{"start_line":150,"start_character":46,"end_line":150,"end_character":54},"updated":"2017-09-06 15:07:38.000000000","message":"endpoint_override should be explicitly included here.\n\n...which implies a missing test case :)","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9db9a0ae1b45be692afed29f7445f86851da587a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                  service or None if not available."},{"line_number":171,"context_line":"        :rtype: string"},{"line_number":172,"context_line":"        \"\"\""},{"line_number":173,"context_line":"        endpoint_data \u003d self.get_endpoint_data(session, **kwargs)"},{"line_number":174,"context_line":"        if not endpoint_data:"},{"line_number":175,"context_line":"            return None"},{"line_number":176,"context_line":"        return endpoint_data.url"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_33c5353d","line":173,"range":{"start_line":173,"start_character":56,"end_line":173,"end_character":64},"updated":"2017-09-06 15:07:38.000000000","message":"Shouldn\u0027t we override discover_versions\u003dFalse here?  We don\u0027t need to run discovery if we got a (versioned) endpoint_override, right?","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"}],"keystoneauth1/tests/unit/test_discovery.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"8f2613c98b9b47343932f6a0df9493d693478a60","unresolved":false,"context_lines":[{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        self.assertEqual(data.api_version, (3, 0))"},{"line_number":596,"context_line":"        self.assertEqual(data.url, V3_URL)"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def test_data_for_url(self):"},{"line_number":599,"context_line":"        mock \u003d self.requests_mock.get(V3_URL,"},{"line_number":600,"context_line":"                                      status_code\u003d200,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_73cf3d7f","line":597,"updated":"2017-09-06 15:01:44.000000000","message":"Not seeing the get_api_major_version use case you gave in the commit message","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9db9a0ae1b45be692afed29f7445f86851da587a","unresolved":false,"context_lines":[{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        self.assertEqual(data.api_version, (3, 0))"},{"line_number":596,"context_line":"        self.assertEqual(data.url, V3_URL)"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"    def test_data_for_url(self):"},{"line_number":599,"context_line":"        mock \u003d self.requests_mock.get(V3_URL,"},{"line_number":600,"context_line":"                                      status_code\u003d200,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_b3ffe565","line":597,"in_reply_to":"7f287b81_73cf3d7f","updated":"2017-09-06 15:07:38.000000000","message":"Agree - see other comment","commit_id":"ddbfaa54b3b7103a807d7a3a55e57220eadd9d8c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fb779e98f3682e1747a6368eff4f1e4661717fc9","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        plugin \u003d noauth.NoAuth()"},{"line_number":566,"context_line":"        data \u003d plugin.get_endpoint_data(self.session, endpoint_override\u003dV3_URL)"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        self.assertEqual(data.api_version, (3, 0))"},{"line_number":569,"context_line":"        self.assertEqual(data.url, V3_URL)"},{"line_number":570,"context_line":"        self.assertEqual("},{"line_number":571,"context_line":"            plugin.get_api_major_version("},{"line_number":572,"context_line":"                self.session, endpoint_override\u003dV3_URL),"},{"line_number":573,"context_line":"            (3, 0))"},{"line_number":574,"context_line":"        self.assertEqual("},{"line_number":575,"context_line":"            plugin.get_endpoint(self.session, endpoint_override\u003dV3_URL),"},{"line_number":576,"context_line":"            V3_URL)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        self.assertTrue(mock.called_once)"},{"line_number":579,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_c5d299d1","line":576,"range":{"start_line":568,"start_character":0,"end_line":576,"end_character":19},"updated":"2017-09-06 21:19:46.000000000","message":"ugh, didn\u0027t notice this before - assertEqual params should be (expected, actual) cause that\u0027s how they\u0027re reported when they fail.\n\nNot a show-stopper.","commit_id":"46286b1cf9e647d69e639873a27c63c2f7ba10ad"}],"keystoneauth1/token_endpoint.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"adce6d87b7bc82d777e11c46a57cb10baa0fd88d","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        :param session: A session object that can be used for communication."},{"line_number":37,"context_line":"        :type session: keystoneauth1.session.Session"},{"line_number":38,"context_line":"        :param bool discover_versions: Whether to get version metadata from"},{"line_number":39,"context_line":"                                       the version discovery document even"},{"line_number":40,"context_line":"                                       if it major api version info can be"},{"line_number":41,"context_line":"                                       inferred from the url."},{"line_number":42,"context_line":"                                       (optional, defaults to True)"},{"line_number":43,"context_line":"        :param kwargs: Ignored."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        :raises keystoneauth1.exceptions.http.HttpError: An error from an"},{"line_number":46,"context_line":"                                                         invalid HTTP response."}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_303ae497","line":43,"range":{"start_line":38,"start_character":0,"end_line":43,"end_character":31},"updated":"2017-09-05 19:31:30.000000000","message":"docstring again doesn\u0027t agree nicely with param list","commit_id":"c6c285dd589b8966ffc936936ad4ab29ae1f0af5"}]}
