)]}'
{"barbicanclient/client.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"dcd53e65bd42455b7fd18b9b846ee2b8b9e7b3ab","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        return message"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def Client(version\u003dNone, session\u003dNone, *args, **kwargs):"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        Barbican client used to interact with barbican service."},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_ac9373f9","line":120,"range":{"start_line":120,"start_character":11,"end_line":120,"end_character":23},"updated":"2016-11-30 19:25:07.000000000","message":"I hope no one was depending on session being the first arg. I think Castellan and neutron-lbaas are safe because they pass in everything with the keyword, but I\u0027m not sure who else was using this? Perhaps it would be better to pass it in as a kwarg? Either way, version needs the param documentation below.\n\nThis probably needs some unit tests, too.","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"4828bce40c76030f7bbcb46c688898fccd3dcaf6","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        return message"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def Client(version\u003dNone, session\u003dNone, *args, **kwargs):"},{"line_number":121,"context_line":"        \"\"\""},{"line_number":122,"context_line":"        Barbican client used to interact with barbican service."},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_df11255f","line":120,"range":{"start_line":120,"start_character":11,"end_line":120,"end_character":23},"in_reply_to":"5a74a57a_ac9373f9","updated":"2016-12-01 02:26:15.000000000","message":"I will put session in kwargs. Thanks.","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"dcd53e65bd42455b7fd18b9b846ee2b8b9e7b3ab","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.strip_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            if v is not None:"},{"line_number":170,"context_line":"                version \u003d v"},{"line_number":171,"context_line":"        if version is not None and str(version).startswith(\u0027v\u0027):"},{"line_number":172,"context_line":"            version \u003d str(version).split(\u0027v\u0027)[1]"},{"line_number":173,"context_line":"        if not version:"},{"line_number":174,"context_line":"            version \u003d _DEFAULT_API_VERSION_INT"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_f27386b2","line":172,"range":{"start_line":169,"start_character":0,"end_line":172,"end_character":48},"updated":"2016-11-30 19:25:07.000000000","message":"What do you think about extracting this logic up into the strip_version utility?  If you passed in http://localhost:9311/v1.0 it could return a string and an int (\u0027http://localhost:9311\u0027, 1)","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"4828bce40c76030f7bbcb46c688898fccd3dcaf6","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.strip_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            if v is not None:"},{"line_number":170,"context_line":"                version \u003d v"},{"line_number":171,"context_line":"        if version is not None and str(version).startswith(\u0027v\u0027):"},{"line_number":172,"context_line":"            version \u003d str(version).split(\u0027v\u0027)[1]"},{"line_number":173,"context_line":"        if not version:"},{"line_number":174,"context_line":"            version \u003d _DEFAULT_API_VERSION_INT"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_3f90594e","line":172,"range":{"start_line":169,"start_character":0,"end_line":172,"end_character":48},"in_reply_to":"5a74a57a_f27386b2","updated":"2016-12-01 02:26:15.000000000","message":"Yes, that would make this func much simpler.","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ac3b44665ee925e003f80088e301515379fccdea","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_DEFAULT_SERVICE_INTERFACE \u003d \u0027public\u0027"},{"line_number":31,"context_line":"_DEFAULT_API_VERSION \u003d \u0027v1\u0027"},{"line_number":32,"context_line":"_DEFAULT_API_VERSION_INT \u003d 1"},{"line_number":33,"context_line":"_SUPPORTED_API_VERSION_MAP \u003d {\u00271\u0027: \u0027barbicanclient.v1.client.Client\u0027}"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class _HTTPClient(adapter.Adapter):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_aa294539","line":33,"updated":"2016-12-15 07:28:20.000000000","message":"why not just include the \u0027v\u0027 prepended to the version number? That way you don\u0027t need to introduce yet another constant for the default API version.","commit_id":"3ee7433aafac2fe3c068a87d28f26e62e4322c8e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ac3b44665ee925e003f80088e301515379fccdea","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\""},{"line_number":157,"context_line":"        LOG.debug(\"Creating Client object\")"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        session \u003d kwargs.pop(\u0027session\u0027, None)"},{"line_number":160,"context_line":"        if not session:"},{"line_number":161,"context_line":"            session \u003d ks_session.Session(verify\u003dkwargs.pop(\u0027verify\u0027, True))"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_4a65111c","line":159,"updated":"2016-12-15 07:28:20.000000000","message":"why not just declare the session as a parameter like it was before?","commit_id":"3ee7433aafac2fe3c068a87d28f26e62e4322c8e"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ac3b44665ee925e003f80088e301515379fccdea","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            version \u003d _DEFAULT_API_VERSION_INT"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            client_path \u003d _SUPPORTED_API_VERSION_MAP[str(version)]"},{"line_number":183,"context_line":"            client_class \u003d importutils.import_class(client_path)"},{"line_number":184,"context_line":"            return client_class(session\u003dsession, *args, **kwargs)"},{"line_number":185,"context_line":"        except (KeyError, ValueError):"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_0a6b1986","line":182,"updated":"2016-12-15 07:28:20.000000000","message":"why not just always use strings, instead of having to cast?","commit_id":"3ee7433aafac2fe3c068a87d28f26e62e4322c8e"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e49222f985a7b8e34d3054b195a96876054a092c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        LOG.debug(\"Creating Client object\")"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        session \u003d kwargs.pop(\u0027session\u0027, None)"},{"line_number":157,"context_line":"        if not session:"},{"line_number":158,"context_line":"            session \u003d ks_session.Session(verify\u003dkwargs.pop(\u0027verify\u0027, True))"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"3f044301_e8a6e353","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":45},"updated":"2017-05-05 17:40:29.000000000","message":"Juan had a comment here on patchset 11:\n\nwhy not just declare the session as a parameter like it was before?","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"af2a3a0784e4a921493022b41e3a6d0303c83aab","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\""},{"line_number":154,"context_line":"        LOG.debug(\"Creating Client object\")"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        session \u003d kwargs.pop(\u0027session\u0027, None)"},{"line_number":157,"context_line":"        if not session:"},{"line_number":158,"context_line":"            session \u003d ks_session.Session(verify\u003dkwargs.pop(\u0027verify\u0027, True))"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1f013ff3_20428411","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":45},"in_reply_to":"3f044301_e8a6e353","updated":"2017-05-17 09:25:18.000000000","message":"Just want to put auth information into kwargs, will restore the definition in next patch.","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"a8311ed64a3792f25b429ec9c28c09bb0a6c0cfc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        super(_HTTPClient, self).__init__(session, **kwargs)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        if endpoint:"},{"line_number":45,"context_line":"            self.endpoint_override \u003d \u0027{0}/{1}\u0027.format(endpoint, self.version)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        if project_id is None:"},{"line_number":48,"context_line":"            self._default_headers \u003d dict()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_56690523","line":45,"updated":"2017-05-18 13:28:43.000000000","message":"This line is strange: it\u0027s using version to create an endpoint_override, but then I don\u0027t see where endpoint_override is used in the code?  I see plenty of unit tests for it.  Perhaps this is out of the scope of this merge request...","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"2e1e0bcc7b28cec847392ecfb1e0640982059d7d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        super(_HTTPClient, self).__init__(session, **kwargs)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        if endpoint:"},{"line_number":45,"context_line":"            self.endpoint_override \u003d \u0027{0}/{1}\u0027.format(endpoint, self.version)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        if project_id is None:"},{"line_number":48,"context_line":"            self._default_headers \u003d dict()"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_31457bb4","line":45,"in_reply_to":"ff0f0b1f_56690523","updated":"2017-05-18 13:34:45.000000000","message":"This is used by the adapter which comes from keystoneauth1 code.","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"a8311ed64a3792f25b429ec9c28c09bb0a6c0cfc","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.split_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            # prefer to get version from endpoint if it contains version info"},{"line_number":170,"context_line":"            if v is not None:"},{"line_number":171,"context_line":"                version \u003d v"},{"line_number":172,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_d1a4ff0a","line":169,"range":{"start_line":169,"start_character":11,"end_line":169,"end_character":77},"updated":"2017-05-18 13:28:43.000000000","message":"If the version that\u0027s provided as an arg is preferred over the version retrieved from the endpoint, that seems closer to the old behavior.  What do you think?","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"a03ebd3a5e75ce82b99b64307eb3ceaed943be1f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.split_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            # prefer to get version from endpoint if it contains version info"},{"line_number":170,"context_line":"            if v is not None:"},{"line_number":171,"context_line":"                version \u003d v"},{"line_number":172,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_bd67674d","line":169,"range":{"start_line":169,"start_character":11,"end_line":169,"end_character":77},"in_reply_to":"ff0f0b1f_0c2edc42","updated":"2017-06-02 19:41:17.000000000","message":"I think giving precedence to the \"version\" kwarg over the value split from the URL is more intuitive.  As a user looking at the parameter options for the first time, it\u0027s more obvious that specifying the \"version\" parameter will change the version rather than specifying the version at the end of the URL.\n\nAlso, it looks like python-novaclient [1] and python-cinderclient [2] use the version passed in from the args, and don\u0027t try to parse a URL, and it would be nice to be close in behavior to the other services.\n\n1. https://github.com/openstack/python-novaclient/blob/master/novaclient/client.py#L331\n\n2. https://github.com/openstack/python-cinderclient/blob/master/cinderclient/client.py#L776\n\nRegardless, I think the case where the user specifies both a version in the endpoint and a version in the version arg, but they are different values, should result in an error.","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"8217451961152e6c2bdd83e1659a84b1d948f3e3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.split_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            # prefer to get version from endpoint if it contains version info"},{"line_number":170,"context_line":"            if v is not None:"},{"line_number":171,"context_line":"                version \u003d v"},{"line_number":172,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":25,"id":"df140735_4b1781a5","line":169,"range":{"start_line":169,"start_character":11,"end_line":169,"end_character":77},"in_reply_to":"ff0f0b1f_bd67674d","updated":"2017-06-05 04:46:55.000000000","message":"OK, so we do not process version or endpoint?","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"c3678f9aa338f8956ece1fcbff0413481f68bbf7","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                                 \u0027auth in the Keystone Session\u0027)"},{"line_number":167,"context_line":"        if kwargs.get(\u0027endpoint\u0027) is not None:"},{"line_number":168,"context_line":"            endpoint, v \u003d utils.split_version(kwargs.get(\u0027endpoint\u0027))"},{"line_number":169,"context_line":"            # prefer to get version from endpoint if it contains version info"},{"line_number":170,"context_line":"            if v is not None:"},{"line_number":171,"context_line":"                version \u003d v"},{"line_number":172,"context_line":"        if not version:"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_0c2edc42","line":169,"range":{"start_line":169,"start_character":11,"end_line":169,"end_character":77},"in_reply_to":"ff0f0b1f_d1a4ff0a","updated":"2017-05-18 14:00:36.000000000","message":"It\u0027s hard to decide which is better...","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"}],"barbicanclient/common/utils.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"dcd53e65bd42455b7fd18b9b846ee2b8b9e7b3ab","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return importutils.import_module(module)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def strip_version(endpoint):"},{"line_number":31,"context_line":"    \"\"\"Strip version from the last component of endpoint if present.\"\"\""},{"line_number":32,"context_line":"    if not isinstance(endpoint, six.string_types):"},{"line_number":33,"context_line":"        raise ValueError(\"Expected endpoint\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_57234ca7","line":30,"updated":"2016-11-30 19:25:07.000000000","message":"Can you please call this something like \"split_version\"?  Strip_version indicates to me that *only* the endpoint without the version will be returned.\n\nAlso, can you please write unit tests for this?  Sorry if I overlooked them.","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"4828bce40c76030f7bbcb46c688898fccd3dcaf6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return importutils.import_module(module)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"def strip_version(endpoint):"},{"line_number":31,"context_line":"    \"\"\"Strip version from the last component of endpoint if present.\"\"\""},{"line_number":32,"context_line":"    if not isinstance(endpoint, six.string_types):"},{"line_number":33,"context_line":"        raise ValueError(\"Expected endpoint\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_fa0b4f22","line":30,"in_reply_to":"5a74a57a_57234ca7","updated":"2016-12-01 02:26:15.000000000","message":"Do we really need unit tests for this func?","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"ac3b44665ee925e003f80088e301515379fccdea","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    endpoint \u003d endpoint.rstrip(\u0027/\u0027)"},{"line_number":29,"context_line":"    url_parts \u003d urlparse.urlparse(endpoint)"},{"line_number":30,"context_line":"    (scheme, netloc, path, __, __, __) \u003d url_parts"},{"line_number":31,"context_line":"    path \u003d path.lstrip(\u0027/\u0027)"},{"line_number":32,"context_line":"    # regex to match \u0027v1\u0027 or \u0027v2.0\u0027 etc"},{"line_number":33,"context_line":"    if re.match(\u0027v\\d+\\.?\\d*\u0027, path):"},{"line_number":34,"context_line":"        version \u003d float(path.lstrip(\u0027v\u0027))"},{"line_number":35,"context_line":"        if int(version) \u003d\u003d version:"},{"line_number":36,"context_line":"            version \u003d int(version)"},{"line_number":37,"context_line":"        endpoint \u003d scheme + \u0027://\u0027 + netloc"},{"line_number":38,"context_line":"    return endpoint, version"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a6eadb0_ea889dc7","line":37,"range":{"start_line":31,"start_character":0,"end_line":37,"end_character":42},"updated":"2016-12-15 07:28:20.000000000","message":"as an extra step before this, you need to get the last section of the path. There are cases where deployers want to use barbican on a standard port (say, port 80), however, the docroot is different.\n\nSo in this case the URL would be\n\nhttp://openstack.mycloud.com/barbican/v1\n\nand it won\u0027t work for this.","commit_id":"3ee7433aafac2fe3c068a87d28f26e62e4322c8e"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e49222f985a7b8e34d3054b195a96876054a092c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def split_version(endpoint):"},{"line_number":22,"context_line":"    \"\"\"Split version from the last component of endpoint if present.\"\"\""},{"line_number":23,"context_line":"    if not isinstance(endpoint, six.string_types):"},{"line_number":24,"context_line":"        raise ValueError(\"Expected endpoint\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f044301_28204bb0","line":21,"updated":"2017-05-05 17:40:29.000000000","message":"Can you please add a few unit tests for this?\n\nAt least one for the usual \"https://localhost:9311/v1\" and \"http://openstack.mycloud.com/barbican/v1\" each and for some with trailing \u0027/\u0027","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"af2a3a0784e4a921493022b41e3a6d0303c83aab","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import six.moves.urllib.parse as urlparse"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def split_version(endpoint):"},{"line_number":22,"context_line":"    \"\"\"Split version from the last component of endpoint if present.\"\"\""},{"line_number":23,"context_line":"    if not isinstance(endpoint, six.string_types):"},{"line_number":24,"context_line":"        raise ValueError(\"Expected endpoint\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"1f013ff3_205ba4f7","line":21,"in_reply_to":"3f044301_28204bb0","updated":"2017-05-17 09:25:18.000000000","message":"Done","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"}],"barbicanclient/tests/test_barbican.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"dcd53e65bd42455b7fd18b9b846ee2b8b9e7b3ab","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":179,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":180,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":181,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":182,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":183,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":184,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_972084b2","line":181,"range":{"start_line":181,"start_character":35,"end_line":181,"end_character":58},"updated":"2016-11-30 19:25:07.000000000","message":"Hmm this is a weird test.  We probably need to think more carefully about what we want this behavior to be.  Should it try to set the version to be v2 if the user specifies it on the command line?","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"4828bce40c76030f7bbcb46c688898fccd3dcaf6","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":179,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":180,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":181,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":182,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":183,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":184,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_7ab9ff14","line":181,"range":{"start_line":181,"start_character":35,"end_line":181,"end_character":58},"in_reply_to":"5a74a57a_972084b2","updated":"2016-12-01 02:26:15.000000000","message":"If we want to refactor barbicanclient in this way, we should not create a client instance successfully if a non-existed version is specified. WDYT?","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"a8311ed64a3792f25b429ec9c28c09bb0a6c0cfc","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":178,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":179,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":180,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":181,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":182,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":183,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_138f1fcd","line":180,"range":{"start_line":180,"start_character":33,"end_line":180,"end_character":59},"updated":"2017-05-18 13:28:43.000000000","message":"This is kind of a weird test -- I feel like this flag should still have an effect and cause an error if the version is unsupported.\n\nFor my own reference:\n\nSo it looks like the command line arg parser still looks for a barbican-api-version:\nhttps://github.com/openstack/python-barbicanclient/blob/master/barbicanclient/barbican.py#L217\n\nand then passes it to the Client as kwarg \u0027version\u0027 in endpoint_filter_kwargs:\nhttps://github.com/openstack/python-barbicanclient/blob/master/barbicanclient/barbican.py#L167-L172","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"8217451961152e6c2bdd83e1659a84b1d948f3e3","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":178,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":179,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":180,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":181,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":182,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":183,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":25,"id":"df140735_cb2a71d9","line":180,"range":{"start_line":180,"start_character":33,"end_line":180,"end_character":59},"in_reply_to":"df140735_a7478d4c","updated":"2017-06-05 04:46:55.000000000","message":"Done","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"c3678f9aa338f8956ece1fcbff0413481f68bbf7","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":178,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":179,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":180,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":181,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":182,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":183,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_2c740035","line":180,"range":{"start_line":180,"start_character":33,"end_line":180,"end_character":59},"in_reply_to":"ff0f0b1f_138f1fcd","updated":"2017-05-18 14:00:36.000000000","message":"It should take effect! But since the version splitted from endpoint is preferred, barbicanclient actually use \"v1\" here.\nMaybe more tests need to be added to test against endpoint and barbican-api-version.","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":10873,"name":"Juan Antonio Osorio Robles","email":"jaosorior@redhat.com","username":"ejuaoso"},"change_message_id":"61d24c099a8b9feb236821fb3a20fcbaa183e2eb","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":178,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":179,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":180,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":181,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":182,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":183,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_8ccb0c52","line":180,"range":{"start_line":180,"start_character":33,"end_line":180,"end_character":59},"in_reply_to":"ff0f0b1f_2c740035","updated":"2017-05-18 14:02:18.000000000","message":"I think it was meant to try using v2 (even if that would fail). Just to see that that was working correctly.","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"},{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"a03ebd3a5e75ce82b99b64307eb3ceaed943be1f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                                \u0027--service-type custom-type \u0027"},{"line_number":178,"context_line":"                                \u0027--service-name Burrbican \u0027"},{"line_number":179,"context_line":"                                \u0027--region-name RegionTwo \u0027"},{"line_number":180,"context_line":"                                \u0027--barbican-api-version v2\u0027)"},{"line_number":181,"context_line":"        args \u003d auth_args + \u0027 \u0027 + endpoint_filter_args"},{"line_number":182,"context_line":"        argv, remainder \u003d self.parser.parse_known_args(args.split())"},{"line_number":183,"context_line":"        barbican_client \u003d self.barbican.create_client(argv)"}],"source_content_type":"text/x-python","patch_set":25,"id":"df140735_a7478d4c","line":180,"range":{"start_line":180,"start_character":33,"end_line":180,"end_character":59},"in_reply_to":"ff0f0b1f_8ccb0c52","updated":"2017-06-02 19:41:17.000000000","message":"Perhaps this should be changed to remove the version from the endpoint, specify barbican-api-version as v1, and check that httpclient.version is v1 ?\n\nWould also be nice to see a test that shows that specifying v1 in the endpoint and v2 in the barbican-api-version results in an error, if that is implemented","commit_id":"9a607a9c79c9e05b8bde8eec29a9fc096d05d17c"}],"barbicanclient/v1/__init__.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"dcd53e65bd42455b7fd18b9b846ee2b8b9e7b3ab","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from barbicanclient.v1.client import Client      # noqa"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_b71ae015","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":55},"updated":"2016-11-30 19:25:07.000000000","message":"Does this do anything? I do not know why this is needed, please explain it to me :)","commit_id":"c4de5b85848c21e3ce7051609690d95fc09612be"}],"functionaltests/client/test_client_connectivity.py":[{"author":{"_account_id":8623,"name":"Kaitlin Farr","email":"kaitlin.farr@jhuapl.edu","username":"kaitlin.farr"},"change_message_id":"e49222f985a7b8e34d3054b195a96876054a092c","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def test_client_can_access_server_if_no_session_specified(self):"},{"line_number":100,"context_line":"        barbicanclient \u003d client.Client("},{"line_number":101,"context_line":"            version\u003d\u0027v1\u0027,"},{"line_number":102,"context_line":"            endpoint\u003dCONF.keymanager.url,"},{"line_number":103,"context_line":"            project_id\u003dCONF.keymanager.project_id,"},{"line_number":104,"context_line":"            auth\u003dself.auth)"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f044301_a33a3c95","line":101,"range":{"start_line":101,"start_character":12,"end_line":101,"end_character":25},"updated":"2017-05-05 17:40:29.000000000","message":"Is version a required parameter now? If yes, I think that\u0027s a problem because it will break backwards compatibility.  If no, can you please add a functional test that shows specifically that the client can still access the server if no version is specified? Something like \"test_client_can_access_server_if_no_version_is_specified\" or\n\"test_client_uses_default_if_no_version_specified\"","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"},{"author":{"_account_id":21797,"name":"Jeremy Liu","display_name":"Jeremy Liu","email":"liujiong.cc@gmail.com","username":"liujiong"},"change_message_id":"af2a3a0784e4a921493022b41e3a6d0303c83aab","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def test_client_can_access_server_if_no_session_specified(self):"},{"line_number":100,"context_line":"        barbicanclient \u003d client.Client("},{"line_number":101,"context_line":"            version\u003d\u0027v1\u0027,"},{"line_number":102,"context_line":"            endpoint\u003dCONF.keymanager.url,"},{"line_number":103,"context_line":"            project_id\u003dCONF.keymanager.project_id,"},{"line_number":104,"context_line":"            auth\u003dself.auth)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1f013ff3_40c0f050","line":101,"range":{"start_line":101,"start_character":12,"end_line":101,"end_character":25},"in_reply_to":"3f044301_a33a3c95","updated":"2017-05-17 09:25:18.000000000","message":"No, version is not mandotory. If it is not specified and endpoint does not contain version info, barbicanclient will use the default api version. Testcase will be added in next patch.","commit_id":"3613ff5ac81958073b3083a14b01bc01a117079a"}]}
