)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"969e16a6d1902fa982d8270d080d97a20cbe683a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The docstring for find_resource says that kwargs are passed to"},{"line_number":10,"context_line":".find(), but these were also being passed to .get(). .get()"},{"line_number":11,"context_line":"is called using the resource by ID so it doesn\u0027t alwyas make"},{"line_number":12,"context_line":"sense to pass query args to it. Callers need to be able to"},{"line_number":13,"context_line":"pass query params that don\u0027t get passed to get()."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_4879aac7","line":11,"range":{"start_line":11,"start_character":49,"end_line":11,"end_character":55},"updated":"2016-02-29 17:47:16.000000000","message":"always","commit_id":"5f600e7fe1cf548b9ce1c6949df2d0920d3c1e95"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"f15ba368413c778daf4662283d84a1e0b93f8116","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The docstring for find_resource says that kwargs are passed to"},{"line_number":10,"context_line":".find(), but these were also being passed to .get(). .get()"},{"line_number":11,"context_line":"is called using the resource by ID so it doesn\u0027t alwyas make"},{"line_number":12,"context_line":"sense to pass query args to it. Callers need to be able to"},{"line_number":13,"context_line":"pass query params that don\u0027t get passed to get()."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9aed3d3a_e9c236e8","line":11,"range":{"start_line":11,"start_character":49,"end_line":11,"end_character":55},"in_reply_to":"9aed3d3a_4879aac7","updated":"2016-02-29 21:42:13.000000000","message":"Done","commit_id":"5f600e7fe1cf548b9ce1c6949df2d0920d3c1e95"}],"openstackclient/common/utils.py":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"1481d6032b1358b8528ff2ac4c7173707e88b469","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    :param manager: A client manager class"},{"line_number":33,"context_line":"    :param name_or_id: The resource we are trying to find"},{"line_number":34,"context_line":"    :param get_kwargs: to be used in calling .get()"},{"line_number":35,"context_line":"    :param kwargs: To be used in calling .find() and .get()"},{"line_number":36,"context_line":"    :rtype: The found resource"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This method will attempt to find a resource in a variety of ways."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_cf16a954","line":35,"updated":"2016-03-02 16:13:28.000000000","message":"I think these are backwards?  get_kwargs appears to always be used, kwargs is only used in .find()\n\nAlso, is there a better name?  This seems to be leaking implementation knowledge to the caller...","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"e53f748ca2d6e2f9310f059639a0c077d0b658b2","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    :param manager: A client manager class"},{"line_number":33,"context_line":"    :param name_or_id: The resource we are trying to find"},{"line_number":34,"context_line":"    :param get_kwargs: to be used in calling .get()"},{"line_number":35,"context_line":"    :param kwargs: To be used in calling .find() and .get()"},{"line_number":36,"context_line":"    :rtype: The found resource"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This method will attempt to find a resource in a variety of ways."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_a5ca4b6c","line":35,"in_reply_to":"7af24918_5ad41646","updated":"2016-03-02 19:55:04.000000000","message":"I understand the bug, and that is fine.  the \u0027get\u0027 name makes sense to you because you know what it is doing.  We rarely use/know the HTTP method used in any of our API calls, that\u0027s the leaky part.  We can leave the name, it\u0027s just not really how the arg is used from the \u0027callers\u0027 point of view.\n\nAnd get_kwargs are included in the .find() call since they are combined into kwargs.  Again, from the caller\u0027s POV they are still present and used:\n\n* first .get() uses get_kwargs, returns if success\n* second .get() uses get_kwargs, returns if success\n* get_kwargs is merged into kwargs\n* third .get() effectively uses get_kwargs + kwargs, returns if success\n* first .find() effectively uses get_kwargs + kwargs","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"f837008fb82497c37bec712af14fd47d4b9627be","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    :param manager: A client manager class"},{"line_number":33,"context_line":"    :param name_or_id: The resource we are trying to find"},{"line_number":34,"context_line":"    :param get_kwargs: to be used in calling .get()"},{"line_number":35,"context_line":"    :param kwargs: To be used in calling .find() and .get()"},{"line_number":36,"context_line":"    :rtype: The found resource"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This method will attempt to find a resource in a variety of ways."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_4e0f2388","line":35,"in_reply_to":"7af24918_a5ca4b6c","updated":"2016-03-02 21:55:55.000000000","message":"I agree brant, they are backwards. We need to have some understanding of the managers.get() signature otherwise we won\u0027t be passing the right information. I guess i am confused on what you mean by leaky. so i am going to try my best to respond\n  \nSECURITY LEAKING\n\nI don\u0027t think this is leaking the information about our HTTP method used, if someone want to find out the code  can\u0027t they just download the clients from pypi?  \n\nHARD TO DEVELOP LEAKY\n\nits hard to develop with find_resource() if you have to know the arguments that need to be passed to the managers.get()   Thinking about this further the only other way to do this is to change every manager.get() to accept **kwargs.\n\nbtw i am sorry for the bad formatting.  I don\u0027t know how to get it to wrap text on the first line or why there are different fonts. lol","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9eb30e24588c30c23de017b8ccf098b31932cf5c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    :param manager: A client manager class"},{"line_number":33,"context_line":"    :param name_or_id: The resource we are trying to find"},{"line_number":34,"context_line":"    :param get_kwargs: to be used in calling .get()"},{"line_number":35,"context_line":"    :param kwargs: To be used in calling .find() and .get()"},{"line_number":36,"context_line":"    :rtype: The found resource"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This method will attempt to find a resource in a variety of ways."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_e88f0aca","line":35,"in_reply_to":"7af24918_a5ca4b6c","updated":"2016-03-02 20:17:32.000000000","message":"I think Dean is right here, the docs should say that get_kwargs is passed to get() and find(), and kwargs is passed to find() only.\n\nget_kwargs isn\u0027t about the HTTP method used, it\u0027s the method that\u0027s called on the manager.","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"2904e2dad07bc8d30fe3ee10c9682415d89ae21a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    :param manager: A client manager class"},{"line_number":33,"context_line":"    :param name_or_id: The resource we are trying to find"},{"line_number":34,"context_line":"    :param get_kwargs: to be used in calling .get()"},{"line_number":35,"context_line":"    :param kwargs: To be used in calling .find() and .get()"},{"line_number":36,"context_line":"    :rtype: The found resource"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This method will attempt to find a resource in a variety of ways."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_5ad41646","line":35,"in_reply_to":"7af24918_cf16a954","updated":"2016-03-02 16:52:14.000000000","message":"The get_kwargs are only used when calling .get(), then on line 77 the are combined with the kwargs to simulate the original functionality.  there is no where that .find() is called with get_kwargs.\n\n\nAlso the name makes sense because they are the correct kwargs that are being passed to the managers get(). I think the name makes sense to me.  Do you have any suggestions? \n\n\nYou don\u0027t realize this is working incorrectly because everything is caught in the excepts, but each managers get() is different.  for example lets take keystone\n\n\nopenstack user show user_id --domain domain_id\n\n- this will not work since in the **kwargs the domain_id is specified, but in keystoneclient\u0027s UserManager.get(user_id) [0] there is no where to accept the kwargs.  Which means there are to many arguments passed to the getter and a TypeError occurs. \n\n\nopenstack project show project_id --domain_id\n\n\n- but if we look at the manager get() it takes specific kwargs.. but not the domain_id so when this is called the domain_id is passed into with the kwargs which will cause a TypeError when it gets to the .get() since it is not expecting the domain_id to be passed, but is expecting many other keyword arguments. [1]\n\n[0] https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v3/users.py#L112\n\n[1] https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v3/projects.py#L124","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"9eb30e24588c30c23de017b8ccf098b31932cf5c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Try to get entity with all keyword arguments"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_830aa71f","line":79,"updated":"2016-03-02 20:17:32.000000000","message":"Comments should say why the code is here.\n\nWhy is this being done?","commit_id":"6000108516df14bfa79682089ae31ba5e86d5319"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7a70453af97546d89cf6ce3b5cda14a91a61d774","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Some projects are reliant on passing the kwargs to .get()"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af24918_31bcbadb","line":79,"updated":"2016-03-02 21:56:40.000000000","message":"those projects should pass get_kwargs rather than kwargs.","commit_id":"9e8107589d736068ab514246c1759a523f509ab0"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"44c856237fbf359ed37841bbe59919a9c75603cc","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Some projects are reliant on passing the kwargs to .get()"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af24918_d1e0f698","line":79,"in_reply_to":"7af24918_11bd3eb7","updated":"2016-03-02 22:01:54.000000000","message":"yes.","commit_id":"9e8107589d736068ab514246c1759a523f509ab0"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"0376fdabe9e24be2de6b04eefce8f011489457ef","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Some projects are reliant on passing the kwargs to .get()"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af24918_11bd3eb7","line":79,"in_reply_to":"7af24918_31bcbadb","updated":"2016-03-02 21:57:56.000000000","message":"Should i update those projects find_resource calls in this patch?","commit_id":"9e8107589d736068ab514246c1759a523f509ab0"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"defd7cf6f07041384e16d7a8000be64b196573c8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Some projects are reliant on passing the kwargs to .get()"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"5aef4532_8fca18a0","line":79,"in_reply_to":"7af24918_b1044a4a","updated":"2016-03-07 22:00:28.000000000","message":"now that codesearch is back online .... After looking through all the managers that are used in the openstackclient keystone is the only project passing kwargs for their manager.get().  This can be removed.","commit_id":"9e8107589d736068ab514246c1759a523f509ab0"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"a8491f65a7f50a65c2633e54eb5d6b42952ce834","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    # Add get_kwargs to kwargs for calling find"},{"line_number":77,"context_line":"    kwargs.update(get_kwargs)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # Some projects are reliant on passing the kwargs to .get()"},{"line_number":80,"context_line":"    try:"},{"line_number":81,"context_line":"        return manager.get(name_or_id, **kwargs)"},{"line_number":82,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af24918_b1044a4a","line":79,"in_reply_to":"7af24918_d1e0f698","updated":"2016-03-02 22:02:28.000000000","message":"will do!","commit_id":"9e8107589d736068ab514246c1759a523f509ab0"}]}
